diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index 3c7663a98..dd3dfcae2 100644 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -52c261b8024febdbbd77bcff16a967376320af57 \ No newline at end of file +88571b688969bc4509fb520d86d161eb20c3d662 \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index 0d4a75c86..20f0f526b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -125,6 +125,10 @@ experimental/mocks/service/workspace/mock_git_credentials_interface.go linguist- experimental/mocks/service/workspace/mock_repos_interface.go linguist-generated=true experimental/mocks/service/workspace/mock_secrets_interface.go linguist-generated=true experimental/mocks/service/workspace/mock_workspace_interface.go linguist-generated=true +service/apps/api.go linguist-generated=true +service/apps/impl.go linguist-generated=true +service/apps/interface.go linguist-generated=true +service/apps/model.go linguist-generated=true service/billing/api.go linguist-generated=true service/billing/billable_usage_usage_test.go linguist-generated=true service/billing/budgets_usage_test.go linguist-generated=true diff --git a/CHANGELOG.md b/CHANGELOG.md index a2f7ab05d..97d028ef1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,197 @@ # Version changelog +## [Release] Release v0.44.0 + +### New Features and Improvements + + * Remove deprecated `WithImpl` and `Impl` service methods ([#1003](https://github.com/databricks/databricks-sdk-go/pull/1003)). + + +### Bug Fixes + + * Allowed filtering for graviton DBRs in `ClusterAPI.SelectSparkVersion` ([#1004](https://github.com/databricks/databricks-sdk-go/pull/1004)). + * Avoid loading the response bodies twice in memory when parsing `bytes.Buffer` ([#984](https://github.com/databricks/databricks-sdk-go/pull/984)). + * Bump google.golang.org/grpc from 1.64.0 to 1.64.1 ([#974](https://github.com/databricks/databricks-sdk-go/pull/974)). + * Fix default-auth example when less than 10 clusters ([#1012](https://github.com/databricks/databricks-sdk-go/pull/1012)). + * Infer Azure tenant ID if not set ([#910](https://github.com/databricks/databricks-sdk-go/pull/910)). + + +### Internal Changes + + * Add comment to validate workflow ([#987](https://github.com/databricks/databricks-sdk-go/pull/987)). + * Add error mapping for GetRun ([#1006](https://github.com/databricks/databricks-sdk-go/pull/1006)). + * Add missing Package to Entity ([#995](https://github.com/databricks/databricks-sdk-go/pull/995)). + * Add prefix to Dependabot commit messages ([#976](https://github.com/databricks/databricks-sdk-go/pull/976)). + * Configure Dependabot for security updates only ([#988](https://github.com/databricks/databricks-sdk-go/pull/988)). + * Enable mixins via struct embedding ([#1000](https://github.com/databricks/databricks-sdk-go/pull/1000)). + * Fix GetWorkspaceClient test & GCP SQL Warehouse Creation test ([#1010](https://github.com/databricks/databricks-sdk-go/pull/1010)). + * Fix integration tests ([#1008](https://github.com/databricks/databricks-sdk-go/pull/1008)). + * Fix processing of `quoted` titles ([#989](https://github.com/databricks/databricks-sdk-go/pull/989)). + * Generate SDK from Open API ([#997](https://github.com/databricks/databricks-sdk-go/pull/997)). + * Log a warning when declaring inline entities ([#994](https://github.com/databricks/databricks-sdk-go/pull/994)). + * Move PR message validation to a separate workflow ([#983](https://github.com/databricks/databricks-sdk-go/pull/983)). + * Pin jobs APIs to 2.1 in SDKs ([#993](https://github.com/databricks/databricks-sdk-go/pull/993)). + * Prefix all extension files with `ext_` ([#1001](https://github.com/databricks/databricks-sdk-go/pull/1001)). + * Trigger the `validate` workflow in the merge queue ([#986](https://github.com/databricks/databricks-sdk-go/pull/986)). + * Update OpenAPI spec ([#991](https://github.com/databricks/databricks-sdk-go/pull/991)). + * Use HTTP status text as message if the error response body is empty ([#990](https://github.com/databricks/databricks-sdk-go/pull/990)). + + +### API Changes: + + * Added [apps](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/apps) package. + * Added [a.UsageDashboards](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#UsageDashboardsAPI) account-level service. + * Added [w.AlertsLegacy](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#AlertsLegacyAPI) workspace-level service, [w.QueriesLegacy](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QueriesLegacyAPI) workspace-level service and [w.QueryVisualizationsLegacy](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QueryVisualizationsLegacyAPI) workspace-level service. + * Added [w.Genie](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieAPI) workspace-level service. + * Added [w.NotificationDestinations](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#NotificationDestinationsAPI) workspace-level service. + * Added `Update` method for [w.Clusters](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#ClustersAPI) workspace-level service. + * Added `ListVisualizations` method for [w.Queries](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QueriesAPI) workspace-level service. + * Added [catalog.GetBindingsSecurableType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#GetBindingsSecurableType) and [catalog.UpdateBindingsSecurableType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#UpdateBindingsSecurableType). + * Added [billing.ActionConfiguration](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#ActionConfiguration), [billing.ActionConfigurationType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#ActionConfigurationType), [billing.AlertConfiguration](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#AlertConfiguration), [billing.AlertConfigurationQuantityType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#AlertConfigurationQuantityType), [billing.AlertConfigurationTimePeriod](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#AlertConfigurationTimePeriod), [billing.AlertConfigurationTriggerType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#AlertConfigurationTriggerType), [billing.BudgetConfiguration](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#BudgetConfiguration), [billing.BudgetConfigurationFilter](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#BudgetConfigurationFilter), [billing.BudgetConfigurationFilterClause](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#BudgetConfigurationFilterClause), [billing.BudgetConfigurationFilterOperator](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#BudgetConfigurationFilterOperator), [billing.BudgetConfigurationFilterTagClause](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#BudgetConfigurationFilterTagClause), [billing.BudgetConfigurationFilterWorkspaceIdClause](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#BudgetConfigurationFilterWorkspaceIdClause), [billing.CreateBillingUsageDashboardRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#CreateBillingUsageDashboardRequest), [billing.CreateBillingUsageDashboardResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#CreateBillingUsageDashboardResponse), [billing.CreateBudgetConfigurationBudget](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#CreateBudgetConfigurationBudget), [billing.CreateBudgetConfigurationBudgetActionConfigurations](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#CreateBudgetConfigurationBudgetActionConfigurations), [billing.CreateBudgetConfigurationBudgetAlertConfigurations](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#CreateBudgetConfigurationBudgetAlertConfigurations), [billing.CreateBudgetConfigurationRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#CreateBudgetConfigurationRequest), [billing.CreateBudgetConfigurationResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#CreateBudgetConfigurationResponse), [billing.DeleteBudgetConfigurationRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#DeleteBudgetConfigurationRequest), `any`, [billing.GetBillingUsageDashboardRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#GetBillingUsageDashboardRequest), [billing.GetBillingUsageDashboardResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#GetBillingUsageDashboardResponse), [billing.GetBudgetConfigurationRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#GetBudgetConfigurationRequest), [billing.GetBudgetConfigurationResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#GetBudgetConfigurationResponse), [billing.ListBudgetConfigurationsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#ListBudgetConfigurationsRequest), [billing.ListBudgetConfigurationsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#ListBudgetConfigurationsResponse), [billing.UpdateBudgetConfigurationBudget](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#UpdateBudgetConfigurationBudget), [billing.UpdateBudgetConfigurationRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#UpdateBudgetConfigurationRequest), [billing.UpdateBudgetConfigurationResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#UpdateBudgetConfigurationResponse) and [billing.UsageDashboardType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#UsageDashboardType). + * Added [compute.GetPolicy](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#GetPolicy), [compute.ListClustersFilterBy](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#ListClustersFilterBy), [compute.ListClustersSortBy](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#ListClustersSortBy), [compute.ListClustersSortByDirection](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#ListClustersSortByDirection), [compute.ListClustersSortByField](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#ListClustersSortByField), [compute.ListOrder](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#ListOrder), [compute.ListPolicies](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#ListPolicies), [compute.ListPolicyFamilies](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#ListPolicyFamilies), [compute.PolicySortColumn](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#PolicySortColumn), [compute.UpdateCluster](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#UpdateCluster), [compute.UpdateClusterResource](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#UpdateClusterResource) and `any`. + * Added [dashboards.ExecuteMessageQueryRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#ExecuteMessageQueryRequest), [dashboards.GenieAttachment](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieAttachment), [dashboards.GenieConversation](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieConversation), [dashboards.GenieCreateConversationMessageRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieCreateConversationMessageRequest), [dashboards.GenieGetConversationMessageRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieGetConversationMessageRequest), [dashboards.GenieGetMessageQueryResultRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieGetMessageQueryResultRequest), [dashboards.GenieGetMessageQueryResultResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieGetMessageQueryResultResponse), [dashboards.GenieMessage](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieMessage), [dashboards.GenieStartConversationMessageRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieStartConversationMessageRequest), [dashboards.GenieStartConversationResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieStartConversationResponse), [dashboards.MessageError](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#MessageError), [dashboards.MessageErrorType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#MessageErrorType), [dashboards.MessageStatus](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#MessageStatus), [dashboards.QueryAttachment](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#QueryAttachment), [dashboards.Result](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#Result) and [dashboards.TextAttachment](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#TextAttachment). + * Added `any`, [iam.MigratePermissionsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#MigratePermissionsRequest) and [iam.MigratePermissionsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#MigratePermissionsResponse). + * Added [oauth2.ListCustomAppIntegrationsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#ListCustomAppIntegrationsRequest) and [oauth2.ListPublishedAppIntegrationsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#ListPublishedAppIntegrationsRequest). + * Added [pipelines.IngestionPipelineDefinition](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#IngestionPipelineDefinition) and [pipelines.PipelineStateInfoHealth](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#PipelineStateInfoHealth). + * Added [serving.GoogleCloudVertexAiConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#GoogleCloudVertexAiConfig). + * Added [settings.Config](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#Config), [settings.CreateNotificationDestinationRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#CreateNotificationDestinationRequest), [settings.DeleteNotificationDestinationRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#DeleteNotificationDestinationRequest), [settings.DestinationType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#DestinationType), [settings.EmailConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#EmailConfig), `any`, [settings.GenericWebhookConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#GenericWebhookConfig), [settings.GetNotificationDestinationRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#GetNotificationDestinationRequest), [settings.ListNotificationDestinationsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#ListNotificationDestinationsRequest), [settings.ListNotificationDestinationsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#ListNotificationDestinationsResponse), [settings.ListNotificationDestinationsResult](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#ListNotificationDestinationsResult), [settings.MicrosoftTeamsConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#MicrosoftTeamsConfig), [settings.NotificationDestination](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#NotificationDestination), [settings.PagerdutyConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#PagerdutyConfig), [settings.SlackConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#SlackConfig) and [settings.UpdateNotificationDestinationRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#UpdateNotificationDestinationRequest). + * Added [sql.AlertCondition](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#AlertCondition), [sql.AlertConditionOperand](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#AlertConditionOperand), [sql.AlertConditionThreshold](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#AlertConditionThreshold), [sql.AlertOperandColumn](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#AlertOperandColumn), [sql.AlertOperandValue](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#AlertOperandValue), [sql.AlertOperator](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#AlertOperator), [sql.ClientCallContext](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#ClientCallContext), [sql.ContextFilter](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#ContextFilter), [sql.CreateAlertRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#CreateAlertRequest), [sql.CreateAlertRequestAlert](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#CreateAlertRequestAlert), [sql.CreateQueryRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#CreateQueryRequest), [sql.CreateQueryRequestQuery](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#CreateQueryRequestQuery), [sql.CreateQueryVisualizationsLegacyRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#CreateQueryVisualizationsLegacyRequest), [sql.CreateVisualizationRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#CreateVisualizationRequest), [sql.CreateVisualizationRequestVisualization](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#CreateVisualizationRequestVisualization), [sql.DatePrecision](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#DatePrecision), [sql.DateRange](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#DateRange), [sql.DateRangeValue](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#DateRangeValue), [sql.DateRangeValueDynamicDateRange](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#DateRangeValueDynamicDateRange), [sql.DateValue](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#DateValue), [sql.DateValueDynamicDate](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#DateValueDynamicDate), [sql.DeleteAlertsLegacyRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#DeleteAlertsLegacyRequest), [sql.DeleteQueriesLegacyRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#DeleteQueriesLegacyRequest), [sql.DeleteQueryVisualizationsLegacyRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#DeleteQueryVisualizationsLegacyRequest), [sql.DeleteVisualizationRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#DeleteVisualizationRequest), `any`, [sql.EncodedText](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#EncodedText), [sql.EncodedTextEncoding](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#EncodedTextEncoding), [sql.EnumValue](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#EnumValue), [sql.GetAlertsLegacyRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#GetAlertsLegacyRequest), [sql.GetQueriesLegacyRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#GetQueriesLegacyRequest), [sql.LegacyAlert](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#LegacyAlert), [sql.LegacyAlertState](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#LegacyAlertState), [sql.LegacyQuery](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#LegacyQuery), [sql.LegacyVisualization](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#LegacyVisualization), [sql.LifecycleState](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#LifecycleState), [sql.ListAlertsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#ListAlertsRequest), [sql.ListAlertsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#ListAlertsResponse), [sql.ListAlertsResponseAlert](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#ListAlertsResponseAlert), [sql.ListQueriesLegacyRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#ListQueriesLegacyRequest), [sql.ListQueryObjectsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#ListQueryObjectsResponse), [sql.ListQueryObjectsResponseQuery](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#ListQueryObjectsResponseQuery), [sql.ListVisualizationsForQueryRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#ListVisualizationsForQueryRequest), [sql.ListVisualizationsForQueryResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#ListVisualizationsForQueryResponse), [sql.NumericValue](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#NumericValue), [sql.QueryBackedValue](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QueryBackedValue), [sql.QueryParameter](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QueryParameter), [sql.QuerySource](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QuerySource), [sql.QuerySourceDriverInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QuerySourceDriverInfo), [sql.QuerySourceEntryPoint](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QuerySourceEntryPoint), [sql.QuerySourceJobManager](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QuerySourceJobManager), [sql.QuerySourceTrigger](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QuerySourceTrigger), [sql.RestoreQueriesLegacyRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#RestoreQueriesLegacyRequest), [sql.RunAsMode](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#RunAsMode), [sql.ServerlessChannelInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#ServerlessChannelInfo), [sql.StatementResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#StatementResponse), [sql.TextValue](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#TextValue), [sql.TrashAlertRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#TrashAlertRequest), [sql.TrashQueryRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#TrashQueryRequest), [sql.UpdateAlertRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#UpdateAlertRequest), [sql.UpdateAlertRequestAlert](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#UpdateAlertRequestAlert), [sql.UpdateQueryRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#UpdateQueryRequest), [sql.UpdateQueryRequestQuery](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#UpdateQueryRequestQuery), [sql.UpdateVisualizationRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#UpdateVisualizationRequest) and [sql.UpdateVisualizationRequestVisualization](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#UpdateVisualizationRequestVisualization). + * Added `Force` field for [catalog.DeleteSchemaRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#DeleteSchemaRequest). + * Added `MaxResults` and `PageToken` fields for [catalog.GetBindingsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#GetBindingsRequest). + * Added `MaxResults` and `PageToken` fields for [catalog.ListSystemSchemasRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListSystemSchemasRequest). + * Added `NextPageToken` field for [catalog.ListSystemSchemasResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListSystemSchemasResponse). + * Added `NextPageToken` field for [catalog.WorkspaceBindingsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#WorkspaceBindingsResponse). + * Added `Version` field for [compute.GetPolicyFamilyRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#GetPolicyFamilyRequest). + * Added `FilterBy`, `PageSize`, `PageToken` and `SortBy` fields for [compute.ListClustersRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#ListClustersRequest). + * Added `NextPageToken` and `PrevPageToken` fields for [compute.ListClustersResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#ListClustersResponse). + * Added `PageToken` field for [jobs.GetRunRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#GetRunRequest). + * Added `Iterations`, `NextPageToken` and `PrevPageToken` fields for [jobs.Run](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#Run). + * Added `CreateTime`, `CreatedBy`, `CreatorUsername` and `Scopes` fields for [oauth2.GetCustomAppIntegrationOutput](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#GetCustomAppIntegrationOutput). + * Added `NextPageToken` field for [oauth2.GetCustomAppIntegrationsOutput](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#GetCustomAppIntegrationsOutput). + * Added `CreateTime` and `CreatedBy` fields for [oauth2.GetPublishedAppIntegrationOutput](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#GetPublishedAppIntegrationOutput). + * Added `NextPageToken` field for [oauth2.GetPublishedAppIntegrationsOutput](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#GetPublishedAppIntegrationsOutput). + * Added `EnableLocalDiskEncryption` field for [pipelines.PipelineCluster](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#PipelineCluster). + * Added `Whl` field for [pipelines.PipelineLibrary](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#PipelineLibrary). + * Added `Health` field for [pipelines.PipelineStateInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#PipelineStateInfo). + * Added `Ai21labsApiKeyPlaintext` field for [serving.Ai21LabsConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#Ai21LabsConfig). + * Added `AwsAccessKeyIdPlaintext` and `AwsSecretAccessKeyPlaintext` fields for [serving.AmazonBedrockConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#AmazonBedrockConfig). + * Added `AnthropicApiKeyPlaintext` field for [serving.AnthropicConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#AnthropicConfig). + * Added `CohereApiBase` and `CohereApiKeyPlaintext` fields for [serving.CohereConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#CohereConfig). + * Added `DatabricksApiTokenPlaintext` field for [serving.DatabricksModelServingConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#DatabricksModelServingConfig). + * Added `GoogleCloudVertexAiConfig` field for [serving.ExternalModel](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ExternalModel). + * Added `MicrosoftEntraClientSecretPlaintext` and `OpenaiApiKeyPlaintext` fields for [serving.OpenAiConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#OpenAiConfig). + * Added `PalmApiKeyPlaintext` field for [serving.PaLmConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#PaLmConfig). + * Added `NextPageToken` field for [sharing.GetRecipientSharePermissionsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#GetRecipientSharePermissionsResponse). + * Added `NextPageToken` field for [sharing.ListProviderSharesResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#ListProviderSharesResponse). + * Added `MaxResults` and `PageToken` fields for [sharing.ListProvidersRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#ListProvidersRequest). + * Added `NextPageToken` field for [sharing.ListProvidersResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#ListProvidersResponse). + * Added `MaxResults` and `PageToken` fields for [sharing.ListRecipientsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#ListRecipientsRequest). + * Added `NextPageToken` field for [sharing.ListRecipientsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#ListRecipientsResponse). + * Added `MaxResults` and `PageToken` fields for [sharing.ListSharesRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#ListSharesRequest). + * Added `NextPageToken` field for [sharing.ListSharesResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#ListSharesResponse). + * Added `MaxResults` and `PageToken` fields for [sharing.SharePermissionsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#SharePermissionsRequest). + * Added `MaxResults` and `PageToken` fields for [sharing.UpdateSharePermissions](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#UpdateSharePermissions). + * Added `Condition`, `CreateTime`, `CustomBody`, `CustomSubject`, `DisplayName`, `LifecycleState`, `OwnerUserName`, `ParentPath`, `QueryId`, `SecondsToRetrigger`, `TriggerTime` and `UpdateTime` fields for [sql.Alert](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#Alert). + * Added `Id` field for [sql.GetAlertRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#GetAlertRequest). + * Added `Id` field for [sql.GetQueryRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#GetQueryRequest). + * Added `PageToken` field for [sql.ListQueriesRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#ListQueriesRequest). + * Added `ApplyAutoLimit`, `Catalog`, `CreateTime`, `DisplayName`, `LastModifierUserName`, `LifecycleState`, `OwnerUserName`, `Parameters`, `ParentPath`, `QueryText`, `RunAsMode`, `Schema`, `UpdateTime` and `WarehouseId` fields for [sql.Query](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#Query). + * Added `ContextFilter` field for [sql.QueryFilter](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QueryFilter). + * Added `QuerySource` field for [sql.QueryInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QueryInfo). + * Added `CreateTime`, `DisplayName`, `QueryId`, `SerializedOptions`, `SerializedQueryPlan` and `UpdateTime` fields for [sql.Visualization](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#Visualization). + * Changed `Create` method for [a.Budgets](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#BudgetsAPI) account-level service to return [billing.CreateBudgetConfigurationResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#CreateBudgetConfigurationResponse). + * Changed `Create` method for [a.Budgets](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#BudgetsAPI) account-level service . New request type is [billing.CreateBudgetConfigurationRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#CreateBudgetConfigurationRequest). + * Changed `Delete` method for [a.Budgets](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#BudgetsAPI) account-level service to return `any`. + * Changed `Delete` method for [a.Budgets](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#BudgetsAPI) account-level service . New request type is [billing.DeleteBudgetConfigurationRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#DeleteBudgetConfigurationRequest). + * Changed `Get` method for [a.Budgets](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#BudgetsAPI) account-level service . New request type is [billing.GetBudgetConfigurationRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#GetBudgetConfigurationRequest). + * Changed `Get` method for [a.Budgets](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#BudgetsAPI) account-level service to return [billing.GetBudgetConfigurationResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#GetBudgetConfigurationResponse). + * Changed `List` method for [a.Budgets](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#BudgetsAPI) account-level service to return [billing.ListBudgetConfigurationsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#ListBudgetConfigurationsResponse). + * Changed `List` method for [a.Budgets](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#BudgetsAPI) account-level service to require request of [billing.ListBudgetConfigurationsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#ListBudgetConfigurationsRequest). + * Changed `Update` method for [a.Budgets](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#BudgetsAPI) account-level service to return [billing.UpdateBudgetConfigurationResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#UpdateBudgetConfigurationResponse). + * Changed `Update` method for [a.Budgets](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#BudgetsAPI) account-level service . New request type is [billing.UpdateBudgetConfigurationRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#UpdateBudgetConfigurationRequest). + * Changed `Create` method for [a.CustomAppIntegration](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#CustomAppIntegrationAPI) account-level service with new required argument order. + * Changed `List` method for [a.CustomAppIntegration](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#CustomAppIntegrationAPI) account-level service to require request of [oauth2.ListCustomAppIntegrationsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#ListCustomAppIntegrationsRequest). + * Changed `List` method for [a.PublishedAppIntegration](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#PublishedAppIntegrationAPI) account-level service to require request of [oauth2.ListPublishedAppIntegrationsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#ListPublishedAppIntegrationsRequest). + * Changed `Delete` method for [a.WorkspaceAssignment](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#WorkspaceAssignmentAPI) account-level service to return `any`. + * Changed `Update` method for [a.WorkspaceAssignment](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#WorkspaceAssignmentAPI) account-level service with new required argument order. + * Changed `Create` method for [w.Alerts](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#AlertsAPI) workspace-level service . New request type is [sql.CreateAlertRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#CreateAlertRequest). + * Changed `Delete` method for [w.Alerts](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#AlertsAPI) workspace-level service to return `any`. + * Changed `Delete` method for [w.Alerts](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#AlertsAPI) workspace-level service . New request type is [sql.TrashAlertRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#TrashAlertRequest). + * Changed `Get` method for [w.Alerts](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#AlertsAPI) workspace-level service with new required argument order. + * Changed `List` method for [w.Alerts](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#AlertsAPI) workspace-level service to return [sql.ListAlertsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#ListAlertsResponse). + * Changed `List` method for [w.Alerts](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#AlertsAPI) workspace-level service to require request of [sql.ListAlertsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#ListAlertsRequest). + * Changed `Update` method for [w.Alerts](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#AlertsAPI) workspace-level service to return [sql.Alert](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#Alert). + * Changed `Update` method for [w.Alerts](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#AlertsAPI) workspace-level service . New request type is [sql.UpdateAlertRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#UpdateAlertRequest). + * Changed `Create` and `Edit` methods for [w.ClusterPolicies](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#ClusterPoliciesAPI) workspace-level service with new required argument order. + * Changed `Get` method for [w.ClusterPolicies](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#ClusterPoliciesAPI) workspace-level service . New request type is [compute.GetPolicy](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#GetPolicy). + * Changed `List` method for [w.ClusterPolicies](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#ClusterPoliciesAPI) workspace-level service . New request type is [compute.ListPolicies](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#ListPolicies). + * Changed `MigratePermissions` method for [w.PermissionMigration](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#PermissionMigrationAPI) workspace-level service to return [iam.MigratePermissionsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#MigratePermissionsResponse). + * Changed `MigratePermissions` method for [w.PermissionMigration](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#PermissionMigrationAPI) workspace-level service . New request type is [iam.MigratePermissionsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#MigratePermissionsRequest). + * Changed `List` method for [w.PolicyFamilies](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#PolicyFamiliesAPI) workspace-level service . New request type is [compute.ListPolicyFamilies](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#ListPolicyFamilies). + * Changed `Create` method for [w.Queries](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QueriesAPI) workspace-level service . New request type is [sql.CreateQueryRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#CreateQueryRequest). + * Changed `Delete` method for [w.Queries](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QueriesAPI) workspace-level service to return `any`. + * Changed `Delete` method for [w.Queries](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QueriesAPI) workspace-level service . New request type is [sql.TrashQueryRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#TrashQueryRequest). + * Changed `Get` method for [w.Queries](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QueriesAPI) workspace-level service with new required argument order. + * Changed `List` method for [w.Queries](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QueriesAPI) workspace-level service to return [sql.ListQueryObjectsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#ListQueryObjectsResponse). + * Changed `Update` method for [w.Queries](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QueriesAPI) workspace-level service . New request type is [sql.UpdateQueryRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#UpdateQueryRequest). + * Changed `Create` method for [w.QueryVisualizations](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QueryVisualizationsAPI) workspace-level service . New request type is [sql.CreateVisualizationRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#CreateVisualizationRequest). + * Changed `Delete` method for [w.QueryVisualizations](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QueryVisualizationsAPI) workspace-level service to return `any`. + * Changed `Delete` method for [w.QueryVisualizations](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QueryVisualizationsAPI) workspace-level service . New request type is [sql.DeleteVisualizationRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#DeleteVisualizationRequest). + * Changed `Update` method for [w.QueryVisualizations](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QueryVisualizationsAPI) workspace-level service . New request type is [sql.UpdateVisualizationRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#UpdateVisualizationRequest). + * Changed `List` method for [w.Shares](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#SharesAPI) workspace-level service to require request of [sharing.ListSharesRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#ListSharesRequest). + * Changed `ExecuteStatement` and `GetStatement` methods for [w.StatementExecution](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#StatementExecutionAPI) workspace-level service to return [sql.StatementResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#StatementResponse). + * Changed `SecurableType` field for [catalog.GetBindingsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#GetBindingsRequest) to [catalog.GetBindingsSecurableType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#GetBindingsSecurableType). + * Changed `SecurableType` field for [catalog.UpdateWorkspaceBindingsParameters](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#UpdateWorkspaceBindingsParameters) to [catalog.UpdateBindingsSecurableType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#UpdateBindingsSecurableType). + * Changed `Name` field for [compute.CreatePolicy](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#CreatePolicy) to no longer be required. + * Changed `Name` field for [compute.EditPolicy](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#EditPolicy) to no longer be required. + * Changed `PolicyFamilyId` field for [compute.GetPolicyFamilyRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#GetPolicyFamilyRequest) to `string`. + * Changed `PolicyFamilies` field for [compute.ListPolicyFamiliesResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#ListPolicyFamiliesResponse) to no longer be required. + * Changed `Definition`, `Description`, `Name` and `PolicyFamilyId` fields for [compute.PolicyFamily](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#PolicyFamily) to no longer be required. + * Changed `Permissions` field for [iam.UpdateWorkspaceAssignments](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#UpdateWorkspaceAssignments) to no longer be required. + * Changed `AccessControlList` field for [jobs.CreateJob](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#CreateJob) to [jobs.JobAccessControlRequestList](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#JobAccessControlRequestList). + * Changed `AccessControlList` field for [jobs.SubmitRun](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#SubmitRun) to [jobs.JobAccessControlRequestList](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#JobAccessControlRequestList). + * Changed `Name` and `RedirectUrls` fields for [oauth2.CreateCustomAppIntegration](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#CreateCustomAppIntegration) to no longer be required. + * Changed `IngestionDefinition` field for [pipelines.CreatePipeline](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#CreatePipeline) to [pipelines.IngestionPipelineDefinition](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#IngestionPipelineDefinition). + * Changed `IngestionDefinition` field for [pipelines.EditPipeline](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#EditPipeline) to [pipelines.IngestionPipelineDefinition](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#IngestionPipelineDefinition). + * Changed `IngestionDefinition` field for [pipelines.PipelineSpec](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#PipelineSpec) to [pipelines.IngestionPipelineDefinition](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#IngestionPipelineDefinition). + * Changed `Ai21labsApiKey` field for [serving.Ai21LabsConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#Ai21LabsConfig) to no longer be required. + * Changed `AwsAccessKeyId` and `AwsSecretAccessKey` fields for [serving.AmazonBedrockConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#AmazonBedrockConfig) to no longer be required. + * Changed `AnthropicApiKey` field for [serving.AnthropicConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#AnthropicConfig) to no longer be required. + * Changed `CohereApiKey` field for [serving.CohereConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#CohereConfig) to no longer be required. + * Changed `DatabricksApiToken` field for [serving.DatabricksModelServingConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#DatabricksModelServingConfig) to no longer be required. + * Changed `PalmApiKey` field for [serving.PaLmConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#PaLmConfig) to no longer be required. + * Changed `Tags` field for [sql.Query](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#Query) to [sql.List](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#List). + * Changed `UserIds` and `WarehouseIds` fields for [sql.QueryFilter](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QueryFilter) to [sql.List](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#List). + * Changed `Results` field for [sql.QueryList](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QueryList) to [sql.LegacyQueryList](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#LegacyQueryList). + * Changed `Visualization` field for [sql.Widget](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#Widget) to [sql.LegacyVisualization](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#LegacyVisualization). + * Removed [w.Apps](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#AppsAPI) workspace-level service. + * Removed `Restore` method for [w.Queries](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QueriesAPI) workspace-level service. + * Removed [marketplace.FilterType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/marketplace#FilterType), [marketplace.ProviderIconFile](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/marketplace#ProviderIconFile), [marketplace.ProviderIconType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/marketplace#ProviderIconType), [marketplace.ProviderListingSummaryInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/marketplace#ProviderListingSummaryInfo), [marketplace.SortBy](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/marketplace#SortBy) and [marketplace.VisibilityFilter](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/marketplace#VisibilityFilter). + * Removed [billing.Budget](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#Budget), [billing.BudgetAlert](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#BudgetAlert), [billing.BudgetList](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#BudgetList), [billing.BudgetWithStatus](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#BudgetWithStatus), [billing.BudgetWithStatusStatusDailyItem](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#BudgetWithStatusStatusDailyItem), [billing.DeleteBudgetRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#DeleteBudgetRequest), `any`, [billing.GetBudgetRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#GetBudgetRequest), `any`, [billing.WrappedBudget](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#WrappedBudget) and [billing.WrappedBudgetWithStatus](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#WrappedBudgetWithStatus). + * Removed [compute.GetClusterPolicyRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#GetClusterPolicyRequest), [compute.ListClusterPoliciesRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#ListClusterPoliciesRequest), [compute.ListPolicyFamiliesRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#ListPolicyFamiliesRequest), [compute.ListSortColumn](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#ListSortColumn), [compute.ListSortOrder](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#ListSortOrder) and [compute.PolicyFamilyId](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#PolicyFamilyId). + * Removed `any`, [iam.PermissionMigrationRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#PermissionMigrationRequest) and [iam.PermissionMigrationResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#PermissionMigrationResponse). + * Removed [pipelines.ManagedIngestionPipelineDefinition](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#ManagedIngestionPipelineDefinition). + * Removed [serving.App](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#App), [serving.AppDeployment](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#AppDeployment), [serving.AppDeploymentArtifacts](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#AppDeploymentArtifacts), [serving.AppDeploymentMode](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#AppDeploymentMode), [serving.AppDeploymentState](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#AppDeploymentState), [serving.AppDeploymentStatus](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#AppDeploymentStatus), [serving.AppEnvironment](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#AppEnvironment), [serving.AppState](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#AppState), [serving.AppStatus](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#AppStatus), [serving.CreateAppDeploymentRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#CreateAppDeploymentRequest), [serving.CreateAppRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#CreateAppRequest), [serving.DeleteAppRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#DeleteAppRequest), [serving.EnvVariable](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#EnvVariable), [serving.GetAppDeploymentRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#GetAppDeploymentRequest), [serving.GetAppEnvironmentRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#GetAppEnvironmentRequest), [serving.GetAppRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#GetAppRequest), [serving.ListAppDeploymentsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ListAppDeploymentsRequest), [serving.ListAppDeploymentsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ListAppDeploymentsResponse), [serving.ListAppsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ListAppsRequest), [serving.ListAppsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ListAppsResponse), [serving.StartAppRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#StartAppRequest), [serving.StopAppRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#StopAppRequest), `any` and [serving.UpdateAppRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#UpdateAppRequest). + * Removed [sql.CreateQueryVisualizationRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#CreateQueryVisualizationRequest), [sql.DeleteAlertRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#DeleteAlertRequest), [sql.DeleteQueryRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#DeleteQueryRequest), [sql.DeleteQueryVisualizationRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#DeleteQueryVisualizationRequest), [sql.ExecuteStatementResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#ExecuteStatementResponse), [sql.GetStatementResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#GetStatementResponse), [sql.RestoreQueryRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#RestoreQueryRequest), [sql.StatementId](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#StatementId), [sql.UserId](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#UserId) and [sql.WarehouseId](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#WarehouseId). + * Removed `CanUseClient` field for [compute.ListClustersRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#ListClustersRequest). + * Removed `IsAscending` and `SortBy` fields for [marketplace.ListListingsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/marketplace#ListListingsRequest). + * Removed `ProviderSummary` field for [marketplace.Listing](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/marketplace#Listing). + * Removed `Filters` field for [marketplace.ListingSetting](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/marketplace#ListingSetting). + * Removed `MetastoreId` field for [marketplace.ListingSummary](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/marketplace#ListingSummary). + * Removed `IsAscending` and `SortBy` fields for [marketplace.SearchListingsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/marketplace#SearchListingsRequest). + * Removed `CreatedAt`, `LastTriggeredAt`, `Name`, `Options`, `Parent`, `Query`, `Rearm`, `UpdatedAt` and `User` fields for [sql.Alert](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#Alert). + * Removed `AlertId` field for [sql.GetAlertRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#GetAlertRequest). + * Removed `QueryId` field for [sql.GetQueryRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#GetQueryRequest). + * Removed `Order`, `Page` and `Q` fields for [sql.ListQueriesRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#ListQueriesRequest). + * Removed `IncludeMetrics` field for [sql.ListQueryHistoryRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#ListQueryHistoryRequest). + * Removed `CanEdit`, `CreatedAt`, `DataSourceId`, `IsArchived`, `IsDraft`, `IsFavorite`, `IsSafe`, `LastModifiedBy`, `LastModifiedById`, `LatestQueryDataId`, `Name`, `Options`, `Parent`, `PermissionTier`, `Query`, `QueryHash`, `RunAsRole`, `UpdatedAt`, `User`, `UserId` and `Visualizations` fields for [sql.Query](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#Query). + * Removed `StatementIds` field for [sql.QueryFilter](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QueryFilter). + * Removed `CanSubscribeToLiveQuery` field for [sql.QueryInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QueryInfo). + * Removed `MetadataTimeMs`, `PlanningTimeMs` and `QueryExecutionTimeMs` fields for [sql.QueryMetrics](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QueryMetrics). + * Removed `CreatedAt`, `Description`, `Name`, `Options`, `Query` and `UpdatedAt` fields for [sql.Visualization](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#Visualization). + +OpenAPI SHA: 88571b688969bc4509fb520d86d161eb20c3d662, Date: 2024-08-08 + ## 0.43.2 ### Internal Changes diff --git a/experimental/mocks/mock_workspace_client.go b/experimental/mocks/mock_workspace_client.go index 8682d13e9..6fe3d9e06 100755 --- a/experimental/mocks/mock_workspace_client.go +++ b/experimental/mocks/mock_workspace_client.go @@ -8,6 +8,7 @@ import ( "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/compute" "github.com/databricks/databricks-sdk-go/experimental/mocks/service/dashboards" @@ -42,7 +43,7 @@ func NewMockWorkspaceClient(t interface { AccountAccessControlProxy: iam.NewMockAccountAccessControlProxyInterface(t), Alerts: sql.NewMockAlertsInterface(t), AlertsLegacy: sql.NewMockAlertsLegacyInterface(t), - Apps: serving.NewMockAppsInterface(t), + Apps: apps.NewMockAppsInterface(t), ArtifactAllowlists: catalog.NewMockArtifactAllowlistsInterface(t), Catalogs: catalog.NewMockCatalogsInterface(t), CleanRooms: sharing.NewMockCleanRoomsInterface(t), @@ -213,10 +214,10 @@ func (m *MockWorkspaceClient) GetMockAlertsLegacyAPI() *sql.MockAlertsLegacyInte return api } -func (m *MockWorkspaceClient) GetMockAppsAPI() *serving.MockAppsInterface { - api, ok := m.WorkspaceClient.Apps.(*serving.MockAppsInterface) +func (m *MockWorkspaceClient) GetMockAppsAPI() *apps.MockAppsInterface { + api, ok := m.WorkspaceClient.Apps.(*apps.MockAppsInterface) if !ok { - panic(fmt.Sprintf("expected Apps to be *serving.MockAppsInterface, actual was %T", m.WorkspaceClient.Apps)) + panic(fmt.Sprintf("expected Apps to be *apps.MockAppsInterface, actual was %T", m.WorkspaceClient.Apps)) } return api } diff --git a/experimental/mocks/service/apps/mock_apps_interface.go b/experimental/mocks/service/apps/mock_apps_interface.go new file mode 100644 index 000000000..090b6caf8 --- /dev/null +++ b/experimental/mocks/service/apps/mock_apps_interface.go @@ -0,0 +1,1632 @@ +// 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.WaitGetAppIdle[apps.App], error) { + ret := _m.Called(ctx, createAppRequest) + + if len(ret) == 0 { + panic("no return value specified for Create") + } + + var r0 *apps.WaitGetAppIdle[apps.App] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, apps.CreateAppRequest) (*apps.WaitGetAppIdle[apps.App], error)); ok { + return rf(ctx, createAppRequest) + } + if rf, ok := ret.Get(0).(func(context.Context, apps.CreateAppRequest) *apps.WaitGetAppIdle[apps.App]); ok { + r0 = rf(ctx, createAppRequest) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*apps.WaitGetAppIdle[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.WaitGetAppIdle[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.WaitGetAppIdle[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) 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, apps.DeleteAppRequest) error); ok { + r0 = rf(ctx, request) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// 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 error) *MockAppsInterface_Delete_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAppsInterface_Delete_Call) RunAndReturn(run func(context.Context, apps.DeleteAppRequest) 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) 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 +} + +// 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 error) *MockAppsInterface_DeleteByName_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAppsInterface_DeleteByName_Call) RunAndReturn(run func(context.Context, string) 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.WaitGetDeploymentAppSucceeded[apps.AppDeployment], error) { + ret := _m.Called(ctx, startAppRequest) + + if len(ret) == 0 { + panic("no return value specified for Start") + } + + var r0 *apps.WaitGetDeploymentAppSucceeded[apps.AppDeployment] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, apps.StartAppRequest) (*apps.WaitGetDeploymentAppSucceeded[apps.AppDeployment], error)); ok { + return rf(ctx, startAppRequest) + } + if rf, ok := ret.Get(0).(func(context.Context, apps.StartAppRequest) *apps.WaitGetDeploymentAppSucceeded[apps.AppDeployment]); ok { + r0 = rf(ctx, startAppRequest) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*apps.WaitGetDeploymentAppSucceeded[apps.AppDeployment]) + } + } + + 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.WaitGetDeploymentAppSucceeded[apps.AppDeployment], _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.WaitGetDeploymentAppSucceeded[apps.AppDeployment], 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.AppDeployment]) (*apps.AppDeployment, 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.AppDeployment + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, apps.StartAppRequest, ...retries.Option[apps.AppDeployment]) (*apps.AppDeployment, error)); ok { + return rf(ctx, startAppRequest, options...) + } + if rf, ok := ret.Get(0).(func(context.Context, apps.StartAppRequest, ...retries.Option[apps.AppDeployment]) *apps.AppDeployment); ok { + r0 = rf(ctx, startAppRequest, options...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*apps.AppDeployment) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, apps.StartAppRequest, ...retries.Option[apps.AppDeployment]) 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.AppDeployment] +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.AppDeployment])) *MockAppsInterface_StartAndWait_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.StartAppRequest), variadicArgs...) + }) + return _c +} + +func (_c *MockAppsInterface_StartAndWait_Call) Return(_a0 *apps.AppDeployment, _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.AppDeployment]) (*apps.AppDeployment, error)) *MockAppsInterface_StartAndWait_Call { + _c.Call.Return(run) + return _c +} + +// Stop provides a mock function with given fields: ctx, request +func (_m *MockAppsInterface) Stop(ctx context.Context, request apps.StopAppRequest) error { + ret := _m.Called(ctx, request) + + if len(ret) == 0 { + panic("no return value specified for Stop") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, apps.StopAppRequest) error); ok { + r0 = rf(ctx, request) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// 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 +// - request apps.StopAppRequest +func (_e *MockAppsInterface_Expecter) Stop(ctx interface{}, request interface{}) *MockAppsInterface_Stop_Call { + return &MockAppsInterface_Stop_Call{Call: _e.mock.On("Stop", ctx, request)} +} + +func (_c *MockAppsInterface_Stop_Call) Run(run func(ctx context.Context, request 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 error) *MockAppsInterface_Stop_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAppsInterface_Stop_Call) RunAndReturn(run func(context.Context, apps.StopAppRequest) error) *MockAppsInterface_Stop_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 +} + +// WaitGetAppIdle provides a mock function with given fields: ctx, name, timeout, callback +func (_m *MockAppsInterface) WaitGetAppIdle(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 WaitGetAppIdle") + } + + 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_WaitGetAppIdle_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitGetAppIdle' +type MockAppsInterface_WaitGetAppIdle_Call struct { + *mock.Call +} + +// WaitGetAppIdle 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) WaitGetAppIdle(ctx interface{}, name interface{}, timeout interface{}, callback interface{}) *MockAppsInterface_WaitGetAppIdle_Call { + return &MockAppsInterface_WaitGetAppIdle_Call{Call: _e.mock.On("WaitGetAppIdle", ctx, name, timeout, callback)} +} + +func (_c *MockAppsInterface_WaitGetAppIdle_Call) Run(run func(ctx context.Context, name string, timeout time.Duration, callback func(*apps.App))) *MockAppsInterface_WaitGetAppIdle_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_WaitGetAppIdle_Call) Return(_a0 *apps.App, _a1 error) *MockAppsInterface_WaitGetAppIdle_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAppsInterface_WaitGetAppIdle_Call) RunAndReturn(run func(context.Context, string, time.Duration, func(*apps.App)) (*apps.App, error)) *MockAppsInterface_WaitGetAppIdle_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 index ffbd6a0c4..90c5b2d79 100644 --- a/experimental/mocks/service/billing/mock_billable_usage_interface.go +++ b/experimental/mocks/service/billing/mock_billable_usage_interface.go @@ -82,101 +82,6 @@ func (_c *MockBillableUsageInterface_Download_Call) RunAndReturn(run func(contex return _c } -// Impl provides a mock function with given fields: -func (_m *MockBillableUsageInterface) Impl() billing.BillableUsageService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 billing.BillableUsageService - if rf, ok := ret.Get(0).(func() billing.BillableUsageService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(billing.BillableUsageService) - } - } - - return r0 -} - -// MockBillableUsageInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockBillableUsageInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockBillableUsageInterface_Expecter) Impl() *MockBillableUsageInterface_Impl_Call { - return &MockBillableUsageInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockBillableUsageInterface_Impl_Call) Run(run func()) *MockBillableUsageInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBillableUsageInterface_Impl_Call) Return(_a0 billing.BillableUsageService) *MockBillableUsageInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBillableUsageInterface_Impl_Call) RunAndReturn(run func() billing.BillableUsageService) *MockBillableUsageInterface_Impl_Call { - _c.Call.Return(run) - return _c -} - -// WithImpl provides a mock function with given fields: impl -func (_m *MockBillableUsageInterface) WithImpl(impl billing.BillableUsageService) billing.BillableUsageInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 billing.BillableUsageInterface - if rf, ok := ret.Get(0).(func(billing.BillableUsageService) billing.BillableUsageInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(billing.BillableUsageInterface) - } - } - - return r0 -} - -// MockBillableUsageInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockBillableUsageInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl billing.BillableUsageService -func (_e *MockBillableUsageInterface_Expecter) WithImpl(impl interface{}) *MockBillableUsageInterface_WithImpl_Call { - return &MockBillableUsageInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockBillableUsageInterface_WithImpl_Call) Run(run func(impl billing.BillableUsageService)) *MockBillableUsageInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(billing.BillableUsageService)) - }) - return _c -} - -func (_c *MockBillableUsageInterface_WithImpl_Call) Return(_a0 billing.BillableUsageInterface) *MockBillableUsageInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBillableUsageInterface_WithImpl_Call) RunAndReturn(run func(billing.BillableUsageService) billing.BillableUsageInterface) *MockBillableUsageInterface_WithImpl_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 { diff --git a/experimental/mocks/service/billing/mock_budgets_interface.go b/experimental/mocks/service/billing/mock_budgets_interface.go index 7ae88a90d..59256ce10 100644 --- a/experimental/mocks/service/billing/mock_budgets_interface.go +++ b/experimental/mocks/service/billing/mock_budgets_interface.go @@ -296,53 +296,6 @@ func (_c *MockBudgetsInterface_GetByBudgetId_Call) RunAndReturn(run func(context return _c } -// Impl provides a mock function with given fields: -func (_m *MockBudgetsInterface) Impl() billing.BudgetsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 billing.BudgetsService - if rf, ok := ret.Get(0).(func() billing.BudgetsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(billing.BudgetsService) - } - } - - return r0 -} - -// MockBudgetsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockBudgetsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockBudgetsInterface_Expecter) Impl() *MockBudgetsInterface_Impl_Call { - return &MockBudgetsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockBudgetsInterface_Impl_Call) Run(run func()) *MockBudgetsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBudgetsInterface_Impl_Call) Return(_a0 billing.BudgetsService) *MockBudgetsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBudgetsInterface_Impl_Call) RunAndReturn(run func() billing.BudgetsService) *MockBudgetsInterface_Impl_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) @@ -510,54 +463,6 @@ func (_c *MockBudgetsInterface_Update_Call) RunAndReturn(run func(context.Contex return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockBudgetsInterface) WithImpl(impl billing.BudgetsService) billing.BudgetsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 billing.BudgetsInterface - if rf, ok := ret.Get(0).(func(billing.BudgetsService) billing.BudgetsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(billing.BudgetsInterface) - } - } - - return r0 -} - -// MockBudgetsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockBudgetsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl billing.BudgetsService -func (_e *MockBudgetsInterface_Expecter) WithImpl(impl interface{}) *MockBudgetsInterface_WithImpl_Call { - return &MockBudgetsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockBudgetsInterface_WithImpl_Call) Run(run func(impl billing.BudgetsService)) *MockBudgetsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(billing.BudgetsService)) - }) - return _c -} - -func (_c *MockBudgetsInterface_WithImpl_Call) Return(_a0 billing.BudgetsInterface) *MockBudgetsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBudgetsInterface_WithImpl_Call) RunAndReturn(run func(billing.BudgetsService) billing.BudgetsInterface) *MockBudgetsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/billing/mock_log_delivery_interface.go b/experimental/mocks/service/billing/mock_log_delivery_interface.go index 5b414a04e..c163a9c26 100644 --- a/experimental/mocks/service/billing/mock_log_delivery_interface.go +++ b/experimental/mocks/service/billing/mock_log_delivery_interface.go @@ -261,53 +261,6 @@ func (_c *MockLogDeliveryInterface_GetByLogDeliveryConfigurationId_Call) RunAndR return _c } -// Impl provides a mock function with given fields: -func (_m *MockLogDeliveryInterface) Impl() billing.LogDeliveryService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 billing.LogDeliveryService - if rf, ok := ret.Get(0).(func() billing.LogDeliveryService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(billing.LogDeliveryService) - } - } - - return r0 -} - -// MockLogDeliveryInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockLogDeliveryInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockLogDeliveryInterface_Expecter) Impl() *MockLogDeliveryInterface_Impl_Call { - return &MockLogDeliveryInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockLogDeliveryInterface_Impl_Call) Run(run func()) *MockLogDeliveryInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockLogDeliveryInterface_Impl_Call) Return(_a0 billing.LogDeliveryService) *MockLogDeliveryInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockLogDeliveryInterface_Impl_Call) RunAndReturn(run func() billing.LogDeliveryService) *MockLogDeliveryInterface_Impl_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) @@ -522,54 +475,6 @@ func (_c *MockLogDeliveryInterface_PatchStatus_Call) RunAndReturn(run func(conte return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockLogDeliveryInterface) WithImpl(impl billing.LogDeliveryService) billing.LogDeliveryInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 billing.LogDeliveryInterface - if rf, ok := ret.Get(0).(func(billing.LogDeliveryService) billing.LogDeliveryInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(billing.LogDeliveryInterface) - } - } - - return r0 -} - -// MockLogDeliveryInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockLogDeliveryInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl billing.LogDeliveryService -func (_e *MockLogDeliveryInterface_Expecter) WithImpl(impl interface{}) *MockLogDeliveryInterface_WithImpl_Call { - return &MockLogDeliveryInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockLogDeliveryInterface_WithImpl_Call) Run(run func(impl billing.LogDeliveryService)) *MockLogDeliveryInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(billing.LogDeliveryService)) - }) - return _c -} - -func (_c *MockLogDeliveryInterface_WithImpl_Call) Return(_a0 billing.LogDeliveryInterface) *MockLogDeliveryInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockLogDeliveryInterface_WithImpl_Call) RunAndReturn(run func(billing.LogDeliveryService) billing.LogDeliveryInterface) *MockLogDeliveryInterface_WithImpl_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 { diff --git a/experimental/mocks/service/billing/mock_usage_dashboards_interface.go b/experimental/mocks/service/billing/mock_usage_dashboards_interface.go index 4ef4e6c20..ee0e87850 100644 --- a/experimental/mocks/service/billing/mock_usage_dashboards_interface.go +++ b/experimental/mocks/service/billing/mock_usage_dashboards_interface.go @@ -141,101 +141,6 @@ func (_c *MockUsageDashboardsInterface_Get_Call) RunAndReturn(run func(context.C return _c } -// Impl provides a mock function with given fields: -func (_m *MockUsageDashboardsInterface) Impl() billing.UsageDashboardsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 billing.UsageDashboardsService - if rf, ok := ret.Get(0).(func() billing.UsageDashboardsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(billing.UsageDashboardsService) - } - } - - return r0 -} - -// MockUsageDashboardsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockUsageDashboardsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockUsageDashboardsInterface_Expecter) Impl() *MockUsageDashboardsInterface_Impl_Call { - return &MockUsageDashboardsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockUsageDashboardsInterface_Impl_Call) Run(run func()) *MockUsageDashboardsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockUsageDashboardsInterface_Impl_Call) Return(_a0 billing.UsageDashboardsService) *MockUsageDashboardsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockUsageDashboardsInterface_Impl_Call) RunAndReturn(run func() billing.UsageDashboardsService) *MockUsageDashboardsInterface_Impl_Call { - _c.Call.Return(run) - return _c -} - -// WithImpl provides a mock function with given fields: impl -func (_m *MockUsageDashboardsInterface) WithImpl(impl billing.UsageDashboardsService) billing.UsageDashboardsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 billing.UsageDashboardsInterface - if rf, ok := ret.Get(0).(func(billing.UsageDashboardsService) billing.UsageDashboardsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(billing.UsageDashboardsInterface) - } - } - - return r0 -} - -// MockUsageDashboardsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockUsageDashboardsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl billing.UsageDashboardsService -func (_e *MockUsageDashboardsInterface_Expecter) WithImpl(impl interface{}) *MockUsageDashboardsInterface_WithImpl_Call { - return &MockUsageDashboardsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockUsageDashboardsInterface_WithImpl_Call) Run(run func(impl billing.UsageDashboardsService)) *MockUsageDashboardsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(billing.UsageDashboardsService)) - }) - return _c -} - -func (_c *MockUsageDashboardsInterface_WithImpl_Call) Return(_a0 billing.UsageDashboardsInterface) *MockUsageDashboardsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockUsageDashboardsInterface_WithImpl_Call) RunAndReturn(run func(billing.UsageDashboardsService) billing.UsageDashboardsInterface) *MockUsageDashboardsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/catalog/mock_account_metastore_assignments_interface.go b/experimental/mocks/service/catalog/mock_account_metastore_assignments_interface.go index a47337935..968ac6044 100644 --- a/experimental/mocks/service/catalog/mock_account_metastore_assignments_interface.go +++ b/experimental/mocks/service/catalog/mock_account_metastore_assignments_interface.go @@ -285,53 +285,6 @@ func (_c *MockAccountMetastoreAssignmentsInterface_GetByWorkspaceId_Call) RunAnd return _c } -// Impl provides a mock function with given fields: -func (_m *MockAccountMetastoreAssignmentsInterface) Impl() catalog.AccountMetastoreAssignmentsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 catalog.AccountMetastoreAssignmentsService - if rf, ok := ret.Get(0).(func() catalog.AccountMetastoreAssignmentsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.AccountMetastoreAssignmentsService) - } - } - - return r0 -} - -// MockAccountMetastoreAssignmentsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockAccountMetastoreAssignmentsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockAccountMetastoreAssignmentsInterface_Expecter) Impl() *MockAccountMetastoreAssignmentsInterface_Impl_Call { - return &MockAccountMetastoreAssignmentsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockAccountMetastoreAssignmentsInterface_Impl_Call) Run(run func()) *MockAccountMetastoreAssignmentsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAccountMetastoreAssignmentsInterface_Impl_Call) Return(_a0 catalog.AccountMetastoreAssignmentsService) *MockAccountMetastoreAssignmentsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountMetastoreAssignmentsInterface_Impl_Call) RunAndReturn(run func() catalog.AccountMetastoreAssignmentsService) *MockAccountMetastoreAssignmentsInterface_Impl_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) @@ -546,54 +499,6 @@ func (_c *MockAccountMetastoreAssignmentsInterface_Update_Call) RunAndReturn(run return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockAccountMetastoreAssignmentsInterface) WithImpl(impl catalog.AccountMetastoreAssignmentsService) catalog.AccountMetastoreAssignmentsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 catalog.AccountMetastoreAssignmentsInterface - if rf, ok := ret.Get(0).(func(catalog.AccountMetastoreAssignmentsService) catalog.AccountMetastoreAssignmentsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.AccountMetastoreAssignmentsInterface) - } - } - - return r0 -} - -// MockAccountMetastoreAssignmentsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockAccountMetastoreAssignmentsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl catalog.AccountMetastoreAssignmentsService -func (_e *MockAccountMetastoreAssignmentsInterface_Expecter) WithImpl(impl interface{}) *MockAccountMetastoreAssignmentsInterface_WithImpl_Call { - return &MockAccountMetastoreAssignmentsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockAccountMetastoreAssignmentsInterface_WithImpl_Call) Run(run func(impl catalog.AccountMetastoreAssignmentsService)) *MockAccountMetastoreAssignmentsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(catalog.AccountMetastoreAssignmentsService)) - }) - return _c -} - -func (_c *MockAccountMetastoreAssignmentsInterface_WithImpl_Call) Return(_a0 catalog.AccountMetastoreAssignmentsInterface) *MockAccountMetastoreAssignmentsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountMetastoreAssignmentsInterface_WithImpl_Call) RunAndReturn(run func(catalog.AccountMetastoreAssignmentsService) catalog.AccountMetastoreAssignmentsInterface) *MockAccountMetastoreAssignmentsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/catalog/mock_account_metastores_interface.go b/experimental/mocks/service/catalog/mock_account_metastores_interface.go index 3268617d2..dd4105954 100644 --- a/experimental/mocks/service/catalog/mock_account_metastores_interface.go +++ b/experimental/mocks/service/catalog/mock_account_metastores_interface.go @@ -296,53 +296,6 @@ func (_c *MockAccountMetastoresInterface_GetByMetastoreId_Call) RunAndReturn(run return _c } -// Impl provides a mock function with given fields: -func (_m *MockAccountMetastoresInterface) Impl() catalog.AccountMetastoresService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 catalog.AccountMetastoresService - if rf, ok := ret.Get(0).(func() catalog.AccountMetastoresService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.AccountMetastoresService) - } - } - - return r0 -} - -// MockAccountMetastoresInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockAccountMetastoresInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockAccountMetastoresInterface_Expecter) Impl() *MockAccountMetastoresInterface_Impl_Call { - return &MockAccountMetastoresInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockAccountMetastoresInterface_Impl_Call) Run(run func()) *MockAccountMetastoresInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAccountMetastoresInterface_Impl_Call) Return(_a0 catalog.AccountMetastoresService) *MockAccountMetastoresInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountMetastoresInterface_Impl_Call) RunAndReturn(run func() catalog.AccountMetastoresService) *MockAccountMetastoresInterface_Impl_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) @@ -508,54 +461,6 @@ func (_c *MockAccountMetastoresInterface_Update_Call) RunAndReturn(run func(cont return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockAccountMetastoresInterface) WithImpl(impl catalog.AccountMetastoresService) catalog.AccountMetastoresInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 catalog.AccountMetastoresInterface - if rf, ok := ret.Get(0).(func(catalog.AccountMetastoresService) catalog.AccountMetastoresInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.AccountMetastoresInterface) - } - } - - return r0 -} - -// MockAccountMetastoresInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockAccountMetastoresInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl catalog.AccountMetastoresService -func (_e *MockAccountMetastoresInterface_Expecter) WithImpl(impl interface{}) *MockAccountMetastoresInterface_WithImpl_Call { - return &MockAccountMetastoresInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockAccountMetastoresInterface_WithImpl_Call) Run(run func(impl catalog.AccountMetastoresService)) *MockAccountMetastoresInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(catalog.AccountMetastoresService)) - }) - return _c -} - -func (_c *MockAccountMetastoresInterface_WithImpl_Call) Return(_a0 catalog.AccountMetastoresInterface) *MockAccountMetastoresInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountMetastoresInterface_WithImpl_Call) RunAndReturn(run func(catalog.AccountMetastoresService) catalog.AccountMetastoresInterface) *MockAccountMetastoresInterface_WithImpl_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 { diff --git a/experimental/mocks/service/catalog/mock_account_storage_credentials_interface.go b/experimental/mocks/service/catalog/mock_account_storage_credentials_interface.go index ff4db744d..2646d9cc2 100644 --- a/experimental/mocks/service/catalog/mock_account_storage_credentials_interface.go +++ b/experimental/mocks/service/catalog/mock_account_storage_credentials_interface.go @@ -298,53 +298,6 @@ func (_c *MockAccountStorageCredentialsInterface_GetByMetastoreIdAndStorageCrede return _c } -// Impl provides a mock function with given fields: -func (_m *MockAccountStorageCredentialsInterface) Impl() catalog.AccountStorageCredentialsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 catalog.AccountStorageCredentialsService - if rf, ok := ret.Get(0).(func() catalog.AccountStorageCredentialsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.AccountStorageCredentialsService) - } - } - - return r0 -} - -// MockAccountStorageCredentialsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockAccountStorageCredentialsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockAccountStorageCredentialsInterface_Expecter) Impl() *MockAccountStorageCredentialsInterface_Impl_Call { - return &MockAccountStorageCredentialsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockAccountStorageCredentialsInterface_Impl_Call) Run(run func()) *MockAccountStorageCredentialsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAccountStorageCredentialsInterface_Impl_Call) Return(_a0 catalog.AccountStorageCredentialsService) *MockAccountStorageCredentialsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountStorageCredentialsInterface_Impl_Call) RunAndReturn(run func() catalog.AccountStorageCredentialsService) *MockAccountStorageCredentialsInterface_Impl_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) @@ -571,54 +524,6 @@ func (_c *MockAccountStorageCredentialsInterface_Update_Call) RunAndReturn(run f return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockAccountStorageCredentialsInterface) WithImpl(impl catalog.AccountStorageCredentialsService) catalog.AccountStorageCredentialsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 catalog.AccountStorageCredentialsInterface - if rf, ok := ret.Get(0).(func(catalog.AccountStorageCredentialsService) catalog.AccountStorageCredentialsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.AccountStorageCredentialsInterface) - } - } - - return r0 -} - -// MockAccountStorageCredentialsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockAccountStorageCredentialsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl catalog.AccountStorageCredentialsService -func (_e *MockAccountStorageCredentialsInterface_Expecter) WithImpl(impl interface{}) *MockAccountStorageCredentialsInterface_WithImpl_Call { - return &MockAccountStorageCredentialsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockAccountStorageCredentialsInterface_WithImpl_Call) Run(run func(impl catalog.AccountStorageCredentialsService)) *MockAccountStorageCredentialsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(catalog.AccountStorageCredentialsService)) - }) - return _c -} - -func (_c *MockAccountStorageCredentialsInterface_WithImpl_Call) Return(_a0 catalog.AccountStorageCredentialsInterface) *MockAccountStorageCredentialsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountStorageCredentialsInterface_WithImpl_Call) RunAndReturn(run func(catalog.AccountStorageCredentialsService) catalog.AccountStorageCredentialsInterface) *MockAccountStorageCredentialsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/catalog/mock_artifact_allowlists_interface.go b/experimental/mocks/service/catalog/mock_artifact_allowlists_interface.go index bf61d4792..72308e190 100644 --- a/experimental/mocks/service/catalog/mock_artifact_allowlists_interface.go +++ b/experimental/mocks/service/catalog/mock_artifact_allowlists_interface.go @@ -141,53 +141,6 @@ func (_c *MockArtifactAllowlistsInterface_GetByArtifactType_Call) RunAndReturn(r return _c } -// Impl provides a mock function with given fields: -func (_m *MockArtifactAllowlistsInterface) Impl() catalog.ArtifactAllowlistsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 catalog.ArtifactAllowlistsService - if rf, ok := ret.Get(0).(func() catalog.ArtifactAllowlistsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.ArtifactAllowlistsService) - } - } - - return r0 -} - -// MockArtifactAllowlistsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockArtifactAllowlistsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockArtifactAllowlistsInterface_Expecter) Impl() *MockArtifactAllowlistsInterface_Impl_Call { - return &MockArtifactAllowlistsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockArtifactAllowlistsInterface_Impl_Call) Run(run func()) *MockArtifactAllowlistsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockArtifactAllowlistsInterface_Impl_Call) Return(_a0 catalog.ArtifactAllowlistsService) *MockArtifactAllowlistsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockArtifactAllowlistsInterface_Impl_Call) RunAndReturn(run func() catalog.ArtifactAllowlistsService) *MockArtifactAllowlistsInterface_Impl_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) @@ -247,54 +200,6 @@ func (_c *MockArtifactAllowlistsInterface_Update_Call) RunAndReturn(run func(con return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockArtifactAllowlistsInterface) WithImpl(impl catalog.ArtifactAllowlistsService) catalog.ArtifactAllowlistsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 catalog.ArtifactAllowlistsInterface - if rf, ok := ret.Get(0).(func(catalog.ArtifactAllowlistsService) catalog.ArtifactAllowlistsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.ArtifactAllowlistsInterface) - } - } - - return r0 -} - -// MockArtifactAllowlistsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockArtifactAllowlistsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl catalog.ArtifactAllowlistsService -func (_e *MockArtifactAllowlistsInterface_Expecter) WithImpl(impl interface{}) *MockArtifactAllowlistsInterface_WithImpl_Call { - return &MockArtifactAllowlistsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockArtifactAllowlistsInterface_WithImpl_Call) Run(run func(impl catalog.ArtifactAllowlistsService)) *MockArtifactAllowlistsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(catalog.ArtifactAllowlistsService)) - }) - return _c -} - -func (_c *MockArtifactAllowlistsInterface_WithImpl_Call) Return(_a0 catalog.ArtifactAllowlistsInterface) *MockArtifactAllowlistsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockArtifactAllowlistsInterface_WithImpl_Call) RunAndReturn(run func(catalog.ArtifactAllowlistsService) catalog.ArtifactAllowlistsInterface) *MockArtifactAllowlistsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/catalog/mock_catalogs_interface.go b/experimental/mocks/service/catalog/mock_catalogs_interface.go index 8dd8e8155..1d5a4665e 100644 --- a/experimental/mocks/service/catalog/mock_catalogs_interface.go +++ b/experimental/mocks/service/catalog/mock_catalogs_interface.go @@ -296,53 +296,6 @@ func (_c *MockCatalogsInterface_GetByName_Call) RunAndReturn(run func(context.Co return _c } -// Impl provides a mock function with given fields: -func (_m *MockCatalogsInterface) Impl() catalog.CatalogsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 catalog.CatalogsService - if rf, ok := ret.Get(0).(func() catalog.CatalogsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.CatalogsService) - } - } - - return r0 -} - -// MockCatalogsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockCatalogsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockCatalogsInterface_Expecter) Impl() *MockCatalogsInterface_Impl_Call { - return &MockCatalogsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockCatalogsInterface_Impl_Call) Run(run func()) *MockCatalogsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockCatalogsInterface_Impl_Call) Return(_a0 catalog.CatalogsService) *MockCatalogsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCatalogsInterface_Impl_Call) RunAndReturn(run func() catalog.CatalogsService) *MockCatalogsInterface_Impl_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) @@ -510,54 +463,6 @@ func (_c *MockCatalogsInterface_Update_Call) RunAndReturn(run func(context.Conte return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockCatalogsInterface) WithImpl(impl catalog.CatalogsService) catalog.CatalogsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 catalog.CatalogsInterface - if rf, ok := ret.Get(0).(func(catalog.CatalogsService) catalog.CatalogsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.CatalogsInterface) - } - } - - return r0 -} - -// MockCatalogsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockCatalogsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl catalog.CatalogsService -func (_e *MockCatalogsInterface_Expecter) WithImpl(impl interface{}) *MockCatalogsInterface_WithImpl_Call { - return &MockCatalogsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockCatalogsInterface_WithImpl_Call) Run(run func(impl catalog.CatalogsService)) *MockCatalogsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(catalog.CatalogsService)) - }) - return _c -} - -func (_c *MockCatalogsInterface_WithImpl_Call) Return(_a0 catalog.CatalogsInterface) *MockCatalogsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCatalogsInterface_WithImpl_Call) RunAndReturn(run func(catalog.CatalogsService) catalog.CatalogsInterface) *MockCatalogsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/catalog/mock_connections_interface.go b/experimental/mocks/service/catalog/mock_connections_interface.go index 804a23ec1..a9558ae5e 100644 --- a/experimental/mocks/service/catalog/mock_connections_interface.go +++ b/experimental/mocks/service/catalog/mock_connections_interface.go @@ -355,53 +355,6 @@ func (_c *MockConnectionsInterface_GetByName_Call) RunAndReturn(run func(context return _c } -// Impl provides a mock function with given fields: -func (_m *MockConnectionsInterface) Impl() catalog.ConnectionsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 catalog.ConnectionsService - if rf, ok := ret.Get(0).(func() catalog.ConnectionsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.ConnectionsService) - } - } - - return r0 -} - -// MockConnectionsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockConnectionsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockConnectionsInterface_Expecter) Impl() *MockConnectionsInterface_Impl_Call { - return &MockConnectionsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockConnectionsInterface_Impl_Call) Run(run func()) *MockConnectionsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockConnectionsInterface_Impl_Call) Return(_a0 catalog.ConnectionsService) *MockConnectionsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConnectionsInterface_Impl_Call) RunAndReturn(run func() catalog.ConnectionsService) *MockConnectionsInterface_Impl_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) @@ -569,54 +522,6 @@ func (_c *MockConnectionsInterface_Update_Call) RunAndReturn(run func(context.Co return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockConnectionsInterface) WithImpl(impl catalog.ConnectionsService) catalog.ConnectionsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 catalog.ConnectionsInterface - if rf, ok := ret.Get(0).(func(catalog.ConnectionsService) catalog.ConnectionsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.ConnectionsInterface) - } - } - - return r0 -} - -// MockConnectionsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockConnectionsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl catalog.ConnectionsService -func (_e *MockConnectionsInterface_Expecter) WithImpl(impl interface{}) *MockConnectionsInterface_WithImpl_Call { - return &MockConnectionsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockConnectionsInterface_WithImpl_Call) Run(run func(impl catalog.ConnectionsService)) *MockConnectionsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(catalog.ConnectionsService)) - }) - return _c -} - -func (_c *MockConnectionsInterface_WithImpl_Call) Return(_a0 catalog.ConnectionsInterface) *MockConnectionsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConnectionsInterface_WithImpl_Call) RunAndReturn(run func(catalog.ConnectionsService) catalog.ConnectionsInterface) *MockConnectionsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/catalog/mock_external_locations_interface.go b/experimental/mocks/service/catalog/mock_external_locations_interface.go index 06b91e9c3..cc4d423c4 100644 --- a/experimental/mocks/service/catalog/mock_external_locations_interface.go +++ b/experimental/mocks/service/catalog/mock_external_locations_interface.go @@ -296,53 +296,6 @@ func (_c *MockExternalLocationsInterface_GetByName_Call) RunAndReturn(run func(c return _c } -// Impl provides a mock function with given fields: -func (_m *MockExternalLocationsInterface) Impl() catalog.ExternalLocationsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 catalog.ExternalLocationsService - if rf, ok := ret.Get(0).(func() catalog.ExternalLocationsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.ExternalLocationsService) - } - } - - return r0 -} - -// MockExternalLocationsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockExternalLocationsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockExternalLocationsInterface_Expecter) Impl() *MockExternalLocationsInterface_Impl_Call { - return &MockExternalLocationsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockExternalLocationsInterface_Impl_Call) Run(run func()) *MockExternalLocationsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockExternalLocationsInterface_Impl_Call) Return(_a0 catalog.ExternalLocationsService) *MockExternalLocationsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockExternalLocationsInterface_Impl_Call) RunAndReturn(run func() catalog.ExternalLocationsService) *MockExternalLocationsInterface_Impl_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) @@ -510,54 +463,6 @@ func (_c *MockExternalLocationsInterface_Update_Call) RunAndReturn(run func(cont return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockExternalLocationsInterface) WithImpl(impl catalog.ExternalLocationsService) catalog.ExternalLocationsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 catalog.ExternalLocationsInterface - if rf, ok := ret.Get(0).(func(catalog.ExternalLocationsService) catalog.ExternalLocationsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.ExternalLocationsInterface) - } - } - - return r0 -} - -// MockExternalLocationsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockExternalLocationsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl catalog.ExternalLocationsService -func (_e *MockExternalLocationsInterface_Expecter) WithImpl(impl interface{}) *MockExternalLocationsInterface_WithImpl_Call { - return &MockExternalLocationsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockExternalLocationsInterface_WithImpl_Call) Run(run func(impl catalog.ExternalLocationsService)) *MockExternalLocationsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(catalog.ExternalLocationsService)) - }) - return _c -} - -func (_c *MockExternalLocationsInterface_WithImpl_Call) Return(_a0 catalog.ExternalLocationsInterface) *MockExternalLocationsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockExternalLocationsInterface_WithImpl_Call) RunAndReturn(run func(catalog.ExternalLocationsService) catalog.ExternalLocationsInterface) *MockExternalLocationsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/catalog/mock_functions_interface.go b/experimental/mocks/service/catalog/mock_functions_interface.go index b8f324ba7..1fdd8664b 100644 --- a/experimental/mocks/service/catalog/mock_functions_interface.go +++ b/experimental/mocks/service/catalog/mock_functions_interface.go @@ -355,53 +355,6 @@ func (_c *MockFunctionsInterface_GetByName_Call) RunAndReturn(run func(context.C return _c } -// Impl provides a mock function with given fields: -func (_m *MockFunctionsInterface) Impl() catalog.FunctionsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 catalog.FunctionsService - if rf, ok := ret.Get(0).(func() catalog.FunctionsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.FunctionsService) - } - } - - return r0 -} - -// MockFunctionsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockFunctionsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockFunctionsInterface_Expecter) Impl() *MockFunctionsInterface_Impl_Call { - return &MockFunctionsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockFunctionsInterface_Impl_Call) Run(run func()) *MockFunctionsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockFunctionsInterface_Impl_Call) Return(_a0 catalog.FunctionsService) *MockFunctionsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockFunctionsInterface_Impl_Call) RunAndReturn(run func() catalog.FunctionsService) *MockFunctionsInterface_Impl_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) @@ -569,54 +522,6 @@ func (_c *MockFunctionsInterface_Update_Call) RunAndReturn(run func(context.Cont return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockFunctionsInterface) WithImpl(impl catalog.FunctionsService) catalog.FunctionsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 catalog.FunctionsInterface - if rf, ok := ret.Get(0).(func(catalog.FunctionsService) catalog.FunctionsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.FunctionsInterface) - } - } - - return r0 -} - -// MockFunctionsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockFunctionsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl catalog.FunctionsService -func (_e *MockFunctionsInterface_Expecter) WithImpl(impl interface{}) *MockFunctionsInterface_WithImpl_Call { - return &MockFunctionsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockFunctionsInterface_WithImpl_Call) Run(run func(impl catalog.FunctionsService)) *MockFunctionsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(catalog.FunctionsService)) - }) - return _c -} - -func (_c *MockFunctionsInterface_WithImpl_Call) Return(_a0 catalog.FunctionsInterface) *MockFunctionsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockFunctionsInterface_WithImpl_Call) RunAndReturn(run func(catalog.FunctionsService) catalog.FunctionsInterface) *MockFunctionsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/catalog/mock_grants_interface.go b/experimental/mocks/service/catalog/mock_grants_interface.go index 944c9790e..f234ab21c 100644 --- a/experimental/mocks/service/catalog/mock_grants_interface.go +++ b/experimental/mocks/service/catalog/mock_grants_interface.go @@ -261,53 +261,6 @@ func (_c *MockGrantsInterface_GetEffectiveBySecurableTypeAndFullName_Call) RunAn return _c } -// Impl provides a mock function with given fields: -func (_m *MockGrantsInterface) Impl() catalog.GrantsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 catalog.GrantsService - if rf, ok := ret.Get(0).(func() catalog.GrantsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.GrantsService) - } - } - - return r0 -} - -// MockGrantsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockGrantsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockGrantsInterface_Expecter) Impl() *MockGrantsInterface_Impl_Call { - return &MockGrantsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockGrantsInterface_Impl_Call) Run(run func()) *MockGrantsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockGrantsInterface_Impl_Call) Return(_a0 catalog.GrantsService) *MockGrantsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockGrantsInterface_Impl_Call) RunAndReturn(run func() catalog.GrantsService) *MockGrantsInterface_Impl_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) @@ -367,54 +320,6 @@ func (_c *MockGrantsInterface_Update_Call) RunAndReturn(run func(context.Context return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockGrantsInterface) WithImpl(impl catalog.GrantsService) catalog.GrantsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 catalog.GrantsInterface - if rf, ok := ret.Get(0).(func(catalog.GrantsService) catalog.GrantsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.GrantsInterface) - } - } - - return r0 -} - -// MockGrantsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockGrantsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl catalog.GrantsService -func (_e *MockGrantsInterface_Expecter) WithImpl(impl interface{}) *MockGrantsInterface_WithImpl_Call { - return &MockGrantsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockGrantsInterface_WithImpl_Call) Run(run func(impl catalog.GrantsService)) *MockGrantsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(catalog.GrantsService)) - }) - return _c -} - -func (_c *MockGrantsInterface_WithImpl_Call) Return(_a0 catalog.GrantsInterface) *MockGrantsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockGrantsInterface_WithImpl_Call) RunAndReturn(run func(catalog.GrantsService) catalog.GrantsInterface) *MockGrantsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/catalog/mock_metastores_interface.go b/experimental/mocks/service/catalog/mock_metastores_interface.go index 3d0a3ae0c..2a347cecc 100644 --- a/experimental/mocks/service/catalog/mock_metastores_interface.go +++ b/experimental/mocks/service/catalog/mock_metastores_interface.go @@ -460,53 +460,6 @@ func (_c *MockMetastoresInterface_GetByName_Call) RunAndReturn(run func(context. return _c } -// Impl provides a mock function with given fields: -func (_m *MockMetastoresInterface) Impl() catalog.MetastoresService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 catalog.MetastoresService - if rf, ok := ret.Get(0).(func() catalog.MetastoresService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.MetastoresService) - } - } - - return r0 -} - -// MockMetastoresInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockMetastoresInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockMetastoresInterface_Expecter) Impl() *MockMetastoresInterface_Impl_Call { - return &MockMetastoresInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockMetastoresInterface_Impl_Call) Run(run func()) *MockMetastoresInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockMetastoresInterface_Impl_Call) Return(_a0 catalog.MetastoresService) *MockMetastoresInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockMetastoresInterface_Impl_Call) RunAndReturn(run func() catalog.MetastoresService) *MockMetastoresInterface_Impl_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) @@ -929,54 +882,6 @@ func (_c *MockMetastoresInterface_UpdateAssignment_Call) RunAndReturn(run func(c return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockMetastoresInterface) WithImpl(impl catalog.MetastoresService) catalog.MetastoresInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 catalog.MetastoresInterface - if rf, ok := ret.Get(0).(func(catalog.MetastoresService) catalog.MetastoresInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.MetastoresInterface) - } - } - - return r0 -} - -// MockMetastoresInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockMetastoresInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl catalog.MetastoresService -func (_e *MockMetastoresInterface_Expecter) WithImpl(impl interface{}) *MockMetastoresInterface_WithImpl_Call { - return &MockMetastoresInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockMetastoresInterface_WithImpl_Call) Run(run func(impl catalog.MetastoresService)) *MockMetastoresInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(catalog.MetastoresService)) - }) - return _c -} - -func (_c *MockMetastoresInterface_WithImpl_Call) Return(_a0 catalog.MetastoresInterface) *MockMetastoresInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockMetastoresInterface_WithImpl_Call) RunAndReturn(run func(catalog.MetastoresService) catalog.MetastoresInterface) *MockMetastoresInterface_WithImpl_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 { diff --git a/experimental/mocks/service/catalog/mock_model_versions_interface.go b/experimental/mocks/service/catalog/mock_model_versions_interface.go index 0e8f7ef62..e0ef0365a 100644 --- a/experimental/mocks/service/catalog/mock_model_versions_interface.go +++ b/experimental/mocks/service/catalog/mock_model_versions_interface.go @@ -358,53 +358,6 @@ func (_c *MockModelVersionsInterface_GetByFullNameAndVersion_Call) RunAndReturn( return _c } -// Impl provides a mock function with given fields: -func (_m *MockModelVersionsInterface) Impl() catalog.ModelVersionsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 catalog.ModelVersionsService - if rf, ok := ret.Get(0).(func() catalog.ModelVersionsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.ModelVersionsService) - } - } - - return r0 -} - -// MockModelVersionsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockModelVersionsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockModelVersionsInterface_Expecter) Impl() *MockModelVersionsInterface_Impl_Call { - return &MockModelVersionsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockModelVersionsInterface_Impl_Call) Run(run func()) *MockModelVersionsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockModelVersionsInterface_Impl_Call) Return(_a0 catalog.ModelVersionsService) *MockModelVersionsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockModelVersionsInterface_Impl_Call) RunAndReturn(run func() catalog.ModelVersionsService) *MockModelVersionsInterface_Impl_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) @@ -631,54 +584,6 @@ func (_c *MockModelVersionsInterface_Update_Call) RunAndReturn(run func(context. return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockModelVersionsInterface) WithImpl(impl catalog.ModelVersionsService) catalog.ModelVersionsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 catalog.ModelVersionsInterface - if rf, ok := ret.Get(0).(func(catalog.ModelVersionsService) catalog.ModelVersionsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.ModelVersionsInterface) - } - } - - return r0 -} - -// MockModelVersionsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockModelVersionsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl catalog.ModelVersionsService -func (_e *MockModelVersionsInterface_Expecter) WithImpl(impl interface{}) *MockModelVersionsInterface_WithImpl_Call { - return &MockModelVersionsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockModelVersionsInterface_WithImpl_Call) Run(run func(impl catalog.ModelVersionsService)) *MockModelVersionsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(catalog.ModelVersionsService)) - }) - return _c -} - -func (_c *MockModelVersionsInterface_WithImpl_Call) Return(_a0 catalog.ModelVersionsInterface) *MockModelVersionsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockModelVersionsInterface_WithImpl_Call) RunAndReturn(run func(catalog.ModelVersionsService) catalog.ModelVersionsInterface) *MockModelVersionsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/catalog/mock_online_tables_interface.go b/experimental/mocks/service/catalog/mock_online_tables_interface.go index ea9ac2a46..39fb1c597 100644 --- a/experimental/mocks/service/catalog/mock_online_tables_interface.go +++ b/experimental/mocks/service/catalog/mock_online_tables_interface.go @@ -294,101 +294,6 @@ func (_c *MockOnlineTablesInterface_GetByName_Call) RunAndReturn(run func(contex return _c } -// Impl provides a mock function with given fields: -func (_m *MockOnlineTablesInterface) Impl() catalog.OnlineTablesService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 catalog.OnlineTablesService - if rf, ok := ret.Get(0).(func() catalog.OnlineTablesService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.OnlineTablesService) - } - } - - return r0 -} - -// MockOnlineTablesInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockOnlineTablesInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockOnlineTablesInterface_Expecter) Impl() *MockOnlineTablesInterface_Impl_Call { - return &MockOnlineTablesInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockOnlineTablesInterface_Impl_Call) Run(run func()) *MockOnlineTablesInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockOnlineTablesInterface_Impl_Call) Return(_a0 catalog.OnlineTablesService) *MockOnlineTablesInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockOnlineTablesInterface_Impl_Call) RunAndReturn(run func() catalog.OnlineTablesService) *MockOnlineTablesInterface_Impl_Call { - _c.Call.Return(run) - return _c -} - -// WithImpl provides a mock function with given fields: impl -func (_m *MockOnlineTablesInterface) WithImpl(impl catalog.OnlineTablesService) catalog.OnlineTablesInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 catalog.OnlineTablesInterface - if rf, ok := ret.Get(0).(func(catalog.OnlineTablesService) catalog.OnlineTablesInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.OnlineTablesInterface) - } - } - - return r0 -} - -// MockOnlineTablesInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockOnlineTablesInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl catalog.OnlineTablesService -func (_e *MockOnlineTablesInterface_Expecter) WithImpl(impl interface{}) *MockOnlineTablesInterface_WithImpl_Call { - return &MockOnlineTablesInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockOnlineTablesInterface_WithImpl_Call) Run(run func(impl catalog.OnlineTablesService)) *MockOnlineTablesInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(catalog.OnlineTablesService)) - }) - return _c -} - -func (_c *MockOnlineTablesInterface_WithImpl_Call) Return(_a0 catalog.OnlineTablesInterface) *MockOnlineTablesInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockOnlineTablesInterface_WithImpl_Call) RunAndReturn(run func(catalog.OnlineTablesService) catalog.OnlineTablesInterface) *MockOnlineTablesInterface_WithImpl_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 { diff --git a/experimental/mocks/service/catalog/mock_quality_monitors_interface.go b/experimental/mocks/service/catalog/mock_quality_monitors_interface.go index 03470fe43..25e4226b9 100644 --- a/experimental/mocks/service/catalog/mock_quality_monitors_interface.go +++ b/experimental/mocks/service/catalog/mock_quality_monitors_interface.go @@ -460,53 +460,6 @@ func (_c *MockQualityMonitorsInterface_GetRefreshByTableNameAndRefreshId_Call) R return _c } -// Impl provides a mock function with given fields: -func (_m *MockQualityMonitorsInterface) Impl() catalog.QualityMonitorsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 catalog.QualityMonitorsService - if rf, ok := ret.Get(0).(func() catalog.QualityMonitorsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.QualityMonitorsService) - } - } - - return r0 -} - -// MockQualityMonitorsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockQualityMonitorsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockQualityMonitorsInterface_Expecter) Impl() *MockQualityMonitorsInterface_Impl_Call { - return &MockQualityMonitorsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockQualityMonitorsInterface_Impl_Call) Run(run func()) *MockQualityMonitorsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockQualityMonitorsInterface_Impl_Call) Return(_a0 catalog.QualityMonitorsService) *MockQualityMonitorsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQualityMonitorsInterface_Impl_Call) RunAndReturn(run func() catalog.QualityMonitorsService) *MockQualityMonitorsInterface_Impl_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) @@ -743,54 +696,6 @@ func (_c *MockQualityMonitorsInterface_Update_Call) RunAndReturn(run func(contex return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockQualityMonitorsInterface) WithImpl(impl catalog.QualityMonitorsService) catalog.QualityMonitorsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 catalog.QualityMonitorsInterface - if rf, ok := ret.Get(0).(func(catalog.QualityMonitorsService) catalog.QualityMonitorsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.QualityMonitorsInterface) - } - } - - return r0 -} - -// MockQualityMonitorsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockQualityMonitorsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl catalog.QualityMonitorsService -func (_e *MockQualityMonitorsInterface_Expecter) WithImpl(impl interface{}) *MockQualityMonitorsInterface_WithImpl_Call { - return &MockQualityMonitorsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockQualityMonitorsInterface_WithImpl_Call) Run(run func(impl catalog.QualityMonitorsService)) *MockQualityMonitorsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(catalog.QualityMonitorsService)) - }) - return _c -} - -func (_c *MockQualityMonitorsInterface_WithImpl_Call) Return(_a0 catalog.QualityMonitorsInterface) *MockQualityMonitorsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQualityMonitorsInterface_WithImpl_Call) RunAndReturn(run func(catalog.QualityMonitorsService) catalog.QualityMonitorsInterface) *MockQualityMonitorsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/catalog/mock_registered_models_interface.go b/experimental/mocks/service/catalog/mock_registered_models_interface.go index 158e12bbf..025d71d85 100644 --- a/experimental/mocks/service/catalog/mock_registered_models_interface.go +++ b/experimental/mocks/service/catalog/mock_registered_models_interface.go @@ -450,53 +450,6 @@ func (_c *MockRegisteredModelsInterface_GetByName_Call) RunAndReturn(run func(co return _c } -// Impl provides a mock function with given fields: -func (_m *MockRegisteredModelsInterface) Impl() catalog.RegisteredModelsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 catalog.RegisteredModelsService - if rf, ok := ret.Get(0).(func() catalog.RegisteredModelsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.RegisteredModelsService) - } - } - - return r0 -} - -// MockRegisteredModelsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockRegisteredModelsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockRegisteredModelsInterface_Expecter) Impl() *MockRegisteredModelsInterface_Impl_Call { - return &MockRegisteredModelsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockRegisteredModelsInterface_Impl_Call) Run(run func()) *MockRegisteredModelsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockRegisteredModelsInterface_Impl_Call) Return(_a0 catalog.RegisteredModelsService) *MockRegisteredModelsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRegisteredModelsInterface_Impl_Call) RunAndReturn(run func() catalog.RegisteredModelsService) *MockRegisteredModelsInterface_Impl_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) @@ -782,54 +735,6 @@ func (_c *MockRegisteredModelsInterface_Update_Call) RunAndReturn(run func(conte return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockRegisteredModelsInterface) WithImpl(impl catalog.RegisteredModelsService) catalog.RegisteredModelsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 catalog.RegisteredModelsInterface - if rf, ok := ret.Get(0).(func(catalog.RegisteredModelsService) catalog.RegisteredModelsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.RegisteredModelsInterface) - } - } - - return r0 -} - -// MockRegisteredModelsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockRegisteredModelsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl catalog.RegisteredModelsService -func (_e *MockRegisteredModelsInterface_Expecter) WithImpl(impl interface{}) *MockRegisteredModelsInterface_WithImpl_Call { - return &MockRegisteredModelsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockRegisteredModelsInterface_WithImpl_Call) Run(run func(impl catalog.RegisteredModelsService)) *MockRegisteredModelsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(catalog.RegisteredModelsService)) - }) - return _c -} - -func (_c *MockRegisteredModelsInterface_WithImpl_Call) Return(_a0 catalog.RegisteredModelsInterface) *MockRegisteredModelsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRegisteredModelsInterface_WithImpl_Call) RunAndReturn(run func(catalog.RegisteredModelsService) catalog.RegisteredModelsInterface) *MockRegisteredModelsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/catalog/mock_schemas_interface.go b/experimental/mocks/service/catalog/mock_schemas_interface.go index f882e53fc..4bad64dbd 100644 --- a/experimental/mocks/service/catalog/mock_schemas_interface.go +++ b/experimental/mocks/service/catalog/mock_schemas_interface.go @@ -355,53 +355,6 @@ func (_c *MockSchemasInterface_GetByName_Call) RunAndReturn(run func(context.Con return _c } -// Impl provides a mock function with given fields: -func (_m *MockSchemasInterface) Impl() catalog.SchemasService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 catalog.SchemasService - if rf, ok := ret.Get(0).(func() catalog.SchemasService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.SchemasService) - } - } - - return r0 -} - -// MockSchemasInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockSchemasInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockSchemasInterface_Expecter) Impl() *MockSchemasInterface_Impl_Call { - return &MockSchemasInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockSchemasInterface_Impl_Call) Run(run func()) *MockSchemasInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSchemasInterface_Impl_Call) Return(_a0 catalog.SchemasService) *MockSchemasInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSchemasInterface_Impl_Call) RunAndReturn(run func() catalog.SchemasService) *MockSchemasInterface_Impl_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) @@ -628,54 +581,6 @@ func (_c *MockSchemasInterface_Update_Call) RunAndReturn(run func(context.Contex return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockSchemasInterface) WithImpl(impl catalog.SchemasService) catalog.SchemasInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 catalog.SchemasInterface - if rf, ok := ret.Get(0).(func(catalog.SchemasService) catalog.SchemasInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.SchemasInterface) - } - } - - return r0 -} - -// MockSchemasInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockSchemasInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl catalog.SchemasService -func (_e *MockSchemasInterface_Expecter) WithImpl(impl interface{}) *MockSchemasInterface_WithImpl_Call { - return &MockSchemasInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockSchemasInterface_WithImpl_Call) Run(run func(impl catalog.SchemasService)) *MockSchemasInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(catalog.SchemasService)) - }) - return _c -} - -func (_c *MockSchemasInterface_WithImpl_Call) Return(_a0 catalog.SchemasInterface) *MockSchemasInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSchemasInterface_WithImpl_Call) RunAndReturn(run func(catalog.SchemasService) catalog.SchemasInterface) *MockSchemasInterface_WithImpl_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 { diff --git a/experimental/mocks/service/catalog/mock_storage_credentials_interface.go b/experimental/mocks/service/catalog/mock_storage_credentials_interface.go index 631806c11..ee4fafbc4 100644 --- a/experimental/mocks/service/catalog/mock_storage_credentials_interface.go +++ b/experimental/mocks/service/catalog/mock_storage_credentials_interface.go @@ -296,53 +296,6 @@ func (_c *MockStorageCredentialsInterface_GetByName_Call) RunAndReturn(run func( return _c } -// Impl provides a mock function with given fields: -func (_m *MockStorageCredentialsInterface) Impl() catalog.StorageCredentialsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 catalog.StorageCredentialsService - if rf, ok := ret.Get(0).(func() catalog.StorageCredentialsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.StorageCredentialsService) - } - } - - return r0 -} - -// MockStorageCredentialsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockStorageCredentialsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockStorageCredentialsInterface_Expecter) Impl() *MockStorageCredentialsInterface_Impl_Call { - return &MockStorageCredentialsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockStorageCredentialsInterface_Impl_Call) Run(run func()) *MockStorageCredentialsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStorageCredentialsInterface_Impl_Call) Return(_a0 catalog.StorageCredentialsService) *MockStorageCredentialsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStorageCredentialsInterface_Impl_Call) RunAndReturn(run func() catalog.StorageCredentialsService) *MockStorageCredentialsInterface_Impl_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) @@ -628,54 +581,6 @@ func (_c *MockStorageCredentialsInterface_Validate_Call) RunAndReturn(run func(c return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockStorageCredentialsInterface) WithImpl(impl catalog.StorageCredentialsService) catalog.StorageCredentialsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 catalog.StorageCredentialsInterface - if rf, ok := ret.Get(0).(func(catalog.StorageCredentialsService) catalog.StorageCredentialsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.StorageCredentialsInterface) - } - } - - return r0 -} - -// MockStorageCredentialsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockStorageCredentialsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl catalog.StorageCredentialsService -func (_e *MockStorageCredentialsInterface_Expecter) WithImpl(impl interface{}) *MockStorageCredentialsInterface_WithImpl_Call { - return &MockStorageCredentialsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockStorageCredentialsInterface_WithImpl_Call) Run(run func(impl catalog.StorageCredentialsService)) *MockStorageCredentialsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(catalog.StorageCredentialsService)) - }) - return _c -} - -func (_c *MockStorageCredentialsInterface_WithImpl_Call) Return(_a0 catalog.StorageCredentialsInterface) *MockStorageCredentialsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStorageCredentialsInterface_WithImpl_Call) RunAndReturn(run func(catalog.StorageCredentialsService) catalog.StorageCredentialsInterface) *MockStorageCredentialsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/catalog/mock_system_schemas_interface.go b/experimental/mocks/service/catalog/mock_system_schemas_interface.go index 7ff4aba23..be608eebc 100644 --- a/experimental/mocks/service/catalog/mock_system_schemas_interface.go +++ b/experimental/mocks/service/catalog/mock_system_schemas_interface.go @@ -167,53 +167,6 @@ func (_c *MockSystemSchemasInterface_Enable_Call) RunAndReturn(run func(context. return _c } -// Impl provides a mock function with given fields: -func (_m *MockSystemSchemasInterface) Impl() catalog.SystemSchemasService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 catalog.SystemSchemasService - if rf, ok := ret.Get(0).(func() catalog.SystemSchemasService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.SystemSchemasService) - } - } - - return r0 -} - -// MockSystemSchemasInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockSystemSchemasInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockSystemSchemasInterface_Expecter) Impl() *MockSystemSchemasInterface_Impl_Call { - return &MockSystemSchemasInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockSystemSchemasInterface_Impl_Call) Run(run func()) *MockSystemSchemasInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSystemSchemasInterface_Impl_Call) Return(_a0 catalog.SystemSchemasService) *MockSystemSchemasInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSystemSchemasInterface_Impl_Call) RunAndReturn(run func() catalog.SystemSchemasService) *MockSystemSchemasInterface_Impl_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) @@ -381,54 +334,6 @@ func (_c *MockSystemSchemasInterface_ListByMetastoreId_Call) RunAndReturn(run fu return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockSystemSchemasInterface) WithImpl(impl catalog.SystemSchemasService) catalog.SystemSchemasInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 catalog.SystemSchemasInterface - if rf, ok := ret.Get(0).(func(catalog.SystemSchemasService) catalog.SystemSchemasInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.SystemSchemasInterface) - } - } - - return r0 -} - -// MockSystemSchemasInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockSystemSchemasInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl catalog.SystemSchemasService -func (_e *MockSystemSchemasInterface_Expecter) WithImpl(impl interface{}) *MockSystemSchemasInterface_WithImpl_Call { - return &MockSystemSchemasInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockSystemSchemasInterface_WithImpl_Call) Run(run func(impl catalog.SystemSchemasService)) *MockSystemSchemasInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(catalog.SystemSchemasService)) - }) - return _c -} - -func (_c *MockSystemSchemasInterface_WithImpl_Call) Return(_a0 catalog.SystemSchemasInterface) *MockSystemSchemasInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSystemSchemasInterface_WithImpl_Call) RunAndReturn(run func(catalog.SystemSchemasService) catalog.SystemSchemasInterface) *MockSystemSchemasInterface_WithImpl_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 { diff --git a/experimental/mocks/service/catalog/mock_table_constraints_interface.go b/experimental/mocks/service/catalog/mock_table_constraints_interface.go index eb6d9819e..73dfb0d2c 100644 --- a/experimental/mocks/service/catalog/mock_table_constraints_interface.go +++ b/experimental/mocks/service/catalog/mock_table_constraints_interface.go @@ -176,101 +176,6 @@ func (_c *MockTableConstraintsInterface_DeleteByFullName_Call) RunAndReturn(run return _c } -// Impl provides a mock function with given fields: -func (_m *MockTableConstraintsInterface) Impl() catalog.TableConstraintsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 catalog.TableConstraintsService - if rf, ok := ret.Get(0).(func() catalog.TableConstraintsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.TableConstraintsService) - } - } - - return r0 -} - -// MockTableConstraintsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockTableConstraintsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockTableConstraintsInterface_Expecter) Impl() *MockTableConstraintsInterface_Impl_Call { - return &MockTableConstraintsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockTableConstraintsInterface_Impl_Call) Run(run func()) *MockTableConstraintsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockTableConstraintsInterface_Impl_Call) Return(_a0 catalog.TableConstraintsService) *MockTableConstraintsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTableConstraintsInterface_Impl_Call) RunAndReturn(run func() catalog.TableConstraintsService) *MockTableConstraintsInterface_Impl_Call { - _c.Call.Return(run) - return _c -} - -// WithImpl provides a mock function with given fields: impl -func (_m *MockTableConstraintsInterface) WithImpl(impl catalog.TableConstraintsService) catalog.TableConstraintsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 catalog.TableConstraintsInterface - if rf, ok := ret.Get(0).(func(catalog.TableConstraintsService) catalog.TableConstraintsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.TableConstraintsInterface) - } - } - - return r0 -} - -// MockTableConstraintsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockTableConstraintsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl catalog.TableConstraintsService -func (_e *MockTableConstraintsInterface_Expecter) WithImpl(impl interface{}) *MockTableConstraintsInterface_WithImpl_Call { - return &MockTableConstraintsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockTableConstraintsInterface_WithImpl_Call) Run(run func(impl catalog.TableConstraintsService)) *MockTableConstraintsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(catalog.TableConstraintsService)) - }) - return _c -} - -func (_c *MockTableConstraintsInterface_WithImpl_Call) Return(_a0 catalog.TableConstraintsInterface) *MockTableConstraintsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTableConstraintsInterface_WithImpl_Call) RunAndReturn(run func(catalog.TableConstraintsService) catalog.TableConstraintsInterface) *MockTableConstraintsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/catalog/mock_tables_interface.go b/experimental/mocks/service/catalog/mock_tables_interface.go index 4f979b1e9..d0da4a5c9 100644 --- a/experimental/mocks/service/catalog/mock_tables_interface.go +++ b/experimental/mocks/service/catalog/mock_tables_interface.go @@ -414,53 +414,6 @@ func (_c *MockTablesInterface_GetByName_Call) RunAndReturn(run func(context.Cont return _c } -// Impl provides a mock function with given fields: -func (_m *MockTablesInterface) Impl() catalog.TablesService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 catalog.TablesService - if rf, ok := ret.Get(0).(func() catalog.TablesService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.TablesService) - } - } - - return r0 -} - -// MockTablesInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockTablesInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockTablesInterface_Expecter) Impl() *MockTablesInterface_Impl_Call { - return &MockTablesInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockTablesInterface_Impl_Call) Run(run func()) *MockTablesInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockTablesInterface_Impl_Call) Return(_a0 catalog.TablesService) *MockTablesInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTablesInterface_Impl_Call) RunAndReturn(run func() catalog.TablesService) *MockTablesInterface_Impl_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) @@ -783,54 +736,6 @@ func (_c *MockTablesInterface_Update_Call) RunAndReturn(run func(context.Context return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockTablesInterface) WithImpl(impl catalog.TablesService) catalog.TablesInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 catalog.TablesInterface - if rf, ok := ret.Get(0).(func(catalog.TablesService) catalog.TablesInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.TablesInterface) - } - } - - return r0 -} - -// MockTablesInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockTablesInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl catalog.TablesService -func (_e *MockTablesInterface_Expecter) WithImpl(impl interface{}) *MockTablesInterface_WithImpl_Call { - return &MockTablesInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockTablesInterface_WithImpl_Call) Run(run func(impl catalog.TablesService)) *MockTablesInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(catalog.TablesService)) - }) - return _c -} - -func (_c *MockTablesInterface_WithImpl_Call) Return(_a0 catalog.TablesInterface) *MockTablesInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTablesInterface_WithImpl_Call) RunAndReturn(run func(catalog.TablesService) catalog.TablesInterface) *MockTablesInterface_WithImpl_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 { diff --git a/experimental/mocks/service/catalog/mock_volumes_interface.go b/experimental/mocks/service/catalog/mock_volumes_interface.go index dc23eed28..b4a6bdd0c 100644 --- a/experimental/mocks/service/catalog/mock_volumes_interface.go +++ b/experimental/mocks/service/catalog/mock_volumes_interface.go @@ -237,53 +237,6 @@ func (_c *MockVolumesInterface_GetByName_Call) RunAndReturn(run func(context.Con return _c } -// Impl provides a mock function with given fields: -func (_m *MockVolumesInterface) Impl() catalog.VolumesService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 catalog.VolumesService - if rf, ok := ret.Get(0).(func() catalog.VolumesService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.VolumesService) - } - } - - return r0 -} - -// MockVolumesInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockVolumesInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockVolumesInterface_Expecter) Impl() *MockVolumesInterface_Impl_Call { - return &MockVolumesInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockVolumesInterface_Impl_Call) Run(run func()) *MockVolumesInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockVolumesInterface_Impl_Call) Return(_a0 catalog.VolumesService) *MockVolumesInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockVolumesInterface_Impl_Call) RunAndReturn(run func() catalog.VolumesService) *MockVolumesInterface_Impl_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) @@ -628,54 +581,6 @@ func (_c *MockVolumesInterface_VolumeInfoNameToVolumeIdMap_Call) RunAndReturn(ru return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockVolumesInterface) WithImpl(impl catalog.VolumesService) catalog.VolumesInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 catalog.VolumesInterface - if rf, ok := ret.Get(0).(func(catalog.VolumesService) catalog.VolumesInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.VolumesInterface) - } - } - - return r0 -} - -// MockVolumesInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockVolumesInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl catalog.VolumesService -func (_e *MockVolumesInterface_Expecter) WithImpl(impl interface{}) *MockVolumesInterface_WithImpl_Call { - return &MockVolumesInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockVolumesInterface_WithImpl_Call) Run(run func(impl catalog.VolumesService)) *MockVolumesInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(catalog.VolumesService)) - }) - return _c -} - -func (_c *MockVolumesInterface_WithImpl_Call) Return(_a0 catalog.VolumesInterface) *MockVolumesInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockVolumesInterface_WithImpl_Call) RunAndReturn(run func(catalog.VolumesService) catalog.VolumesInterface) *MockVolumesInterface_WithImpl_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 { diff --git a/experimental/mocks/service/catalog/mock_workspace_bindings_interface.go b/experimental/mocks/service/catalog/mock_workspace_bindings_interface.go index 47306208c..1bce0578f 100644 --- a/experimental/mocks/service/catalog/mock_workspace_bindings_interface.go +++ b/experimental/mocks/service/catalog/mock_workspace_bindings_interface.go @@ -7,6 +7,8 @@ import ( catalog "github.com/databricks/databricks-sdk-go/service/catalog" + listing "github.com/databricks/databricks-sdk-go/listing" + mock "github.com/stretchr/testify/mock" ) @@ -83,23 +85,72 @@ func (_c *MockWorkspaceBindingsInterface_Get_Call) RunAndReturn(run func(context } // GetBindings provides a mock function with given fields: ctx, request -func (_m *MockWorkspaceBindingsInterface) GetBindings(ctx context.Context, request catalog.GetBindingsRequest) (*catalog.WorkspaceBindingsResponse, error) { +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 *catalog.WorkspaceBindingsResponse + 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.WorkspaceBindingsResponse, error)); ok { + 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.WorkspaceBindingsResponse); ok { + 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.WorkspaceBindingsResponse) + r0 = ret.Get(0).([]catalog.WorkspaceBinding) } } @@ -112,31 +163,31 @@ func (_m *MockWorkspaceBindingsInterface) GetBindings(ctx context.Context, reque return r0, r1 } -// MockWorkspaceBindingsInterface_GetBindings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBindings' -type MockWorkspaceBindingsInterface_GetBindings_Call struct { +// 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 } -// GetBindings is a helper method to define mock.On call +// GetBindingsAll 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 (_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_GetBindings_Call) Run(run func(ctx context.Context, request catalog.GetBindingsRequest)) *MockWorkspaceBindingsInterface_GetBindings_Call { +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_GetBindings_Call) Return(_a0 *catalog.WorkspaceBindingsResponse, _a1 error) *MockWorkspaceBindingsInterface_GetBindings_Call { +func (_c *MockWorkspaceBindingsInterface_GetBindingsAll_Call) Return(_a0 []catalog.WorkspaceBinding, _a1 error) *MockWorkspaceBindingsInterface_GetBindingsAll_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *MockWorkspaceBindingsInterface_GetBindings_Call) RunAndReturn(run func(context.Context, catalog.GetBindingsRequest) (*catalog.WorkspaceBindingsResponse, error)) *MockWorkspaceBindingsInterface_GetBindings_Call { +func (_c *MockWorkspaceBindingsInterface_GetBindingsAll_Call) RunAndReturn(run func(context.Context, catalog.GetBindingsRequest) ([]catalog.WorkspaceBinding, error)) *MockWorkspaceBindingsInterface_GetBindingsAll_Call { _c.Call.Return(run) return _c } @@ -260,53 +311,6 @@ func (_c *MockWorkspaceBindingsInterface_GetByName_Call) RunAndReturn(run func(c return _c } -// Impl provides a mock function with given fields: -func (_m *MockWorkspaceBindingsInterface) Impl() catalog.WorkspaceBindingsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 catalog.WorkspaceBindingsService - if rf, ok := ret.Get(0).(func() catalog.WorkspaceBindingsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.WorkspaceBindingsService) - } - } - - return r0 -} - -// MockWorkspaceBindingsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockWorkspaceBindingsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockWorkspaceBindingsInterface_Expecter) Impl() *MockWorkspaceBindingsInterface_Impl_Call { - return &MockWorkspaceBindingsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockWorkspaceBindingsInterface_Impl_Call) Run(run func()) *MockWorkspaceBindingsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockWorkspaceBindingsInterface_Impl_Call) Return(_a0 catalog.WorkspaceBindingsService) *MockWorkspaceBindingsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWorkspaceBindingsInterface_Impl_Call) RunAndReturn(run func() catalog.WorkspaceBindingsService) *MockWorkspaceBindingsInterface_Impl_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) @@ -425,54 +429,6 @@ func (_c *MockWorkspaceBindingsInterface_UpdateBindings_Call) RunAndReturn(run f return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockWorkspaceBindingsInterface) WithImpl(impl catalog.WorkspaceBindingsService) catalog.WorkspaceBindingsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 catalog.WorkspaceBindingsInterface - if rf, ok := ret.Get(0).(func(catalog.WorkspaceBindingsService) catalog.WorkspaceBindingsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(catalog.WorkspaceBindingsInterface) - } - } - - return r0 -} - -// MockWorkspaceBindingsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockWorkspaceBindingsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl catalog.WorkspaceBindingsService -func (_e *MockWorkspaceBindingsInterface_Expecter) WithImpl(impl interface{}) *MockWorkspaceBindingsInterface_WithImpl_Call { - return &MockWorkspaceBindingsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockWorkspaceBindingsInterface_WithImpl_Call) Run(run func(impl catalog.WorkspaceBindingsService)) *MockWorkspaceBindingsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(catalog.WorkspaceBindingsService)) - }) - return _c -} - -func (_c *MockWorkspaceBindingsInterface_WithImpl_Call) Return(_a0 catalog.WorkspaceBindingsInterface) *MockWorkspaceBindingsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWorkspaceBindingsInterface_WithImpl_Call) RunAndReturn(run func(catalog.WorkspaceBindingsService) catalog.WorkspaceBindingsInterface) *MockWorkspaceBindingsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/compute/mock_cluster_policies_interface.go b/experimental/mocks/service/compute/mock_cluster_policies_interface.go index 0766347b0..250c365fa 100644 --- a/experimental/mocks/service/compute/mock_cluster_policies_interface.go +++ b/experimental/mocks/service/compute/mock_cluster_policies_interface.go @@ -226,7 +226,7 @@ func (_c *MockClusterPoliciesInterface_Edit_Call) RunAndReturn(run func(context. } // Get provides a mock function with given fields: ctx, request -func (_m *MockClusterPoliciesInterface) Get(ctx context.Context, request compute.GetClusterPolicyRequest) (*compute.Policy, error) { +func (_m *MockClusterPoliciesInterface) Get(ctx context.Context, request compute.GetPolicy) (*compute.Policy, error) { ret := _m.Called(ctx, request) if len(ret) == 0 { @@ -235,10 +235,10 @@ func (_m *MockClusterPoliciesInterface) Get(ctx context.Context, request compute var r0 *compute.Policy var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.GetClusterPolicyRequest) (*compute.Policy, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, compute.GetPolicy) (*compute.Policy, error)); ok { return rf(ctx, request) } - if rf, ok := ret.Get(0).(func(context.Context, compute.GetClusterPolicyRequest) *compute.Policy); ok { + if rf, ok := ret.Get(0).(func(context.Context, compute.GetPolicy) *compute.Policy); ok { r0 = rf(ctx, request) } else { if ret.Get(0) != nil { @@ -246,7 +246,7 @@ func (_m *MockClusterPoliciesInterface) Get(ctx context.Context, request compute } } - if rf, ok := ret.Get(1).(func(context.Context, compute.GetClusterPolicyRequest) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, compute.GetPolicy) error); ok { r1 = rf(ctx, request) } else { r1 = ret.Error(1) @@ -262,14 +262,14 @@ type MockClusterPoliciesInterface_Get_Call struct { // Get is a helper method to define mock.On call // - ctx context.Context -// - request compute.GetClusterPolicyRequest +// - request compute.GetPolicy 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 { +func (_c *MockClusterPoliciesInterface_Get_Call) Run(run func(ctx context.Context, request compute.GetPolicy)) *MockClusterPoliciesInterface_Get_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.GetClusterPolicyRequest)) + run(args[0].(context.Context), args[1].(compute.GetPolicy)) }) return _c } @@ -279,7 +279,7 @@ func (_c *MockClusterPoliciesInterface_Get_Call) Return(_a0 *compute.Policy, _a1 return _c } -func (_c *MockClusterPoliciesInterface_Get_Call) RunAndReturn(run func(context.Context, compute.GetClusterPolicyRequest) (*compute.Policy, error)) *MockClusterPoliciesInterface_Get_Call { +func (_c *MockClusterPoliciesInterface_Get_Call) RunAndReturn(run func(context.Context, compute.GetPolicy) (*compute.Policy, error)) *MockClusterPoliciesInterface_Get_Call { _c.Call.Return(run) return _c } @@ -638,55 +638,8 @@ func (_c *MockClusterPoliciesInterface_GetPermissionsByClusterPolicyId_Call) Run return _c } -// Impl provides a mock function with given fields: -func (_m *MockClusterPoliciesInterface) Impl() compute.ClusterPoliciesService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 compute.ClusterPoliciesService - if rf, ok := ret.Get(0).(func() compute.ClusterPoliciesService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(compute.ClusterPoliciesService) - } - } - - return r0 -} - -// MockClusterPoliciesInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockClusterPoliciesInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockClusterPoliciesInterface_Expecter) Impl() *MockClusterPoliciesInterface_Impl_Call { - return &MockClusterPoliciesInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockClusterPoliciesInterface_Impl_Call) Run(run func()) *MockClusterPoliciesInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockClusterPoliciesInterface_Impl_Call) Return(_a0 compute.ClusterPoliciesService) *MockClusterPoliciesInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClusterPoliciesInterface_Impl_Call) RunAndReturn(run func() compute.ClusterPoliciesService) *MockClusterPoliciesInterface_Impl_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] { +func (_m *MockClusterPoliciesInterface) List(ctx context.Context, request compute.ListPolicies) listing.Iterator[compute.Policy] { ret := _m.Called(ctx, request) if len(ret) == 0 { @@ -694,7 +647,7 @@ func (_m *MockClusterPoliciesInterface) List(ctx context.Context, request comput } var r0 listing.Iterator[compute.Policy] - if rf, ok := ret.Get(0).(func(context.Context, compute.ListClusterPoliciesRequest) listing.Iterator[compute.Policy]); ok { + if rf, ok := ret.Get(0).(func(context.Context, compute.ListPolicies) listing.Iterator[compute.Policy]); ok { r0 = rf(ctx, request) } else { if ret.Get(0) != nil { @@ -712,14 +665,14 @@ type MockClusterPoliciesInterface_List_Call struct { // List is a helper method to define mock.On call // - ctx context.Context -// - request compute.ListClusterPoliciesRequest +// - request compute.ListPolicies 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 { +func (_c *MockClusterPoliciesInterface_List_Call) Run(run func(ctx context.Context, request compute.ListPolicies)) *MockClusterPoliciesInterface_List_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.ListClusterPoliciesRequest)) + run(args[0].(context.Context), args[1].(compute.ListPolicies)) }) return _c } @@ -729,13 +682,13 @@ func (_c *MockClusterPoliciesInterface_List_Call) Return(_a0 listing.Iterator[co return _c } -func (_c *MockClusterPoliciesInterface_List_Call) RunAndReturn(run func(context.Context, compute.ListClusterPoliciesRequest) listing.Iterator[compute.Policy]) *MockClusterPoliciesInterface_List_Call { +func (_c *MockClusterPoliciesInterface_List_Call) RunAndReturn(run func(context.Context, compute.ListPolicies) 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) { +func (_m *MockClusterPoliciesInterface) ListAll(ctx context.Context, request compute.ListPolicies) ([]compute.Policy, error) { ret := _m.Called(ctx, request) if len(ret) == 0 { @@ -744,10 +697,10 @@ func (_m *MockClusterPoliciesInterface) ListAll(ctx context.Context, request com var r0 []compute.Policy var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.ListClusterPoliciesRequest) ([]compute.Policy, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, compute.ListPolicies) ([]compute.Policy, error)); ok { return rf(ctx, request) } - if rf, ok := ret.Get(0).(func(context.Context, compute.ListClusterPoliciesRequest) []compute.Policy); ok { + if rf, ok := ret.Get(0).(func(context.Context, compute.ListPolicies) []compute.Policy); ok { r0 = rf(ctx, request) } else { if ret.Get(0) != nil { @@ -755,7 +708,7 @@ func (_m *MockClusterPoliciesInterface) ListAll(ctx context.Context, request com } } - if rf, ok := ret.Get(1).(func(context.Context, compute.ListClusterPoliciesRequest) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, compute.ListPolicies) error); ok { r1 = rf(ctx, request) } else { r1 = ret.Error(1) @@ -771,14 +724,14 @@ type MockClusterPoliciesInterface_ListAll_Call struct { // ListAll is a helper method to define mock.On call // - ctx context.Context -// - request compute.ListClusterPoliciesRequest +// - request compute.ListPolicies 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 { +func (_c *MockClusterPoliciesInterface_ListAll_Call) Run(run func(ctx context.Context, request compute.ListPolicies)) *MockClusterPoliciesInterface_ListAll_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.ListClusterPoliciesRequest)) + run(args[0].(context.Context), args[1].(compute.ListPolicies)) }) return _c } @@ -788,13 +741,13 @@ func (_c *MockClusterPoliciesInterface_ListAll_Call) Return(_a0 []compute.Policy return _c } -func (_c *MockClusterPoliciesInterface_ListAll_Call) RunAndReturn(run func(context.Context, compute.ListClusterPoliciesRequest) ([]compute.Policy, error)) *MockClusterPoliciesInterface_ListAll_Call { +func (_c *MockClusterPoliciesInterface_ListAll_Call) RunAndReturn(run func(context.Context, compute.ListPolicies) ([]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) { +func (_m *MockClusterPoliciesInterface) PolicyNameToPolicyIdMap(ctx context.Context, request compute.ListPolicies) (map[string]string, error) { ret := _m.Called(ctx, request) if len(ret) == 0 { @@ -803,10 +756,10 @@ func (_m *MockClusterPoliciesInterface) PolicyNameToPolicyIdMap(ctx context.Cont var r0 map[string]string var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.ListClusterPoliciesRequest) (map[string]string, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, compute.ListPolicies) (map[string]string, error)); ok { return rf(ctx, request) } - if rf, ok := ret.Get(0).(func(context.Context, compute.ListClusterPoliciesRequest) map[string]string); ok { + if rf, ok := ret.Get(0).(func(context.Context, compute.ListPolicies) map[string]string); ok { r0 = rf(ctx, request) } else { if ret.Get(0) != nil { @@ -814,7 +767,7 @@ func (_m *MockClusterPoliciesInterface) PolicyNameToPolicyIdMap(ctx context.Cont } } - if rf, ok := ret.Get(1).(func(context.Context, compute.ListClusterPoliciesRequest) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, compute.ListPolicies) error); ok { r1 = rf(ctx, request) } else { r1 = ret.Error(1) @@ -830,14 +783,14 @@ type MockClusterPoliciesInterface_PolicyNameToPolicyIdMap_Call struct { // PolicyNameToPolicyIdMap is a helper method to define mock.On call // - ctx context.Context -// - request compute.ListClusterPoliciesRequest +// - request compute.ListPolicies 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 { +func (_c *MockClusterPoliciesInterface_PolicyNameToPolicyIdMap_Call) Run(run func(ctx context.Context, request compute.ListPolicies)) *MockClusterPoliciesInterface_PolicyNameToPolicyIdMap_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.ListClusterPoliciesRequest)) + run(args[0].(context.Context), args[1].(compute.ListPolicies)) }) return _c } @@ -847,7 +800,7 @@ func (_c *MockClusterPoliciesInterface_PolicyNameToPolicyIdMap_Call) Return(_a0 return _c } -func (_c *MockClusterPoliciesInterface_PolicyNameToPolicyIdMap_Call) RunAndReturn(run func(context.Context, compute.ListClusterPoliciesRequest) (map[string]string, error)) *MockClusterPoliciesInterface_PolicyNameToPolicyIdMap_Call { +func (_c *MockClusterPoliciesInterface_PolicyNameToPolicyIdMap_Call) RunAndReturn(run func(context.Context, compute.ListPolicies) (map[string]string, error)) *MockClusterPoliciesInterface_PolicyNameToPolicyIdMap_Call { _c.Call.Return(run) return _c } @@ -970,54 +923,6 @@ func (_c *MockClusterPoliciesInterface_UpdatePermissions_Call) RunAndReturn(run return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockClusterPoliciesInterface) WithImpl(impl compute.ClusterPoliciesService) compute.ClusterPoliciesInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 compute.ClusterPoliciesInterface - if rf, ok := ret.Get(0).(func(compute.ClusterPoliciesService) compute.ClusterPoliciesInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(compute.ClusterPoliciesInterface) - } - } - - return r0 -} - -// MockClusterPoliciesInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockClusterPoliciesInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl compute.ClusterPoliciesService -func (_e *MockClusterPoliciesInterface_Expecter) WithImpl(impl interface{}) *MockClusterPoliciesInterface_WithImpl_Call { - return &MockClusterPoliciesInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockClusterPoliciesInterface_WithImpl_Call) Run(run func(impl compute.ClusterPoliciesService)) *MockClusterPoliciesInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(compute.ClusterPoliciesService)) - }) - return _c -} - -func (_c *MockClusterPoliciesInterface_WithImpl_Call) Return(_a0 compute.ClusterPoliciesInterface) *MockClusterPoliciesInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClusterPoliciesInterface_WithImpl_Call) RunAndReturn(run func(compute.ClusterPoliciesService) compute.ClusterPoliciesInterface) *MockClusterPoliciesInterface_WithImpl_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 { diff --git a/experimental/mocks/service/compute/mock_clusters_interface.go b/experimental/mocks/service/compute/mock_clusters_interface.go index 1be96be87..be48ba31e 100644 --- a/experimental/mocks/service/compute/mock_clusters_interface.go +++ b/experimental/mocks/service/compute/mock_clusters_interface.go @@ -1297,53 +1297,6 @@ func (_c *MockClustersInterface_GetPermissionsByClusterId_Call) RunAndReturn(run return _c } -// Impl provides a mock function with given fields: -func (_m *MockClustersInterface) Impl() compute.ClustersService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 compute.ClustersService - if rf, ok := ret.Get(0).(func() compute.ClustersService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(compute.ClustersService) - } - } - - return r0 -} - -// MockClustersInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockClustersInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockClustersInterface_Expecter) Impl() *MockClustersInterface_Impl_Call { - return &MockClustersInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockClustersInterface_Impl_Call) Run(run func()) *MockClustersInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockClustersInterface_Impl_Call) Return(_a0 compute.ClustersService) *MockClustersInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClustersInterface_Impl_Call) RunAndReturn(run func() compute.ClustersService) *MockClustersInterface_Impl_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) @@ -2601,6 +2554,139 @@ func (_c *MockClustersInterface_UnpinByClusterId_Call) RunAndReturn(run func(con 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) @@ -2782,54 +2868,6 @@ func (_c *MockClustersInterface_WaitGetClusterTerminated_Call) RunAndReturn(run return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockClustersInterface) WithImpl(impl compute.ClustersService) compute.ClustersInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 compute.ClustersInterface - if rf, ok := ret.Get(0).(func(compute.ClustersService) compute.ClustersInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(compute.ClustersInterface) - } - } - - return r0 -} - -// MockClustersInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockClustersInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl compute.ClustersService -func (_e *MockClustersInterface_Expecter) WithImpl(impl interface{}) *MockClustersInterface_WithImpl_Call { - return &MockClustersInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockClustersInterface_WithImpl_Call) Run(run func(impl compute.ClustersService)) *MockClustersInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(compute.ClustersService)) - }) - return _c -} - -func (_c *MockClustersInterface_WithImpl_Call) Return(_a0 compute.ClustersInterface) *MockClustersInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClustersInterface_WithImpl_Call) RunAndReturn(run func(compute.ClustersService) compute.ClustersInterface) *MockClustersInterface_WithImpl_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 { diff --git a/experimental/mocks/service/compute/mock_command_execution_interface.go b/experimental/mocks/service/compute/mock_command_execution_interface.go index 50528a69f..f1908b864 100644 --- a/experimental/mocks/service/compute/mock_command_execution_interface.go +++ b/experimental/mocks/service/compute/mock_command_execution_interface.go @@ -591,53 +591,6 @@ func (_c *MockCommandExecutionInterface_ExecuteAndWait_Call) RunAndReturn(run fu return _c } -// Impl provides a mock function with given fields: -func (_m *MockCommandExecutionInterface) Impl() compute.CommandExecutionService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 compute.CommandExecutionService - if rf, ok := ret.Get(0).(func() compute.CommandExecutionService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(compute.CommandExecutionService) - } - } - - return r0 -} - -// MockCommandExecutionInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockCommandExecutionInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockCommandExecutionInterface_Expecter) Impl() *MockCommandExecutionInterface_Impl_Call { - return &MockCommandExecutionInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockCommandExecutionInterface_Impl_Call) Run(run func()) *MockCommandExecutionInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockCommandExecutionInterface_Impl_Call) Return(_a0 compute.CommandExecutionService) *MockCommandExecutionInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCommandExecutionInterface_Impl_Call) RunAndReturn(run func() compute.CommandExecutionService) *MockCommandExecutionInterface_Impl_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) @@ -886,54 +839,6 @@ func (_c *MockCommandExecutionInterface_WaitContextStatusCommandExecutionRunning return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockCommandExecutionInterface) WithImpl(impl compute.CommandExecutionService) compute.CommandExecutionInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 compute.CommandExecutionInterface - if rf, ok := ret.Get(0).(func(compute.CommandExecutionService) compute.CommandExecutionInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(compute.CommandExecutionInterface) - } - } - - return r0 -} - -// MockCommandExecutionInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockCommandExecutionInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl compute.CommandExecutionService -func (_e *MockCommandExecutionInterface_Expecter) WithImpl(impl interface{}) *MockCommandExecutionInterface_WithImpl_Call { - return &MockCommandExecutionInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockCommandExecutionInterface_WithImpl_Call) Run(run func(impl compute.CommandExecutionService)) *MockCommandExecutionInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(compute.CommandExecutionService)) - }) - return _c -} - -func (_c *MockCommandExecutionInterface_WithImpl_Call) Return(_a0 compute.CommandExecutionInterface) *MockCommandExecutionInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCommandExecutionInterface_WithImpl_Call) RunAndReturn(run func(compute.CommandExecutionService) compute.CommandExecutionInterface) *MockCommandExecutionInterface_WithImpl_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 { diff --git a/experimental/mocks/service/compute/mock_global_init_scripts_interface.go b/experimental/mocks/service/compute/mock_global_init_scripts_interface.go index da6ac1321..d57c005c1 100644 --- a/experimental/mocks/service/compute/mock_global_init_scripts_interface.go +++ b/experimental/mocks/service/compute/mock_global_init_scripts_interface.go @@ -413,53 +413,6 @@ func (_c *MockGlobalInitScriptsInterface_GlobalInitScriptDetailsNameToScriptIdMa return _c } -// Impl provides a mock function with given fields: -func (_m *MockGlobalInitScriptsInterface) Impl() compute.GlobalInitScriptsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 compute.GlobalInitScriptsService - if rf, ok := ret.Get(0).(func() compute.GlobalInitScriptsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(compute.GlobalInitScriptsService) - } - } - - return r0 -} - -// MockGlobalInitScriptsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockGlobalInitScriptsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockGlobalInitScriptsInterface_Expecter) Impl() *MockGlobalInitScriptsInterface_Impl_Call { - return &MockGlobalInitScriptsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockGlobalInitScriptsInterface_Impl_Call) Run(run func()) *MockGlobalInitScriptsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockGlobalInitScriptsInterface_Impl_Call) Return(_a0 compute.GlobalInitScriptsService) *MockGlobalInitScriptsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockGlobalInitScriptsInterface_Impl_Call) RunAndReturn(run func() compute.GlobalInitScriptsService) *MockGlobalInitScriptsInterface_Impl_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) @@ -613,54 +566,6 @@ func (_c *MockGlobalInitScriptsInterface_Update_Call) RunAndReturn(run func(cont return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockGlobalInitScriptsInterface) WithImpl(impl compute.GlobalInitScriptsService) compute.GlobalInitScriptsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 compute.GlobalInitScriptsInterface - if rf, ok := ret.Get(0).(func(compute.GlobalInitScriptsService) compute.GlobalInitScriptsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(compute.GlobalInitScriptsInterface) - } - } - - return r0 -} - -// MockGlobalInitScriptsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockGlobalInitScriptsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl compute.GlobalInitScriptsService -func (_e *MockGlobalInitScriptsInterface_Expecter) WithImpl(impl interface{}) *MockGlobalInitScriptsInterface_WithImpl_Call { - return &MockGlobalInitScriptsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockGlobalInitScriptsInterface_WithImpl_Call) Run(run func(impl compute.GlobalInitScriptsService)) *MockGlobalInitScriptsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(compute.GlobalInitScriptsService)) - }) - return _c -} - -func (_c *MockGlobalInitScriptsInterface_WithImpl_Call) Return(_a0 compute.GlobalInitScriptsInterface) *MockGlobalInitScriptsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockGlobalInitScriptsInterface_WithImpl_Call) RunAndReturn(run func(compute.GlobalInitScriptsService) compute.GlobalInitScriptsInterface) *MockGlobalInitScriptsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/compute/mock_instance_pools_interface.go b/experimental/mocks/service/compute/mock_instance_pools_interface.go index 8f068caa4..d81eb239f 100644 --- a/experimental/mocks/service/compute/mock_instance_pools_interface.go +++ b/experimental/mocks/service/compute/mock_instance_pools_interface.go @@ -638,53 +638,6 @@ func (_c *MockInstancePoolsInterface_GetPermissionsByInstancePoolId_Call) RunAnd return _c } -// Impl provides a mock function with given fields: -func (_m *MockInstancePoolsInterface) Impl() compute.InstancePoolsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 compute.InstancePoolsService - if rf, ok := ret.Get(0).(func() compute.InstancePoolsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(compute.InstancePoolsService) - } - } - - return r0 -} - -// MockInstancePoolsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockInstancePoolsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockInstancePoolsInterface_Expecter) Impl() *MockInstancePoolsInterface_Impl_Call { - return &MockInstancePoolsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockInstancePoolsInterface_Impl_Call) Run(run func()) *MockInstancePoolsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockInstancePoolsInterface_Impl_Call) Return(_a0 compute.InstancePoolsService) *MockInstancePoolsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockInstancePoolsInterface_Impl_Call) RunAndReturn(run func() compute.InstancePoolsService) *MockInstancePoolsInterface_Impl_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) @@ -967,54 +920,6 @@ func (_c *MockInstancePoolsInterface_UpdatePermissions_Call) RunAndReturn(run fu return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockInstancePoolsInterface) WithImpl(impl compute.InstancePoolsService) compute.InstancePoolsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 compute.InstancePoolsInterface - if rf, ok := ret.Get(0).(func(compute.InstancePoolsService) compute.InstancePoolsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(compute.InstancePoolsInterface) - } - } - - return r0 -} - -// MockInstancePoolsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockInstancePoolsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl compute.InstancePoolsService -func (_e *MockInstancePoolsInterface_Expecter) WithImpl(impl interface{}) *MockInstancePoolsInterface_WithImpl_Call { - return &MockInstancePoolsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockInstancePoolsInterface_WithImpl_Call) Run(run func(impl compute.InstancePoolsService)) *MockInstancePoolsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(compute.InstancePoolsService)) - }) - return _c -} - -func (_c *MockInstancePoolsInterface_WithImpl_Call) Return(_a0 compute.InstancePoolsInterface) *MockInstancePoolsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockInstancePoolsInterface_WithImpl_Call) RunAndReturn(run func(compute.InstancePoolsService) compute.InstancePoolsInterface) *MockInstancePoolsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/compute/mock_instance_profiles_interface.go b/experimental/mocks/service/compute/mock_instance_profiles_interface.go index 39c96d096..4b99f32bf 100644 --- a/experimental/mocks/service/compute/mock_instance_profiles_interface.go +++ b/experimental/mocks/service/compute/mock_instance_profiles_interface.go @@ -119,53 +119,6 @@ func (_c *MockInstanceProfilesInterface_Edit_Call) RunAndReturn(run func(context return _c } -// Impl provides a mock function with given fields: -func (_m *MockInstanceProfilesInterface) Impl() compute.InstanceProfilesService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 compute.InstanceProfilesService - if rf, ok := ret.Get(0).(func() compute.InstanceProfilesService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(compute.InstanceProfilesService) - } - } - - return r0 -} - -// MockInstanceProfilesInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockInstanceProfilesInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockInstanceProfilesInterface_Expecter) Impl() *MockInstanceProfilesInterface_Impl_Call { - return &MockInstanceProfilesInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockInstanceProfilesInterface_Impl_Call) Run(run func()) *MockInstanceProfilesInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockInstanceProfilesInterface_Impl_Call) Return(_a0 compute.InstanceProfilesService) *MockInstanceProfilesInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockInstanceProfilesInterface_Impl_Call) RunAndReturn(run func() compute.InstanceProfilesService) *MockInstanceProfilesInterface_Impl_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) @@ -366,54 +319,6 @@ func (_c *MockInstanceProfilesInterface_RemoveByInstanceProfileArn_Call) RunAndR return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockInstanceProfilesInterface) WithImpl(impl compute.InstanceProfilesService) compute.InstanceProfilesInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 compute.InstanceProfilesInterface - if rf, ok := ret.Get(0).(func(compute.InstanceProfilesService) compute.InstanceProfilesInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(compute.InstanceProfilesInterface) - } - } - - return r0 -} - -// MockInstanceProfilesInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockInstanceProfilesInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl compute.InstanceProfilesService -func (_e *MockInstanceProfilesInterface_Expecter) WithImpl(impl interface{}) *MockInstanceProfilesInterface_WithImpl_Call { - return &MockInstanceProfilesInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockInstanceProfilesInterface_WithImpl_Call) Run(run func(impl compute.InstanceProfilesService)) *MockInstanceProfilesInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(compute.InstanceProfilesService)) - }) - return _c -} - -func (_c *MockInstanceProfilesInterface_WithImpl_Call) Return(_a0 compute.InstanceProfilesInterface) *MockInstanceProfilesInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockInstanceProfilesInterface_WithImpl_Call) RunAndReturn(run func(compute.InstanceProfilesService) compute.InstanceProfilesInterface) *MockInstanceProfilesInterface_WithImpl_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 { diff --git a/experimental/mocks/service/compute/mock_libraries_interface.go b/experimental/mocks/service/compute/mock_libraries_interface.go index 9e6e91215..5f9a8696a 100644 --- a/experimental/mocks/service/compute/mock_libraries_interface.go +++ b/experimental/mocks/service/compute/mock_libraries_interface.go @@ -300,53 +300,6 @@ func (_c *MockLibrariesInterface_ClusterStatusByClusterId_Call) RunAndReturn(run return _c } -// Impl provides a mock function with given fields: -func (_m *MockLibrariesInterface) Impl() compute.LibrariesService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 compute.LibrariesService - if rf, ok := ret.Get(0).(func() compute.LibrariesService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(compute.LibrariesService) - } - } - - return r0 -} - -// MockLibrariesInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockLibrariesInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockLibrariesInterface_Expecter) Impl() *MockLibrariesInterface_Impl_Call { - return &MockLibrariesInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockLibrariesInterface_Impl_Call) Run(run func()) *MockLibrariesInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockLibrariesInterface_Impl_Call) Return(_a0 compute.LibrariesService) *MockLibrariesInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockLibrariesInterface_Impl_Call) RunAndReturn(run func() compute.LibrariesService) *MockLibrariesInterface_Impl_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) @@ -503,54 +456,6 @@ func (_c *MockLibrariesInterface_UpdateAndWait_Call) RunAndReturn(run func(conte return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockLibrariesInterface) WithImpl(impl compute.LibrariesService) compute.LibrariesInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 compute.LibrariesInterface - if rf, ok := ret.Get(0).(func(compute.LibrariesService) compute.LibrariesInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(compute.LibrariesInterface) - } - } - - return r0 -} - -// MockLibrariesInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockLibrariesInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl compute.LibrariesService -func (_e *MockLibrariesInterface_Expecter) WithImpl(impl interface{}) *MockLibrariesInterface_WithImpl_Call { - return &MockLibrariesInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockLibrariesInterface_WithImpl_Call) Run(run func(impl compute.LibrariesService)) *MockLibrariesInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(compute.LibrariesService)) - }) - return _c -} - -func (_c *MockLibrariesInterface_WithImpl_Call) Return(_a0 compute.LibrariesInterface) *MockLibrariesInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockLibrariesInterface_WithImpl_Call) RunAndReturn(run func(compute.LibrariesService) compute.LibrariesInterface) *MockLibrariesInterface_WithImpl_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 { diff --git a/experimental/mocks/service/compute/mock_policy_families_interface.go b/experimental/mocks/service/compute/mock_policy_families_interface.go index 1d956c92b..b5ea92a04 100644 --- a/experimental/mocks/service/compute/mock_policy_families_interface.go +++ b/experimental/mocks/service/compute/mock_policy_families_interface.go @@ -143,55 +143,8 @@ func (_c *MockPolicyFamiliesInterface_GetByPolicyFamilyId_Call) RunAndReturn(run return _c } -// Impl provides a mock function with given fields: -func (_m *MockPolicyFamiliesInterface) Impl() compute.PolicyFamiliesService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 compute.PolicyFamiliesService - if rf, ok := ret.Get(0).(func() compute.PolicyFamiliesService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(compute.PolicyFamiliesService) - } - } - - return r0 -} - -// MockPolicyFamiliesInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockPolicyFamiliesInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockPolicyFamiliesInterface_Expecter) Impl() *MockPolicyFamiliesInterface_Impl_Call { - return &MockPolicyFamiliesInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockPolicyFamiliesInterface_Impl_Call) Run(run func()) *MockPolicyFamiliesInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPolicyFamiliesInterface_Impl_Call) Return(_a0 compute.PolicyFamiliesService) *MockPolicyFamiliesInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPolicyFamiliesInterface_Impl_Call) RunAndReturn(run func() compute.PolicyFamiliesService) *MockPolicyFamiliesInterface_Impl_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] { +func (_m *MockPolicyFamiliesInterface) List(ctx context.Context, request compute.ListPolicyFamilies) listing.Iterator[compute.PolicyFamily] { ret := _m.Called(ctx, request) if len(ret) == 0 { @@ -199,7 +152,7 @@ func (_m *MockPolicyFamiliesInterface) List(ctx context.Context, request compute } var r0 listing.Iterator[compute.PolicyFamily] - if rf, ok := ret.Get(0).(func(context.Context, compute.ListPolicyFamiliesRequest) listing.Iterator[compute.PolicyFamily]); ok { + if rf, ok := ret.Get(0).(func(context.Context, compute.ListPolicyFamilies) listing.Iterator[compute.PolicyFamily]); ok { r0 = rf(ctx, request) } else { if ret.Get(0) != nil { @@ -217,14 +170,14 @@ type MockPolicyFamiliesInterface_List_Call struct { // List is a helper method to define mock.On call // - ctx context.Context -// - request compute.ListPolicyFamiliesRequest +// - request compute.ListPolicyFamilies 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 { +func (_c *MockPolicyFamiliesInterface_List_Call) Run(run func(ctx context.Context, request compute.ListPolicyFamilies)) *MockPolicyFamiliesInterface_List_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.ListPolicyFamiliesRequest)) + run(args[0].(context.Context), args[1].(compute.ListPolicyFamilies)) }) return _c } @@ -234,13 +187,13 @@ func (_c *MockPolicyFamiliesInterface_List_Call) Return(_a0 listing.Iterator[com return _c } -func (_c *MockPolicyFamiliesInterface_List_Call) RunAndReturn(run func(context.Context, compute.ListPolicyFamiliesRequest) listing.Iterator[compute.PolicyFamily]) *MockPolicyFamiliesInterface_List_Call { +func (_c *MockPolicyFamiliesInterface_List_Call) RunAndReturn(run func(context.Context, compute.ListPolicyFamilies) 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) { +func (_m *MockPolicyFamiliesInterface) ListAll(ctx context.Context, request compute.ListPolicyFamilies) ([]compute.PolicyFamily, error) { ret := _m.Called(ctx, request) if len(ret) == 0 { @@ -249,10 +202,10 @@ func (_m *MockPolicyFamiliesInterface) ListAll(ctx context.Context, request comp var r0 []compute.PolicyFamily var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.ListPolicyFamiliesRequest) ([]compute.PolicyFamily, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, compute.ListPolicyFamilies) ([]compute.PolicyFamily, error)); ok { return rf(ctx, request) } - if rf, ok := ret.Get(0).(func(context.Context, compute.ListPolicyFamiliesRequest) []compute.PolicyFamily); ok { + if rf, ok := ret.Get(0).(func(context.Context, compute.ListPolicyFamilies) []compute.PolicyFamily); ok { r0 = rf(ctx, request) } else { if ret.Get(0) != nil { @@ -260,7 +213,7 @@ func (_m *MockPolicyFamiliesInterface) ListAll(ctx context.Context, request comp } } - if rf, ok := ret.Get(1).(func(context.Context, compute.ListPolicyFamiliesRequest) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, compute.ListPolicyFamilies) error); ok { r1 = rf(ctx, request) } else { r1 = ret.Error(1) @@ -276,14 +229,14 @@ type MockPolicyFamiliesInterface_ListAll_Call struct { // ListAll is a helper method to define mock.On call // - ctx context.Context -// - request compute.ListPolicyFamiliesRequest +// - request compute.ListPolicyFamilies 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 { +func (_c *MockPolicyFamiliesInterface_ListAll_Call) Run(run func(ctx context.Context, request compute.ListPolicyFamilies)) *MockPolicyFamiliesInterface_ListAll_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.ListPolicyFamiliesRequest)) + run(args[0].(context.Context), args[1].(compute.ListPolicyFamilies)) }) return _c } @@ -293,55 +246,7 @@ func (_c *MockPolicyFamiliesInterface_ListAll_Call) Return(_a0 []compute.PolicyF 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 -} - -// WithImpl provides a mock function with given fields: impl -func (_m *MockPolicyFamiliesInterface) WithImpl(impl compute.PolicyFamiliesService) compute.PolicyFamiliesInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 compute.PolicyFamiliesInterface - if rf, ok := ret.Get(0).(func(compute.PolicyFamiliesService) compute.PolicyFamiliesInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(compute.PolicyFamiliesInterface) - } - } - - return r0 -} - -// MockPolicyFamiliesInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockPolicyFamiliesInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl compute.PolicyFamiliesService -func (_e *MockPolicyFamiliesInterface_Expecter) WithImpl(impl interface{}) *MockPolicyFamiliesInterface_WithImpl_Call { - return &MockPolicyFamiliesInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockPolicyFamiliesInterface_WithImpl_Call) Run(run func(impl compute.PolicyFamiliesService)) *MockPolicyFamiliesInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(compute.PolicyFamiliesService)) - }) - return _c -} - -func (_c *MockPolicyFamiliesInterface_WithImpl_Call) Return(_a0 compute.PolicyFamiliesInterface) *MockPolicyFamiliesInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPolicyFamiliesInterface_WithImpl_Call) RunAndReturn(run func(compute.PolicyFamiliesService) compute.PolicyFamiliesInterface) *MockPolicyFamiliesInterface_WithImpl_Call { +func (_c *MockPolicyFamiliesInterface_ListAll_Call) RunAndReturn(run func(context.Context, compute.ListPolicyFamilies) ([]compute.PolicyFamily, error)) *MockPolicyFamiliesInterface_ListAll_Call { _c.Call.Return(run) return _c } diff --git a/experimental/mocks/service/dashboards/mock_genie_interface.go b/experimental/mocks/service/dashboards/mock_genie_interface.go index 74a00850d..f04a05948 100644 --- a/experimental/mocks/service/dashboards/mock_genie_interface.go +++ b/experimental/mocks/service/dashboards/mock_genie_interface.go @@ -458,53 +458,6 @@ func (_c *MockGenieInterface_GetMessageQueryResultBySpaceIdAndConversationIdAndM return _c } -// Impl provides a mock function with given fields: -func (_m *MockGenieInterface) Impl() dashboards.GenieService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 dashboards.GenieService - if rf, ok := ret.Get(0).(func() dashboards.GenieService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(dashboards.GenieService) - } - } - - return r0 -} - -// MockGenieInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockGenieInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockGenieInterface_Expecter) Impl() *MockGenieInterface_Impl_Call { - return &MockGenieInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockGenieInterface_Impl_Call) Run(run func()) *MockGenieInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockGenieInterface_Impl_Call) Return(_a0 dashboards.GenieService) *MockGenieInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockGenieInterface_Impl_Call) RunAndReturn(run func() dashboards.GenieService) *MockGenieInterface_Impl_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) @@ -701,54 +654,6 @@ func (_c *MockGenieInterface_WaitGetMessageGenieCompleted_Call) RunAndReturn(run return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockGenieInterface) WithImpl(impl dashboards.GenieService) dashboards.GenieInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 dashboards.GenieInterface - if rf, ok := ret.Get(0).(func(dashboards.GenieService) dashboards.GenieInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(dashboards.GenieInterface) - } - } - - return r0 -} - -// MockGenieInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockGenieInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl dashboards.GenieService -func (_e *MockGenieInterface_Expecter) WithImpl(impl interface{}) *MockGenieInterface_WithImpl_Call { - return &MockGenieInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockGenieInterface_WithImpl_Call) Run(run func(impl dashboards.GenieService)) *MockGenieInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(dashboards.GenieService)) - }) - return _c -} - -func (_c *MockGenieInterface_WithImpl_Call) Return(_a0 dashboards.GenieInterface) *MockGenieInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockGenieInterface_WithImpl_Call) RunAndReturn(run func(dashboards.GenieService) dashboards.GenieInterface) *MockGenieInterface_WithImpl_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 { diff --git a/experimental/mocks/service/dashboards/mock_lakeview_interface.go b/experimental/mocks/service/dashboards/mock_lakeview_interface.go index 69f6bf1bc..0e18d5903 100644 --- a/experimental/mocks/service/dashboards/mock_lakeview_interface.go +++ b/experimental/mocks/service/dashboards/mock_lakeview_interface.go @@ -867,53 +867,6 @@ func (_c *MockLakeviewInterface_GetSubscriptionByDashboardIdAndScheduleIdAndSubs return _c } -// Impl provides a mock function with given fields: -func (_m *MockLakeviewInterface) Impl() dashboards.LakeviewService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 dashboards.LakeviewService - if rf, ok := ret.Get(0).(func() dashboards.LakeviewService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(dashboards.LakeviewService) - } - } - - return r0 -} - -// MockLakeviewInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockLakeviewInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockLakeviewInterface_Expecter) Impl() *MockLakeviewInterface_Impl_Call { - return &MockLakeviewInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockLakeviewInterface_Impl_Call) Run(run func()) *MockLakeviewInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockLakeviewInterface_Impl_Call) Return(_a0 dashboards.LakeviewService) *MockLakeviewInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockLakeviewInterface_Impl_Call) RunAndReturn(run func() dashboards.LakeviewService) *MockLakeviewInterface_Impl_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) @@ -1781,54 +1734,6 @@ func (_c *MockLakeviewInterface_UpdateSchedule_Call) RunAndReturn(run func(conte return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockLakeviewInterface) WithImpl(impl dashboards.LakeviewService) dashboards.LakeviewInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 dashboards.LakeviewInterface - if rf, ok := ret.Get(0).(func(dashboards.LakeviewService) dashboards.LakeviewInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(dashboards.LakeviewInterface) - } - } - - return r0 -} - -// MockLakeviewInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockLakeviewInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl dashboards.LakeviewService -func (_e *MockLakeviewInterface_Expecter) WithImpl(impl interface{}) *MockLakeviewInterface_WithImpl_Call { - return &MockLakeviewInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockLakeviewInterface_WithImpl_Call) Run(run func(impl dashboards.LakeviewService)) *MockLakeviewInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(dashboards.LakeviewService)) - }) - return _c -} - -func (_c *MockLakeviewInterface_WithImpl_Call) Return(_a0 dashboards.LakeviewInterface) *MockLakeviewInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockLakeviewInterface_WithImpl_Call) RunAndReturn(run func(dashboards.LakeviewService) dashboards.LakeviewInterface) *MockLakeviewInterface_WithImpl_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 { diff --git a/experimental/mocks/service/files/mock_dbfs_interface.go b/experimental/mocks/service/files/mock_dbfs_interface.go index 6a586b041..f2494b722 100644 --- a/experimental/mocks/service/files/mock_dbfs_interface.go +++ b/experimental/mocks/service/files/mock_dbfs_interface.go @@ -389,53 +389,6 @@ func (_c *MockDbfsInterface_GetStatusByPath_Call) RunAndReturn(run func(context. return _c } -// Impl provides a mock function with given fields: -func (_m *MockDbfsInterface) Impl() files.DbfsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 files.DbfsService - if rf, ok := ret.Get(0).(func() files.DbfsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(files.DbfsService) - } - } - - return r0 -} - -// MockDbfsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockDbfsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockDbfsInterface_Expecter) Impl() *MockDbfsInterface_Impl_Call { - return &MockDbfsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockDbfsInterface_Impl_Call) Run(run func()) *MockDbfsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockDbfsInterface_Impl_Call) Return(_a0 files.DbfsService) *MockDbfsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDbfsInterface_Impl_Call) RunAndReturn(run func() files.DbfsService) *MockDbfsInterface_Impl_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) @@ -1028,54 +981,6 @@ func (_c *MockDbfsInterface_RecursiveList_Call) RunAndReturn(run func(context.Co return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockDbfsInterface) WithImpl(impl files.DbfsService) files.DbfsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 files.DbfsInterface - if rf, ok := ret.Get(0).(func(files.DbfsService) files.DbfsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(files.DbfsInterface) - } - } - - return r0 -} - -// MockDbfsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockDbfsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl files.DbfsService -func (_e *MockDbfsInterface_Expecter) WithImpl(impl interface{}) *MockDbfsInterface_WithImpl_Call { - return &MockDbfsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockDbfsInterface_WithImpl_Call) Run(run func(impl files.DbfsService)) *MockDbfsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(files.DbfsService)) - }) - return _c -} - -func (_c *MockDbfsInterface_WithImpl_Call) Return(_a0 files.DbfsInterface) *MockDbfsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDbfsInterface_WithImpl_Call) RunAndReturn(run func(files.DbfsService) files.DbfsInterface) *MockDbfsInterface_WithImpl_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) diff --git a/experimental/mocks/service/files/mock_files_interface.go b/experimental/mocks/service/files/mock_files_interface.go index 5e4d2377e..dfc7c45dd 100644 --- a/experimental/mocks/service/files/mock_files_interface.go +++ b/experimental/mocks/service/files/mock_files_interface.go @@ -589,53 +589,6 @@ func (_c *MockFilesInterface_GetMetadataByFilePath_Call) RunAndReturn(run func(c return _c } -// Impl provides a mock function with given fields: -func (_m *MockFilesInterface) Impl() files.FilesService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 files.FilesService - if rf, ok := ret.Get(0).(func() files.FilesService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(files.FilesService) - } - } - - return r0 -} - -// MockFilesInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockFilesInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockFilesInterface_Expecter) Impl() *MockFilesInterface_Impl_Call { - return &MockFilesInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockFilesInterface_Impl_Call) Run(run func()) *MockFilesInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockFilesInterface_Impl_Call) Return(_a0 files.FilesService) *MockFilesInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockFilesInterface_Impl_Call) RunAndReturn(run func() files.FilesService) *MockFilesInterface_Impl_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) @@ -850,54 +803,6 @@ func (_c *MockFilesInterface_Upload_Call) RunAndReturn(run func(context.Context, return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockFilesInterface) WithImpl(impl files.FilesService) files.FilesInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 files.FilesInterface - if rf, ok := ret.Get(0).(func(files.FilesService) files.FilesInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(files.FilesInterface) - } - } - - return r0 -} - -// MockFilesInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockFilesInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl files.FilesService -func (_e *MockFilesInterface_Expecter) WithImpl(impl interface{}) *MockFilesInterface_WithImpl_Call { - return &MockFilesInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockFilesInterface_WithImpl_Call) Run(run func(impl files.FilesService)) *MockFilesInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(files.FilesService)) - }) - return _c -} - -func (_c *MockFilesInterface_WithImpl_Call) Return(_a0 files.FilesInterface) *MockFilesInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockFilesInterface_WithImpl_Call) RunAndReturn(run func(files.FilesService) files.FilesInterface) *MockFilesInterface_WithImpl_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 { diff --git a/experimental/mocks/service/iam/mock_account_access_control_interface.go b/experimental/mocks/service/iam/mock_account_access_control_interface.go index 5a6e96e31..e5e7dbbba 100644 --- a/experimental/mocks/service/iam/mock_account_access_control_interface.go +++ b/experimental/mocks/service/iam/mock_account_access_control_interface.go @@ -140,53 +140,6 @@ func (_c *MockAccountAccessControlInterface_GetRuleSet_Call) RunAndReturn(run fu return _c } -// Impl provides a mock function with given fields: -func (_m *MockAccountAccessControlInterface) Impl() iam.AccountAccessControlService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 iam.AccountAccessControlService - if rf, ok := ret.Get(0).(func() iam.AccountAccessControlService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(iam.AccountAccessControlService) - } - } - - return r0 -} - -// MockAccountAccessControlInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockAccountAccessControlInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockAccountAccessControlInterface_Expecter) Impl() *MockAccountAccessControlInterface_Impl_Call { - return &MockAccountAccessControlInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockAccountAccessControlInterface_Impl_Call) Run(run func()) *MockAccountAccessControlInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAccountAccessControlInterface_Impl_Call) Return(_a0 iam.AccountAccessControlService) *MockAccountAccessControlInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountAccessControlInterface_Impl_Call) RunAndReturn(run func() iam.AccountAccessControlService) *MockAccountAccessControlInterface_Impl_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) @@ -246,54 +199,6 @@ func (_c *MockAccountAccessControlInterface_UpdateRuleSet_Call) RunAndReturn(run return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockAccountAccessControlInterface) WithImpl(impl iam.AccountAccessControlService) iam.AccountAccessControlInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 iam.AccountAccessControlInterface - if rf, ok := ret.Get(0).(func(iam.AccountAccessControlService) iam.AccountAccessControlInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(iam.AccountAccessControlInterface) - } - } - - return r0 -} - -// MockAccountAccessControlInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockAccountAccessControlInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl iam.AccountAccessControlService -func (_e *MockAccountAccessControlInterface_Expecter) WithImpl(impl interface{}) *MockAccountAccessControlInterface_WithImpl_Call { - return &MockAccountAccessControlInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockAccountAccessControlInterface_WithImpl_Call) Run(run func(impl iam.AccountAccessControlService)) *MockAccountAccessControlInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(iam.AccountAccessControlService)) - }) - return _c -} - -func (_c *MockAccountAccessControlInterface_WithImpl_Call) Return(_a0 iam.AccountAccessControlInterface) *MockAccountAccessControlInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountAccessControlInterface_WithImpl_Call) RunAndReturn(run func(iam.AccountAccessControlService) iam.AccountAccessControlInterface) *MockAccountAccessControlInterface_WithImpl_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 { 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 index c56c76c71..10fd30a6f 100644 --- a/experimental/mocks/service/iam/mock_account_access_control_proxy_interface.go +++ b/experimental/mocks/service/iam/mock_account_access_control_proxy_interface.go @@ -140,53 +140,6 @@ func (_c *MockAccountAccessControlProxyInterface_GetRuleSet_Call) RunAndReturn(r return _c } -// Impl provides a mock function with given fields: -func (_m *MockAccountAccessControlProxyInterface) Impl() iam.AccountAccessControlProxyService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 iam.AccountAccessControlProxyService - if rf, ok := ret.Get(0).(func() iam.AccountAccessControlProxyService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(iam.AccountAccessControlProxyService) - } - } - - return r0 -} - -// MockAccountAccessControlProxyInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockAccountAccessControlProxyInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockAccountAccessControlProxyInterface_Expecter) Impl() *MockAccountAccessControlProxyInterface_Impl_Call { - return &MockAccountAccessControlProxyInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockAccountAccessControlProxyInterface_Impl_Call) Run(run func()) *MockAccountAccessControlProxyInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAccountAccessControlProxyInterface_Impl_Call) Return(_a0 iam.AccountAccessControlProxyService) *MockAccountAccessControlProxyInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountAccessControlProxyInterface_Impl_Call) RunAndReturn(run func() iam.AccountAccessControlProxyService) *MockAccountAccessControlProxyInterface_Impl_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) @@ -246,54 +199,6 @@ func (_c *MockAccountAccessControlProxyInterface_UpdateRuleSet_Call) RunAndRetur return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockAccountAccessControlProxyInterface) WithImpl(impl iam.AccountAccessControlProxyService) iam.AccountAccessControlProxyInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 iam.AccountAccessControlProxyInterface - if rf, ok := ret.Get(0).(func(iam.AccountAccessControlProxyService) iam.AccountAccessControlProxyInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(iam.AccountAccessControlProxyInterface) - } - } - - return r0 -} - -// MockAccountAccessControlProxyInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockAccountAccessControlProxyInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl iam.AccountAccessControlProxyService -func (_e *MockAccountAccessControlProxyInterface_Expecter) WithImpl(impl interface{}) *MockAccountAccessControlProxyInterface_WithImpl_Call { - return &MockAccountAccessControlProxyInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockAccountAccessControlProxyInterface_WithImpl_Call) Run(run func(impl iam.AccountAccessControlProxyService)) *MockAccountAccessControlProxyInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(iam.AccountAccessControlProxyService)) - }) - return _c -} - -func (_c *MockAccountAccessControlProxyInterface_WithImpl_Call) Return(_a0 iam.AccountAccessControlProxyInterface) *MockAccountAccessControlProxyInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountAccessControlProxyInterface_WithImpl_Call) RunAndReturn(run func(iam.AccountAccessControlProxyService) iam.AccountAccessControlProxyInterface) *MockAccountAccessControlProxyInterface_WithImpl_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 { diff --git a/experimental/mocks/service/iam/mock_account_groups_interface.go b/experimental/mocks/service/iam/mock_account_groups_interface.go index 56e3e8d83..fc79085f2 100644 --- a/experimental/mocks/service/iam/mock_account_groups_interface.go +++ b/experimental/mocks/service/iam/mock_account_groups_interface.go @@ -413,53 +413,6 @@ func (_c *MockAccountGroupsInterface_GroupDisplayNameToIdMap_Call) RunAndReturn( return _c } -// Impl provides a mock function with given fields: -func (_m *MockAccountGroupsInterface) Impl() iam.AccountGroupsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 iam.AccountGroupsService - if rf, ok := ret.Get(0).(func() iam.AccountGroupsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(iam.AccountGroupsService) - } - } - - return r0 -} - -// MockAccountGroupsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockAccountGroupsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockAccountGroupsInterface_Expecter) Impl() *MockAccountGroupsInterface_Impl_Call { - return &MockAccountGroupsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockAccountGroupsInterface_Impl_Call) Run(run func()) *MockAccountGroupsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAccountGroupsInterface_Impl_Call) Return(_a0 iam.AccountGroupsService) *MockAccountGroupsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountGroupsInterface_Impl_Call) RunAndReturn(run func() iam.AccountGroupsService) *MockAccountGroupsInterface_Impl_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) @@ -662,54 +615,6 @@ func (_c *MockAccountGroupsInterface_Update_Call) RunAndReturn(run func(context. return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockAccountGroupsInterface) WithImpl(impl iam.AccountGroupsService) iam.AccountGroupsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 iam.AccountGroupsInterface - if rf, ok := ret.Get(0).(func(iam.AccountGroupsService) iam.AccountGroupsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(iam.AccountGroupsInterface) - } - } - - return r0 -} - -// MockAccountGroupsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockAccountGroupsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl iam.AccountGroupsService -func (_e *MockAccountGroupsInterface_Expecter) WithImpl(impl interface{}) *MockAccountGroupsInterface_WithImpl_Call { - return &MockAccountGroupsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockAccountGroupsInterface_WithImpl_Call) Run(run func(impl iam.AccountGroupsService)) *MockAccountGroupsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(iam.AccountGroupsService)) - }) - return _c -} - -func (_c *MockAccountGroupsInterface_WithImpl_Call) Return(_a0 iam.AccountGroupsInterface) *MockAccountGroupsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountGroupsInterface_WithImpl_Call) RunAndReturn(run func(iam.AccountGroupsService) iam.AccountGroupsInterface) *MockAccountGroupsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/iam/mock_account_service_principals_interface.go b/experimental/mocks/service/iam/mock_account_service_principals_interface.go index aade59ee8..3f4eebb3b 100644 --- a/experimental/mocks/service/iam/mock_account_service_principals_interface.go +++ b/experimental/mocks/service/iam/mock_account_service_principals_interface.go @@ -354,53 +354,6 @@ func (_c *MockAccountServicePrincipalsInterface_GetById_Call) RunAndReturn(run f return _c } -// Impl provides a mock function with given fields: -func (_m *MockAccountServicePrincipalsInterface) Impl() iam.AccountServicePrincipalsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 iam.AccountServicePrincipalsService - if rf, ok := ret.Get(0).(func() iam.AccountServicePrincipalsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(iam.AccountServicePrincipalsService) - } - } - - return r0 -} - -// MockAccountServicePrincipalsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockAccountServicePrincipalsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockAccountServicePrincipalsInterface_Expecter) Impl() *MockAccountServicePrincipalsInterface_Impl_Call { - return &MockAccountServicePrincipalsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockAccountServicePrincipalsInterface_Impl_Call) Run(run func()) *MockAccountServicePrincipalsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_Impl_Call) Return(_a0 iam.AccountServicePrincipalsService) *MockAccountServicePrincipalsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_Impl_Call) RunAndReturn(run func() iam.AccountServicePrincipalsService) *MockAccountServicePrincipalsInterface_Impl_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) @@ -662,54 +615,6 @@ func (_c *MockAccountServicePrincipalsInterface_Update_Call) RunAndReturn(run fu return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockAccountServicePrincipalsInterface) WithImpl(impl iam.AccountServicePrincipalsService) iam.AccountServicePrincipalsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 iam.AccountServicePrincipalsInterface - if rf, ok := ret.Get(0).(func(iam.AccountServicePrincipalsService) iam.AccountServicePrincipalsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(iam.AccountServicePrincipalsInterface) - } - } - - return r0 -} - -// MockAccountServicePrincipalsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockAccountServicePrincipalsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl iam.AccountServicePrincipalsService -func (_e *MockAccountServicePrincipalsInterface_Expecter) WithImpl(impl interface{}) *MockAccountServicePrincipalsInterface_WithImpl_Call { - return &MockAccountServicePrincipalsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockAccountServicePrincipalsInterface_WithImpl_Call) Run(run func(impl iam.AccountServicePrincipalsService)) *MockAccountServicePrincipalsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(iam.AccountServicePrincipalsService)) - }) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_WithImpl_Call) Return(_a0 iam.AccountServicePrincipalsInterface) *MockAccountServicePrincipalsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_WithImpl_Call) RunAndReturn(run func(iam.AccountServicePrincipalsService) iam.AccountServicePrincipalsInterface) *MockAccountServicePrincipalsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/iam/mock_account_users_interface.go b/experimental/mocks/service/iam/mock_account_users_interface.go index b3ba42609..dec7252ee 100644 --- a/experimental/mocks/service/iam/mock_account_users_interface.go +++ b/experimental/mocks/service/iam/mock_account_users_interface.go @@ -354,53 +354,6 @@ func (_c *MockAccountUsersInterface_GetByUserName_Call) RunAndReturn(run func(co return _c } -// Impl provides a mock function with given fields: -func (_m *MockAccountUsersInterface) Impl() iam.AccountUsersService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 iam.AccountUsersService - if rf, ok := ret.Get(0).(func() iam.AccountUsersService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(iam.AccountUsersService) - } - } - - return r0 -} - -// MockAccountUsersInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockAccountUsersInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockAccountUsersInterface_Expecter) Impl() *MockAccountUsersInterface_Impl_Call { - return &MockAccountUsersInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockAccountUsersInterface_Impl_Call) Run(run func()) *MockAccountUsersInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAccountUsersInterface_Impl_Call) Return(_a0 iam.AccountUsersService) *MockAccountUsersInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountUsersInterface_Impl_Call) RunAndReturn(run func() iam.AccountUsersService) *MockAccountUsersInterface_Impl_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) @@ -662,54 +615,6 @@ func (_c *MockAccountUsersInterface_UserUserNameToIdMap_Call) RunAndReturn(run f return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockAccountUsersInterface) WithImpl(impl iam.AccountUsersService) iam.AccountUsersInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 iam.AccountUsersInterface - if rf, ok := ret.Get(0).(func(iam.AccountUsersService) iam.AccountUsersInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(iam.AccountUsersInterface) - } - } - - return r0 -} - -// MockAccountUsersInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockAccountUsersInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl iam.AccountUsersService -func (_e *MockAccountUsersInterface_Expecter) WithImpl(impl interface{}) *MockAccountUsersInterface_WithImpl_Call { - return &MockAccountUsersInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockAccountUsersInterface_WithImpl_Call) Run(run func(impl iam.AccountUsersService)) *MockAccountUsersInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(iam.AccountUsersService)) - }) - return _c -} - -func (_c *MockAccountUsersInterface_WithImpl_Call) Return(_a0 iam.AccountUsersInterface) *MockAccountUsersInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountUsersInterface_WithImpl_Call) RunAndReturn(run func(iam.AccountUsersService) iam.AccountUsersInterface) *MockAccountUsersInterface_WithImpl_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 { diff --git a/experimental/mocks/service/iam/mock_current_user_interface.go b/experimental/mocks/service/iam/mock_current_user_interface.go index 22fece11f..6ddcd3fab 100644 --- a/experimental/mocks/service/iam/mock_current_user_interface.go +++ b/experimental/mocks/service/iam/mock_current_user_interface.go @@ -22,53 +22,6 @@ func (_m *MockCurrentUserInterface) EXPECT() *MockCurrentUserInterface_Expecter return &MockCurrentUserInterface_Expecter{mock: &_m.Mock} } -// Impl provides a mock function with given fields: -func (_m *MockCurrentUserInterface) Impl() iam.CurrentUserService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 iam.CurrentUserService - if rf, ok := ret.Get(0).(func() iam.CurrentUserService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(iam.CurrentUserService) - } - } - - return r0 -} - -// MockCurrentUserInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockCurrentUserInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockCurrentUserInterface_Expecter) Impl() *MockCurrentUserInterface_Impl_Call { - return &MockCurrentUserInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockCurrentUserInterface_Impl_Call) Run(run func()) *MockCurrentUserInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockCurrentUserInterface_Impl_Call) Return(_a0 iam.CurrentUserService) *MockCurrentUserInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCurrentUserInterface_Impl_Call) RunAndReturn(run func() iam.CurrentUserService) *MockCurrentUserInterface_Impl_Call { - _c.Call.Return(run) - return _c -} - // Me provides a mock function with given fields: ctx func (_m *MockCurrentUserInterface) Me(ctx context.Context) (*iam.User, error) { ret := _m.Called(ctx) @@ -127,54 +80,6 @@ func (_c *MockCurrentUserInterface_Me_Call) RunAndReturn(run func(context.Contex return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockCurrentUserInterface) WithImpl(impl iam.CurrentUserService) iam.CurrentUserInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 iam.CurrentUserInterface - if rf, ok := ret.Get(0).(func(iam.CurrentUserService) iam.CurrentUserInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(iam.CurrentUserInterface) - } - } - - return r0 -} - -// MockCurrentUserInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockCurrentUserInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl iam.CurrentUserService -func (_e *MockCurrentUserInterface_Expecter) WithImpl(impl interface{}) *MockCurrentUserInterface_WithImpl_Call { - return &MockCurrentUserInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockCurrentUserInterface_WithImpl_Call) Run(run func(impl iam.CurrentUserService)) *MockCurrentUserInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(iam.CurrentUserService)) - }) - return _c -} - -func (_c *MockCurrentUserInterface_WithImpl_Call) Return(_a0 iam.CurrentUserInterface) *MockCurrentUserInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCurrentUserInterface_WithImpl_Call) RunAndReturn(run func(iam.CurrentUserService) iam.CurrentUserInterface) *MockCurrentUserInterface_WithImpl_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 { diff --git a/experimental/mocks/service/iam/mock_groups_interface.go b/experimental/mocks/service/iam/mock_groups_interface.go index 7251caa0b..b86139bce 100644 --- a/experimental/mocks/service/iam/mock_groups_interface.go +++ b/experimental/mocks/service/iam/mock_groups_interface.go @@ -413,53 +413,6 @@ func (_c *MockGroupsInterface_GroupDisplayNameToIdMap_Call) RunAndReturn(run fun return _c } -// Impl provides a mock function with given fields: -func (_m *MockGroupsInterface) Impl() iam.GroupsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 iam.GroupsService - if rf, ok := ret.Get(0).(func() iam.GroupsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(iam.GroupsService) - } - } - - return r0 -} - -// MockGroupsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockGroupsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockGroupsInterface_Expecter) Impl() *MockGroupsInterface_Impl_Call { - return &MockGroupsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockGroupsInterface_Impl_Call) Run(run func()) *MockGroupsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockGroupsInterface_Impl_Call) Return(_a0 iam.GroupsService) *MockGroupsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockGroupsInterface_Impl_Call) RunAndReturn(run func() iam.GroupsService) *MockGroupsInterface_Impl_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) @@ -662,54 +615,6 @@ func (_c *MockGroupsInterface_Update_Call) RunAndReturn(run func(context.Context return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockGroupsInterface) WithImpl(impl iam.GroupsService) iam.GroupsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 iam.GroupsInterface - if rf, ok := ret.Get(0).(func(iam.GroupsService) iam.GroupsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(iam.GroupsInterface) - } - } - - return r0 -} - -// MockGroupsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockGroupsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl iam.GroupsService -func (_e *MockGroupsInterface_Expecter) WithImpl(impl interface{}) *MockGroupsInterface_WithImpl_Call { - return &MockGroupsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockGroupsInterface_WithImpl_Call) Run(run func(impl iam.GroupsService)) *MockGroupsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(iam.GroupsService)) - }) - return _c -} - -func (_c *MockGroupsInterface_WithImpl_Call) Return(_a0 iam.GroupsInterface) *MockGroupsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockGroupsInterface_WithImpl_Call) RunAndReturn(run func(iam.GroupsService) iam.GroupsInterface) *MockGroupsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/iam/mock_permission_migration_interface.go b/experimental/mocks/service/iam/mock_permission_migration_interface.go index 59b34b26d..c2187d519 100644 --- a/experimental/mocks/service/iam/mock_permission_migration_interface.go +++ b/experimental/mocks/service/iam/mock_permission_migration_interface.go @@ -22,53 +22,6 @@ func (_m *MockPermissionMigrationInterface) EXPECT() *MockPermissionMigrationInt return &MockPermissionMigrationInterface_Expecter{mock: &_m.Mock} } -// Impl provides a mock function with given fields: -func (_m *MockPermissionMigrationInterface) Impl() iam.PermissionMigrationService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 iam.PermissionMigrationService - if rf, ok := ret.Get(0).(func() iam.PermissionMigrationService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(iam.PermissionMigrationService) - } - } - - return r0 -} - -// MockPermissionMigrationInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockPermissionMigrationInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockPermissionMigrationInterface_Expecter) Impl() *MockPermissionMigrationInterface_Impl_Call { - return &MockPermissionMigrationInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockPermissionMigrationInterface_Impl_Call) Run(run func()) *MockPermissionMigrationInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPermissionMigrationInterface_Impl_Call) Return(_a0 iam.PermissionMigrationService) *MockPermissionMigrationInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPermissionMigrationInterface_Impl_Call) RunAndReturn(run func() iam.PermissionMigrationService) *MockPermissionMigrationInterface_Impl_Call { - _c.Call.Return(run) - return _c -} - // 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) @@ -128,54 +81,6 @@ func (_c *MockPermissionMigrationInterface_MigratePermissions_Call) RunAndReturn return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockPermissionMigrationInterface) WithImpl(impl iam.PermissionMigrationService) iam.PermissionMigrationInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 iam.PermissionMigrationInterface - if rf, ok := ret.Get(0).(func(iam.PermissionMigrationService) iam.PermissionMigrationInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(iam.PermissionMigrationInterface) - } - } - - return r0 -} - -// MockPermissionMigrationInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockPermissionMigrationInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl iam.PermissionMigrationService -func (_e *MockPermissionMigrationInterface_Expecter) WithImpl(impl interface{}) *MockPermissionMigrationInterface_WithImpl_Call { - return &MockPermissionMigrationInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockPermissionMigrationInterface_WithImpl_Call) Run(run func(impl iam.PermissionMigrationService)) *MockPermissionMigrationInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(iam.PermissionMigrationService)) - }) - return _c -} - -func (_c *MockPermissionMigrationInterface_WithImpl_Call) Return(_a0 iam.PermissionMigrationInterface) *MockPermissionMigrationInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPermissionMigrationInterface_WithImpl_Call) RunAndReturn(run func(iam.PermissionMigrationService) iam.PermissionMigrationInterface) *MockPermissionMigrationInterface_WithImpl_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 { diff --git a/experimental/mocks/service/iam/mock_permissions_interface.go b/experimental/mocks/service/iam/mock_permissions_interface.go index b260d8b78..8b461769f 100644 --- a/experimental/mocks/service/iam/mock_permissions_interface.go +++ b/experimental/mocks/service/iam/mock_permissions_interface.go @@ -260,53 +260,6 @@ func (_c *MockPermissionsInterface_GetPermissionLevelsByRequestObjectTypeAndRequ return _c } -// Impl provides a mock function with given fields: -func (_m *MockPermissionsInterface) Impl() iam.PermissionsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 iam.PermissionsService - if rf, ok := ret.Get(0).(func() iam.PermissionsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(iam.PermissionsService) - } - } - - return r0 -} - -// MockPermissionsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockPermissionsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockPermissionsInterface_Expecter) Impl() *MockPermissionsInterface_Impl_Call { - return &MockPermissionsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockPermissionsInterface_Impl_Call) Run(run func()) *MockPermissionsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPermissionsInterface_Impl_Call) Return(_a0 iam.PermissionsService) *MockPermissionsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPermissionsInterface_Impl_Call) RunAndReturn(run func() iam.PermissionsService) *MockPermissionsInterface_Impl_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) @@ -425,54 +378,6 @@ func (_c *MockPermissionsInterface_Update_Call) RunAndReturn(run func(context.Co return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockPermissionsInterface) WithImpl(impl iam.PermissionsService) iam.PermissionsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 iam.PermissionsInterface - if rf, ok := ret.Get(0).(func(iam.PermissionsService) iam.PermissionsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(iam.PermissionsInterface) - } - } - - return r0 -} - -// MockPermissionsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockPermissionsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl iam.PermissionsService -func (_e *MockPermissionsInterface_Expecter) WithImpl(impl interface{}) *MockPermissionsInterface_WithImpl_Call { - return &MockPermissionsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockPermissionsInterface_WithImpl_Call) Run(run func(impl iam.PermissionsService)) *MockPermissionsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(iam.PermissionsService)) - }) - return _c -} - -func (_c *MockPermissionsInterface_WithImpl_Call) Return(_a0 iam.PermissionsInterface) *MockPermissionsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPermissionsInterface_WithImpl_Call) RunAndReturn(run func(iam.PermissionsService) iam.PermissionsInterface) *MockPermissionsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/iam/mock_service_principals_interface.go b/experimental/mocks/service/iam/mock_service_principals_interface.go index f64c2f404..bba9feb79 100644 --- a/experimental/mocks/service/iam/mock_service_principals_interface.go +++ b/experimental/mocks/service/iam/mock_service_principals_interface.go @@ -354,53 +354,6 @@ func (_c *MockServicePrincipalsInterface_GetById_Call) RunAndReturn(run func(con return _c } -// Impl provides a mock function with given fields: -func (_m *MockServicePrincipalsInterface) Impl() iam.ServicePrincipalsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 iam.ServicePrincipalsService - if rf, ok := ret.Get(0).(func() iam.ServicePrincipalsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(iam.ServicePrincipalsService) - } - } - - return r0 -} - -// MockServicePrincipalsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockServicePrincipalsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockServicePrincipalsInterface_Expecter) Impl() *MockServicePrincipalsInterface_Impl_Call { - return &MockServicePrincipalsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockServicePrincipalsInterface_Impl_Call) Run(run func()) *MockServicePrincipalsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockServicePrincipalsInterface_Impl_Call) Return(_a0 iam.ServicePrincipalsService) *MockServicePrincipalsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServicePrincipalsInterface_Impl_Call) RunAndReturn(run func() iam.ServicePrincipalsService) *MockServicePrincipalsInterface_Impl_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) @@ -662,54 +615,6 @@ func (_c *MockServicePrincipalsInterface_Update_Call) RunAndReturn(run func(cont return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockServicePrincipalsInterface) WithImpl(impl iam.ServicePrincipalsService) iam.ServicePrincipalsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 iam.ServicePrincipalsInterface - if rf, ok := ret.Get(0).(func(iam.ServicePrincipalsService) iam.ServicePrincipalsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(iam.ServicePrincipalsInterface) - } - } - - return r0 -} - -// MockServicePrincipalsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockServicePrincipalsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl iam.ServicePrincipalsService -func (_e *MockServicePrincipalsInterface_Expecter) WithImpl(impl interface{}) *MockServicePrincipalsInterface_WithImpl_Call { - return &MockServicePrincipalsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockServicePrincipalsInterface_WithImpl_Call) Run(run func(impl iam.ServicePrincipalsService)) *MockServicePrincipalsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(iam.ServicePrincipalsService)) - }) - return _c -} - -func (_c *MockServicePrincipalsInterface_WithImpl_Call) Return(_a0 iam.ServicePrincipalsInterface) *MockServicePrincipalsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServicePrincipalsInterface_WithImpl_Call) RunAndReturn(run func(iam.ServicePrincipalsService) iam.ServicePrincipalsInterface) *MockServicePrincipalsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/iam/mock_users_interface.go b/experimental/mocks/service/iam/mock_users_interface.go index e7275a071..9319fdade 100644 --- a/experimental/mocks/service/iam/mock_users_interface.go +++ b/experimental/mocks/service/iam/mock_users_interface.go @@ -470,53 +470,6 @@ func (_c *MockUsersInterface_GetPermissions_Call) RunAndReturn(run func(context. return _c } -// Impl provides a mock function with given fields: -func (_m *MockUsersInterface) Impl() iam.UsersService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 iam.UsersService - if rf, ok := ret.Get(0).(func() iam.UsersService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(iam.UsersService) - } - } - - return r0 -} - -// MockUsersInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockUsersInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockUsersInterface_Expecter) Impl() *MockUsersInterface_Impl_Call { - return &MockUsersInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockUsersInterface_Impl_Call) Run(run func()) *MockUsersInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockUsersInterface_Impl_Call) Return(_a0 iam.UsersService) *MockUsersInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockUsersInterface_Impl_Call) RunAndReturn(run func() iam.UsersService) *MockUsersInterface_Impl_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) @@ -896,54 +849,6 @@ func (_c *MockUsersInterface_UserUserNameToIdMap_Call) RunAndReturn(run func(con return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockUsersInterface) WithImpl(impl iam.UsersService) iam.UsersInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 iam.UsersInterface - if rf, ok := ret.Get(0).(func(iam.UsersService) iam.UsersInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(iam.UsersInterface) - } - } - - return r0 -} - -// MockUsersInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockUsersInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl iam.UsersService -func (_e *MockUsersInterface_Expecter) WithImpl(impl interface{}) *MockUsersInterface_WithImpl_Call { - return &MockUsersInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockUsersInterface_WithImpl_Call) Run(run func(impl iam.UsersService)) *MockUsersInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(iam.UsersService)) - }) - return _c -} - -func (_c *MockUsersInterface_WithImpl_Call) Return(_a0 iam.UsersInterface) *MockUsersInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockUsersInterface_WithImpl_Call) RunAndReturn(run func(iam.UsersService) iam.UsersInterface) *MockUsersInterface_WithImpl_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 { diff --git a/experimental/mocks/service/iam/mock_workspace_assignment_interface.go b/experimental/mocks/service/iam/mock_workspace_assignment_interface.go index bd829e0b1..7625feeab 100644 --- a/experimental/mocks/service/iam/mock_workspace_assignment_interface.go +++ b/experimental/mocks/service/iam/mock_workspace_assignment_interface.go @@ -237,53 +237,6 @@ func (_c *MockWorkspaceAssignmentInterface_GetByWorkspaceId_Call) RunAndReturn(r return _c } -// Impl provides a mock function with given fields: -func (_m *MockWorkspaceAssignmentInterface) Impl() iam.WorkspaceAssignmentService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 iam.WorkspaceAssignmentService - if rf, ok := ret.Get(0).(func() iam.WorkspaceAssignmentService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(iam.WorkspaceAssignmentService) - } - } - - return r0 -} - -// MockWorkspaceAssignmentInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockWorkspaceAssignmentInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockWorkspaceAssignmentInterface_Expecter) Impl() *MockWorkspaceAssignmentInterface_Impl_Call { - return &MockWorkspaceAssignmentInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockWorkspaceAssignmentInterface_Impl_Call) Run(run func()) *MockWorkspaceAssignmentInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockWorkspaceAssignmentInterface_Impl_Call) Return(_a0 iam.WorkspaceAssignmentService) *MockWorkspaceAssignmentInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWorkspaceAssignmentInterface_Impl_Call) RunAndReturn(run func() iam.WorkspaceAssignmentService) *MockWorkspaceAssignmentInterface_Impl_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) @@ -510,54 +463,6 @@ func (_c *MockWorkspaceAssignmentInterface_Update_Call) RunAndReturn(run func(co return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockWorkspaceAssignmentInterface) WithImpl(impl iam.WorkspaceAssignmentService) iam.WorkspaceAssignmentInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 iam.WorkspaceAssignmentInterface - if rf, ok := ret.Get(0).(func(iam.WorkspaceAssignmentService) iam.WorkspaceAssignmentInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(iam.WorkspaceAssignmentInterface) - } - } - - return r0 -} - -// MockWorkspaceAssignmentInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockWorkspaceAssignmentInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl iam.WorkspaceAssignmentService -func (_e *MockWorkspaceAssignmentInterface_Expecter) WithImpl(impl interface{}) *MockWorkspaceAssignmentInterface_WithImpl_Call { - return &MockWorkspaceAssignmentInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockWorkspaceAssignmentInterface_WithImpl_Call) Run(run func(impl iam.WorkspaceAssignmentService)) *MockWorkspaceAssignmentInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(iam.WorkspaceAssignmentService)) - }) - return _c -} - -func (_c *MockWorkspaceAssignmentInterface_WithImpl_Call) Return(_a0 iam.WorkspaceAssignmentInterface) *MockWorkspaceAssignmentInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWorkspaceAssignmentInterface_WithImpl_Call) RunAndReturn(run func(iam.WorkspaceAssignmentService) iam.WorkspaceAssignmentInterface) *MockWorkspaceAssignmentInterface_WithImpl_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 { diff --git a/experimental/mocks/service/jobs/mock_jobs_interface.go b/experimental/mocks/service/jobs/mock_jobs_interface.go index 610d168d5..c00b20329 100644 --- a/experimental/mocks/service/jobs/mock_jobs_interface.go +++ b/experimental/mocks/service/jobs/mock_jobs_interface.go @@ -1284,53 +1284,6 @@ func (_c *MockJobsInterface_GetRunOutputByRunId_Call) RunAndReturn(run func(cont return _c } -// Impl provides a mock function with given fields: -func (_m *MockJobsInterface) Impl() jobs.JobsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 jobs.JobsService - if rf, ok := ret.Get(0).(func() jobs.JobsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(jobs.JobsService) - } - } - - return r0 -} - -// MockJobsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockJobsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockJobsInterface_Expecter) Impl() *MockJobsInterface_Impl_Call { - return &MockJobsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockJobsInterface_Impl_Call) Run(run func()) *MockJobsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockJobsInterface_Impl_Call) Return(_a0 jobs.JobsService) *MockJobsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockJobsInterface_Impl_Call) RunAndReturn(run func() jobs.JobsService) *MockJobsInterface_Impl_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) @@ -2219,54 +2172,6 @@ func (_c *MockJobsInterface_WaitGetRunJobTerminatedOrSkipped_Call) RunAndReturn( return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockJobsInterface) WithImpl(impl jobs.JobsService) jobs.JobsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 jobs.JobsInterface - if rf, ok := ret.Get(0).(func(jobs.JobsService) jobs.JobsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(jobs.JobsInterface) - } - } - - return r0 -} - -// MockJobsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockJobsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl jobs.JobsService -func (_e *MockJobsInterface_Expecter) WithImpl(impl interface{}) *MockJobsInterface_WithImpl_Call { - return &MockJobsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockJobsInterface_WithImpl_Call) Run(run func(impl jobs.JobsService)) *MockJobsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(jobs.JobsService)) - }) - return _c -} - -func (_c *MockJobsInterface_WithImpl_Call) Return(_a0 jobs.JobsInterface) *MockJobsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockJobsInterface_WithImpl_Call) RunAndReturn(run func(jobs.JobsService) jobs.JobsInterface) *MockJobsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/marketplace/mock_consumer_fulfillments_interface.go b/experimental/mocks/service/marketplace/mock_consumer_fulfillments_interface.go index 710cdd993..001d37a17 100644 --- a/experimental/mocks/service/marketplace/mock_consumer_fulfillments_interface.go +++ b/experimental/mocks/service/marketplace/mock_consumer_fulfillments_interface.go @@ -191,53 +191,6 @@ func (_c *MockConsumerFulfillmentsInterface_GetByListingId_Call) RunAndReturn(ru return _c } -// Impl provides a mock function with given fields: -func (_m *MockConsumerFulfillmentsInterface) Impl() marketplace.ConsumerFulfillmentsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 marketplace.ConsumerFulfillmentsService - if rf, ok := ret.Get(0).(func() marketplace.ConsumerFulfillmentsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(marketplace.ConsumerFulfillmentsService) - } - } - - return r0 -} - -// MockConsumerFulfillmentsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockConsumerFulfillmentsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockConsumerFulfillmentsInterface_Expecter) Impl() *MockConsumerFulfillmentsInterface_Impl_Call { - return &MockConsumerFulfillmentsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockConsumerFulfillmentsInterface_Impl_Call) Run(run func()) *MockConsumerFulfillmentsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockConsumerFulfillmentsInterface_Impl_Call) Return(_a0 marketplace.ConsumerFulfillmentsService) *MockConsumerFulfillmentsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConsumerFulfillmentsInterface_Impl_Call) RunAndReturn(run func() marketplace.ConsumerFulfillmentsService) *MockConsumerFulfillmentsInterface_Impl_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) @@ -405,54 +358,6 @@ func (_c *MockConsumerFulfillmentsInterface_ListByListingId_Call) RunAndReturn(r return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockConsumerFulfillmentsInterface) WithImpl(impl marketplace.ConsumerFulfillmentsService) marketplace.ConsumerFulfillmentsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 marketplace.ConsumerFulfillmentsInterface - if rf, ok := ret.Get(0).(func(marketplace.ConsumerFulfillmentsService) marketplace.ConsumerFulfillmentsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(marketplace.ConsumerFulfillmentsInterface) - } - } - - return r0 -} - -// MockConsumerFulfillmentsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockConsumerFulfillmentsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl marketplace.ConsumerFulfillmentsService -func (_e *MockConsumerFulfillmentsInterface_Expecter) WithImpl(impl interface{}) *MockConsumerFulfillmentsInterface_WithImpl_Call { - return &MockConsumerFulfillmentsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockConsumerFulfillmentsInterface_WithImpl_Call) Run(run func(impl marketplace.ConsumerFulfillmentsService)) *MockConsumerFulfillmentsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(marketplace.ConsumerFulfillmentsService)) - }) - return _c -} - -func (_c *MockConsumerFulfillmentsInterface_WithImpl_Call) Return(_a0 marketplace.ConsumerFulfillmentsInterface) *MockConsumerFulfillmentsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConsumerFulfillmentsInterface_WithImpl_Call) RunAndReturn(run func(marketplace.ConsumerFulfillmentsService) marketplace.ConsumerFulfillmentsInterface) *MockConsumerFulfillmentsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/marketplace/mock_consumer_installations_interface.go b/experimental/mocks/service/marketplace/mock_consumer_installations_interface.go index 50bcf1b3d..7bc4dcde2 100644 --- a/experimental/mocks/service/marketplace/mock_consumer_installations_interface.go +++ b/experimental/mocks/service/marketplace/mock_consumer_installations_interface.go @@ -178,53 +178,6 @@ func (_c *MockConsumerInstallationsInterface_DeleteByListingIdAndInstallationId_ return _c } -// Impl provides a mock function with given fields: -func (_m *MockConsumerInstallationsInterface) Impl() marketplace.ConsumerInstallationsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 marketplace.ConsumerInstallationsService - if rf, ok := ret.Get(0).(func() marketplace.ConsumerInstallationsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(marketplace.ConsumerInstallationsService) - } - } - - return r0 -} - -// MockConsumerInstallationsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockConsumerInstallationsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockConsumerInstallationsInterface_Expecter) Impl() *MockConsumerInstallationsInterface_Impl_Call { - return &MockConsumerInstallationsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockConsumerInstallationsInterface_Impl_Call) Run(run func()) *MockConsumerInstallationsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockConsumerInstallationsInterface_Impl_Call) Return(_a0 marketplace.ConsumerInstallationsService) *MockConsumerInstallationsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConsumerInstallationsInterface_Impl_Call) RunAndReturn(run func() marketplace.ConsumerInstallationsService) *MockConsumerInstallationsInterface_Impl_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) @@ -559,54 +512,6 @@ func (_c *MockConsumerInstallationsInterface_Update_Call) RunAndReturn(run func( return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockConsumerInstallationsInterface) WithImpl(impl marketplace.ConsumerInstallationsService) marketplace.ConsumerInstallationsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 marketplace.ConsumerInstallationsInterface - if rf, ok := ret.Get(0).(func(marketplace.ConsumerInstallationsService) marketplace.ConsumerInstallationsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(marketplace.ConsumerInstallationsInterface) - } - } - - return r0 -} - -// MockConsumerInstallationsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockConsumerInstallationsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl marketplace.ConsumerInstallationsService -func (_e *MockConsumerInstallationsInterface_Expecter) WithImpl(impl interface{}) *MockConsumerInstallationsInterface_WithImpl_Call { - return &MockConsumerInstallationsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockConsumerInstallationsInterface_WithImpl_Call) Run(run func(impl marketplace.ConsumerInstallationsService)) *MockConsumerInstallationsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(marketplace.ConsumerInstallationsService)) - }) - return _c -} - -func (_c *MockConsumerInstallationsInterface_WithImpl_Call) Return(_a0 marketplace.ConsumerInstallationsInterface) *MockConsumerInstallationsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConsumerInstallationsInterface_WithImpl_Call) RunAndReturn(run func(marketplace.ConsumerInstallationsService) marketplace.ConsumerInstallationsInterface) *MockConsumerInstallationsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/marketplace/mock_consumer_listings_interface.go b/experimental/mocks/service/marketplace/mock_consumer_listings_interface.go index 4fb554721..aceb32726 100644 --- a/experimental/mocks/service/marketplace/mock_consumer_listings_interface.go +++ b/experimental/mocks/service/marketplace/mock_consumer_listings_interface.go @@ -260,53 +260,6 @@ func (_c *MockConsumerListingsInterface_GetBySummaryName_Call) RunAndReturn(run return _c } -// Impl provides a mock function with given fields: -func (_m *MockConsumerListingsInterface) Impl() marketplace.ConsumerListingsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 marketplace.ConsumerListingsService - if rf, ok := ret.Get(0).(func() marketplace.ConsumerListingsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(marketplace.ConsumerListingsService) - } - } - - return r0 -} - -// MockConsumerListingsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockConsumerListingsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockConsumerListingsInterface_Expecter) Impl() *MockConsumerListingsInterface_Impl_Call { - return &MockConsumerListingsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockConsumerListingsInterface_Impl_Call) Run(run func()) *MockConsumerListingsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockConsumerListingsInterface_Impl_Call) Return(_a0 marketplace.ConsumerListingsService) *MockConsumerListingsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConsumerListingsInterface_Impl_Call) RunAndReturn(run func() marketplace.ConsumerListingsService) *MockConsumerListingsInterface_Impl_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) @@ -582,54 +535,6 @@ func (_c *MockConsumerListingsInterface_SearchAll_Call) RunAndReturn(run func(co return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockConsumerListingsInterface) WithImpl(impl marketplace.ConsumerListingsService) marketplace.ConsumerListingsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 marketplace.ConsumerListingsInterface - if rf, ok := ret.Get(0).(func(marketplace.ConsumerListingsService) marketplace.ConsumerListingsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(marketplace.ConsumerListingsInterface) - } - } - - return r0 -} - -// MockConsumerListingsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockConsumerListingsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl marketplace.ConsumerListingsService -func (_e *MockConsumerListingsInterface_Expecter) WithImpl(impl interface{}) *MockConsumerListingsInterface_WithImpl_Call { - return &MockConsumerListingsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockConsumerListingsInterface_WithImpl_Call) Run(run func(impl marketplace.ConsumerListingsService)) *MockConsumerListingsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(marketplace.ConsumerListingsService)) - }) - return _c -} - -func (_c *MockConsumerListingsInterface_WithImpl_Call) Return(_a0 marketplace.ConsumerListingsInterface) *MockConsumerListingsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConsumerListingsInterface_WithImpl_Call) RunAndReturn(run func(marketplace.ConsumerListingsService) marketplace.ConsumerListingsInterface) *MockConsumerListingsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/marketplace/mock_consumer_personalization_requests_interface.go b/experimental/mocks/service/marketplace/mock_consumer_personalization_requests_interface.go index c74543b4e..dddb0cb00 100644 --- a/experimental/mocks/service/marketplace/mock_consumer_personalization_requests_interface.go +++ b/experimental/mocks/service/marketplace/mock_consumer_personalization_requests_interface.go @@ -201,53 +201,6 @@ func (_c *MockConsumerPersonalizationRequestsInterface_GetByListingId_Call) RunA return _c } -// Impl provides a mock function with given fields: -func (_m *MockConsumerPersonalizationRequestsInterface) Impl() marketplace.ConsumerPersonalizationRequestsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 marketplace.ConsumerPersonalizationRequestsService - if rf, ok := ret.Get(0).(func() marketplace.ConsumerPersonalizationRequestsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(marketplace.ConsumerPersonalizationRequestsService) - } - } - - return r0 -} - -// MockConsumerPersonalizationRequestsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockConsumerPersonalizationRequestsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockConsumerPersonalizationRequestsInterface_Expecter) Impl() *MockConsumerPersonalizationRequestsInterface_Impl_Call { - return &MockConsumerPersonalizationRequestsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockConsumerPersonalizationRequestsInterface_Impl_Call) Run(run func()) *MockConsumerPersonalizationRequestsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockConsumerPersonalizationRequestsInterface_Impl_Call) Return(_a0 marketplace.ConsumerPersonalizationRequestsService) *MockConsumerPersonalizationRequestsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConsumerPersonalizationRequestsInterface_Impl_Call) RunAndReturn(run func() marketplace.ConsumerPersonalizationRequestsService) *MockConsumerPersonalizationRequestsInterface_Impl_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) @@ -356,54 +309,6 @@ func (_c *MockConsumerPersonalizationRequestsInterface_ListAll_Call) RunAndRetur return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockConsumerPersonalizationRequestsInterface) WithImpl(impl marketplace.ConsumerPersonalizationRequestsService) marketplace.ConsumerPersonalizationRequestsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 marketplace.ConsumerPersonalizationRequestsInterface - if rf, ok := ret.Get(0).(func(marketplace.ConsumerPersonalizationRequestsService) marketplace.ConsumerPersonalizationRequestsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(marketplace.ConsumerPersonalizationRequestsInterface) - } - } - - return r0 -} - -// MockConsumerPersonalizationRequestsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockConsumerPersonalizationRequestsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl marketplace.ConsumerPersonalizationRequestsService -func (_e *MockConsumerPersonalizationRequestsInterface_Expecter) WithImpl(impl interface{}) *MockConsumerPersonalizationRequestsInterface_WithImpl_Call { - return &MockConsumerPersonalizationRequestsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockConsumerPersonalizationRequestsInterface_WithImpl_Call) Run(run func(impl marketplace.ConsumerPersonalizationRequestsService)) *MockConsumerPersonalizationRequestsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(marketplace.ConsumerPersonalizationRequestsService)) - }) - return _c -} - -func (_c *MockConsumerPersonalizationRequestsInterface_WithImpl_Call) Return(_a0 marketplace.ConsumerPersonalizationRequestsInterface) *MockConsumerPersonalizationRequestsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConsumerPersonalizationRequestsInterface_WithImpl_Call) RunAndReturn(run func(marketplace.ConsumerPersonalizationRequestsService) marketplace.ConsumerPersonalizationRequestsInterface) *MockConsumerPersonalizationRequestsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/marketplace/mock_consumer_providers_interface.go b/experimental/mocks/service/marketplace/mock_consumer_providers_interface.go index 55b54f4ce..ecb1d5b07 100644 --- a/experimental/mocks/service/marketplace/mock_consumer_providers_interface.go +++ b/experimental/mocks/service/marketplace/mock_consumer_providers_interface.go @@ -260,53 +260,6 @@ func (_c *MockConsumerProvidersInterface_GetByName_Call) RunAndReturn(run func(c return _c } -// Impl provides a mock function with given fields: -func (_m *MockConsumerProvidersInterface) Impl() marketplace.ConsumerProvidersService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 marketplace.ConsumerProvidersService - if rf, ok := ret.Get(0).(func() marketplace.ConsumerProvidersService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(marketplace.ConsumerProvidersService) - } - } - - return r0 -} - -// MockConsumerProvidersInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockConsumerProvidersInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockConsumerProvidersInterface_Expecter) Impl() *MockConsumerProvidersInterface_Impl_Call { - return &MockConsumerProvidersInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockConsumerProvidersInterface_Impl_Call) Run(run func()) *MockConsumerProvidersInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockConsumerProvidersInterface_Impl_Call) Return(_a0 marketplace.ConsumerProvidersService) *MockConsumerProvidersInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConsumerProvidersInterface_Impl_Call) RunAndReturn(run func() marketplace.ConsumerProvidersService) *MockConsumerProvidersInterface_Impl_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) @@ -474,54 +427,6 @@ func (_c *MockConsumerProvidersInterface_ProviderInfoNameToIdMap_Call) RunAndRet return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockConsumerProvidersInterface) WithImpl(impl marketplace.ConsumerProvidersService) marketplace.ConsumerProvidersInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 marketplace.ConsumerProvidersInterface - if rf, ok := ret.Get(0).(func(marketplace.ConsumerProvidersService) marketplace.ConsumerProvidersInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(marketplace.ConsumerProvidersInterface) - } - } - - return r0 -} - -// MockConsumerProvidersInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockConsumerProvidersInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl marketplace.ConsumerProvidersService -func (_e *MockConsumerProvidersInterface_Expecter) WithImpl(impl interface{}) *MockConsumerProvidersInterface_WithImpl_Call { - return &MockConsumerProvidersInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockConsumerProvidersInterface_WithImpl_Call) Run(run func(impl marketplace.ConsumerProvidersService)) *MockConsumerProvidersInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(marketplace.ConsumerProvidersService)) - }) - return _c -} - -func (_c *MockConsumerProvidersInterface_WithImpl_Call) Return(_a0 marketplace.ConsumerProvidersInterface) *MockConsumerProvidersInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConsumerProvidersInterface_WithImpl_Call) RunAndReturn(run func(marketplace.ConsumerProvidersService) marketplace.ConsumerProvidersInterface) *MockConsumerProvidersInterface_WithImpl_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 { diff --git a/experimental/mocks/service/marketplace/mock_provider_exchange_filters_interface.go b/experimental/mocks/service/marketplace/mock_provider_exchange_filters_interface.go index c241193ca..1e7826be3 100644 --- a/experimental/mocks/service/marketplace/mock_provider_exchange_filters_interface.go +++ b/experimental/mocks/service/marketplace/mock_provider_exchange_filters_interface.go @@ -295,53 +295,6 @@ func (_c *MockProviderExchangeFiltersInterface_GetByName_Call) RunAndReturn(run return _c } -// Impl provides a mock function with given fields: -func (_m *MockProviderExchangeFiltersInterface) Impl() marketplace.ProviderExchangeFiltersService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 marketplace.ProviderExchangeFiltersService - if rf, ok := ret.Get(0).(func() marketplace.ProviderExchangeFiltersService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(marketplace.ProviderExchangeFiltersService) - } - } - - return r0 -} - -// MockProviderExchangeFiltersInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockProviderExchangeFiltersInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockProviderExchangeFiltersInterface_Expecter) Impl() *MockProviderExchangeFiltersInterface_Impl_Call { - return &MockProviderExchangeFiltersInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockProviderExchangeFiltersInterface_Impl_Call) Run(run func()) *MockProviderExchangeFiltersInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockProviderExchangeFiltersInterface_Impl_Call) Return(_a0 marketplace.ProviderExchangeFiltersService) *MockProviderExchangeFiltersInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderExchangeFiltersInterface_Impl_Call) RunAndReturn(run func() marketplace.ProviderExchangeFiltersService) *MockProviderExchangeFiltersInterface_Impl_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) @@ -509,54 +462,6 @@ func (_c *MockProviderExchangeFiltersInterface_Update_Call) RunAndReturn(run fun return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockProviderExchangeFiltersInterface) WithImpl(impl marketplace.ProviderExchangeFiltersService) marketplace.ProviderExchangeFiltersInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 marketplace.ProviderExchangeFiltersInterface - if rf, ok := ret.Get(0).(func(marketplace.ProviderExchangeFiltersService) marketplace.ProviderExchangeFiltersInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(marketplace.ProviderExchangeFiltersInterface) - } - } - - return r0 -} - -// MockProviderExchangeFiltersInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockProviderExchangeFiltersInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl marketplace.ProviderExchangeFiltersService -func (_e *MockProviderExchangeFiltersInterface_Expecter) WithImpl(impl interface{}) *MockProviderExchangeFiltersInterface_WithImpl_Call { - return &MockProviderExchangeFiltersInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockProviderExchangeFiltersInterface_WithImpl_Call) Run(run func(impl marketplace.ProviderExchangeFiltersService)) *MockProviderExchangeFiltersInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(marketplace.ProviderExchangeFiltersService)) - }) - return _c -} - -func (_c *MockProviderExchangeFiltersInterface_WithImpl_Call) Return(_a0 marketplace.ProviderExchangeFiltersInterface) *MockProviderExchangeFiltersInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderExchangeFiltersInterface_WithImpl_Call) RunAndReturn(run func(marketplace.ProviderExchangeFiltersService) marketplace.ProviderExchangeFiltersInterface) *MockProviderExchangeFiltersInterface_WithImpl_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 { diff --git a/experimental/mocks/service/marketplace/mock_provider_exchanges_interface.go b/experimental/mocks/service/marketplace/mock_provider_exchanges_interface.go index 41d2194aa..4c03760ad 100644 --- a/experimental/mocks/service/marketplace/mock_provider_exchanges_interface.go +++ b/experimental/mocks/service/marketplace/mock_provider_exchanges_interface.go @@ -802,53 +802,6 @@ func (_c *MockProviderExchangesInterface_GetByName_Call) RunAndReturn(run func(c return _c } -// Impl provides a mock function with given fields: -func (_m *MockProviderExchangesInterface) Impl() marketplace.ProviderExchangesService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 marketplace.ProviderExchangesService - if rf, ok := ret.Get(0).(func() marketplace.ProviderExchangesService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(marketplace.ProviderExchangesService) - } - } - - return r0 -} - -// MockProviderExchangesInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockProviderExchangesInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockProviderExchangesInterface_Expecter) Impl() *MockProviderExchangesInterface_Impl_Call { - return &MockProviderExchangesInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockProviderExchangesInterface_Impl_Call) Run(run func()) *MockProviderExchangesInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockProviderExchangesInterface_Impl_Call) Return(_a0 marketplace.ProviderExchangesService) *MockProviderExchangesInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderExchangesInterface_Impl_Call) RunAndReturn(run func() marketplace.ProviderExchangesService) *MockProviderExchangesInterface_Impl_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) @@ -1232,54 +1185,6 @@ func (_c *MockProviderExchangesInterface_Update_Call) RunAndReturn(run func(cont return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockProviderExchangesInterface) WithImpl(impl marketplace.ProviderExchangesService) marketplace.ProviderExchangesInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 marketplace.ProviderExchangesInterface - if rf, ok := ret.Get(0).(func(marketplace.ProviderExchangesService) marketplace.ProviderExchangesInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(marketplace.ProviderExchangesInterface) - } - } - - return r0 -} - -// MockProviderExchangesInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockProviderExchangesInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl marketplace.ProviderExchangesService -func (_e *MockProviderExchangesInterface_Expecter) WithImpl(impl interface{}) *MockProviderExchangesInterface_WithImpl_Call { - return &MockProviderExchangesInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockProviderExchangesInterface_WithImpl_Call) Run(run func(impl marketplace.ProviderExchangesService)) *MockProviderExchangesInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(marketplace.ProviderExchangesService)) - }) - return _c -} - -func (_c *MockProviderExchangesInterface_WithImpl_Call) Return(_a0 marketplace.ProviderExchangesInterface) *MockProviderExchangesInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderExchangesInterface_WithImpl_Call) RunAndReturn(run func(marketplace.ProviderExchangesService) marketplace.ProviderExchangesInterface) *MockProviderExchangesInterface_WithImpl_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 { diff --git a/experimental/mocks/service/marketplace/mock_provider_files_interface.go b/experimental/mocks/service/marketplace/mock_provider_files_interface.go index 92bb62fb8..4c05d72af 100644 --- a/experimental/mocks/service/marketplace/mock_provider_files_interface.go +++ b/experimental/mocks/service/marketplace/mock_provider_files_interface.go @@ -413,53 +413,6 @@ func (_c *MockProviderFilesInterface_GetByFileId_Call) RunAndReturn(run func(con return _c } -// Impl provides a mock function with given fields: -func (_m *MockProviderFilesInterface) Impl() marketplace.ProviderFilesService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 marketplace.ProviderFilesService - if rf, ok := ret.Get(0).(func() marketplace.ProviderFilesService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(marketplace.ProviderFilesService) - } - } - - return r0 -} - -// MockProviderFilesInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockProviderFilesInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockProviderFilesInterface_Expecter) Impl() *MockProviderFilesInterface_Impl_Call { - return &MockProviderFilesInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockProviderFilesInterface_Impl_Call) Run(run func()) *MockProviderFilesInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockProviderFilesInterface_Impl_Call) Return(_a0 marketplace.ProviderFilesService) *MockProviderFilesInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderFilesInterface_Impl_Call) RunAndReturn(run func() marketplace.ProviderFilesService) *MockProviderFilesInterface_Impl_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) @@ -568,54 +521,6 @@ func (_c *MockProviderFilesInterface_ListAll_Call) RunAndReturn(run func(context return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockProviderFilesInterface) WithImpl(impl marketplace.ProviderFilesService) marketplace.ProviderFilesInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 marketplace.ProviderFilesInterface - if rf, ok := ret.Get(0).(func(marketplace.ProviderFilesService) marketplace.ProviderFilesInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(marketplace.ProviderFilesInterface) - } - } - - return r0 -} - -// MockProviderFilesInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockProviderFilesInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl marketplace.ProviderFilesService -func (_e *MockProviderFilesInterface_Expecter) WithImpl(impl interface{}) *MockProviderFilesInterface_WithImpl_Call { - return &MockProviderFilesInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockProviderFilesInterface_WithImpl_Call) Run(run func(impl marketplace.ProviderFilesService)) *MockProviderFilesInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(marketplace.ProviderFilesService)) - }) - return _c -} - -func (_c *MockProviderFilesInterface_WithImpl_Call) Return(_a0 marketplace.ProviderFilesInterface) *MockProviderFilesInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderFilesInterface_WithImpl_Call) RunAndReturn(run func(marketplace.ProviderFilesService) marketplace.ProviderFilesInterface) *MockProviderFilesInterface_WithImpl_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 { diff --git a/experimental/mocks/service/marketplace/mock_provider_listings_interface.go b/experimental/mocks/service/marketplace/mock_provider_listings_interface.go index a8288cb2f..b1c0a55bc 100644 --- a/experimental/mocks/service/marketplace/mock_provider_listings_interface.go +++ b/experimental/mocks/service/marketplace/mock_provider_listings_interface.go @@ -354,53 +354,6 @@ func (_c *MockProviderListingsInterface_GetBySummaryName_Call) RunAndReturn(run return _c } -// Impl provides a mock function with given fields: -func (_m *MockProviderListingsInterface) Impl() marketplace.ProviderListingsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 marketplace.ProviderListingsService - if rf, ok := ret.Get(0).(func() marketplace.ProviderListingsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(marketplace.ProviderListingsService) - } - } - - return r0 -} - -// MockProviderListingsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockProviderListingsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockProviderListingsInterface_Expecter) Impl() *MockProviderListingsInterface_Impl_Call { - return &MockProviderListingsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockProviderListingsInterface_Impl_Call) Run(run func()) *MockProviderListingsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockProviderListingsInterface_Impl_Call) Return(_a0 marketplace.ProviderListingsService) *MockProviderListingsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderListingsInterface_Impl_Call) RunAndReturn(run func() marketplace.ProviderListingsService) *MockProviderListingsInterface_Impl_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) @@ -627,54 +580,6 @@ func (_c *MockProviderListingsInterface_Update_Call) RunAndReturn(run func(conte return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockProviderListingsInterface) WithImpl(impl marketplace.ProviderListingsService) marketplace.ProviderListingsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 marketplace.ProviderListingsInterface - if rf, ok := ret.Get(0).(func(marketplace.ProviderListingsService) marketplace.ProviderListingsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(marketplace.ProviderListingsInterface) - } - } - - return r0 -} - -// MockProviderListingsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockProviderListingsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl marketplace.ProviderListingsService -func (_e *MockProviderListingsInterface_Expecter) WithImpl(impl interface{}) *MockProviderListingsInterface_WithImpl_Call { - return &MockProviderListingsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockProviderListingsInterface_WithImpl_Call) Run(run func(impl marketplace.ProviderListingsService)) *MockProviderListingsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(marketplace.ProviderListingsService)) - }) - return _c -} - -func (_c *MockProviderListingsInterface_WithImpl_Call) Return(_a0 marketplace.ProviderListingsInterface) *MockProviderListingsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderListingsInterface_WithImpl_Call) RunAndReturn(run func(marketplace.ProviderListingsService) marketplace.ProviderListingsInterface) *MockProviderListingsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/marketplace/mock_provider_personalization_requests_interface.go b/experimental/mocks/service/marketplace/mock_provider_personalization_requests_interface.go index ec428d767..0792ffc86 100644 --- a/experimental/mocks/service/marketplace/mock_provider_personalization_requests_interface.go +++ b/experimental/mocks/service/marketplace/mock_provider_personalization_requests_interface.go @@ -24,53 +24,6 @@ func (_m *MockProviderPersonalizationRequestsInterface) EXPECT() *MockProviderPe return &MockProviderPersonalizationRequestsInterface_Expecter{mock: &_m.Mock} } -// Impl provides a mock function with given fields: -func (_m *MockProviderPersonalizationRequestsInterface) Impl() marketplace.ProviderPersonalizationRequestsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 marketplace.ProviderPersonalizationRequestsService - if rf, ok := ret.Get(0).(func() marketplace.ProviderPersonalizationRequestsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(marketplace.ProviderPersonalizationRequestsService) - } - } - - return r0 -} - -// MockProviderPersonalizationRequestsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockProviderPersonalizationRequestsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockProviderPersonalizationRequestsInterface_Expecter) Impl() *MockProviderPersonalizationRequestsInterface_Impl_Call { - return &MockProviderPersonalizationRequestsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockProviderPersonalizationRequestsInterface_Impl_Call) Run(run func()) *MockProviderPersonalizationRequestsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockProviderPersonalizationRequestsInterface_Impl_Call) Return(_a0 marketplace.ProviderPersonalizationRequestsService) *MockProviderPersonalizationRequestsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderPersonalizationRequestsInterface_Impl_Call) RunAndReturn(run func() marketplace.ProviderPersonalizationRequestsService) *MockProviderPersonalizationRequestsInterface_Impl_Call { - _c.Call.Return(run) - return _c -} - // 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) @@ -238,54 +191,6 @@ func (_c *MockProviderPersonalizationRequestsInterface_Update_Call) RunAndReturn return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockProviderPersonalizationRequestsInterface) WithImpl(impl marketplace.ProviderPersonalizationRequestsService) marketplace.ProviderPersonalizationRequestsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 marketplace.ProviderPersonalizationRequestsInterface - if rf, ok := ret.Get(0).(func(marketplace.ProviderPersonalizationRequestsService) marketplace.ProviderPersonalizationRequestsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(marketplace.ProviderPersonalizationRequestsInterface) - } - } - - return r0 -} - -// MockProviderPersonalizationRequestsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockProviderPersonalizationRequestsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl marketplace.ProviderPersonalizationRequestsService -func (_e *MockProviderPersonalizationRequestsInterface_Expecter) WithImpl(impl interface{}) *MockProviderPersonalizationRequestsInterface_WithImpl_Call { - return &MockProviderPersonalizationRequestsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockProviderPersonalizationRequestsInterface_WithImpl_Call) Run(run func(impl marketplace.ProviderPersonalizationRequestsService)) *MockProviderPersonalizationRequestsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(marketplace.ProviderPersonalizationRequestsService)) - }) - return _c -} - -func (_c *MockProviderPersonalizationRequestsInterface_WithImpl_Call) Return(_a0 marketplace.ProviderPersonalizationRequestsInterface) *MockProviderPersonalizationRequestsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderPersonalizationRequestsInterface_WithImpl_Call) RunAndReturn(run func(marketplace.ProviderPersonalizationRequestsService) marketplace.ProviderPersonalizationRequestsInterface) *MockProviderPersonalizationRequestsInterface_WithImpl_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 { 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 index 6a3847913..3bee4950a 100644 --- a/experimental/mocks/service/marketplace/mock_provider_provider_analytics_dashboards_interface.go +++ b/experimental/mocks/service/marketplace/mock_provider_provider_analytics_dashboards_interface.go @@ -196,53 +196,6 @@ func (_c *MockProviderProviderAnalyticsDashboardsInterface_GetLatestVersion_Call return _c } -// Impl provides a mock function with given fields: -func (_m *MockProviderProviderAnalyticsDashboardsInterface) Impl() marketplace.ProviderProviderAnalyticsDashboardsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 marketplace.ProviderProviderAnalyticsDashboardsService - if rf, ok := ret.Get(0).(func() marketplace.ProviderProviderAnalyticsDashboardsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(marketplace.ProviderProviderAnalyticsDashboardsService) - } - } - - return r0 -} - -// MockProviderProviderAnalyticsDashboardsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockProviderProviderAnalyticsDashboardsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockProviderProviderAnalyticsDashboardsInterface_Expecter) Impl() *MockProviderProviderAnalyticsDashboardsInterface_Impl_Call { - return &MockProviderProviderAnalyticsDashboardsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockProviderProviderAnalyticsDashboardsInterface_Impl_Call) Run(run func()) *MockProviderProviderAnalyticsDashboardsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockProviderProviderAnalyticsDashboardsInterface_Impl_Call) Return(_a0 marketplace.ProviderProviderAnalyticsDashboardsService) *MockProviderProviderAnalyticsDashboardsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderProviderAnalyticsDashboardsInterface_Impl_Call) RunAndReturn(run func() marketplace.ProviderProviderAnalyticsDashboardsService) *MockProviderProviderAnalyticsDashboardsInterface_Impl_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) @@ -302,54 +255,6 @@ func (_c *MockProviderProviderAnalyticsDashboardsInterface_Update_Call) RunAndRe return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockProviderProviderAnalyticsDashboardsInterface) WithImpl(impl marketplace.ProviderProviderAnalyticsDashboardsService) marketplace.ProviderProviderAnalyticsDashboardsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 marketplace.ProviderProviderAnalyticsDashboardsInterface - if rf, ok := ret.Get(0).(func(marketplace.ProviderProviderAnalyticsDashboardsService) marketplace.ProviderProviderAnalyticsDashboardsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(marketplace.ProviderProviderAnalyticsDashboardsInterface) - } - } - - return r0 -} - -// MockProviderProviderAnalyticsDashboardsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockProviderProviderAnalyticsDashboardsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl marketplace.ProviderProviderAnalyticsDashboardsService -func (_e *MockProviderProviderAnalyticsDashboardsInterface_Expecter) WithImpl(impl interface{}) *MockProviderProviderAnalyticsDashboardsInterface_WithImpl_Call { - return &MockProviderProviderAnalyticsDashboardsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockProviderProviderAnalyticsDashboardsInterface_WithImpl_Call) Run(run func(impl marketplace.ProviderProviderAnalyticsDashboardsService)) *MockProviderProviderAnalyticsDashboardsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(marketplace.ProviderProviderAnalyticsDashboardsService)) - }) - return _c -} - -func (_c *MockProviderProviderAnalyticsDashboardsInterface_WithImpl_Call) Return(_a0 marketplace.ProviderProviderAnalyticsDashboardsInterface) *MockProviderProviderAnalyticsDashboardsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderProviderAnalyticsDashboardsInterface_WithImpl_Call) RunAndReturn(run func(marketplace.ProviderProviderAnalyticsDashboardsService) marketplace.ProviderProviderAnalyticsDashboardsInterface) *MockProviderProviderAnalyticsDashboardsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/marketplace/mock_provider_providers_interface.go b/experimental/mocks/service/marketplace/mock_provider_providers_interface.go index 074555aed..bbab1a55e 100644 --- a/experimental/mocks/service/marketplace/mock_provider_providers_interface.go +++ b/experimental/mocks/service/marketplace/mock_provider_providers_interface.go @@ -354,53 +354,6 @@ func (_c *MockProviderProvidersInterface_GetByName_Call) RunAndReturn(run func(c return _c } -// Impl provides a mock function with given fields: -func (_m *MockProviderProvidersInterface) Impl() marketplace.ProviderProvidersService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 marketplace.ProviderProvidersService - if rf, ok := ret.Get(0).(func() marketplace.ProviderProvidersService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(marketplace.ProviderProvidersService) - } - } - - return r0 -} - -// MockProviderProvidersInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockProviderProvidersInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockProviderProvidersInterface_Expecter) Impl() *MockProviderProvidersInterface_Impl_Call { - return &MockProviderProvidersInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockProviderProvidersInterface_Impl_Call) Run(run func()) *MockProviderProvidersInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockProviderProvidersInterface_Impl_Call) Return(_a0 marketplace.ProviderProvidersService) *MockProviderProvidersInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderProvidersInterface_Impl_Call) RunAndReturn(run func() marketplace.ProviderProvidersService) *MockProviderProvidersInterface_Impl_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) @@ -627,54 +580,6 @@ func (_c *MockProviderProvidersInterface_Update_Call) RunAndReturn(run func(cont return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockProviderProvidersInterface) WithImpl(impl marketplace.ProviderProvidersService) marketplace.ProviderProvidersInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 marketplace.ProviderProvidersInterface - if rf, ok := ret.Get(0).(func(marketplace.ProviderProvidersService) marketplace.ProviderProvidersInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(marketplace.ProviderProvidersInterface) - } - } - - return r0 -} - -// MockProviderProvidersInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockProviderProvidersInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl marketplace.ProviderProvidersService -func (_e *MockProviderProvidersInterface_Expecter) WithImpl(impl interface{}) *MockProviderProvidersInterface_WithImpl_Call { - return &MockProviderProvidersInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockProviderProvidersInterface_WithImpl_Call) Run(run func(impl marketplace.ProviderProvidersService)) *MockProviderProvidersInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(marketplace.ProviderProvidersService)) - }) - return _c -} - -func (_c *MockProviderProvidersInterface_WithImpl_Call) Return(_a0 marketplace.ProviderProvidersInterface) *MockProviderProvidersInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderProvidersInterface_WithImpl_Call) RunAndReturn(run func(marketplace.ProviderProvidersService) marketplace.ProviderProvidersInterface) *MockProviderProvidersInterface_WithImpl_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 { diff --git a/experimental/mocks/service/ml/mock_experiments_interface.go b/experimental/mocks/service/ml/mock_experiments_interface.go index b917074ef..0743f56c9 100644 --- a/experimental/mocks/service/ml/mock_experiments_interface.go +++ b/experimental/mocks/service/ml/mock_experiments_interface.go @@ -863,53 +863,6 @@ func (_c *MockExperimentsInterface_GetRun_Call) RunAndReturn(run func(context.Co return _c } -// Impl provides a mock function with given fields: -func (_m *MockExperimentsInterface) Impl() ml.ExperimentsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 ml.ExperimentsService - if rf, ok := ret.Get(0).(func() ml.ExperimentsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(ml.ExperimentsService) - } - } - - return r0 -} - -// MockExperimentsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockExperimentsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockExperimentsInterface_Expecter) Impl() *MockExperimentsInterface_Impl_Call { - return &MockExperimentsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockExperimentsInterface_Impl_Call) Run(run func()) *MockExperimentsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockExperimentsInterface_Impl_Call) Return(_a0 ml.ExperimentsService) *MockExperimentsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockExperimentsInterface_Impl_Call) RunAndReturn(run func() ml.ExperimentsService) *MockExperimentsInterface_Impl_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) @@ -2048,54 +2001,6 @@ func (_c *MockExperimentsInterface_UpdateRun_Call) RunAndReturn(run func(context return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockExperimentsInterface) WithImpl(impl ml.ExperimentsService) ml.ExperimentsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 ml.ExperimentsInterface - if rf, ok := ret.Get(0).(func(ml.ExperimentsService) ml.ExperimentsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(ml.ExperimentsInterface) - } - } - - return r0 -} - -// MockExperimentsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockExperimentsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl ml.ExperimentsService -func (_e *MockExperimentsInterface_Expecter) WithImpl(impl interface{}) *MockExperimentsInterface_WithImpl_Call { - return &MockExperimentsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockExperimentsInterface_WithImpl_Call) Run(run func(impl ml.ExperimentsService)) *MockExperimentsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(ml.ExperimentsService)) - }) - return _c -} - -func (_c *MockExperimentsInterface_WithImpl_Call) Return(_a0 ml.ExperimentsInterface) *MockExperimentsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockExperimentsInterface_WithImpl_Call) RunAndReturn(run func(ml.ExperimentsService) ml.ExperimentsInterface) *MockExperimentsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/ml/mock_model_registry_interface.go b/experimental/mocks/service/ml/mock_model_registry_interface.go index 96a777739..c4196bccd 100644 --- a/experimental/mocks/service/ml/mock_model_registry_interface.go +++ b/experimental/mocks/service/ml/mock_model_registry_interface.go @@ -1228,53 +1228,6 @@ func (_c *MockModelRegistryInterface_GetPermissionsByRegisteredModelId_Call) Run return _c } -// Impl provides a mock function with given fields: -func (_m *MockModelRegistryInterface) Impl() ml.ModelRegistryService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 ml.ModelRegistryService - if rf, ok := ret.Get(0).(func() ml.ModelRegistryService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(ml.ModelRegistryService) - } - } - - return r0 -} - -// MockModelRegistryInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockModelRegistryInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockModelRegistryInterface_Expecter) Impl() *MockModelRegistryInterface_Impl_Call { - return &MockModelRegistryInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockModelRegistryInterface_Impl_Call) Run(run func()) *MockModelRegistryInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockModelRegistryInterface_Impl_Call) Return(_a0 ml.ModelRegistryService) *MockModelRegistryInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockModelRegistryInterface_Impl_Call) RunAndReturn(run func() ml.ModelRegistryService) *MockModelRegistryInterface_Impl_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) @@ -2463,54 +2416,6 @@ func (_c *MockModelRegistryInterface_UpdateWebhook_Call) RunAndReturn(run func(c return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockModelRegistryInterface) WithImpl(impl ml.ModelRegistryService) ml.ModelRegistryInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 ml.ModelRegistryInterface - if rf, ok := ret.Get(0).(func(ml.ModelRegistryService) ml.ModelRegistryInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(ml.ModelRegistryInterface) - } - } - - return r0 -} - -// MockModelRegistryInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockModelRegistryInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl ml.ModelRegistryService -func (_e *MockModelRegistryInterface_Expecter) WithImpl(impl interface{}) *MockModelRegistryInterface_WithImpl_Call { - return &MockModelRegistryInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockModelRegistryInterface_WithImpl_Call) Run(run func(impl ml.ModelRegistryService)) *MockModelRegistryInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(ml.ModelRegistryService)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_WithImpl_Call) Return(_a0 ml.ModelRegistryInterface) *MockModelRegistryInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockModelRegistryInterface_WithImpl_Call) RunAndReturn(run func(ml.ModelRegistryService) ml.ModelRegistryInterface) *MockModelRegistryInterface_WithImpl_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 { diff --git a/experimental/mocks/service/oauth2/mock_custom_app_integration_interface.go b/experimental/mocks/service/oauth2/mock_custom_app_integration_interface.go index d1d139ad5..714d00854 100644 --- a/experimental/mocks/service/oauth2/mock_custom_app_integration_interface.go +++ b/experimental/mocks/service/oauth2/mock_custom_app_integration_interface.go @@ -295,53 +295,6 @@ func (_c *MockCustomAppIntegrationInterface_GetByIntegrationId_Call) RunAndRetur return _c } -// Impl provides a mock function with given fields: -func (_m *MockCustomAppIntegrationInterface) Impl() oauth2.CustomAppIntegrationService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 oauth2.CustomAppIntegrationService - if rf, ok := ret.Get(0).(func() oauth2.CustomAppIntegrationService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(oauth2.CustomAppIntegrationService) - } - } - - return r0 -} - -// MockCustomAppIntegrationInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockCustomAppIntegrationInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockCustomAppIntegrationInterface_Expecter) Impl() *MockCustomAppIntegrationInterface_Impl_Call { - return &MockCustomAppIntegrationInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockCustomAppIntegrationInterface_Impl_Call) Run(run func()) *MockCustomAppIntegrationInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockCustomAppIntegrationInterface_Impl_Call) Return(_a0 oauth2.CustomAppIntegrationService) *MockCustomAppIntegrationInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCustomAppIntegrationInterface_Impl_Call) RunAndReturn(run func() oauth2.CustomAppIntegrationService) *MockCustomAppIntegrationInterface_Impl_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) @@ -497,54 +450,6 @@ func (_c *MockCustomAppIntegrationInterface_Update_Call) RunAndReturn(run func(c return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockCustomAppIntegrationInterface) WithImpl(impl oauth2.CustomAppIntegrationService) oauth2.CustomAppIntegrationInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 oauth2.CustomAppIntegrationInterface - if rf, ok := ret.Get(0).(func(oauth2.CustomAppIntegrationService) oauth2.CustomAppIntegrationInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(oauth2.CustomAppIntegrationInterface) - } - } - - return r0 -} - -// MockCustomAppIntegrationInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockCustomAppIntegrationInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl oauth2.CustomAppIntegrationService -func (_e *MockCustomAppIntegrationInterface_Expecter) WithImpl(impl interface{}) *MockCustomAppIntegrationInterface_WithImpl_Call { - return &MockCustomAppIntegrationInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockCustomAppIntegrationInterface_WithImpl_Call) Run(run func(impl oauth2.CustomAppIntegrationService)) *MockCustomAppIntegrationInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(oauth2.CustomAppIntegrationService)) - }) - return _c -} - -func (_c *MockCustomAppIntegrationInterface_WithImpl_Call) Return(_a0 oauth2.CustomAppIntegrationInterface) *MockCustomAppIntegrationInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCustomAppIntegrationInterface_WithImpl_Call) RunAndReturn(run func(oauth2.CustomAppIntegrationService) oauth2.CustomAppIntegrationInterface) *MockCustomAppIntegrationInterface_WithImpl_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 { 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 index 92d0664ec..589dfc670 100644 --- a/experimental/mocks/service/oauth2/mock_o_auth_published_apps_interface.go +++ b/experimental/mocks/service/oauth2/mock_o_auth_published_apps_interface.go @@ -24,53 +24,6 @@ func (_m *MockOAuthPublishedAppsInterface) EXPECT() *MockOAuthPublishedAppsInter return &MockOAuthPublishedAppsInterface_Expecter{mock: &_m.Mock} } -// Impl provides a mock function with given fields: -func (_m *MockOAuthPublishedAppsInterface) Impl() oauth2.OAuthPublishedAppsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 oauth2.OAuthPublishedAppsService - if rf, ok := ret.Get(0).(func() oauth2.OAuthPublishedAppsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(oauth2.OAuthPublishedAppsService) - } - } - - return r0 -} - -// MockOAuthPublishedAppsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockOAuthPublishedAppsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockOAuthPublishedAppsInterface_Expecter) Impl() *MockOAuthPublishedAppsInterface_Impl_Call { - return &MockOAuthPublishedAppsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockOAuthPublishedAppsInterface_Impl_Call) Run(run func()) *MockOAuthPublishedAppsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockOAuthPublishedAppsInterface_Impl_Call) Return(_a0 oauth2.OAuthPublishedAppsService) *MockOAuthPublishedAppsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockOAuthPublishedAppsInterface_Impl_Call) RunAndReturn(run func() oauth2.OAuthPublishedAppsService) *MockOAuthPublishedAppsInterface_Impl_Call { - _c.Call.Return(run) - return _c -} - // 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) @@ -179,54 +132,6 @@ func (_c *MockOAuthPublishedAppsInterface_ListAll_Call) RunAndReturn(run func(co return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockOAuthPublishedAppsInterface) WithImpl(impl oauth2.OAuthPublishedAppsService) oauth2.OAuthPublishedAppsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 oauth2.OAuthPublishedAppsInterface - if rf, ok := ret.Get(0).(func(oauth2.OAuthPublishedAppsService) oauth2.OAuthPublishedAppsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(oauth2.OAuthPublishedAppsInterface) - } - } - - return r0 -} - -// MockOAuthPublishedAppsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockOAuthPublishedAppsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl oauth2.OAuthPublishedAppsService -func (_e *MockOAuthPublishedAppsInterface_Expecter) WithImpl(impl interface{}) *MockOAuthPublishedAppsInterface_WithImpl_Call { - return &MockOAuthPublishedAppsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockOAuthPublishedAppsInterface_WithImpl_Call) Run(run func(impl oauth2.OAuthPublishedAppsService)) *MockOAuthPublishedAppsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(oauth2.OAuthPublishedAppsService)) - }) - return _c -} - -func (_c *MockOAuthPublishedAppsInterface_WithImpl_Call) Return(_a0 oauth2.OAuthPublishedAppsInterface) *MockOAuthPublishedAppsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockOAuthPublishedAppsInterface_WithImpl_Call) RunAndReturn(run func(oauth2.OAuthPublishedAppsService) oauth2.OAuthPublishedAppsInterface) *MockOAuthPublishedAppsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/oauth2/mock_published_app_integration_interface.go b/experimental/mocks/service/oauth2/mock_published_app_integration_interface.go index 02f27a774..b9641341a 100644 --- a/experimental/mocks/service/oauth2/mock_published_app_integration_interface.go +++ b/experimental/mocks/service/oauth2/mock_published_app_integration_interface.go @@ -295,53 +295,6 @@ func (_c *MockPublishedAppIntegrationInterface_GetByIntegrationId_Call) RunAndRe return _c } -// Impl provides a mock function with given fields: -func (_m *MockPublishedAppIntegrationInterface) Impl() oauth2.PublishedAppIntegrationService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 oauth2.PublishedAppIntegrationService - if rf, ok := ret.Get(0).(func() oauth2.PublishedAppIntegrationService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(oauth2.PublishedAppIntegrationService) - } - } - - return r0 -} - -// MockPublishedAppIntegrationInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockPublishedAppIntegrationInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockPublishedAppIntegrationInterface_Expecter) Impl() *MockPublishedAppIntegrationInterface_Impl_Call { - return &MockPublishedAppIntegrationInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockPublishedAppIntegrationInterface_Impl_Call) Run(run func()) *MockPublishedAppIntegrationInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPublishedAppIntegrationInterface_Impl_Call) Return(_a0 oauth2.PublishedAppIntegrationService) *MockPublishedAppIntegrationInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPublishedAppIntegrationInterface_Impl_Call) RunAndReturn(run func() oauth2.PublishedAppIntegrationService) *MockPublishedAppIntegrationInterface_Impl_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) @@ -497,54 +450,6 @@ func (_c *MockPublishedAppIntegrationInterface_Update_Call) RunAndReturn(run fun return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockPublishedAppIntegrationInterface) WithImpl(impl oauth2.PublishedAppIntegrationService) oauth2.PublishedAppIntegrationInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 oauth2.PublishedAppIntegrationInterface - if rf, ok := ret.Get(0).(func(oauth2.PublishedAppIntegrationService) oauth2.PublishedAppIntegrationInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(oauth2.PublishedAppIntegrationInterface) - } - } - - return r0 -} - -// MockPublishedAppIntegrationInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockPublishedAppIntegrationInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl oauth2.PublishedAppIntegrationService -func (_e *MockPublishedAppIntegrationInterface_Expecter) WithImpl(impl interface{}) *MockPublishedAppIntegrationInterface_WithImpl_Call { - return &MockPublishedAppIntegrationInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockPublishedAppIntegrationInterface_WithImpl_Call) Run(run func(impl oauth2.PublishedAppIntegrationService)) *MockPublishedAppIntegrationInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(oauth2.PublishedAppIntegrationService)) - }) - return _c -} - -func (_c *MockPublishedAppIntegrationInterface_WithImpl_Call) Return(_a0 oauth2.PublishedAppIntegrationInterface) *MockPublishedAppIntegrationInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPublishedAppIntegrationInterface_WithImpl_Call) RunAndReturn(run func(oauth2.PublishedAppIntegrationService) oauth2.PublishedAppIntegrationInterface) *MockPublishedAppIntegrationInterface_WithImpl_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 { diff --git a/experimental/mocks/service/oauth2/mock_service_principal_secrets_interface.go b/experimental/mocks/service/oauth2/mock_service_principal_secrets_interface.go index 001b053d6..06f9d0828 100644 --- a/experimental/mocks/service/oauth2/mock_service_principal_secrets_interface.go +++ b/experimental/mocks/service/oauth2/mock_service_principal_secrets_interface.go @@ -178,53 +178,6 @@ func (_c *MockServicePrincipalSecretsInterface_DeleteByServicePrincipalIdAndSecr return _c } -// Impl provides a mock function with given fields: -func (_m *MockServicePrincipalSecretsInterface) Impl() oauth2.ServicePrincipalSecretsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 oauth2.ServicePrincipalSecretsService - if rf, ok := ret.Get(0).(func() oauth2.ServicePrincipalSecretsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(oauth2.ServicePrincipalSecretsService) - } - } - - return r0 -} - -// MockServicePrincipalSecretsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockServicePrincipalSecretsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockServicePrincipalSecretsInterface_Expecter) Impl() *MockServicePrincipalSecretsInterface_Impl_Call { - return &MockServicePrincipalSecretsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockServicePrincipalSecretsInterface_Impl_Call) Run(run func()) *MockServicePrincipalSecretsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockServicePrincipalSecretsInterface_Impl_Call) Return(_a0 oauth2.ServicePrincipalSecretsService) *MockServicePrincipalSecretsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServicePrincipalSecretsInterface_Impl_Call) RunAndReturn(run func() oauth2.ServicePrincipalSecretsService) *MockServicePrincipalSecretsInterface_Impl_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) @@ -392,54 +345,6 @@ func (_c *MockServicePrincipalSecretsInterface_ListByServicePrincipalId_Call) Ru return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockServicePrincipalSecretsInterface) WithImpl(impl oauth2.ServicePrincipalSecretsService) oauth2.ServicePrincipalSecretsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 oauth2.ServicePrincipalSecretsInterface - if rf, ok := ret.Get(0).(func(oauth2.ServicePrincipalSecretsService) oauth2.ServicePrincipalSecretsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(oauth2.ServicePrincipalSecretsInterface) - } - } - - return r0 -} - -// MockServicePrincipalSecretsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockServicePrincipalSecretsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl oauth2.ServicePrincipalSecretsService -func (_e *MockServicePrincipalSecretsInterface_Expecter) WithImpl(impl interface{}) *MockServicePrincipalSecretsInterface_WithImpl_Call { - return &MockServicePrincipalSecretsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockServicePrincipalSecretsInterface_WithImpl_Call) Run(run func(impl oauth2.ServicePrincipalSecretsService)) *MockServicePrincipalSecretsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(oauth2.ServicePrincipalSecretsService)) - }) - return _c -} - -func (_c *MockServicePrincipalSecretsInterface_WithImpl_Call) Return(_a0 oauth2.ServicePrincipalSecretsInterface) *MockServicePrincipalSecretsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServicePrincipalSecretsInterface_WithImpl_Call) RunAndReturn(run func(oauth2.ServicePrincipalSecretsService) oauth2.ServicePrincipalSecretsInterface) *MockServicePrincipalSecretsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/pipelines/mock_pipelines_interface.go b/experimental/mocks/service/pipelines/mock_pipelines_interface.go index e7f055297..bc932ef31 100644 --- a/experimental/mocks/service/pipelines/mock_pipelines_interface.go +++ b/experimental/mocks/service/pipelines/mock_pipelines_interface.go @@ -713,53 +713,6 @@ func (_c *MockPipelinesInterface_GetUpdateByPipelineIdAndUpdateId_Call) RunAndRe return _c } -// Impl provides a mock function with given fields: -func (_m *MockPipelinesInterface) Impl() pipelines.PipelinesService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 pipelines.PipelinesService - if rf, ok := ret.Get(0).(func() pipelines.PipelinesService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(pipelines.PipelinesService) - } - } - - return r0 -} - -// MockPipelinesInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockPipelinesInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockPipelinesInterface_Expecter) Impl() *MockPipelinesInterface_Impl_Call { - return &MockPipelinesInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockPipelinesInterface_Impl_Call) Run(run func()) *MockPipelinesInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPipelinesInterface_Impl_Call) Return(_a0 pipelines.PipelinesService) *MockPipelinesInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPipelinesInterface_Impl_Call) RunAndReturn(run func() pipelines.PipelinesService) *MockPipelinesInterface_Impl_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) @@ -1691,54 +1644,6 @@ func (_c *MockPipelinesInterface_WaitGetPipelineRunning_Call) RunAndReturn(run f return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockPipelinesInterface) WithImpl(impl pipelines.PipelinesService) pipelines.PipelinesInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 pipelines.PipelinesInterface - if rf, ok := ret.Get(0).(func(pipelines.PipelinesService) pipelines.PipelinesInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(pipelines.PipelinesInterface) - } - } - - return r0 -} - -// MockPipelinesInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockPipelinesInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl pipelines.PipelinesService -func (_e *MockPipelinesInterface_Expecter) WithImpl(impl interface{}) *MockPipelinesInterface_WithImpl_Call { - return &MockPipelinesInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockPipelinesInterface_WithImpl_Call) Run(run func(impl pipelines.PipelinesService)) *MockPipelinesInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(pipelines.PipelinesService)) - }) - return _c -} - -func (_c *MockPipelinesInterface_WithImpl_Call) Return(_a0 pipelines.PipelinesInterface) *MockPipelinesInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPipelinesInterface_WithImpl_Call) RunAndReturn(run func(pipelines.PipelinesService) pipelines.PipelinesInterface) *MockPipelinesInterface_WithImpl_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 { diff --git a/experimental/mocks/service/provisioning/mock_credentials_interface.go b/experimental/mocks/service/provisioning/mock_credentials_interface.go index 467d68565..d02f18583 100644 --- a/experimental/mocks/service/provisioning/mock_credentials_interface.go +++ b/experimental/mocks/service/provisioning/mock_credentials_interface.go @@ -410,53 +410,6 @@ func (_c *MockCredentialsInterface_GetByCredentialsName_Call) RunAndReturn(run f return _c } -// Impl provides a mock function with given fields: -func (_m *MockCredentialsInterface) Impl() provisioning.CredentialsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 provisioning.CredentialsService - if rf, ok := ret.Get(0).(func() provisioning.CredentialsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(provisioning.CredentialsService) - } - } - - return r0 -} - -// MockCredentialsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockCredentialsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockCredentialsInterface_Expecter) Impl() *MockCredentialsInterface_Impl_Call { - return &MockCredentialsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockCredentialsInterface_Impl_Call) Run(run func()) *MockCredentialsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockCredentialsInterface_Impl_Call) Return(_a0 provisioning.CredentialsService) *MockCredentialsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCredentialsInterface_Impl_Call) RunAndReturn(run func() provisioning.CredentialsService) *MockCredentialsInterface_Impl_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) @@ -515,54 +468,6 @@ func (_c *MockCredentialsInterface_List_Call) RunAndReturn(run func(context.Cont return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockCredentialsInterface) WithImpl(impl provisioning.CredentialsService) provisioning.CredentialsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 provisioning.CredentialsInterface - if rf, ok := ret.Get(0).(func(provisioning.CredentialsService) provisioning.CredentialsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(provisioning.CredentialsInterface) - } - } - - return r0 -} - -// MockCredentialsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockCredentialsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl provisioning.CredentialsService -func (_e *MockCredentialsInterface_Expecter) WithImpl(impl interface{}) *MockCredentialsInterface_WithImpl_Call { - return &MockCredentialsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockCredentialsInterface_WithImpl_Call) Run(run func(impl provisioning.CredentialsService)) *MockCredentialsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(provisioning.CredentialsService)) - }) - return _c -} - -func (_c *MockCredentialsInterface_WithImpl_Call) Return(_a0 provisioning.CredentialsInterface) *MockCredentialsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCredentialsInterface_WithImpl_Call) RunAndReturn(run func(provisioning.CredentialsService) provisioning.CredentialsInterface) *MockCredentialsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/provisioning/mock_encryption_keys_interface.go b/experimental/mocks/service/provisioning/mock_encryption_keys_interface.go index 02abe88bc..78836e9f2 100644 --- a/experimental/mocks/service/provisioning/mock_encryption_keys_interface.go +++ b/experimental/mocks/service/provisioning/mock_encryption_keys_interface.go @@ -293,53 +293,6 @@ func (_c *MockEncryptionKeysInterface_GetByCustomerManagedKeyId_Call) RunAndRetu return _c } -// Impl provides a mock function with given fields: -func (_m *MockEncryptionKeysInterface) Impl() provisioning.EncryptionKeysService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 provisioning.EncryptionKeysService - if rf, ok := ret.Get(0).(func() provisioning.EncryptionKeysService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(provisioning.EncryptionKeysService) - } - } - - return r0 -} - -// MockEncryptionKeysInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockEncryptionKeysInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockEncryptionKeysInterface_Expecter) Impl() *MockEncryptionKeysInterface_Impl_Call { - return &MockEncryptionKeysInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockEncryptionKeysInterface_Impl_Call) Run(run func()) *MockEncryptionKeysInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockEncryptionKeysInterface_Impl_Call) Return(_a0 provisioning.EncryptionKeysService) *MockEncryptionKeysInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockEncryptionKeysInterface_Impl_Call) RunAndReturn(run func() provisioning.EncryptionKeysService) *MockEncryptionKeysInterface_Impl_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) @@ -398,54 +351,6 @@ func (_c *MockEncryptionKeysInterface_List_Call) RunAndReturn(run func(context.C return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockEncryptionKeysInterface) WithImpl(impl provisioning.EncryptionKeysService) provisioning.EncryptionKeysInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 provisioning.EncryptionKeysInterface - if rf, ok := ret.Get(0).(func(provisioning.EncryptionKeysService) provisioning.EncryptionKeysInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(provisioning.EncryptionKeysInterface) - } - } - - return r0 -} - -// MockEncryptionKeysInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockEncryptionKeysInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl provisioning.EncryptionKeysService -func (_e *MockEncryptionKeysInterface_Expecter) WithImpl(impl interface{}) *MockEncryptionKeysInterface_WithImpl_Call { - return &MockEncryptionKeysInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockEncryptionKeysInterface_WithImpl_Call) Run(run func(impl provisioning.EncryptionKeysService)) *MockEncryptionKeysInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(provisioning.EncryptionKeysService)) - }) - return _c -} - -func (_c *MockEncryptionKeysInterface_WithImpl_Call) Return(_a0 provisioning.EncryptionKeysInterface) *MockEncryptionKeysInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockEncryptionKeysInterface_WithImpl_Call) RunAndReturn(run func(provisioning.EncryptionKeysService) provisioning.EncryptionKeysInterface) *MockEncryptionKeysInterface_WithImpl_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 { diff --git a/experimental/mocks/service/provisioning/mock_networks_interface.go b/experimental/mocks/service/provisioning/mock_networks_interface.go index 616c1a457..489e9f4f1 100644 --- a/experimental/mocks/service/provisioning/mock_networks_interface.go +++ b/experimental/mocks/service/provisioning/mock_networks_interface.go @@ -352,53 +352,6 @@ func (_c *MockNetworksInterface_GetByNetworkName_Call) RunAndReturn(run func(con return _c } -// Impl provides a mock function with given fields: -func (_m *MockNetworksInterface) Impl() provisioning.NetworksService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 provisioning.NetworksService - if rf, ok := ret.Get(0).(func() provisioning.NetworksService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(provisioning.NetworksService) - } - } - - return r0 -} - -// MockNetworksInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockNetworksInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockNetworksInterface_Expecter) Impl() *MockNetworksInterface_Impl_Call { - return &MockNetworksInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockNetworksInterface_Impl_Call) Run(run func()) *MockNetworksInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNetworksInterface_Impl_Call) Return(_a0 provisioning.NetworksService) *MockNetworksInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNetworksInterface_Impl_Call) RunAndReturn(run func() provisioning.NetworksService) *MockNetworksInterface_Impl_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) @@ -515,54 +468,6 @@ func (_c *MockNetworksInterface_NetworkNetworkNameToNetworkIdMap_Call) RunAndRet return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockNetworksInterface) WithImpl(impl provisioning.NetworksService) provisioning.NetworksInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 provisioning.NetworksInterface - if rf, ok := ret.Get(0).(func(provisioning.NetworksService) provisioning.NetworksInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(provisioning.NetworksInterface) - } - } - - return r0 -} - -// MockNetworksInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockNetworksInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl provisioning.NetworksService -func (_e *MockNetworksInterface_Expecter) WithImpl(impl interface{}) *MockNetworksInterface_WithImpl_Call { - return &MockNetworksInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockNetworksInterface_WithImpl_Call) Run(run func(impl provisioning.NetworksService)) *MockNetworksInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(provisioning.NetworksService)) - }) - return _c -} - -func (_c *MockNetworksInterface_WithImpl_Call) Return(_a0 provisioning.NetworksInterface) *MockNetworksInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNetworksInterface_WithImpl_Call) RunAndReturn(run func(provisioning.NetworksService) provisioning.NetworksInterface) *MockNetworksInterface_WithImpl_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 { diff --git a/experimental/mocks/service/provisioning/mock_private_access_interface.go b/experimental/mocks/service/provisioning/mock_private_access_interface.go index b97820050..f078209c0 100644 --- a/experimental/mocks/service/provisioning/mock_private_access_interface.go +++ b/experimental/mocks/service/provisioning/mock_private_access_interface.go @@ -352,53 +352,6 @@ func (_c *MockPrivateAccessInterface_GetByPrivateAccessSettingsName_Call) RunAnd return _c } -// Impl provides a mock function with given fields: -func (_m *MockPrivateAccessInterface) Impl() provisioning.PrivateAccessService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 provisioning.PrivateAccessService - if rf, ok := ret.Get(0).(func() provisioning.PrivateAccessService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(provisioning.PrivateAccessService) - } - } - - return r0 -} - -// MockPrivateAccessInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockPrivateAccessInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockPrivateAccessInterface_Expecter) Impl() *MockPrivateAccessInterface_Impl_Call { - return &MockPrivateAccessInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockPrivateAccessInterface_Impl_Call) Run(run func()) *MockPrivateAccessInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPrivateAccessInterface_Impl_Call) Return(_a0 provisioning.PrivateAccessService) *MockPrivateAccessInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPrivateAccessInterface_Impl_Call) RunAndReturn(run func() provisioning.PrivateAccessService) *MockPrivateAccessInterface_Impl_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) @@ -562,54 +515,6 @@ func (_c *MockPrivateAccessInterface_Replace_Call) RunAndReturn(run func(context return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockPrivateAccessInterface) WithImpl(impl provisioning.PrivateAccessService) provisioning.PrivateAccessInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 provisioning.PrivateAccessInterface - if rf, ok := ret.Get(0).(func(provisioning.PrivateAccessService) provisioning.PrivateAccessInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(provisioning.PrivateAccessInterface) - } - } - - return r0 -} - -// MockPrivateAccessInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockPrivateAccessInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl provisioning.PrivateAccessService -func (_e *MockPrivateAccessInterface_Expecter) WithImpl(impl interface{}) *MockPrivateAccessInterface_WithImpl_Call { - return &MockPrivateAccessInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockPrivateAccessInterface_WithImpl_Call) Run(run func(impl provisioning.PrivateAccessService)) *MockPrivateAccessInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(provisioning.PrivateAccessService)) - }) - return _c -} - -func (_c *MockPrivateAccessInterface_WithImpl_Call) Return(_a0 provisioning.PrivateAccessInterface) *MockPrivateAccessInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPrivateAccessInterface_WithImpl_Call) RunAndReturn(run func(provisioning.PrivateAccessService) provisioning.PrivateAccessInterface) *MockPrivateAccessInterface_WithImpl_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 { diff --git a/experimental/mocks/service/provisioning/mock_storage_interface.go b/experimental/mocks/service/provisioning/mock_storage_interface.go index 2be42de44..007d2cbae 100644 --- a/experimental/mocks/service/provisioning/mock_storage_interface.go +++ b/experimental/mocks/service/provisioning/mock_storage_interface.go @@ -352,53 +352,6 @@ func (_c *MockStorageInterface_GetByStorageConfigurationName_Call) RunAndReturn( return _c } -// Impl provides a mock function with given fields: -func (_m *MockStorageInterface) Impl() provisioning.StorageService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 provisioning.StorageService - if rf, ok := ret.Get(0).(func() provisioning.StorageService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(provisioning.StorageService) - } - } - - return r0 -} - -// MockStorageInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockStorageInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockStorageInterface_Expecter) Impl() *MockStorageInterface_Impl_Call { - return &MockStorageInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockStorageInterface_Impl_Call) Run(run func()) *MockStorageInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStorageInterface_Impl_Call) Return(_a0 provisioning.StorageService) *MockStorageInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStorageInterface_Impl_Call) RunAndReturn(run func() provisioning.StorageService) *MockStorageInterface_Impl_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) @@ -515,54 +468,6 @@ func (_c *MockStorageInterface_StorageConfigurationStorageConfigurationNameToSto return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockStorageInterface) WithImpl(impl provisioning.StorageService) provisioning.StorageInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 provisioning.StorageInterface - if rf, ok := ret.Get(0).(func(provisioning.StorageService) provisioning.StorageInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(provisioning.StorageInterface) - } - } - - return r0 -} - -// MockStorageInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockStorageInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl provisioning.StorageService -func (_e *MockStorageInterface_Expecter) WithImpl(impl interface{}) *MockStorageInterface_WithImpl_Call { - return &MockStorageInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockStorageInterface_WithImpl_Call) Run(run func(impl provisioning.StorageService)) *MockStorageInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(provisioning.StorageService)) - }) - return _c -} - -func (_c *MockStorageInterface_WithImpl_Call) Return(_a0 provisioning.StorageInterface) *MockStorageInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStorageInterface_WithImpl_Call) RunAndReturn(run func(provisioning.StorageService) provisioning.StorageInterface) *MockStorageInterface_WithImpl_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 { diff --git a/experimental/mocks/service/provisioning/mock_vpc_endpoints_interface.go b/experimental/mocks/service/provisioning/mock_vpc_endpoints_interface.go index 695a1a05b..61426495b 100644 --- a/experimental/mocks/service/provisioning/mock_vpc_endpoints_interface.go +++ b/experimental/mocks/service/provisioning/mock_vpc_endpoints_interface.go @@ -352,53 +352,6 @@ func (_c *MockVpcEndpointsInterface_GetByVpcEndpointName_Call) RunAndReturn(run return _c } -// Impl provides a mock function with given fields: -func (_m *MockVpcEndpointsInterface) Impl() provisioning.VpcEndpointsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 provisioning.VpcEndpointsService - if rf, ok := ret.Get(0).(func() provisioning.VpcEndpointsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(provisioning.VpcEndpointsService) - } - } - - return r0 -} - -// MockVpcEndpointsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockVpcEndpointsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockVpcEndpointsInterface_Expecter) Impl() *MockVpcEndpointsInterface_Impl_Call { - return &MockVpcEndpointsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockVpcEndpointsInterface_Impl_Call) Run(run func()) *MockVpcEndpointsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockVpcEndpointsInterface_Impl_Call) Return(_a0 provisioning.VpcEndpointsService) *MockVpcEndpointsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockVpcEndpointsInterface_Impl_Call) RunAndReturn(run func() provisioning.VpcEndpointsService) *MockVpcEndpointsInterface_Impl_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) @@ -515,54 +468,6 @@ func (_c *MockVpcEndpointsInterface_VpcEndpointVpcEndpointNameToVpcEndpointIdMap return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockVpcEndpointsInterface) WithImpl(impl provisioning.VpcEndpointsService) provisioning.VpcEndpointsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 provisioning.VpcEndpointsInterface - if rf, ok := ret.Get(0).(func(provisioning.VpcEndpointsService) provisioning.VpcEndpointsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(provisioning.VpcEndpointsInterface) - } - } - - return r0 -} - -// MockVpcEndpointsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockVpcEndpointsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl provisioning.VpcEndpointsService -func (_e *MockVpcEndpointsInterface_Expecter) WithImpl(impl interface{}) *MockVpcEndpointsInterface_WithImpl_Call { - return &MockVpcEndpointsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockVpcEndpointsInterface_WithImpl_Call) Run(run func(impl provisioning.VpcEndpointsService)) *MockVpcEndpointsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(provisioning.VpcEndpointsService)) - }) - return _c -} - -func (_c *MockVpcEndpointsInterface_WithImpl_Call) Return(_a0 provisioning.VpcEndpointsInterface) *MockVpcEndpointsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockVpcEndpointsInterface_WithImpl_Call) RunAndReturn(run func(provisioning.VpcEndpointsService) provisioning.VpcEndpointsInterface) *MockVpcEndpointsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/provisioning/mock_workspaces_interface.go b/experimental/mocks/service/provisioning/mock_workspaces_interface.go index bf30cc8ee..230d2b9f3 100644 --- a/experimental/mocks/service/provisioning/mock_workspaces_interface.go +++ b/experimental/mocks/service/provisioning/mock_workspaces_interface.go @@ -430,53 +430,6 @@ func (_c *MockWorkspacesInterface_GetByWorkspaceName_Call) RunAndReturn(run func return _c } -// Impl provides a mock function with given fields: -func (_m *MockWorkspacesInterface) Impl() provisioning.WorkspacesService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 provisioning.WorkspacesService - if rf, ok := ret.Get(0).(func() provisioning.WorkspacesService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(provisioning.WorkspacesService) - } - } - - return r0 -} - -// MockWorkspacesInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockWorkspacesInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockWorkspacesInterface_Expecter) Impl() *MockWorkspacesInterface_Impl_Call { - return &MockWorkspacesInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockWorkspacesInterface_Impl_Call) Run(run func()) *MockWorkspacesInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockWorkspacesInterface_Impl_Call) Return(_a0 provisioning.WorkspacesService) *MockWorkspacesInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWorkspacesInterface_Impl_Call) RunAndReturn(run func() provisioning.WorkspacesService) *MockWorkspacesInterface_Impl_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) @@ -729,54 +682,6 @@ func (_c *MockWorkspacesInterface_WaitGetWorkspaceRunning_Call) RunAndReturn(run return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockWorkspacesInterface) WithImpl(impl provisioning.WorkspacesService) provisioning.WorkspacesInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 provisioning.WorkspacesInterface - if rf, ok := ret.Get(0).(func(provisioning.WorkspacesService) provisioning.WorkspacesInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(provisioning.WorkspacesInterface) - } - } - - return r0 -} - -// MockWorkspacesInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockWorkspacesInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl provisioning.WorkspacesService -func (_e *MockWorkspacesInterface_Expecter) WithImpl(impl interface{}) *MockWorkspacesInterface_WithImpl_Call { - return &MockWorkspacesInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockWorkspacesInterface_WithImpl_Call) Run(run func(impl provisioning.WorkspacesService)) *MockWorkspacesInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(provisioning.WorkspacesService)) - }) - return _c -} - -func (_c *MockWorkspacesInterface_WithImpl_Call) Return(_a0 provisioning.WorkspacesInterface) *MockWorkspacesInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWorkspacesInterface_WithImpl_Call) RunAndReturn(run func(provisioning.WorkspacesService) provisioning.WorkspacesInterface) *MockWorkspacesInterface_WithImpl_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) 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 index e5441d026..28332a309 100644 --- a/experimental/mocks/service/serving/mock_serving_endpoints_data_plane_interface.go +++ b/experimental/mocks/service/serving/mock_serving_endpoints_data_plane_interface.go @@ -22,53 +22,6 @@ func (_m *MockServingEndpointsDataPlaneInterface) EXPECT() *MockServingEndpoints return &MockServingEndpointsDataPlaneInterface_Expecter{mock: &_m.Mock} } -// Impl provides a mock function with given fields: -func (_m *MockServingEndpointsDataPlaneInterface) Impl() serving.ServingEndpointsDataPlaneService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 serving.ServingEndpointsDataPlaneService - if rf, ok := ret.Get(0).(func() serving.ServingEndpointsDataPlaneService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(serving.ServingEndpointsDataPlaneService) - } - } - - return r0 -} - -// MockServingEndpointsDataPlaneInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockServingEndpointsDataPlaneInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockServingEndpointsDataPlaneInterface_Expecter) Impl() *MockServingEndpointsDataPlaneInterface_Impl_Call { - return &MockServingEndpointsDataPlaneInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockServingEndpointsDataPlaneInterface_Impl_Call) Run(run func()) *MockServingEndpointsDataPlaneInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockServingEndpointsDataPlaneInterface_Impl_Call) Return(_a0 serving.ServingEndpointsDataPlaneService) *MockServingEndpointsDataPlaneInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServingEndpointsDataPlaneInterface_Impl_Call) RunAndReturn(run func() serving.ServingEndpointsDataPlaneService) *MockServingEndpointsDataPlaneInterface_Impl_Call { - _c.Call.Return(run) - return _c -} - // 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) @@ -128,54 +81,6 @@ func (_c *MockServingEndpointsDataPlaneInterface_Query_Call) RunAndReturn(run fu return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockServingEndpointsDataPlaneInterface) WithImpl(impl serving.ServingEndpointsDataPlaneService) serving.ServingEndpointsDataPlaneInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 serving.ServingEndpointsDataPlaneInterface - if rf, ok := ret.Get(0).(func(serving.ServingEndpointsDataPlaneService) serving.ServingEndpointsDataPlaneInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(serving.ServingEndpointsDataPlaneInterface) - } - } - - return r0 -} - -// MockServingEndpointsDataPlaneInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockServingEndpointsDataPlaneInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl serving.ServingEndpointsDataPlaneService -func (_e *MockServingEndpointsDataPlaneInterface_Expecter) WithImpl(impl interface{}) *MockServingEndpointsDataPlaneInterface_WithImpl_Call { - return &MockServingEndpointsDataPlaneInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockServingEndpointsDataPlaneInterface_WithImpl_Call) Run(run func(impl serving.ServingEndpointsDataPlaneService)) *MockServingEndpointsDataPlaneInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(serving.ServingEndpointsDataPlaneService)) - }) - return _c -} - -func (_c *MockServingEndpointsDataPlaneInterface_WithImpl_Call) Return(_a0 serving.ServingEndpointsDataPlaneInterface) *MockServingEndpointsDataPlaneInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServingEndpointsDataPlaneInterface_WithImpl_Call) RunAndReturn(run func(serving.ServingEndpointsDataPlaneService) serving.ServingEndpointsDataPlaneInterface) *MockServingEndpointsDataPlaneInterface_WithImpl_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 { diff --git a/experimental/mocks/service/serving/mock_serving_endpoints_interface.go b/experimental/mocks/service/serving/mock_serving_endpoints_interface.go index 496304aec..50cfbe4e4 100644 --- a/experimental/mocks/service/serving/mock_serving_endpoints_interface.go +++ b/experimental/mocks/service/serving/mock_serving_endpoints_interface.go @@ -940,53 +940,6 @@ func (_c *MockServingEndpointsInterface_GetPermissionsByServingEndpointId_Call) return _c } -// Impl provides a mock function with given fields: -func (_m *MockServingEndpointsInterface) Impl() serving.ServingEndpointsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 serving.ServingEndpointsService - if rf, ok := ret.Get(0).(func() serving.ServingEndpointsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(serving.ServingEndpointsService) - } - } - - return r0 -} - -// MockServingEndpointsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockServingEndpointsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockServingEndpointsInterface_Expecter) Impl() *MockServingEndpointsInterface_Impl_Call { - return &MockServingEndpointsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockServingEndpointsInterface_Impl_Call) Run(run func()) *MockServingEndpointsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockServingEndpointsInterface_Impl_Call) Return(_a0 serving.ServingEndpointsService) *MockServingEndpointsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServingEndpointsInterface_Impl_Call) RunAndReturn(run func() serving.ServingEndpointsService) *MockServingEndpointsInterface_Impl_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) @@ -1701,54 +1654,6 @@ func (_c *MockServingEndpointsInterface_WaitGetServingEndpointNotUpdating_Call) return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockServingEndpointsInterface) WithImpl(impl serving.ServingEndpointsService) serving.ServingEndpointsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 serving.ServingEndpointsInterface - if rf, ok := ret.Get(0).(func(serving.ServingEndpointsService) serving.ServingEndpointsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(serving.ServingEndpointsInterface) - } - } - - return r0 -} - -// MockServingEndpointsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockServingEndpointsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl serving.ServingEndpointsService -func (_e *MockServingEndpointsInterface_Expecter) WithImpl(impl interface{}) *MockServingEndpointsInterface_WithImpl_Call { - return &MockServingEndpointsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockServingEndpointsInterface_WithImpl_Call) Run(run func(impl serving.ServingEndpointsService)) *MockServingEndpointsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(serving.ServingEndpointsService)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_WithImpl_Call) Return(_a0 serving.ServingEndpointsInterface) *MockServingEndpointsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServingEndpointsInterface_WithImpl_Call) RunAndReturn(run func(serving.ServingEndpointsService) serving.ServingEndpointsInterface) *MockServingEndpointsInterface_WithImpl_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 { 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 index 5c001c73d..d0a7599ba 100644 --- a/experimental/mocks/service/settings/mock_account_ip_access_lists_interface.go +++ b/experimental/mocks/service/settings/mock_account_ip_access_lists_interface.go @@ -354,53 +354,6 @@ func (_c *MockAccountIpAccessListsInterface_GetByLabel_Call) RunAndReturn(run fu return _c } -// Impl provides a mock function with given fields: -func (_m *MockAccountIpAccessListsInterface) Impl() settings.AccountIpAccessListsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 settings.AccountIpAccessListsService - if rf, ok := ret.Get(0).(func() settings.AccountIpAccessListsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.AccountIpAccessListsService) - } - } - - return r0 -} - -// MockAccountIpAccessListsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockAccountIpAccessListsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockAccountIpAccessListsInterface_Expecter) Impl() *MockAccountIpAccessListsInterface_Impl_Call { - return &MockAccountIpAccessListsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockAccountIpAccessListsInterface_Impl_Call) Run(run func()) *MockAccountIpAccessListsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_Impl_Call) Return(_a0 settings.AccountIpAccessListsService) *MockAccountIpAccessListsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_Impl_Call) RunAndReturn(run func() settings.AccountIpAccessListsService) *MockAccountIpAccessListsInterface_Impl_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) @@ -659,54 +612,6 @@ func (_c *MockAccountIpAccessListsInterface_Update_Call) RunAndReturn(run func(c return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockAccountIpAccessListsInterface) WithImpl(impl settings.AccountIpAccessListsService) settings.AccountIpAccessListsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 settings.AccountIpAccessListsInterface - if rf, ok := ret.Get(0).(func(settings.AccountIpAccessListsService) settings.AccountIpAccessListsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.AccountIpAccessListsInterface) - } - } - - return r0 -} - -// MockAccountIpAccessListsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockAccountIpAccessListsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl settings.AccountIpAccessListsService -func (_e *MockAccountIpAccessListsInterface_Expecter) WithImpl(impl interface{}) *MockAccountIpAccessListsInterface_WithImpl_Call { - return &MockAccountIpAccessListsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockAccountIpAccessListsInterface_WithImpl_Call) Run(run func(impl settings.AccountIpAccessListsService)) *MockAccountIpAccessListsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(settings.AccountIpAccessListsService)) - }) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_WithImpl_Call) Return(_a0 settings.AccountIpAccessListsInterface) *MockAccountIpAccessListsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_WithImpl_Call) RunAndReturn(run func(settings.AccountIpAccessListsService) settings.AccountIpAccessListsInterface) *MockAccountIpAccessListsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/settings/mock_account_settings_interface.go b/experimental/mocks/service/settings/mock_account_settings_interface.go index 679acc898..d7847e6ea 100644 --- a/experimental/mocks/service/settings/mock_account_settings_interface.go +++ b/experimental/mocks/service/settings/mock_account_settings_interface.go @@ -114,53 +114,6 @@ func (_c *MockAccountSettingsInterface_EsmEnablementAccount_Call) RunAndReturn(r return _c } -// Impl provides a mock function with given fields: -func (_m *MockAccountSettingsInterface) Impl() settings.AccountSettingsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 settings.AccountSettingsService - if rf, ok := ret.Get(0).(func() settings.AccountSettingsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.AccountSettingsService) - } - } - - return r0 -} - -// MockAccountSettingsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockAccountSettingsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockAccountSettingsInterface_Expecter) Impl() *MockAccountSettingsInterface_Impl_Call { - return &MockAccountSettingsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockAccountSettingsInterface_Impl_Call) Run(run func()) *MockAccountSettingsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAccountSettingsInterface_Impl_Call) Return(_a0 settings.AccountSettingsService) *MockAccountSettingsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountSettingsInterface_Impl_Call) RunAndReturn(run func() settings.AccountSettingsService) *MockAccountSettingsInterface_Impl_Call { - _c.Call.Return(run) - return _c -} - // PersonalCompute provides a mock function with given fields: func (_m *MockAccountSettingsInterface) PersonalCompute() settings.PersonalComputeInterface { ret := _m.Called() @@ -208,54 +161,6 @@ func (_c *MockAccountSettingsInterface_PersonalCompute_Call) RunAndReturn(run fu return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockAccountSettingsInterface) WithImpl(impl settings.AccountSettingsService) settings.AccountSettingsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 settings.AccountSettingsInterface - if rf, ok := ret.Get(0).(func(settings.AccountSettingsService) settings.AccountSettingsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.AccountSettingsInterface) - } - } - - return r0 -} - -// MockAccountSettingsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockAccountSettingsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl settings.AccountSettingsService -func (_e *MockAccountSettingsInterface_Expecter) WithImpl(impl interface{}) *MockAccountSettingsInterface_WithImpl_Call { - return &MockAccountSettingsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockAccountSettingsInterface_WithImpl_Call) Run(run func(impl settings.AccountSettingsService)) *MockAccountSettingsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(settings.AccountSettingsService)) - }) - return _c -} - -func (_c *MockAccountSettingsInterface_WithImpl_Call) Return(_a0 settings.AccountSettingsInterface) *MockAccountSettingsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountSettingsInterface_WithImpl_Call) RunAndReturn(run func(settings.AccountSettingsService) settings.AccountSettingsInterface) *MockAccountSettingsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/settings/mock_automatic_cluster_update_interface.go b/experimental/mocks/service/settings/mock_automatic_cluster_update_interface.go index 549fc5623..45d44fdaa 100644 --- a/experimental/mocks/service/settings/mock_automatic_cluster_update_interface.go +++ b/experimental/mocks/service/settings/mock_automatic_cluster_update_interface.go @@ -81,53 +81,6 @@ func (_c *MockAutomaticClusterUpdateInterface_Get_Call) RunAndReturn(run func(co return _c } -// Impl provides a mock function with given fields: -func (_m *MockAutomaticClusterUpdateInterface) Impl() settings.AutomaticClusterUpdateService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 settings.AutomaticClusterUpdateService - if rf, ok := ret.Get(0).(func() settings.AutomaticClusterUpdateService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.AutomaticClusterUpdateService) - } - } - - return r0 -} - -// MockAutomaticClusterUpdateInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockAutomaticClusterUpdateInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockAutomaticClusterUpdateInterface_Expecter) Impl() *MockAutomaticClusterUpdateInterface_Impl_Call { - return &MockAutomaticClusterUpdateInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockAutomaticClusterUpdateInterface_Impl_Call) Run(run func()) *MockAutomaticClusterUpdateInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAutomaticClusterUpdateInterface_Impl_Call) Return(_a0 settings.AutomaticClusterUpdateService) *MockAutomaticClusterUpdateInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAutomaticClusterUpdateInterface_Impl_Call) RunAndReturn(run func() settings.AutomaticClusterUpdateService) *MockAutomaticClusterUpdateInterface_Impl_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) @@ -187,54 +140,6 @@ func (_c *MockAutomaticClusterUpdateInterface_Update_Call) RunAndReturn(run func return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockAutomaticClusterUpdateInterface) WithImpl(impl settings.AutomaticClusterUpdateService) settings.AutomaticClusterUpdateInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 settings.AutomaticClusterUpdateInterface - if rf, ok := ret.Get(0).(func(settings.AutomaticClusterUpdateService) settings.AutomaticClusterUpdateInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.AutomaticClusterUpdateInterface) - } - } - - return r0 -} - -// MockAutomaticClusterUpdateInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockAutomaticClusterUpdateInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl settings.AutomaticClusterUpdateService -func (_e *MockAutomaticClusterUpdateInterface_Expecter) WithImpl(impl interface{}) *MockAutomaticClusterUpdateInterface_WithImpl_Call { - return &MockAutomaticClusterUpdateInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockAutomaticClusterUpdateInterface_WithImpl_Call) Run(run func(impl settings.AutomaticClusterUpdateService)) *MockAutomaticClusterUpdateInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(settings.AutomaticClusterUpdateService)) - }) - return _c -} - -func (_c *MockAutomaticClusterUpdateInterface_WithImpl_Call) Return(_a0 settings.AutomaticClusterUpdateInterface) *MockAutomaticClusterUpdateInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAutomaticClusterUpdateInterface_WithImpl_Call) RunAndReturn(run func(settings.AutomaticClusterUpdateService) settings.AutomaticClusterUpdateInterface) *MockAutomaticClusterUpdateInterface_WithImpl_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 { diff --git a/experimental/mocks/service/settings/mock_compliance_security_profile_interface.go b/experimental/mocks/service/settings/mock_compliance_security_profile_interface.go index d4eebd864..e16518dd4 100644 --- a/experimental/mocks/service/settings/mock_compliance_security_profile_interface.go +++ b/experimental/mocks/service/settings/mock_compliance_security_profile_interface.go @@ -81,53 +81,6 @@ func (_c *MockComplianceSecurityProfileInterface_Get_Call) RunAndReturn(run func return _c } -// Impl provides a mock function with given fields: -func (_m *MockComplianceSecurityProfileInterface) Impl() settings.ComplianceSecurityProfileService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 settings.ComplianceSecurityProfileService - if rf, ok := ret.Get(0).(func() settings.ComplianceSecurityProfileService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.ComplianceSecurityProfileService) - } - } - - return r0 -} - -// MockComplianceSecurityProfileInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockComplianceSecurityProfileInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockComplianceSecurityProfileInterface_Expecter) Impl() *MockComplianceSecurityProfileInterface_Impl_Call { - return &MockComplianceSecurityProfileInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockComplianceSecurityProfileInterface_Impl_Call) Run(run func()) *MockComplianceSecurityProfileInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockComplianceSecurityProfileInterface_Impl_Call) Return(_a0 settings.ComplianceSecurityProfileService) *MockComplianceSecurityProfileInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockComplianceSecurityProfileInterface_Impl_Call) RunAndReturn(run func() settings.ComplianceSecurityProfileService) *MockComplianceSecurityProfileInterface_Impl_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) @@ -187,54 +140,6 @@ func (_c *MockComplianceSecurityProfileInterface_Update_Call) RunAndReturn(run f return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockComplianceSecurityProfileInterface) WithImpl(impl settings.ComplianceSecurityProfileService) settings.ComplianceSecurityProfileInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 settings.ComplianceSecurityProfileInterface - if rf, ok := ret.Get(0).(func(settings.ComplianceSecurityProfileService) settings.ComplianceSecurityProfileInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.ComplianceSecurityProfileInterface) - } - } - - return r0 -} - -// MockComplianceSecurityProfileInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockComplianceSecurityProfileInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl settings.ComplianceSecurityProfileService -func (_e *MockComplianceSecurityProfileInterface_Expecter) WithImpl(impl interface{}) *MockComplianceSecurityProfileInterface_WithImpl_Call { - return &MockComplianceSecurityProfileInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockComplianceSecurityProfileInterface_WithImpl_Call) Run(run func(impl settings.ComplianceSecurityProfileService)) *MockComplianceSecurityProfileInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(settings.ComplianceSecurityProfileService)) - }) - return _c -} - -func (_c *MockComplianceSecurityProfileInterface_WithImpl_Call) Return(_a0 settings.ComplianceSecurityProfileInterface) *MockComplianceSecurityProfileInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockComplianceSecurityProfileInterface_WithImpl_Call) RunAndReturn(run func(settings.ComplianceSecurityProfileService) settings.ComplianceSecurityProfileInterface) *MockComplianceSecurityProfileInterface_WithImpl_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 { diff --git a/experimental/mocks/service/settings/mock_credentials_manager_interface.go b/experimental/mocks/service/settings/mock_credentials_manager_interface.go index daad50771..c23f9f2dd 100644 --- a/experimental/mocks/service/settings/mock_credentials_manager_interface.go +++ b/experimental/mocks/service/settings/mock_credentials_manager_interface.go @@ -81,101 +81,6 @@ func (_c *MockCredentialsManagerInterface_ExchangeToken_Call) RunAndReturn(run f return _c } -// Impl provides a mock function with given fields: -func (_m *MockCredentialsManagerInterface) Impl() settings.CredentialsManagerService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 settings.CredentialsManagerService - if rf, ok := ret.Get(0).(func() settings.CredentialsManagerService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.CredentialsManagerService) - } - } - - return r0 -} - -// MockCredentialsManagerInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockCredentialsManagerInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockCredentialsManagerInterface_Expecter) Impl() *MockCredentialsManagerInterface_Impl_Call { - return &MockCredentialsManagerInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockCredentialsManagerInterface_Impl_Call) Run(run func()) *MockCredentialsManagerInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockCredentialsManagerInterface_Impl_Call) Return(_a0 settings.CredentialsManagerService) *MockCredentialsManagerInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCredentialsManagerInterface_Impl_Call) RunAndReturn(run func() settings.CredentialsManagerService) *MockCredentialsManagerInterface_Impl_Call { - _c.Call.Return(run) - return _c -} - -// WithImpl provides a mock function with given fields: impl -func (_m *MockCredentialsManagerInterface) WithImpl(impl settings.CredentialsManagerService) settings.CredentialsManagerInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 settings.CredentialsManagerInterface - if rf, ok := ret.Get(0).(func(settings.CredentialsManagerService) settings.CredentialsManagerInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.CredentialsManagerInterface) - } - } - - return r0 -} - -// MockCredentialsManagerInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockCredentialsManagerInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl settings.CredentialsManagerService -func (_e *MockCredentialsManagerInterface_Expecter) WithImpl(impl interface{}) *MockCredentialsManagerInterface_WithImpl_Call { - return &MockCredentialsManagerInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockCredentialsManagerInterface_WithImpl_Call) Run(run func(impl settings.CredentialsManagerService)) *MockCredentialsManagerInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(settings.CredentialsManagerService)) - }) - return _c -} - -func (_c *MockCredentialsManagerInterface_WithImpl_Call) Return(_a0 settings.CredentialsManagerInterface) *MockCredentialsManagerInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCredentialsManagerInterface_WithImpl_Call) RunAndReturn(run func(settings.CredentialsManagerService) settings.CredentialsManagerInterface) *MockCredentialsManagerInterface_WithImpl_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 { diff --git a/experimental/mocks/service/settings/mock_csp_enablement_account_interface.go b/experimental/mocks/service/settings/mock_csp_enablement_account_interface.go index 99215a0b4..97bfb1918 100644 --- a/experimental/mocks/service/settings/mock_csp_enablement_account_interface.go +++ b/experimental/mocks/service/settings/mock_csp_enablement_account_interface.go @@ -81,53 +81,6 @@ func (_c *MockCspEnablementAccountInterface_Get_Call) RunAndReturn(run func(cont return _c } -// Impl provides a mock function with given fields: -func (_m *MockCspEnablementAccountInterface) Impl() settings.CspEnablementAccountService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 settings.CspEnablementAccountService - if rf, ok := ret.Get(0).(func() settings.CspEnablementAccountService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.CspEnablementAccountService) - } - } - - return r0 -} - -// MockCspEnablementAccountInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockCspEnablementAccountInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockCspEnablementAccountInterface_Expecter) Impl() *MockCspEnablementAccountInterface_Impl_Call { - return &MockCspEnablementAccountInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockCspEnablementAccountInterface_Impl_Call) Run(run func()) *MockCspEnablementAccountInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockCspEnablementAccountInterface_Impl_Call) Return(_a0 settings.CspEnablementAccountService) *MockCspEnablementAccountInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCspEnablementAccountInterface_Impl_Call) RunAndReturn(run func() settings.CspEnablementAccountService) *MockCspEnablementAccountInterface_Impl_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) @@ -187,54 +140,6 @@ func (_c *MockCspEnablementAccountInterface_Update_Call) RunAndReturn(run func(c return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockCspEnablementAccountInterface) WithImpl(impl settings.CspEnablementAccountService) settings.CspEnablementAccountInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 settings.CspEnablementAccountInterface - if rf, ok := ret.Get(0).(func(settings.CspEnablementAccountService) settings.CspEnablementAccountInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.CspEnablementAccountInterface) - } - } - - return r0 -} - -// MockCspEnablementAccountInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockCspEnablementAccountInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl settings.CspEnablementAccountService -func (_e *MockCspEnablementAccountInterface_Expecter) WithImpl(impl interface{}) *MockCspEnablementAccountInterface_WithImpl_Call { - return &MockCspEnablementAccountInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockCspEnablementAccountInterface_WithImpl_Call) Run(run func(impl settings.CspEnablementAccountService)) *MockCspEnablementAccountInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(settings.CspEnablementAccountService)) - }) - return _c -} - -func (_c *MockCspEnablementAccountInterface_WithImpl_Call) Return(_a0 settings.CspEnablementAccountInterface) *MockCspEnablementAccountInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCspEnablementAccountInterface_WithImpl_Call) RunAndReturn(run func(settings.CspEnablementAccountService) settings.CspEnablementAccountInterface) *MockCspEnablementAccountInterface_WithImpl_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 { diff --git a/experimental/mocks/service/settings/mock_default_namespace_interface.go b/experimental/mocks/service/settings/mock_default_namespace_interface.go index 42af0bbe2..9a4cb866f 100644 --- a/experimental/mocks/service/settings/mock_default_namespace_interface.go +++ b/experimental/mocks/service/settings/mock_default_namespace_interface.go @@ -140,53 +140,6 @@ func (_c *MockDefaultNamespaceInterface_Get_Call) RunAndReturn(run func(context. return _c } -// Impl provides a mock function with given fields: -func (_m *MockDefaultNamespaceInterface) Impl() settings.DefaultNamespaceService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 settings.DefaultNamespaceService - if rf, ok := ret.Get(0).(func() settings.DefaultNamespaceService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.DefaultNamespaceService) - } - } - - return r0 -} - -// MockDefaultNamespaceInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockDefaultNamespaceInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockDefaultNamespaceInterface_Expecter) Impl() *MockDefaultNamespaceInterface_Impl_Call { - return &MockDefaultNamespaceInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockDefaultNamespaceInterface_Impl_Call) Run(run func()) *MockDefaultNamespaceInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockDefaultNamespaceInterface_Impl_Call) Return(_a0 settings.DefaultNamespaceService) *MockDefaultNamespaceInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDefaultNamespaceInterface_Impl_Call) RunAndReturn(run func() settings.DefaultNamespaceService) *MockDefaultNamespaceInterface_Impl_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) @@ -246,54 +199,6 @@ func (_c *MockDefaultNamespaceInterface_Update_Call) RunAndReturn(run func(conte return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockDefaultNamespaceInterface) WithImpl(impl settings.DefaultNamespaceService) settings.DefaultNamespaceInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 settings.DefaultNamespaceInterface - if rf, ok := ret.Get(0).(func(settings.DefaultNamespaceService) settings.DefaultNamespaceInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.DefaultNamespaceInterface) - } - } - - return r0 -} - -// MockDefaultNamespaceInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockDefaultNamespaceInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl settings.DefaultNamespaceService -func (_e *MockDefaultNamespaceInterface_Expecter) WithImpl(impl interface{}) *MockDefaultNamespaceInterface_WithImpl_Call { - return &MockDefaultNamespaceInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockDefaultNamespaceInterface_WithImpl_Call) Run(run func(impl settings.DefaultNamespaceService)) *MockDefaultNamespaceInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(settings.DefaultNamespaceService)) - }) - return _c -} - -func (_c *MockDefaultNamespaceInterface_WithImpl_Call) Return(_a0 settings.DefaultNamespaceInterface) *MockDefaultNamespaceInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDefaultNamespaceInterface_WithImpl_Call) RunAndReturn(run func(settings.DefaultNamespaceService) settings.DefaultNamespaceInterface) *MockDefaultNamespaceInterface_WithImpl_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 { diff --git a/experimental/mocks/service/settings/mock_enhanced_security_monitoring_interface.go b/experimental/mocks/service/settings/mock_enhanced_security_monitoring_interface.go index ec7f49c5d..13f2a64c4 100644 --- a/experimental/mocks/service/settings/mock_enhanced_security_monitoring_interface.go +++ b/experimental/mocks/service/settings/mock_enhanced_security_monitoring_interface.go @@ -81,53 +81,6 @@ func (_c *MockEnhancedSecurityMonitoringInterface_Get_Call) RunAndReturn(run fun return _c } -// Impl provides a mock function with given fields: -func (_m *MockEnhancedSecurityMonitoringInterface) Impl() settings.EnhancedSecurityMonitoringService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 settings.EnhancedSecurityMonitoringService - if rf, ok := ret.Get(0).(func() settings.EnhancedSecurityMonitoringService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.EnhancedSecurityMonitoringService) - } - } - - return r0 -} - -// MockEnhancedSecurityMonitoringInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockEnhancedSecurityMonitoringInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockEnhancedSecurityMonitoringInterface_Expecter) Impl() *MockEnhancedSecurityMonitoringInterface_Impl_Call { - return &MockEnhancedSecurityMonitoringInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockEnhancedSecurityMonitoringInterface_Impl_Call) Run(run func()) *MockEnhancedSecurityMonitoringInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockEnhancedSecurityMonitoringInterface_Impl_Call) Return(_a0 settings.EnhancedSecurityMonitoringService) *MockEnhancedSecurityMonitoringInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockEnhancedSecurityMonitoringInterface_Impl_Call) RunAndReturn(run func() settings.EnhancedSecurityMonitoringService) *MockEnhancedSecurityMonitoringInterface_Impl_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) @@ -187,54 +140,6 @@ func (_c *MockEnhancedSecurityMonitoringInterface_Update_Call) RunAndReturn(run return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockEnhancedSecurityMonitoringInterface) WithImpl(impl settings.EnhancedSecurityMonitoringService) settings.EnhancedSecurityMonitoringInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 settings.EnhancedSecurityMonitoringInterface - if rf, ok := ret.Get(0).(func(settings.EnhancedSecurityMonitoringService) settings.EnhancedSecurityMonitoringInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.EnhancedSecurityMonitoringInterface) - } - } - - return r0 -} - -// MockEnhancedSecurityMonitoringInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockEnhancedSecurityMonitoringInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl settings.EnhancedSecurityMonitoringService -func (_e *MockEnhancedSecurityMonitoringInterface_Expecter) WithImpl(impl interface{}) *MockEnhancedSecurityMonitoringInterface_WithImpl_Call { - return &MockEnhancedSecurityMonitoringInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockEnhancedSecurityMonitoringInterface_WithImpl_Call) Run(run func(impl settings.EnhancedSecurityMonitoringService)) *MockEnhancedSecurityMonitoringInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(settings.EnhancedSecurityMonitoringService)) - }) - return _c -} - -func (_c *MockEnhancedSecurityMonitoringInterface_WithImpl_Call) Return(_a0 settings.EnhancedSecurityMonitoringInterface) *MockEnhancedSecurityMonitoringInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockEnhancedSecurityMonitoringInterface_WithImpl_Call) RunAndReturn(run func(settings.EnhancedSecurityMonitoringService) settings.EnhancedSecurityMonitoringInterface) *MockEnhancedSecurityMonitoringInterface_WithImpl_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 { diff --git a/experimental/mocks/service/settings/mock_esm_enablement_account_interface.go b/experimental/mocks/service/settings/mock_esm_enablement_account_interface.go index 9b796e639..05385abf0 100644 --- a/experimental/mocks/service/settings/mock_esm_enablement_account_interface.go +++ b/experimental/mocks/service/settings/mock_esm_enablement_account_interface.go @@ -81,53 +81,6 @@ func (_c *MockEsmEnablementAccountInterface_Get_Call) RunAndReturn(run func(cont return _c } -// Impl provides a mock function with given fields: -func (_m *MockEsmEnablementAccountInterface) Impl() settings.EsmEnablementAccountService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 settings.EsmEnablementAccountService - if rf, ok := ret.Get(0).(func() settings.EsmEnablementAccountService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.EsmEnablementAccountService) - } - } - - return r0 -} - -// MockEsmEnablementAccountInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockEsmEnablementAccountInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockEsmEnablementAccountInterface_Expecter) Impl() *MockEsmEnablementAccountInterface_Impl_Call { - return &MockEsmEnablementAccountInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockEsmEnablementAccountInterface_Impl_Call) Run(run func()) *MockEsmEnablementAccountInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockEsmEnablementAccountInterface_Impl_Call) Return(_a0 settings.EsmEnablementAccountService) *MockEsmEnablementAccountInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockEsmEnablementAccountInterface_Impl_Call) RunAndReturn(run func() settings.EsmEnablementAccountService) *MockEsmEnablementAccountInterface_Impl_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) @@ -187,54 +140,6 @@ func (_c *MockEsmEnablementAccountInterface_Update_Call) RunAndReturn(run func(c return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockEsmEnablementAccountInterface) WithImpl(impl settings.EsmEnablementAccountService) settings.EsmEnablementAccountInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 settings.EsmEnablementAccountInterface - if rf, ok := ret.Get(0).(func(settings.EsmEnablementAccountService) settings.EsmEnablementAccountInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.EsmEnablementAccountInterface) - } - } - - return r0 -} - -// MockEsmEnablementAccountInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockEsmEnablementAccountInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl settings.EsmEnablementAccountService -func (_e *MockEsmEnablementAccountInterface_Expecter) WithImpl(impl interface{}) *MockEsmEnablementAccountInterface_WithImpl_Call { - return &MockEsmEnablementAccountInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockEsmEnablementAccountInterface_WithImpl_Call) Run(run func(impl settings.EsmEnablementAccountService)) *MockEsmEnablementAccountInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(settings.EsmEnablementAccountService)) - }) - return _c -} - -func (_c *MockEsmEnablementAccountInterface_WithImpl_Call) Return(_a0 settings.EsmEnablementAccountInterface) *MockEsmEnablementAccountInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockEsmEnablementAccountInterface_WithImpl_Call) RunAndReturn(run func(settings.EsmEnablementAccountService) settings.EsmEnablementAccountInterface) *MockEsmEnablementAccountInterface_WithImpl_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 { diff --git a/experimental/mocks/service/settings/mock_ip_access_lists_interface.go b/experimental/mocks/service/settings/mock_ip_access_lists_interface.go index 8aca87dfa..8f69bc5c2 100644 --- a/experimental/mocks/service/settings/mock_ip_access_lists_interface.go +++ b/experimental/mocks/service/settings/mock_ip_access_lists_interface.go @@ -354,53 +354,6 @@ func (_c *MockIpAccessListsInterface_GetByLabel_Call) RunAndReturn(run func(cont return _c } -// Impl provides a mock function with given fields: -func (_m *MockIpAccessListsInterface) Impl() settings.IpAccessListsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 settings.IpAccessListsService - if rf, ok := ret.Get(0).(func() settings.IpAccessListsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.IpAccessListsService) - } - } - - return r0 -} - -// MockIpAccessListsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockIpAccessListsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockIpAccessListsInterface_Expecter) Impl() *MockIpAccessListsInterface_Impl_Call { - return &MockIpAccessListsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockIpAccessListsInterface_Impl_Call) Run(run func()) *MockIpAccessListsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockIpAccessListsInterface_Impl_Call) Return(_a0 settings.IpAccessListsService) *MockIpAccessListsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIpAccessListsInterface_Impl_Call) RunAndReturn(run func() settings.IpAccessListsService) *MockIpAccessListsInterface_Impl_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) @@ -659,54 +612,6 @@ func (_c *MockIpAccessListsInterface_Update_Call) RunAndReturn(run func(context. return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockIpAccessListsInterface) WithImpl(impl settings.IpAccessListsService) settings.IpAccessListsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 settings.IpAccessListsInterface - if rf, ok := ret.Get(0).(func(settings.IpAccessListsService) settings.IpAccessListsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.IpAccessListsInterface) - } - } - - return r0 -} - -// MockIpAccessListsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockIpAccessListsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl settings.IpAccessListsService -func (_e *MockIpAccessListsInterface_Expecter) WithImpl(impl interface{}) *MockIpAccessListsInterface_WithImpl_Call { - return &MockIpAccessListsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockIpAccessListsInterface_WithImpl_Call) Run(run func(impl settings.IpAccessListsService)) *MockIpAccessListsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(settings.IpAccessListsService)) - }) - return _c -} - -func (_c *MockIpAccessListsInterface_WithImpl_Call) Return(_a0 settings.IpAccessListsInterface) *MockIpAccessListsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIpAccessListsInterface_WithImpl_Call) RunAndReturn(run func(settings.IpAccessListsService) settings.IpAccessListsInterface) *MockIpAccessListsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/settings/mock_network_connectivity_interface.go b/experimental/mocks/service/settings/mock_network_connectivity_interface.go index 766cae9a7..c0c809d61 100644 --- a/experimental/mocks/service/settings/mock_network_connectivity_interface.go +++ b/experimental/mocks/service/settings/mock_network_connectivity_interface.go @@ -592,53 +592,6 @@ func (_c *MockNetworkConnectivityInterface_GetPrivateEndpointRuleByNetworkConnec return _c } -// Impl provides a mock function with given fields: -func (_m *MockNetworkConnectivityInterface) Impl() settings.NetworkConnectivityService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 settings.NetworkConnectivityService - if rf, ok := ret.Get(0).(func() settings.NetworkConnectivityService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.NetworkConnectivityService) - } - } - - return r0 -} - -// MockNetworkConnectivityInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockNetworkConnectivityInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockNetworkConnectivityInterface_Expecter) Impl() *MockNetworkConnectivityInterface_Impl_Call { - return &MockNetworkConnectivityInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockNetworkConnectivityInterface_Impl_Call) Run(run func()) *MockNetworkConnectivityInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNetworkConnectivityInterface_Impl_Call) Return(_a0 settings.NetworkConnectivityService) *MockNetworkConnectivityInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNetworkConnectivityInterface_Impl_Call) RunAndReturn(run func() settings.NetworkConnectivityService) *MockNetworkConnectivityInterface_Impl_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) @@ -914,54 +867,6 @@ func (_c *MockNetworkConnectivityInterface_ListPrivateEndpointRulesByNetworkConn return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockNetworkConnectivityInterface) WithImpl(impl settings.NetworkConnectivityService) settings.NetworkConnectivityInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 settings.NetworkConnectivityInterface - if rf, ok := ret.Get(0).(func(settings.NetworkConnectivityService) settings.NetworkConnectivityInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.NetworkConnectivityInterface) - } - } - - return r0 -} - -// MockNetworkConnectivityInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockNetworkConnectivityInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl settings.NetworkConnectivityService -func (_e *MockNetworkConnectivityInterface_Expecter) WithImpl(impl interface{}) *MockNetworkConnectivityInterface_WithImpl_Call { - return &MockNetworkConnectivityInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockNetworkConnectivityInterface_WithImpl_Call) Run(run func(impl settings.NetworkConnectivityService)) *MockNetworkConnectivityInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(settings.NetworkConnectivityService)) - }) - return _c -} - -func (_c *MockNetworkConnectivityInterface_WithImpl_Call) Return(_a0 settings.NetworkConnectivityInterface) *MockNetworkConnectivityInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNetworkConnectivityInterface_WithImpl_Call) RunAndReturn(run func(settings.NetworkConnectivityService) settings.NetworkConnectivityInterface) *MockNetworkConnectivityInterface_WithImpl_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 { diff --git a/experimental/mocks/service/settings/mock_notification_destinations_interface.go b/experimental/mocks/service/settings/mock_notification_destinations_interface.go index ad84d9f7e..1a7ba71fa 100644 --- a/experimental/mocks/service/settings/mock_notification_destinations_interface.go +++ b/experimental/mocks/service/settings/mock_notification_destinations_interface.go @@ -295,53 +295,6 @@ func (_c *MockNotificationDestinationsInterface_GetById_Call) RunAndReturn(run f return _c } -// Impl provides a mock function with given fields: -func (_m *MockNotificationDestinationsInterface) Impl() settings.NotificationDestinationsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 settings.NotificationDestinationsService - if rf, ok := ret.Get(0).(func() settings.NotificationDestinationsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.NotificationDestinationsService) - } - } - - return r0 -} - -// MockNotificationDestinationsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockNotificationDestinationsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockNotificationDestinationsInterface_Expecter) Impl() *MockNotificationDestinationsInterface_Impl_Call { - return &MockNotificationDestinationsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockNotificationDestinationsInterface_Impl_Call) Run(run func()) *MockNotificationDestinationsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNotificationDestinationsInterface_Impl_Call) Return(_a0 settings.NotificationDestinationsService) *MockNotificationDestinationsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNotificationDestinationsInterface_Impl_Call) RunAndReturn(run func() settings.NotificationDestinationsService) *MockNotificationDestinationsInterface_Impl_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) @@ -509,54 +462,6 @@ func (_c *MockNotificationDestinationsInterface_Update_Call) RunAndReturn(run fu return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockNotificationDestinationsInterface) WithImpl(impl settings.NotificationDestinationsService) settings.NotificationDestinationsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 settings.NotificationDestinationsInterface - if rf, ok := ret.Get(0).(func(settings.NotificationDestinationsService) settings.NotificationDestinationsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.NotificationDestinationsInterface) - } - } - - return r0 -} - -// MockNotificationDestinationsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockNotificationDestinationsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl settings.NotificationDestinationsService -func (_e *MockNotificationDestinationsInterface_Expecter) WithImpl(impl interface{}) *MockNotificationDestinationsInterface_WithImpl_Call { - return &MockNotificationDestinationsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockNotificationDestinationsInterface_WithImpl_Call) Run(run func(impl settings.NotificationDestinationsService)) *MockNotificationDestinationsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(settings.NotificationDestinationsService)) - }) - return _c -} - -func (_c *MockNotificationDestinationsInterface_WithImpl_Call) Return(_a0 settings.NotificationDestinationsInterface) *MockNotificationDestinationsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNotificationDestinationsInterface_WithImpl_Call) RunAndReturn(run func(settings.NotificationDestinationsService) settings.NotificationDestinationsInterface) *MockNotificationDestinationsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/settings/mock_personal_compute_interface.go b/experimental/mocks/service/settings/mock_personal_compute_interface.go index a21c028a9..cb747b324 100644 --- a/experimental/mocks/service/settings/mock_personal_compute_interface.go +++ b/experimental/mocks/service/settings/mock_personal_compute_interface.go @@ -140,53 +140,6 @@ func (_c *MockPersonalComputeInterface_Get_Call) RunAndReturn(run func(context.C return _c } -// Impl provides a mock function with given fields: -func (_m *MockPersonalComputeInterface) Impl() settings.PersonalComputeService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 settings.PersonalComputeService - if rf, ok := ret.Get(0).(func() settings.PersonalComputeService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.PersonalComputeService) - } - } - - return r0 -} - -// MockPersonalComputeInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockPersonalComputeInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockPersonalComputeInterface_Expecter) Impl() *MockPersonalComputeInterface_Impl_Call { - return &MockPersonalComputeInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockPersonalComputeInterface_Impl_Call) Run(run func()) *MockPersonalComputeInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPersonalComputeInterface_Impl_Call) Return(_a0 settings.PersonalComputeService) *MockPersonalComputeInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPersonalComputeInterface_Impl_Call) RunAndReturn(run func() settings.PersonalComputeService) *MockPersonalComputeInterface_Impl_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) @@ -246,54 +199,6 @@ func (_c *MockPersonalComputeInterface_Update_Call) RunAndReturn(run func(contex return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockPersonalComputeInterface) WithImpl(impl settings.PersonalComputeService) settings.PersonalComputeInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 settings.PersonalComputeInterface - if rf, ok := ret.Get(0).(func(settings.PersonalComputeService) settings.PersonalComputeInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.PersonalComputeInterface) - } - } - - return r0 -} - -// MockPersonalComputeInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockPersonalComputeInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl settings.PersonalComputeService -func (_e *MockPersonalComputeInterface_Expecter) WithImpl(impl interface{}) *MockPersonalComputeInterface_WithImpl_Call { - return &MockPersonalComputeInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockPersonalComputeInterface_WithImpl_Call) Run(run func(impl settings.PersonalComputeService)) *MockPersonalComputeInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(settings.PersonalComputeService)) - }) - return _c -} - -func (_c *MockPersonalComputeInterface_WithImpl_Call) Return(_a0 settings.PersonalComputeInterface) *MockPersonalComputeInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPersonalComputeInterface_WithImpl_Call) RunAndReturn(run func(settings.PersonalComputeService) settings.PersonalComputeInterface) *MockPersonalComputeInterface_WithImpl_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 { diff --git a/experimental/mocks/service/settings/mock_restrict_workspace_admins_interface.go b/experimental/mocks/service/settings/mock_restrict_workspace_admins_interface.go index abf6c0979..5dd1373a0 100644 --- a/experimental/mocks/service/settings/mock_restrict_workspace_admins_interface.go +++ b/experimental/mocks/service/settings/mock_restrict_workspace_admins_interface.go @@ -140,53 +140,6 @@ func (_c *MockRestrictWorkspaceAdminsInterface_Get_Call) RunAndReturn(run func(c return _c } -// Impl provides a mock function with given fields: -func (_m *MockRestrictWorkspaceAdminsInterface) Impl() settings.RestrictWorkspaceAdminsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 settings.RestrictWorkspaceAdminsService - if rf, ok := ret.Get(0).(func() settings.RestrictWorkspaceAdminsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.RestrictWorkspaceAdminsService) - } - } - - return r0 -} - -// MockRestrictWorkspaceAdminsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockRestrictWorkspaceAdminsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockRestrictWorkspaceAdminsInterface_Expecter) Impl() *MockRestrictWorkspaceAdminsInterface_Impl_Call { - return &MockRestrictWorkspaceAdminsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockRestrictWorkspaceAdminsInterface_Impl_Call) Run(run func()) *MockRestrictWorkspaceAdminsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockRestrictWorkspaceAdminsInterface_Impl_Call) Return(_a0 settings.RestrictWorkspaceAdminsService) *MockRestrictWorkspaceAdminsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRestrictWorkspaceAdminsInterface_Impl_Call) RunAndReturn(run func() settings.RestrictWorkspaceAdminsService) *MockRestrictWorkspaceAdminsInterface_Impl_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) @@ -246,54 +199,6 @@ func (_c *MockRestrictWorkspaceAdminsInterface_Update_Call) RunAndReturn(run fun return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockRestrictWorkspaceAdminsInterface) WithImpl(impl settings.RestrictWorkspaceAdminsService) settings.RestrictWorkspaceAdminsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 settings.RestrictWorkspaceAdminsInterface - if rf, ok := ret.Get(0).(func(settings.RestrictWorkspaceAdminsService) settings.RestrictWorkspaceAdminsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.RestrictWorkspaceAdminsInterface) - } - } - - return r0 -} - -// MockRestrictWorkspaceAdminsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockRestrictWorkspaceAdminsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl settings.RestrictWorkspaceAdminsService -func (_e *MockRestrictWorkspaceAdminsInterface_Expecter) WithImpl(impl interface{}) *MockRestrictWorkspaceAdminsInterface_WithImpl_Call { - return &MockRestrictWorkspaceAdminsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockRestrictWorkspaceAdminsInterface_WithImpl_Call) Run(run func(impl settings.RestrictWorkspaceAdminsService)) *MockRestrictWorkspaceAdminsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(settings.RestrictWorkspaceAdminsService)) - }) - return _c -} - -func (_c *MockRestrictWorkspaceAdminsInterface_WithImpl_Call) Return(_a0 settings.RestrictWorkspaceAdminsInterface) *MockRestrictWorkspaceAdminsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRestrictWorkspaceAdminsInterface_WithImpl_Call) RunAndReturn(run func(settings.RestrictWorkspaceAdminsService) settings.RestrictWorkspaceAdminsInterface) *MockRestrictWorkspaceAdminsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/settings/mock_settings_interface.go b/experimental/mocks/service/settings/mock_settings_interface.go index 70a27c5f9..aa02673d5 100644 --- a/experimental/mocks/service/settings/mock_settings_interface.go +++ b/experimental/mocks/service/settings/mock_settings_interface.go @@ -208,53 +208,6 @@ func (_c *MockSettingsInterface_EnhancedSecurityMonitoring_Call) RunAndReturn(ru return _c } -// Impl provides a mock function with given fields: -func (_m *MockSettingsInterface) Impl() settings.SettingsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 settings.SettingsService - if rf, ok := ret.Get(0).(func() settings.SettingsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.SettingsService) - } - } - - return r0 -} - -// MockSettingsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockSettingsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockSettingsInterface_Expecter) Impl() *MockSettingsInterface_Impl_Call { - return &MockSettingsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockSettingsInterface_Impl_Call) Run(run func()) *MockSettingsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSettingsInterface_Impl_Call) Return(_a0 settings.SettingsService) *MockSettingsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSettingsInterface_Impl_Call) RunAndReturn(run func() settings.SettingsService) *MockSettingsInterface_Impl_Call { - _c.Call.Return(run) - return _c -} - // RestrictWorkspaceAdmins provides a mock function with given fields: func (_m *MockSettingsInterface) RestrictWorkspaceAdmins() settings.RestrictWorkspaceAdminsInterface { ret := _m.Called() @@ -302,54 +255,6 @@ func (_c *MockSettingsInterface_RestrictWorkspaceAdmins_Call) RunAndReturn(run f return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockSettingsInterface) WithImpl(impl settings.SettingsService) settings.SettingsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 settings.SettingsInterface - if rf, ok := ret.Get(0).(func(settings.SettingsService) settings.SettingsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.SettingsInterface) - } - } - - return r0 -} - -// MockSettingsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockSettingsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl settings.SettingsService -func (_e *MockSettingsInterface_Expecter) WithImpl(impl interface{}) *MockSettingsInterface_WithImpl_Call { - return &MockSettingsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockSettingsInterface_WithImpl_Call) Run(run func(impl settings.SettingsService)) *MockSettingsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(settings.SettingsService)) - }) - return _c -} - -func (_c *MockSettingsInterface_WithImpl_Call) Return(_a0 settings.SettingsInterface) *MockSettingsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSettingsInterface_WithImpl_Call) RunAndReturn(run func(settings.SettingsService) settings.SettingsInterface) *MockSettingsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/settings/mock_token_management_interface.go b/experimental/mocks/service/settings/mock_token_management_interface.go index c2ca3a839..14f8737ce 100644 --- a/experimental/mocks/service/settings/mock_token_management_interface.go +++ b/experimental/mocks/service/settings/mock_token_management_interface.go @@ -470,53 +470,6 @@ func (_c *MockTokenManagementInterface_GetPermissions_Call) RunAndReturn(run fun return _c } -// Impl provides a mock function with given fields: -func (_m *MockTokenManagementInterface) Impl() settings.TokenManagementService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 settings.TokenManagementService - if rf, ok := ret.Get(0).(func() settings.TokenManagementService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.TokenManagementService) - } - } - - return r0 -} - -// MockTokenManagementInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockTokenManagementInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockTokenManagementInterface_Expecter) Impl() *MockTokenManagementInterface_Impl_Call { - return &MockTokenManagementInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockTokenManagementInterface_Impl_Call) Run(run func()) *MockTokenManagementInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockTokenManagementInterface_Impl_Call) Return(_a0 settings.TokenManagementService) *MockTokenManagementInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTokenManagementInterface_Impl_Call) RunAndReturn(run func() settings.TokenManagementService) *MockTokenManagementInterface_Impl_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) @@ -802,54 +755,6 @@ func (_c *MockTokenManagementInterface_UpdatePermissions_Call) RunAndReturn(run return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockTokenManagementInterface) WithImpl(impl settings.TokenManagementService) settings.TokenManagementInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 settings.TokenManagementInterface - if rf, ok := ret.Get(0).(func(settings.TokenManagementService) settings.TokenManagementInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.TokenManagementInterface) - } - } - - return r0 -} - -// MockTokenManagementInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockTokenManagementInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl settings.TokenManagementService -func (_e *MockTokenManagementInterface_Expecter) WithImpl(impl interface{}) *MockTokenManagementInterface_WithImpl_Call { - return &MockTokenManagementInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockTokenManagementInterface_WithImpl_Call) Run(run func(impl settings.TokenManagementService)) *MockTokenManagementInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(settings.TokenManagementService)) - }) - return _c -} - -func (_c *MockTokenManagementInterface_WithImpl_Call) Return(_a0 settings.TokenManagementInterface) *MockTokenManagementInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTokenManagementInterface_WithImpl_Call) RunAndReturn(run func(settings.TokenManagementService) settings.TokenManagementInterface) *MockTokenManagementInterface_WithImpl_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 { diff --git a/experimental/mocks/service/settings/mock_tokens_interface.go b/experimental/mocks/service/settings/mock_tokens_interface.go index 4b0c43ec7..4b3263816 100644 --- a/experimental/mocks/service/settings/mock_tokens_interface.go +++ b/experimental/mocks/service/settings/mock_tokens_interface.go @@ -236,53 +236,6 @@ func (_c *MockTokensInterface_GetByComment_Call) RunAndReturn(run func(context.C return _c } -// Impl provides a mock function with given fields: -func (_m *MockTokensInterface) Impl() settings.TokensService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 settings.TokensService - if rf, ok := ret.Get(0).(func() settings.TokensService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.TokensService) - } - } - - return r0 -} - -// MockTokensInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockTokensInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockTokensInterface_Expecter) Impl() *MockTokensInterface_Impl_Call { - return &MockTokensInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockTokensInterface_Impl_Call) Run(run func()) *MockTokensInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockTokensInterface_Impl_Call) Return(_a0 settings.TokensService) *MockTokensInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTokensInterface_Impl_Call) RunAndReturn(run func() settings.TokensService) *MockTokensInterface_Impl_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) @@ -447,54 +400,6 @@ func (_c *MockTokensInterface_PublicTokenInfoCommentToTokenIdMap_Call) RunAndRet return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockTokensInterface) WithImpl(impl settings.TokensService) settings.TokensInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 settings.TokensInterface - if rf, ok := ret.Get(0).(func(settings.TokensService) settings.TokensInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.TokensInterface) - } - } - - return r0 -} - -// MockTokensInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockTokensInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl settings.TokensService -func (_e *MockTokensInterface_Expecter) WithImpl(impl interface{}) *MockTokensInterface_WithImpl_Call { - return &MockTokensInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockTokensInterface_WithImpl_Call) Run(run func(impl settings.TokensService)) *MockTokensInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(settings.TokensService)) - }) - return _c -} - -func (_c *MockTokensInterface_WithImpl_Call) Return(_a0 settings.TokensInterface) *MockTokensInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTokensInterface_WithImpl_Call) RunAndReturn(run func(settings.TokensService) settings.TokensInterface) *MockTokensInterface_WithImpl_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 { diff --git a/experimental/mocks/service/settings/mock_workspace_conf_interface.go b/experimental/mocks/service/settings/mock_workspace_conf_interface.go index 2be39d1ad..e7067d78f 100644 --- a/experimental/mocks/service/settings/mock_workspace_conf_interface.go +++ b/experimental/mocks/service/settings/mock_workspace_conf_interface.go @@ -81,53 +81,6 @@ func (_c *MockWorkspaceConfInterface_GetStatus_Call) RunAndReturn(run func(conte return _c } -// Impl provides a mock function with given fields: -func (_m *MockWorkspaceConfInterface) Impl() settings.WorkspaceConfService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 settings.WorkspaceConfService - if rf, ok := ret.Get(0).(func() settings.WorkspaceConfService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.WorkspaceConfService) - } - } - - return r0 -} - -// MockWorkspaceConfInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockWorkspaceConfInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockWorkspaceConfInterface_Expecter) Impl() *MockWorkspaceConfInterface_Impl_Call { - return &MockWorkspaceConfInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockWorkspaceConfInterface_Impl_Call) Run(run func()) *MockWorkspaceConfInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockWorkspaceConfInterface_Impl_Call) Return(_a0 settings.WorkspaceConfService) *MockWorkspaceConfInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWorkspaceConfInterface_Impl_Call) RunAndReturn(run func() settings.WorkspaceConfService) *MockWorkspaceConfInterface_Impl_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) @@ -175,54 +128,6 @@ func (_c *MockWorkspaceConfInterface_SetStatus_Call) RunAndReturn(run func(conte return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockWorkspaceConfInterface) WithImpl(impl settings.WorkspaceConfService) settings.WorkspaceConfInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 settings.WorkspaceConfInterface - if rf, ok := ret.Get(0).(func(settings.WorkspaceConfService) settings.WorkspaceConfInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.WorkspaceConfInterface) - } - } - - return r0 -} - -// MockWorkspaceConfInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockWorkspaceConfInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl settings.WorkspaceConfService -func (_e *MockWorkspaceConfInterface_Expecter) WithImpl(impl interface{}) *MockWorkspaceConfInterface_WithImpl_Call { - return &MockWorkspaceConfInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockWorkspaceConfInterface_WithImpl_Call) Run(run func(impl settings.WorkspaceConfService)) *MockWorkspaceConfInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(settings.WorkspaceConfService)) - }) - return _c -} - -func (_c *MockWorkspaceConfInterface_WithImpl_Call) Return(_a0 settings.WorkspaceConfInterface) *MockWorkspaceConfInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWorkspaceConfInterface_WithImpl_Call) RunAndReturn(run func(settings.WorkspaceConfService) settings.WorkspaceConfInterface) *MockWorkspaceConfInterface_WithImpl_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 { diff --git a/experimental/mocks/service/sharing/mock_clean_rooms_interface.go b/experimental/mocks/service/sharing/mock_clean_rooms_interface.go index 1840a1713..eb20dd199 100644 --- a/experimental/mocks/service/sharing/mock_clean_rooms_interface.go +++ b/experimental/mocks/service/sharing/mock_clean_rooms_interface.go @@ -295,53 +295,6 @@ func (_c *MockCleanRoomsInterface_GetByName_Call) RunAndReturn(run func(context. return _c } -// Impl provides a mock function with given fields: -func (_m *MockCleanRoomsInterface) Impl() sharing.CleanRoomsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 sharing.CleanRoomsService - if rf, ok := ret.Get(0).(func() sharing.CleanRoomsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sharing.CleanRoomsService) - } - } - - return r0 -} - -// MockCleanRoomsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockCleanRoomsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockCleanRoomsInterface_Expecter) Impl() *MockCleanRoomsInterface_Impl_Call { - return &MockCleanRoomsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockCleanRoomsInterface_Impl_Call) Run(run func()) *MockCleanRoomsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockCleanRoomsInterface_Impl_Call) Return(_a0 sharing.CleanRoomsService) *MockCleanRoomsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCleanRoomsInterface_Impl_Call) RunAndReturn(run func() sharing.CleanRoomsService) *MockCleanRoomsInterface_Impl_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 sharing.ListCleanRoomsRequest) listing.Iterator[sharing.CleanRoomInfo] { ret := _m.Called(ctx, request) @@ -509,54 +462,6 @@ func (_c *MockCleanRoomsInterface_Update_Call) RunAndReturn(run func(context.Con return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockCleanRoomsInterface) WithImpl(impl sharing.CleanRoomsService) sharing.CleanRoomsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 sharing.CleanRoomsInterface - if rf, ok := ret.Get(0).(func(sharing.CleanRoomsService) sharing.CleanRoomsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sharing.CleanRoomsInterface) - } - } - - return r0 -} - -// MockCleanRoomsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockCleanRoomsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl sharing.CleanRoomsService -func (_e *MockCleanRoomsInterface_Expecter) WithImpl(impl interface{}) *MockCleanRoomsInterface_WithImpl_Call { - return &MockCleanRoomsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockCleanRoomsInterface_WithImpl_Call) Run(run func(impl sharing.CleanRoomsService)) *MockCleanRoomsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(sharing.CleanRoomsService)) - }) - return _c -} - -func (_c *MockCleanRoomsInterface_WithImpl_Call) Return(_a0 sharing.CleanRoomsInterface) *MockCleanRoomsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCleanRoomsInterface_WithImpl_Call) RunAndReturn(run func(sharing.CleanRoomsService) sharing.CleanRoomsInterface) *MockCleanRoomsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/sharing/mock_providers_interface.go b/experimental/mocks/service/sharing/mock_providers_interface.go index edaba3e43..b3c75dd3a 100644 --- a/experimental/mocks/service/sharing/mock_providers_interface.go +++ b/experimental/mocks/service/sharing/mock_providers_interface.go @@ -295,53 +295,6 @@ func (_c *MockProvidersInterface_GetByName_Call) RunAndReturn(run func(context.C return _c } -// Impl provides a mock function with given fields: -func (_m *MockProvidersInterface) Impl() sharing.ProvidersService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 sharing.ProvidersService - if rf, ok := ret.Get(0).(func() sharing.ProvidersService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sharing.ProvidersService) - } - } - - return r0 -} - -// MockProvidersInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockProvidersInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockProvidersInterface_Expecter) Impl() *MockProvidersInterface_Impl_Call { - return &MockProvidersInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockProvidersInterface_Impl_Call) Run(run func()) *MockProvidersInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockProvidersInterface_Impl_Call) Return(_a0 sharing.ProvidersService) *MockProvidersInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProvidersInterface_Impl_Call) RunAndReturn(run func() sharing.ProvidersService) *MockProvidersInterface_Impl_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) @@ -735,54 +688,6 @@ func (_c *MockProvidersInterface_Update_Call) RunAndReturn(run func(context.Cont return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockProvidersInterface) WithImpl(impl sharing.ProvidersService) sharing.ProvidersInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 sharing.ProvidersInterface - if rf, ok := ret.Get(0).(func(sharing.ProvidersService) sharing.ProvidersInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sharing.ProvidersInterface) - } - } - - return r0 -} - -// MockProvidersInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockProvidersInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl sharing.ProvidersService -func (_e *MockProvidersInterface_Expecter) WithImpl(impl interface{}) *MockProvidersInterface_WithImpl_Call { - return &MockProvidersInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockProvidersInterface_WithImpl_Call) Run(run func(impl sharing.ProvidersService)) *MockProvidersInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(sharing.ProvidersService)) - }) - return _c -} - -func (_c *MockProvidersInterface_WithImpl_Call) Return(_a0 sharing.ProvidersInterface) *MockProvidersInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProvidersInterface_WithImpl_Call) RunAndReturn(run func(sharing.ProvidersService) sharing.ProvidersInterface) *MockProvidersInterface_WithImpl_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 { diff --git a/experimental/mocks/service/sharing/mock_recipient_activation_interface.go b/experimental/mocks/service/sharing/mock_recipient_activation_interface.go index e4783290e..a940afe6a 100644 --- a/experimental/mocks/service/sharing/mock_recipient_activation_interface.go +++ b/experimental/mocks/service/sharing/mock_recipient_activation_interface.go @@ -116,53 +116,6 @@ func (_c *MockRecipientActivationInterface_GetActivationUrlInfoByActivationUrl_C return _c } -// Impl provides a mock function with given fields: -func (_m *MockRecipientActivationInterface) Impl() sharing.RecipientActivationService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 sharing.RecipientActivationService - if rf, ok := ret.Get(0).(func() sharing.RecipientActivationService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sharing.RecipientActivationService) - } - } - - return r0 -} - -// MockRecipientActivationInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockRecipientActivationInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockRecipientActivationInterface_Expecter) Impl() *MockRecipientActivationInterface_Impl_Call { - return &MockRecipientActivationInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockRecipientActivationInterface_Impl_Call) Run(run func()) *MockRecipientActivationInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockRecipientActivationInterface_Impl_Call) Return(_a0 sharing.RecipientActivationService) *MockRecipientActivationInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRecipientActivationInterface_Impl_Call) RunAndReturn(run func() sharing.RecipientActivationService) *MockRecipientActivationInterface_Impl_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) @@ -281,54 +234,6 @@ func (_c *MockRecipientActivationInterface_RetrieveTokenByActivationUrl_Call) Ru return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockRecipientActivationInterface) WithImpl(impl sharing.RecipientActivationService) sharing.RecipientActivationInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 sharing.RecipientActivationInterface - if rf, ok := ret.Get(0).(func(sharing.RecipientActivationService) sharing.RecipientActivationInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sharing.RecipientActivationInterface) - } - } - - return r0 -} - -// MockRecipientActivationInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockRecipientActivationInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl sharing.RecipientActivationService -func (_e *MockRecipientActivationInterface_Expecter) WithImpl(impl interface{}) *MockRecipientActivationInterface_WithImpl_Call { - return &MockRecipientActivationInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockRecipientActivationInterface_WithImpl_Call) Run(run func(impl sharing.RecipientActivationService)) *MockRecipientActivationInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(sharing.RecipientActivationService)) - }) - return _c -} - -func (_c *MockRecipientActivationInterface_WithImpl_Call) Return(_a0 sharing.RecipientActivationInterface) *MockRecipientActivationInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRecipientActivationInterface_WithImpl_Call) RunAndReturn(run func(sharing.RecipientActivationService) sharing.RecipientActivationInterface) *MockRecipientActivationInterface_WithImpl_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 { diff --git a/experimental/mocks/service/sharing/mock_recipients_interface.go b/experimental/mocks/service/sharing/mock_recipients_interface.go index 08c7f7f9c..7f724bb2d 100644 --- a/experimental/mocks/service/sharing/mock_recipients_interface.go +++ b/experimental/mocks/service/sharing/mock_recipients_interface.go @@ -295,53 +295,6 @@ func (_c *MockRecipientsInterface_GetByName_Call) RunAndReturn(run func(context. return _c } -// Impl provides a mock function with given fields: -func (_m *MockRecipientsInterface) Impl() sharing.RecipientsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 sharing.RecipientsService - if rf, ok := ret.Get(0).(func() sharing.RecipientsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sharing.RecipientsService) - } - } - - return r0 -} - -// MockRecipientsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockRecipientsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockRecipientsInterface_Expecter) Impl() *MockRecipientsInterface_Impl_Call { - return &MockRecipientsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockRecipientsInterface_Impl_Call) Run(run func()) *MockRecipientsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockRecipientsInterface_Impl_Call) Return(_a0 sharing.RecipientsService) *MockRecipientsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRecipientsInterface_Impl_Call) RunAndReturn(run func() sharing.RecipientsService) *MockRecipientsInterface_Impl_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) @@ -733,54 +686,6 @@ func (_c *MockRecipientsInterface_Update_Call) RunAndReturn(run func(context.Con return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockRecipientsInterface) WithImpl(impl sharing.RecipientsService) sharing.RecipientsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 sharing.RecipientsInterface - if rf, ok := ret.Get(0).(func(sharing.RecipientsService) sharing.RecipientsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sharing.RecipientsInterface) - } - } - - return r0 -} - -// MockRecipientsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockRecipientsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl sharing.RecipientsService -func (_e *MockRecipientsInterface_Expecter) WithImpl(impl interface{}) *MockRecipientsInterface_WithImpl_Call { - return &MockRecipientsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockRecipientsInterface_WithImpl_Call) Run(run func(impl sharing.RecipientsService)) *MockRecipientsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(sharing.RecipientsService)) - }) - return _c -} - -func (_c *MockRecipientsInterface_WithImpl_Call) Return(_a0 sharing.RecipientsInterface) *MockRecipientsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRecipientsInterface_WithImpl_Call) RunAndReturn(run func(sharing.RecipientsService) sharing.RecipientsInterface) *MockRecipientsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/sharing/mock_shares_interface.go b/experimental/mocks/service/sharing/mock_shares_interface.go index 83089cd40..006b7a8ea 100644 --- a/experimental/mocks/service/sharing/mock_shares_interface.go +++ b/experimental/mocks/service/sharing/mock_shares_interface.go @@ -298,53 +298,6 @@ func (_c *MockSharesInterface_GetByName_Call) RunAndReturn(run func(context.Cont return _c } -// Impl provides a mock function with given fields: -func (_m *MockSharesInterface) Impl() sharing.SharesService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 sharing.SharesService - if rf, ok := ret.Get(0).(func() sharing.SharesService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sharing.SharesService) - } - } - - return r0 -} - -// MockSharesInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockSharesInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockSharesInterface_Expecter) Impl() *MockSharesInterface_Impl_Call { - return &MockSharesInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockSharesInterface_Impl_Call) Run(run func()) *MockSharesInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSharesInterface_Impl_Call) Return(_a0 sharing.SharesService) *MockSharesInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSharesInterface_Impl_Call) RunAndReturn(run func() sharing.SharesService) *MockSharesInterface_Impl_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) @@ -677,54 +630,6 @@ func (_c *MockSharesInterface_UpdatePermissions_Call) RunAndReturn(run func(cont return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockSharesInterface) WithImpl(impl sharing.SharesService) sharing.SharesInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 sharing.SharesInterface - if rf, ok := ret.Get(0).(func(sharing.SharesService) sharing.SharesInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sharing.SharesInterface) - } - } - - return r0 -} - -// MockSharesInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockSharesInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl sharing.SharesService -func (_e *MockSharesInterface_Expecter) WithImpl(impl interface{}) *MockSharesInterface_WithImpl_Call { - return &MockSharesInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockSharesInterface_WithImpl_Call) Run(run func(impl sharing.SharesService)) *MockSharesInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(sharing.SharesService)) - }) - return _c -} - -func (_c *MockSharesInterface_WithImpl_Call) Return(_a0 sharing.SharesInterface) *MockSharesInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSharesInterface_WithImpl_Call) RunAndReturn(run func(sharing.SharesService) sharing.SharesInterface) *MockSharesInterface_WithImpl_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 { diff --git a/experimental/mocks/service/sql/mock_alerts_interface.go b/experimental/mocks/service/sql/mock_alerts_interface.go index e0825e25e..20408c2fd 100644 --- a/experimental/mocks/service/sql/mock_alerts_interface.go +++ b/experimental/mocks/service/sql/mock_alerts_interface.go @@ -354,53 +354,6 @@ func (_c *MockAlertsInterface_GetById_Call) RunAndReturn(run func(context.Contex return _c } -// Impl provides a mock function with given fields: -func (_m *MockAlertsInterface) Impl() sql.AlertsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 sql.AlertsService - if rf, ok := ret.Get(0).(func() sql.AlertsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.AlertsService) - } - } - - return r0 -} - -// MockAlertsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockAlertsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockAlertsInterface_Expecter) Impl() *MockAlertsInterface_Impl_Call { - return &MockAlertsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockAlertsInterface_Impl_Call) Run(run func()) *MockAlertsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAlertsInterface_Impl_Call) Return(_a0 sql.AlertsService) *MockAlertsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAlertsInterface_Impl_Call) RunAndReturn(run func() sql.AlertsService) *MockAlertsInterface_Impl_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) @@ -627,54 +580,6 @@ func (_c *MockAlertsInterface_Update_Call) RunAndReturn(run func(context.Context return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockAlertsInterface) WithImpl(impl sql.AlertsService) sql.AlertsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 sql.AlertsInterface - if rf, ok := ret.Get(0).(func(sql.AlertsService) sql.AlertsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.AlertsInterface) - } - } - - return r0 -} - -// MockAlertsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockAlertsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl sql.AlertsService -func (_e *MockAlertsInterface_Expecter) WithImpl(impl interface{}) *MockAlertsInterface_WithImpl_Call { - return &MockAlertsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockAlertsInterface_WithImpl_Call) Run(run func(impl sql.AlertsService)) *MockAlertsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(sql.AlertsService)) - }) - return _c -} - -func (_c *MockAlertsInterface_WithImpl_Call) Return(_a0 sql.AlertsInterface) *MockAlertsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAlertsInterface_WithImpl_Call) RunAndReturn(run func(sql.AlertsService) sql.AlertsInterface) *MockAlertsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/sql/mock_alerts_legacy_interface.go b/experimental/mocks/service/sql/mock_alerts_legacy_interface.go index 38a9e2197..f990b0bc6 100644 --- a/experimental/mocks/service/sql/mock_alerts_legacy_interface.go +++ b/experimental/mocks/service/sql/mock_alerts_legacy_interface.go @@ -352,53 +352,6 @@ func (_c *MockAlertsLegacyInterface_GetByName_Call) RunAndReturn(run func(contex return _c } -// Impl provides a mock function with given fields: -func (_m *MockAlertsLegacyInterface) Impl() sql.AlertsLegacyService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 sql.AlertsLegacyService - if rf, ok := ret.Get(0).(func() sql.AlertsLegacyService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.AlertsLegacyService) - } - } - - return r0 -} - -// MockAlertsLegacyInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockAlertsLegacyInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockAlertsLegacyInterface_Expecter) Impl() *MockAlertsLegacyInterface_Impl_Call { - return &MockAlertsLegacyInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockAlertsLegacyInterface_Impl_Call) Run(run func()) *MockAlertsLegacyInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAlertsLegacyInterface_Impl_Call) Return(_a0 sql.AlertsLegacyService) *MockAlertsLegacyInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAlertsLegacyInterface_Impl_Call) RunAndReturn(run func() sql.AlertsLegacyService) *MockAlertsLegacyInterface_Impl_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) @@ -562,54 +515,6 @@ func (_c *MockAlertsLegacyInterface_Update_Call) RunAndReturn(run func(context.C return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockAlertsLegacyInterface) WithImpl(impl sql.AlertsLegacyService) sql.AlertsLegacyInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 sql.AlertsLegacyInterface - if rf, ok := ret.Get(0).(func(sql.AlertsLegacyService) sql.AlertsLegacyInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.AlertsLegacyInterface) - } - } - - return r0 -} - -// MockAlertsLegacyInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockAlertsLegacyInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl sql.AlertsLegacyService -func (_e *MockAlertsLegacyInterface_Expecter) WithImpl(impl interface{}) *MockAlertsLegacyInterface_WithImpl_Call { - return &MockAlertsLegacyInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockAlertsLegacyInterface_WithImpl_Call) Run(run func(impl sql.AlertsLegacyService)) *MockAlertsLegacyInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(sql.AlertsLegacyService)) - }) - return _c -} - -func (_c *MockAlertsLegacyInterface_WithImpl_Call) Return(_a0 sql.AlertsLegacyInterface) *MockAlertsLegacyInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAlertsLegacyInterface_WithImpl_Call) RunAndReturn(run func(sql.AlertsLegacyService) sql.AlertsLegacyInterface) *MockAlertsLegacyInterface_WithImpl_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 { diff --git a/experimental/mocks/service/sql/mock_dashboard_widgets_interface.go b/experimental/mocks/service/sql/mock_dashboard_widgets_interface.go index 8932346bc..e0f4b74e7 100644 --- a/experimental/mocks/service/sql/mock_dashboard_widgets_interface.go +++ b/experimental/mocks/service/sql/mock_dashboard_widgets_interface.go @@ -175,53 +175,6 @@ func (_c *MockDashboardWidgetsInterface_DeleteById_Call) RunAndReturn(run func(c return _c } -// Impl provides a mock function with given fields: -func (_m *MockDashboardWidgetsInterface) Impl() sql.DashboardWidgetsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 sql.DashboardWidgetsService - if rf, ok := ret.Get(0).(func() sql.DashboardWidgetsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.DashboardWidgetsService) - } - } - - return r0 -} - -// MockDashboardWidgetsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockDashboardWidgetsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockDashboardWidgetsInterface_Expecter) Impl() *MockDashboardWidgetsInterface_Impl_Call { - return &MockDashboardWidgetsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockDashboardWidgetsInterface_Impl_Call) Run(run func()) *MockDashboardWidgetsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockDashboardWidgetsInterface_Impl_Call) Return(_a0 sql.DashboardWidgetsService) *MockDashboardWidgetsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDashboardWidgetsInterface_Impl_Call) RunAndReturn(run func() sql.DashboardWidgetsService) *MockDashboardWidgetsInterface_Impl_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) @@ -281,54 +234,6 @@ func (_c *MockDashboardWidgetsInterface_Update_Call) RunAndReturn(run func(conte return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockDashboardWidgetsInterface) WithImpl(impl sql.DashboardWidgetsService) sql.DashboardWidgetsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 sql.DashboardWidgetsInterface - if rf, ok := ret.Get(0).(func(sql.DashboardWidgetsService) sql.DashboardWidgetsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.DashboardWidgetsInterface) - } - } - - return r0 -} - -// MockDashboardWidgetsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockDashboardWidgetsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl sql.DashboardWidgetsService -func (_e *MockDashboardWidgetsInterface_Expecter) WithImpl(impl interface{}) *MockDashboardWidgetsInterface_WithImpl_Call { - return &MockDashboardWidgetsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockDashboardWidgetsInterface_WithImpl_Call) Run(run func(impl sql.DashboardWidgetsService)) *MockDashboardWidgetsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(sql.DashboardWidgetsService)) - }) - return _c -} - -func (_c *MockDashboardWidgetsInterface_WithImpl_Call) Return(_a0 sql.DashboardWidgetsInterface) *MockDashboardWidgetsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDashboardWidgetsInterface_WithImpl_Call) RunAndReturn(run func(sql.DashboardWidgetsService) sql.DashboardWidgetsInterface) *MockDashboardWidgetsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/sql/mock_dashboards_interface.go b/experimental/mocks/service/sql/mock_dashboards_interface.go index d696c5474..605c03395 100644 --- a/experimental/mocks/service/sql/mock_dashboards_interface.go +++ b/experimental/mocks/service/sql/mock_dashboards_interface.go @@ -413,53 +413,6 @@ func (_c *MockDashboardsInterface_GetByName_Call) RunAndReturn(run func(context. return _c } -// Impl provides a mock function with given fields: -func (_m *MockDashboardsInterface) Impl() sql.DashboardsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 sql.DashboardsService - if rf, ok := ret.Get(0).(func() sql.DashboardsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.DashboardsService) - } - } - - return r0 -} - -// MockDashboardsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockDashboardsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockDashboardsInterface_Expecter) Impl() *MockDashboardsInterface_Impl_Call { - return &MockDashboardsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockDashboardsInterface_Impl_Call) Run(run func()) *MockDashboardsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockDashboardsInterface_Impl_Call) Return(_a0 sql.DashboardsService) *MockDashboardsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDashboardsInterface_Impl_Call) RunAndReturn(run func() sql.DashboardsService) *MockDashboardsInterface_Impl_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) @@ -674,54 +627,6 @@ func (_c *MockDashboardsInterface_Update_Call) RunAndReturn(run func(context.Con return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockDashboardsInterface) WithImpl(impl sql.DashboardsService) sql.DashboardsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 sql.DashboardsInterface - if rf, ok := ret.Get(0).(func(sql.DashboardsService) sql.DashboardsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.DashboardsInterface) - } - } - - return r0 -} - -// MockDashboardsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockDashboardsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl sql.DashboardsService -func (_e *MockDashboardsInterface_Expecter) WithImpl(impl interface{}) *MockDashboardsInterface_WithImpl_Call { - return &MockDashboardsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockDashboardsInterface_WithImpl_Call) Run(run func(impl sql.DashboardsService)) *MockDashboardsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(sql.DashboardsService)) - }) - return _c -} - -func (_c *MockDashboardsInterface_WithImpl_Call) Return(_a0 sql.DashboardsInterface) *MockDashboardsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDashboardsInterface_WithImpl_Call) RunAndReturn(run func(sql.DashboardsService) sql.DashboardsInterface) *MockDashboardsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/sql/mock_data_sources_interface.go b/experimental/mocks/service/sql/mock_data_sources_interface.go index afd2bb3a6..fb1a708e2 100644 --- a/experimental/mocks/service/sql/mock_data_sources_interface.go +++ b/experimental/mocks/service/sql/mock_data_sources_interface.go @@ -139,53 +139,6 @@ func (_c *MockDataSourcesInterface_GetByName_Call) RunAndReturn(run func(context return _c } -// Impl provides a mock function with given fields: -func (_m *MockDataSourcesInterface) Impl() sql.DataSourcesService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 sql.DataSourcesService - if rf, ok := ret.Get(0).(func() sql.DataSourcesService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.DataSourcesService) - } - } - - return r0 -} - -// MockDataSourcesInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockDataSourcesInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockDataSourcesInterface_Expecter) Impl() *MockDataSourcesInterface_Impl_Call { - return &MockDataSourcesInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockDataSourcesInterface_Impl_Call) Run(run func()) *MockDataSourcesInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockDataSourcesInterface_Impl_Call) Return(_a0 sql.DataSourcesService) *MockDataSourcesInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDataSourcesInterface_Impl_Call) RunAndReturn(run func() sql.DataSourcesService) *MockDataSourcesInterface_Impl_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) @@ -244,54 +197,6 @@ func (_c *MockDataSourcesInterface_List_Call) RunAndReturn(run func(context.Cont return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockDataSourcesInterface) WithImpl(impl sql.DataSourcesService) sql.DataSourcesInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 sql.DataSourcesInterface - if rf, ok := ret.Get(0).(func(sql.DataSourcesService) sql.DataSourcesInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.DataSourcesInterface) - } - } - - return r0 -} - -// MockDataSourcesInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockDataSourcesInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl sql.DataSourcesService -func (_e *MockDataSourcesInterface_Expecter) WithImpl(impl interface{}) *MockDataSourcesInterface_WithImpl_Call { - return &MockDataSourcesInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockDataSourcesInterface_WithImpl_Call) Run(run func(impl sql.DataSourcesService)) *MockDataSourcesInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(sql.DataSourcesService)) - }) - return _c -} - -func (_c *MockDataSourcesInterface_WithImpl_Call) Return(_a0 sql.DataSourcesInterface) *MockDataSourcesInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDataSourcesInterface_WithImpl_Call) RunAndReturn(run func(sql.DataSourcesService) sql.DataSourcesInterface) *MockDataSourcesInterface_WithImpl_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 { diff --git a/experimental/mocks/service/sql/mock_dbsql_permissions_interface.go b/experimental/mocks/service/sql/mock_dbsql_permissions_interface.go index ca4dd6459..95cfdfc0e 100644 --- a/experimental/mocks/service/sql/mock_dbsql_permissions_interface.go +++ b/experimental/mocks/service/sql/mock_dbsql_permissions_interface.go @@ -141,53 +141,6 @@ func (_c *MockDbsqlPermissionsInterface_GetByObjectTypeAndObjectId_Call) RunAndR return _c } -// Impl provides a mock function with given fields: -func (_m *MockDbsqlPermissionsInterface) Impl() sql.DbsqlPermissionsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 sql.DbsqlPermissionsService - if rf, ok := ret.Get(0).(func() sql.DbsqlPermissionsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.DbsqlPermissionsService) - } - } - - return r0 -} - -// MockDbsqlPermissionsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockDbsqlPermissionsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockDbsqlPermissionsInterface_Expecter) Impl() *MockDbsqlPermissionsInterface_Impl_Call { - return &MockDbsqlPermissionsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockDbsqlPermissionsInterface_Impl_Call) Run(run func()) *MockDbsqlPermissionsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockDbsqlPermissionsInterface_Impl_Call) Return(_a0 sql.DbsqlPermissionsService) *MockDbsqlPermissionsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDbsqlPermissionsInterface_Impl_Call) RunAndReturn(run func() sql.DbsqlPermissionsService) *MockDbsqlPermissionsInterface_Impl_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) @@ -306,54 +259,6 @@ func (_c *MockDbsqlPermissionsInterface_TransferOwnership_Call) RunAndReturn(run return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockDbsqlPermissionsInterface) WithImpl(impl sql.DbsqlPermissionsService) sql.DbsqlPermissionsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 sql.DbsqlPermissionsInterface - if rf, ok := ret.Get(0).(func(sql.DbsqlPermissionsService) sql.DbsqlPermissionsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.DbsqlPermissionsInterface) - } - } - - return r0 -} - -// MockDbsqlPermissionsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockDbsqlPermissionsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl sql.DbsqlPermissionsService -func (_e *MockDbsqlPermissionsInterface_Expecter) WithImpl(impl interface{}) *MockDbsqlPermissionsInterface_WithImpl_Call { - return &MockDbsqlPermissionsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockDbsqlPermissionsInterface_WithImpl_Call) Run(run func(impl sql.DbsqlPermissionsService)) *MockDbsqlPermissionsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(sql.DbsqlPermissionsService)) - }) - return _c -} - -func (_c *MockDbsqlPermissionsInterface_WithImpl_Call) Return(_a0 sql.DbsqlPermissionsInterface) *MockDbsqlPermissionsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDbsqlPermissionsInterface_WithImpl_Call) RunAndReturn(run func(sql.DbsqlPermissionsService) sql.DbsqlPermissionsInterface) *MockDbsqlPermissionsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/sql/mock_queries_interface.go b/experimental/mocks/service/sql/mock_queries_interface.go index 2a08d1472..efc62901b 100644 --- a/experimental/mocks/service/sql/mock_queries_interface.go +++ b/experimental/mocks/service/sql/mock_queries_interface.go @@ -354,53 +354,6 @@ func (_c *MockQueriesInterface_GetById_Call) RunAndReturn(run func(context.Conte return _c } -// Impl provides a mock function with given fields: -func (_m *MockQueriesInterface) Impl() sql.QueriesService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 sql.QueriesService - if rf, ok := ret.Get(0).(func() sql.QueriesService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.QueriesService) - } - } - - return r0 -} - -// MockQueriesInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockQueriesInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockQueriesInterface_Expecter) Impl() *MockQueriesInterface_Impl_Call { - return &MockQueriesInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockQueriesInterface_Impl_Call) Run(run func()) *MockQueriesInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockQueriesInterface_Impl_Call) Return(_a0 sql.QueriesService) *MockQueriesInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQueriesInterface_Impl_Call) RunAndReturn(run func() sql.QueriesService) *MockQueriesInterface_Impl_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) @@ -794,54 +747,6 @@ func (_c *MockQueriesInterface_Update_Call) RunAndReturn(run func(context.Contex return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockQueriesInterface) WithImpl(impl sql.QueriesService) sql.QueriesInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 sql.QueriesInterface - if rf, ok := ret.Get(0).(func(sql.QueriesService) sql.QueriesInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.QueriesInterface) - } - } - - return r0 -} - -// MockQueriesInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockQueriesInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl sql.QueriesService -func (_e *MockQueriesInterface_Expecter) WithImpl(impl interface{}) *MockQueriesInterface_WithImpl_Call { - return &MockQueriesInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockQueriesInterface_WithImpl_Call) Run(run func(impl sql.QueriesService)) *MockQueriesInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(sql.QueriesService)) - }) - return _c -} - -func (_c *MockQueriesInterface_WithImpl_Call) Return(_a0 sql.QueriesInterface) *MockQueriesInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQueriesInterface_WithImpl_Call) RunAndReturn(run func(sql.QueriesService) sql.QueriesInterface) *MockQueriesInterface_WithImpl_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 { diff --git a/experimental/mocks/service/sql/mock_queries_legacy_interface.go b/experimental/mocks/service/sql/mock_queries_legacy_interface.go index 52c004621..e7b6e60b2 100644 --- a/experimental/mocks/service/sql/mock_queries_legacy_interface.go +++ b/experimental/mocks/service/sql/mock_queries_legacy_interface.go @@ -354,53 +354,6 @@ func (_c *MockQueriesLegacyInterface_GetByQueryId_Call) RunAndReturn(run func(co return _c } -// Impl provides a mock function with given fields: -func (_m *MockQueriesLegacyInterface) Impl() sql.QueriesLegacyService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 sql.QueriesLegacyService - if rf, ok := ret.Get(0).(func() sql.QueriesLegacyService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.QueriesLegacyService) - } - } - - return r0 -} - -// MockQueriesLegacyInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockQueriesLegacyInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockQueriesLegacyInterface_Expecter) Impl() *MockQueriesLegacyInterface_Impl_Call { - return &MockQueriesLegacyInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockQueriesLegacyInterface_Impl_Call) Run(run func()) *MockQueriesLegacyInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockQueriesLegacyInterface_Impl_Call) Return(_a0 sql.QueriesLegacyService) *MockQueriesLegacyInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQueriesLegacyInterface_Impl_Call) RunAndReturn(run func() sql.QueriesLegacyService) *MockQueriesLegacyInterface_Impl_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) @@ -674,54 +627,6 @@ func (_c *MockQueriesLegacyInterface_Update_Call) RunAndReturn(run func(context. return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockQueriesLegacyInterface) WithImpl(impl sql.QueriesLegacyService) sql.QueriesLegacyInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 sql.QueriesLegacyInterface - if rf, ok := ret.Get(0).(func(sql.QueriesLegacyService) sql.QueriesLegacyInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.QueriesLegacyInterface) - } - } - - return r0 -} - -// MockQueriesLegacyInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockQueriesLegacyInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl sql.QueriesLegacyService -func (_e *MockQueriesLegacyInterface_Expecter) WithImpl(impl interface{}) *MockQueriesLegacyInterface_WithImpl_Call { - return &MockQueriesLegacyInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockQueriesLegacyInterface_WithImpl_Call) Run(run func(impl sql.QueriesLegacyService)) *MockQueriesLegacyInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(sql.QueriesLegacyService)) - }) - return _c -} - -func (_c *MockQueriesLegacyInterface_WithImpl_Call) Return(_a0 sql.QueriesLegacyInterface) *MockQueriesLegacyInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQueriesLegacyInterface_WithImpl_Call) RunAndReturn(run func(sql.QueriesLegacyService) sql.QueriesLegacyInterface) *MockQueriesLegacyInterface_WithImpl_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 { diff --git a/experimental/mocks/service/sql/mock_query_history_interface.go b/experimental/mocks/service/sql/mock_query_history_interface.go index 4447a4adc..2091b7cfe 100644 --- a/experimental/mocks/service/sql/mock_query_history_interface.go +++ b/experimental/mocks/service/sql/mock_query_history_interface.go @@ -22,53 +22,6 @@ func (_m *MockQueryHistoryInterface) EXPECT() *MockQueryHistoryInterface_Expecte return &MockQueryHistoryInterface_Expecter{mock: &_m.Mock} } -// Impl provides a mock function with given fields: -func (_m *MockQueryHistoryInterface) Impl() sql.QueryHistoryService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 sql.QueryHistoryService - if rf, ok := ret.Get(0).(func() sql.QueryHistoryService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.QueryHistoryService) - } - } - - return r0 -} - -// MockQueryHistoryInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockQueryHistoryInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockQueryHistoryInterface_Expecter) Impl() *MockQueryHistoryInterface_Impl_Call { - return &MockQueryHistoryInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockQueryHistoryInterface_Impl_Call) Run(run func()) *MockQueryHistoryInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockQueryHistoryInterface_Impl_Call) Return(_a0 sql.QueryHistoryService) *MockQueryHistoryInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQueryHistoryInterface_Impl_Call) RunAndReturn(run func() sql.QueryHistoryService) *MockQueryHistoryInterface_Impl_Call { - _c.Call.Return(run) - return _c -} - // 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) @@ -128,54 +81,6 @@ func (_c *MockQueryHistoryInterface_List_Call) RunAndReturn(run func(context.Con return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockQueryHistoryInterface) WithImpl(impl sql.QueryHistoryService) sql.QueryHistoryInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 sql.QueryHistoryInterface - if rf, ok := ret.Get(0).(func(sql.QueryHistoryService) sql.QueryHistoryInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.QueryHistoryInterface) - } - } - - return r0 -} - -// MockQueryHistoryInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockQueryHistoryInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl sql.QueryHistoryService -func (_e *MockQueryHistoryInterface_Expecter) WithImpl(impl interface{}) *MockQueryHistoryInterface_WithImpl_Call { - return &MockQueryHistoryInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockQueryHistoryInterface_WithImpl_Call) Run(run func(impl sql.QueryHistoryService)) *MockQueryHistoryInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(sql.QueryHistoryService)) - }) - return _c -} - -func (_c *MockQueryHistoryInterface_WithImpl_Call) Return(_a0 sql.QueryHistoryInterface) *MockQueryHistoryInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQueryHistoryInterface_WithImpl_Call) RunAndReturn(run func(sql.QueryHistoryService) sql.QueryHistoryInterface) *MockQueryHistoryInterface_WithImpl_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 { diff --git a/experimental/mocks/service/sql/mock_query_visualizations_interface.go b/experimental/mocks/service/sql/mock_query_visualizations_interface.go index 4f807ce7c..267920cb7 100644 --- a/experimental/mocks/service/sql/mock_query_visualizations_interface.go +++ b/experimental/mocks/service/sql/mock_query_visualizations_interface.go @@ -175,53 +175,6 @@ func (_c *MockQueryVisualizationsInterface_DeleteById_Call) RunAndReturn(run fun return _c } -// Impl provides a mock function with given fields: -func (_m *MockQueryVisualizationsInterface) Impl() sql.QueryVisualizationsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 sql.QueryVisualizationsService - if rf, ok := ret.Get(0).(func() sql.QueryVisualizationsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.QueryVisualizationsService) - } - } - - return r0 -} - -// MockQueryVisualizationsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockQueryVisualizationsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockQueryVisualizationsInterface_Expecter) Impl() *MockQueryVisualizationsInterface_Impl_Call { - return &MockQueryVisualizationsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockQueryVisualizationsInterface_Impl_Call) Run(run func()) *MockQueryVisualizationsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockQueryVisualizationsInterface_Impl_Call) Return(_a0 sql.QueryVisualizationsService) *MockQueryVisualizationsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQueryVisualizationsInterface_Impl_Call) RunAndReturn(run func() sql.QueryVisualizationsService) *MockQueryVisualizationsInterface_Impl_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) @@ -281,54 +234,6 @@ func (_c *MockQueryVisualizationsInterface_Update_Call) RunAndReturn(run func(co return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockQueryVisualizationsInterface) WithImpl(impl sql.QueryVisualizationsService) sql.QueryVisualizationsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 sql.QueryVisualizationsInterface - if rf, ok := ret.Get(0).(func(sql.QueryVisualizationsService) sql.QueryVisualizationsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.QueryVisualizationsInterface) - } - } - - return r0 -} - -// MockQueryVisualizationsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockQueryVisualizationsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl sql.QueryVisualizationsService -func (_e *MockQueryVisualizationsInterface_Expecter) WithImpl(impl interface{}) *MockQueryVisualizationsInterface_WithImpl_Call { - return &MockQueryVisualizationsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockQueryVisualizationsInterface_WithImpl_Call) Run(run func(impl sql.QueryVisualizationsService)) *MockQueryVisualizationsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(sql.QueryVisualizationsService)) - }) - return _c -} - -func (_c *MockQueryVisualizationsInterface_WithImpl_Call) Return(_a0 sql.QueryVisualizationsInterface) *MockQueryVisualizationsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQueryVisualizationsInterface_WithImpl_Call) RunAndReturn(run func(sql.QueryVisualizationsService) sql.QueryVisualizationsInterface) *MockQueryVisualizationsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/sql/mock_query_visualizations_legacy_interface.go b/experimental/mocks/service/sql/mock_query_visualizations_legacy_interface.go index c460b9ea0..e303d3fb8 100644 --- a/experimental/mocks/service/sql/mock_query_visualizations_legacy_interface.go +++ b/experimental/mocks/service/sql/mock_query_visualizations_legacy_interface.go @@ -175,53 +175,6 @@ func (_c *MockQueryVisualizationsLegacyInterface_DeleteById_Call) RunAndReturn(r return _c } -// Impl provides a mock function with given fields: -func (_m *MockQueryVisualizationsLegacyInterface) Impl() sql.QueryVisualizationsLegacyService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 sql.QueryVisualizationsLegacyService - if rf, ok := ret.Get(0).(func() sql.QueryVisualizationsLegacyService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.QueryVisualizationsLegacyService) - } - } - - return r0 -} - -// MockQueryVisualizationsLegacyInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockQueryVisualizationsLegacyInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockQueryVisualizationsLegacyInterface_Expecter) Impl() *MockQueryVisualizationsLegacyInterface_Impl_Call { - return &MockQueryVisualizationsLegacyInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockQueryVisualizationsLegacyInterface_Impl_Call) Run(run func()) *MockQueryVisualizationsLegacyInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockQueryVisualizationsLegacyInterface_Impl_Call) Return(_a0 sql.QueryVisualizationsLegacyService) *MockQueryVisualizationsLegacyInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQueryVisualizationsLegacyInterface_Impl_Call) RunAndReturn(run func() sql.QueryVisualizationsLegacyService) *MockQueryVisualizationsLegacyInterface_Impl_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) @@ -281,54 +234,6 @@ func (_c *MockQueryVisualizationsLegacyInterface_Update_Call) RunAndReturn(run f return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockQueryVisualizationsLegacyInterface) WithImpl(impl sql.QueryVisualizationsLegacyService) sql.QueryVisualizationsLegacyInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 sql.QueryVisualizationsLegacyInterface - if rf, ok := ret.Get(0).(func(sql.QueryVisualizationsLegacyService) sql.QueryVisualizationsLegacyInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.QueryVisualizationsLegacyInterface) - } - } - - return r0 -} - -// MockQueryVisualizationsLegacyInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockQueryVisualizationsLegacyInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl sql.QueryVisualizationsLegacyService -func (_e *MockQueryVisualizationsLegacyInterface_Expecter) WithImpl(impl interface{}) *MockQueryVisualizationsLegacyInterface_WithImpl_Call { - return &MockQueryVisualizationsLegacyInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockQueryVisualizationsLegacyInterface_WithImpl_Call) Run(run func(impl sql.QueryVisualizationsLegacyService)) *MockQueryVisualizationsLegacyInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(sql.QueryVisualizationsLegacyService)) - }) - return _c -} - -func (_c *MockQueryVisualizationsLegacyInterface_WithImpl_Call) Return(_a0 sql.QueryVisualizationsLegacyInterface) *MockQueryVisualizationsLegacyInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQueryVisualizationsLegacyInterface_WithImpl_Call) RunAndReturn(run func(sql.QueryVisualizationsLegacyService) sql.QueryVisualizationsLegacyInterface) *MockQueryVisualizationsLegacyInterface_WithImpl_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 { diff --git a/experimental/mocks/service/sql/mock_statement_execution_interface.go b/experimental/mocks/service/sql/mock_statement_execution_interface.go index e7fcd4414..718c6d443 100644 --- a/experimental/mocks/service/sql/mock_statement_execution_interface.go +++ b/experimental/mocks/service/sql/mock_statement_execution_interface.go @@ -424,101 +424,6 @@ func (_c *MockStatementExecutionInterface_GetStatementResultChunkNByStatementIdA return _c } -// Impl provides a mock function with given fields: -func (_m *MockStatementExecutionInterface) Impl() sql.StatementExecutionService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 sql.StatementExecutionService - if rf, ok := ret.Get(0).(func() sql.StatementExecutionService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.StatementExecutionService) - } - } - - return r0 -} - -// MockStatementExecutionInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockStatementExecutionInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockStatementExecutionInterface_Expecter) Impl() *MockStatementExecutionInterface_Impl_Call { - return &MockStatementExecutionInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockStatementExecutionInterface_Impl_Call) Run(run func()) *MockStatementExecutionInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStatementExecutionInterface_Impl_Call) Return(_a0 sql.StatementExecutionService) *MockStatementExecutionInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStatementExecutionInterface_Impl_Call) RunAndReturn(run func() sql.StatementExecutionService) *MockStatementExecutionInterface_Impl_Call { - _c.Call.Return(run) - return _c -} - -// WithImpl provides a mock function with given fields: impl -func (_m *MockStatementExecutionInterface) WithImpl(impl sql.StatementExecutionService) sql.StatementExecutionInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 sql.StatementExecutionInterface - if rf, ok := ret.Get(0).(func(sql.StatementExecutionService) sql.StatementExecutionInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.StatementExecutionInterface) - } - } - - return r0 -} - -// MockStatementExecutionInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockStatementExecutionInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl sql.StatementExecutionService -func (_e *MockStatementExecutionInterface_Expecter) WithImpl(impl interface{}) *MockStatementExecutionInterface_WithImpl_Call { - return &MockStatementExecutionInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockStatementExecutionInterface_WithImpl_Call) Run(run func(impl sql.StatementExecutionService)) *MockStatementExecutionInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(sql.StatementExecutionService)) - }) - return _c -} - -func (_c *MockStatementExecutionInterface_WithImpl_Call) Return(_a0 sql.StatementExecutionInterface) *MockStatementExecutionInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStatementExecutionInterface_WithImpl_Call) RunAndReturn(run func(sql.StatementExecutionService) sql.StatementExecutionInterface) *MockStatementExecutionInterface_WithImpl_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 { diff --git a/experimental/mocks/service/sql/mock_warehouses_interface.go b/experimental/mocks/service/sql/mock_warehouses_interface.go index 173a3ba69..7db4a09b6 100644 --- a/experimental/mocks/service/sql/mock_warehouses_interface.go +++ b/experimental/mocks/service/sql/mock_warehouses_interface.go @@ -918,53 +918,6 @@ func (_c *MockWarehousesInterface_GetWorkspaceWarehouseConfig_Call) RunAndReturn return _c } -// Impl provides a mock function with given fields: -func (_m *MockWarehousesInterface) Impl() sql.WarehousesService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 sql.WarehousesService - if rf, ok := ret.Get(0).(func() sql.WarehousesService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.WarehousesService) - } - } - - return r0 -} - -// MockWarehousesInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockWarehousesInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockWarehousesInterface_Expecter) Impl() *MockWarehousesInterface_Impl_Call { - return &MockWarehousesInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockWarehousesInterface_Impl_Call) Run(run func()) *MockWarehousesInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockWarehousesInterface_Impl_Call) Return(_a0 sql.WarehousesService) *MockWarehousesInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWarehousesInterface_Impl_Call) RunAndReturn(run func() sql.WarehousesService) *MockWarehousesInterface_Impl_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) @@ -1626,54 +1579,6 @@ func (_c *MockWarehousesInterface_WaitGetWarehouseStopped_Call) RunAndReturn(run return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockWarehousesInterface) WithImpl(impl sql.WarehousesService) sql.WarehousesInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 sql.WarehousesInterface - if rf, ok := ret.Get(0).(func(sql.WarehousesService) sql.WarehousesInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(sql.WarehousesInterface) - } - } - - return r0 -} - -// MockWarehousesInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockWarehousesInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl sql.WarehousesService -func (_e *MockWarehousesInterface_Expecter) WithImpl(impl interface{}) *MockWarehousesInterface_WithImpl_Call { - return &MockWarehousesInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockWarehousesInterface_WithImpl_Call) Run(run func(impl sql.WarehousesService)) *MockWarehousesInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(sql.WarehousesService)) - }) - return _c -} - -func (_c *MockWarehousesInterface_WithImpl_Call) Return(_a0 sql.WarehousesInterface) *MockWarehousesInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWarehousesInterface_WithImpl_Call) RunAndReturn(run func(sql.WarehousesService) sql.WarehousesInterface) *MockWarehousesInterface_WithImpl_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 { diff --git a/experimental/mocks/service/vectorsearch/mock_vector_search_endpoints_interface.go b/experimental/mocks/service/vectorsearch/mock_vector_search_endpoints_interface.go index 036740132..bac669a1c 100644 --- a/experimental/mocks/service/vectorsearch/mock_vector_search_endpoints_interface.go +++ b/experimental/mocks/service/vectorsearch/mock_vector_search_endpoints_interface.go @@ -373,53 +373,6 @@ func (_c *MockVectorSearchEndpointsInterface_GetEndpointByEndpointName_Call) Run return _c } -// Impl provides a mock function with given fields: -func (_m *MockVectorSearchEndpointsInterface) Impl() vectorsearch.VectorSearchEndpointsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 vectorsearch.VectorSearchEndpointsService - if rf, ok := ret.Get(0).(func() vectorsearch.VectorSearchEndpointsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(vectorsearch.VectorSearchEndpointsService) - } - } - - return r0 -} - -// MockVectorSearchEndpointsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockVectorSearchEndpointsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockVectorSearchEndpointsInterface_Expecter) Impl() *MockVectorSearchEndpointsInterface_Impl_Call { - return &MockVectorSearchEndpointsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockVectorSearchEndpointsInterface_Impl_Call) Run(run func()) *MockVectorSearchEndpointsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockVectorSearchEndpointsInterface_Impl_Call) Return(_a0 vectorsearch.VectorSearchEndpointsService) *MockVectorSearchEndpointsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockVectorSearchEndpointsInterface_Impl_Call) RunAndReturn(run func() vectorsearch.VectorSearchEndpointsService) *MockVectorSearchEndpointsInterface_Impl_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) @@ -589,54 +542,6 @@ func (_c *MockVectorSearchEndpointsInterface_WaitGetEndpointVectorSearchEndpoint return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockVectorSearchEndpointsInterface) WithImpl(impl vectorsearch.VectorSearchEndpointsService) vectorsearch.VectorSearchEndpointsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 vectorsearch.VectorSearchEndpointsInterface - if rf, ok := ret.Get(0).(func(vectorsearch.VectorSearchEndpointsService) vectorsearch.VectorSearchEndpointsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(vectorsearch.VectorSearchEndpointsInterface) - } - } - - return r0 -} - -// MockVectorSearchEndpointsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockVectorSearchEndpointsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl vectorsearch.VectorSearchEndpointsService -func (_e *MockVectorSearchEndpointsInterface_Expecter) WithImpl(impl interface{}) *MockVectorSearchEndpointsInterface_WithImpl_Call { - return &MockVectorSearchEndpointsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockVectorSearchEndpointsInterface_WithImpl_Call) Run(run func(impl vectorsearch.VectorSearchEndpointsService)) *MockVectorSearchEndpointsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(vectorsearch.VectorSearchEndpointsService)) - }) - return _c -} - -func (_c *MockVectorSearchEndpointsInterface_WithImpl_Call) Return(_a0 vectorsearch.VectorSearchEndpointsInterface) *MockVectorSearchEndpointsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockVectorSearchEndpointsInterface_WithImpl_Call) RunAndReturn(run func(vectorsearch.VectorSearchEndpointsService) vectorsearch.VectorSearchEndpointsInterface) *MockVectorSearchEndpointsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/vectorsearch/mock_vector_search_indexes_interface.go b/experimental/mocks/service/vectorsearch/mock_vector_search_indexes_interface.go index 8041f921a..a72f967db 100644 --- a/experimental/mocks/service/vectorsearch/mock_vector_search_indexes_interface.go +++ b/experimental/mocks/service/vectorsearch/mock_vector_search_indexes_interface.go @@ -354,53 +354,6 @@ func (_c *MockVectorSearchIndexesInterface_GetIndexByIndexName_Call) RunAndRetur return _c } -// Impl provides a mock function with given fields: -func (_m *MockVectorSearchIndexesInterface) Impl() vectorsearch.VectorSearchIndexesService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 vectorsearch.VectorSearchIndexesService - if rf, ok := ret.Get(0).(func() vectorsearch.VectorSearchIndexesService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(vectorsearch.VectorSearchIndexesService) - } - } - - return r0 -} - -// MockVectorSearchIndexesInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockVectorSearchIndexesInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockVectorSearchIndexesInterface_Expecter) Impl() *MockVectorSearchIndexesInterface_Impl_Call { - return &MockVectorSearchIndexesInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockVectorSearchIndexesInterface_Impl_Call) Run(run func()) *MockVectorSearchIndexesInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_Impl_Call) Return(_a0 vectorsearch.VectorSearchIndexesService) *MockVectorSearchIndexesInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_Impl_Call) RunAndReturn(run func() vectorsearch.VectorSearchIndexesService) *MockVectorSearchIndexesInterface_Impl_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) @@ -792,54 +745,6 @@ func (_c *MockVectorSearchIndexesInterface_UpsertDataVectorIndex_Call) RunAndRet return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockVectorSearchIndexesInterface) WithImpl(impl vectorsearch.VectorSearchIndexesService) vectorsearch.VectorSearchIndexesInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 vectorsearch.VectorSearchIndexesInterface - if rf, ok := ret.Get(0).(func(vectorsearch.VectorSearchIndexesService) vectorsearch.VectorSearchIndexesInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(vectorsearch.VectorSearchIndexesInterface) - } - } - - return r0 -} - -// MockVectorSearchIndexesInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockVectorSearchIndexesInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl vectorsearch.VectorSearchIndexesService -func (_e *MockVectorSearchIndexesInterface_Expecter) WithImpl(impl interface{}) *MockVectorSearchIndexesInterface_WithImpl_Call { - return &MockVectorSearchIndexesInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockVectorSearchIndexesInterface_WithImpl_Call) Run(run func(impl vectorsearch.VectorSearchIndexesService)) *MockVectorSearchIndexesInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(vectorsearch.VectorSearchIndexesService)) - }) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_WithImpl_Call) Return(_a0 vectorsearch.VectorSearchIndexesInterface) *MockVectorSearchIndexesInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_WithImpl_Call) RunAndReturn(run func(vectorsearch.VectorSearchIndexesService) vectorsearch.VectorSearchIndexesInterface) *MockVectorSearchIndexesInterface_WithImpl_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 { diff --git a/experimental/mocks/service/workspace/mock_git_credentials_interface.go b/experimental/mocks/service/workspace/mock_git_credentials_interface.go index 62a508ecc..a81c7fc4e 100644 --- a/experimental/mocks/service/workspace/mock_git_credentials_interface.go +++ b/experimental/mocks/service/workspace/mock_git_credentials_interface.go @@ -412,53 +412,6 @@ func (_c *MockGitCredentialsInterface_GetByGitProvider_Call) RunAndReturn(run fu return _c } -// Impl provides a mock function with given fields: -func (_m *MockGitCredentialsInterface) Impl() workspace.GitCredentialsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 workspace.GitCredentialsService - if rf, ok := ret.Get(0).(func() workspace.GitCredentialsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(workspace.GitCredentialsService) - } - } - - return r0 -} - -// MockGitCredentialsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockGitCredentialsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockGitCredentialsInterface_Expecter) Impl() *MockGitCredentialsInterface_Impl_Call { - return &MockGitCredentialsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockGitCredentialsInterface_Impl_Call) Run(run func()) *MockGitCredentialsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockGitCredentialsInterface_Impl_Call) Return(_a0 workspace.GitCredentialsService) *MockGitCredentialsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockGitCredentialsInterface_Impl_Call) RunAndReturn(run func() workspace.GitCredentialsService) *MockGitCredentialsInterface_Impl_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) @@ -612,54 +565,6 @@ func (_c *MockGitCredentialsInterface_Update_Call) RunAndReturn(run func(context return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockGitCredentialsInterface) WithImpl(impl workspace.GitCredentialsService) workspace.GitCredentialsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 workspace.GitCredentialsInterface - if rf, ok := ret.Get(0).(func(workspace.GitCredentialsService) workspace.GitCredentialsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(workspace.GitCredentialsInterface) - } - } - - return r0 -} - -// MockGitCredentialsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockGitCredentialsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl workspace.GitCredentialsService -func (_e *MockGitCredentialsInterface_Expecter) WithImpl(impl interface{}) *MockGitCredentialsInterface_WithImpl_Call { - return &MockGitCredentialsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockGitCredentialsInterface_WithImpl_Call) Run(run func(impl workspace.GitCredentialsService)) *MockGitCredentialsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(workspace.GitCredentialsService)) - }) - return _c -} - -func (_c *MockGitCredentialsInterface_WithImpl_Call) Return(_a0 workspace.GitCredentialsInterface) *MockGitCredentialsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockGitCredentialsInterface_WithImpl_Call) RunAndReturn(run func(workspace.GitCredentialsService) workspace.GitCredentialsInterface) *MockGitCredentialsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/workspace/mock_repos_interface.go b/experimental/mocks/service/workspace/mock_repos_interface.go index ad202510e..667b62554 100644 --- a/experimental/mocks/service/workspace/mock_repos_interface.go +++ b/experimental/mocks/service/workspace/mock_repos_interface.go @@ -590,53 +590,6 @@ func (_c *MockReposInterface_GetPermissionsByRepoId_Call) RunAndReturn(run func( return _c } -// Impl provides a mock function with given fields: -func (_m *MockReposInterface) Impl() workspace.ReposService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 workspace.ReposService - if rf, ok := ret.Get(0).(func() workspace.ReposService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(workspace.ReposService) - } - } - - return r0 -} - -// MockReposInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockReposInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockReposInterface_Expecter) Impl() *MockReposInterface_Impl_Call { - return &MockReposInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockReposInterface_Impl_Call) Run(run func()) *MockReposInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockReposInterface_Impl_Call) Return(_a0 workspace.ReposService) *MockReposInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockReposInterface_Impl_Call) RunAndReturn(run func() workspace.ReposService) *MockReposInterface_Impl_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) @@ -969,54 +922,6 @@ func (_c *MockReposInterface_UpdatePermissions_Call) RunAndReturn(run func(conte return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockReposInterface) WithImpl(impl workspace.ReposService) workspace.ReposInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 workspace.ReposInterface - if rf, ok := ret.Get(0).(func(workspace.ReposService) workspace.ReposInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(workspace.ReposInterface) - } - } - - return r0 -} - -// MockReposInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockReposInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl workspace.ReposService -func (_e *MockReposInterface_Expecter) WithImpl(impl interface{}) *MockReposInterface_WithImpl_Call { - return &MockReposInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockReposInterface_WithImpl_Call) Run(run func(impl workspace.ReposService)) *MockReposInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(workspace.ReposService)) - }) - return _c -} - -func (_c *MockReposInterface_WithImpl_Call) Return(_a0 workspace.ReposInterface) *MockReposInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockReposInterface_WithImpl_Call) RunAndReturn(run func(workspace.ReposService) workspace.ReposInterface) *MockReposInterface_WithImpl_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 { diff --git a/experimental/mocks/service/workspace/mock_secrets_interface.go b/experimental/mocks/service/workspace/mock_secrets_interface.go index 77347dbb8..cb469e55c 100644 --- a/experimental/mocks/service/workspace/mock_secrets_interface.go +++ b/experimental/mocks/service/workspace/mock_secrets_interface.go @@ -377,53 +377,6 @@ func (_c *MockSecretsInterface_GetSecret_Call) RunAndReturn(run func(context.Con return _c } -// Impl provides a mock function with given fields: -func (_m *MockSecretsInterface) Impl() workspace.SecretsService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 workspace.SecretsService - if rf, ok := ret.Get(0).(func() workspace.SecretsService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(workspace.SecretsService) - } - } - - return r0 -} - -// MockSecretsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockSecretsInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockSecretsInterface_Expecter) Impl() *MockSecretsInterface_Impl_Call { - return &MockSecretsInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockSecretsInterface_Impl_Call) Run(run func()) *MockSecretsInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSecretsInterface_Impl_Call) Return(_a0 workspace.SecretsService) *MockSecretsInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSecretsInterface_Impl_Call) RunAndReturn(run func() workspace.SecretsService) *MockSecretsInterface_Impl_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) @@ -958,54 +911,6 @@ func (_c *MockSecretsInterface_PutSecret_Call) RunAndReturn(run func(context.Con return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockSecretsInterface) WithImpl(impl workspace.SecretsService) workspace.SecretsInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 workspace.SecretsInterface - if rf, ok := ret.Get(0).(func(workspace.SecretsService) workspace.SecretsInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(workspace.SecretsInterface) - } - } - - return r0 -} - -// MockSecretsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockSecretsInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl workspace.SecretsService -func (_e *MockSecretsInterface_Expecter) WithImpl(impl interface{}) *MockSecretsInterface_WithImpl_Call { - return &MockSecretsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockSecretsInterface_WithImpl_Call) Run(run func(impl workspace.SecretsService)) *MockSecretsInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(workspace.SecretsService)) - }) - return _c -} - -func (_c *MockSecretsInterface_WithImpl_Call) Return(_a0 workspace.SecretsInterface) *MockSecretsInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSecretsInterface_WithImpl_Call) RunAndReturn(run func(workspace.SecretsService) workspace.SecretsInterface) *MockSecretsInterface_WithImpl_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 { diff --git a/experimental/mocks/service/workspace/mock_workspace_interface.go b/experimental/mocks/service/workspace/mock_workspace_interface.go index 8573e7aff..30b2ecf5d 100644 --- a/experimental/mocks/service/workspace/mock_workspace_interface.go +++ b/experimental/mocks/service/workspace/mock_workspace_interface.go @@ -620,53 +620,6 @@ func (_c *MockWorkspaceInterface_GetStatusByPath_Call) RunAndReturn(run func(con return _c } -// Impl provides a mock function with given fields: -func (_m *MockWorkspaceInterface) Impl() workspace.WorkspaceService { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Impl") - } - - var r0 workspace.WorkspaceService - if rf, ok := ret.Get(0).(func() workspace.WorkspaceService); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(workspace.WorkspaceService) - } - } - - return r0 -} - -// MockWorkspaceInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl' -type MockWorkspaceInterface_Impl_Call struct { - *mock.Call -} - -// Impl is a helper method to define mock.On call -func (_e *MockWorkspaceInterface_Expecter) Impl() *MockWorkspaceInterface_Impl_Call { - return &MockWorkspaceInterface_Impl_Call{Call: _e.mock.On("Impl")} -} - -func (_c *MockWorkspaceInterface_Impl_Call) Run(run func()) *MockWorkspaceInterface_Impl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockWorkspaceInterface_Impl_Call) Return(_a0 workspace.WorkspaceService) *MockWorkspaceInterface_Impl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWorkspaceInterface_Impl_Call) RunAndReturn(run func() workspace.WorkspaceService) *MockWorkspaceInterface_Impl_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) @@ -1274,54 +1227,6 @@ func (_c *MockWorkspaceInterface_Upload_Call) RunAndReturn(run func(context.Cont return _c } -// WithImpl provides a mock function with given fields: impl -func (_m *MockWorkspaceInterface) WithImpl(impl workspace.WorkspaceService) workspace.WorkspaceInterface { - ret := _m.Called(impl) - - if len(ret) == 0 { - panic("no return value specified for WithImpl") - } - - var r0 workspace.WorkspaceInterface - if rf, ok := ret.Get(0).(func(workspace.WorkspaceService) workspace.WorkspaceInterface); ok { - r0 = rf(impl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(workspace.WorkspaceInterface) - } - } - - return r0 -} - -// MockWorkspaceInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl' -type MockWorkspaceInterface_WithImpl_Call struct { - *mock.Call -} - -// WithImpl is a helper method to define mock.On call -// - impl workspace.WorkspaceService -func (_e *MockWorkspaceInterface_Expecter) WithImpl(impl interface{}) *MockWorkspaceInterface_WithImpl_Call { - return &MockWorkspaceInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)} -} - -func (_c *MockWorkspaceInterface_WithImpl_Call) Run(run func(impl workspace.WorkspaceService)) *MockWorkspaceInterface_WithImpl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(workspace.WorkspaceService)) - }) - return _c -} - -func (_c *MockWorkspaceInterface_WithImpl_Call) Return(_a0 workspace.WorkspaceInterface) *MockWorkspaceInterface_WithImpl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWorkspaceInterface_WithImpl_Call) RunAndReturn(run func(workspace.WorkspaceService) workspace.WorkspaceInterface) *MockWorkspaceInterface_WithImpl_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) diff --git a/service/apps/api.go b/service/apps/api.go new file mode 100755 index 000000000..c5985426b --- /dev/null +++ b/service/apps/api.go @@ -0,0 +1,580 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +// Apps run directly on a customer’s Databricks instance, integrate with their data, use and extend Databricks services, and enable users to interact through single sign-on. +package apps + +import ( + "context" + "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" +) + +type AppsInterface interface { + + // WaitGetAppIdle repeatedly calls [AppsAPI.Get] and waits to reach IDLE state + WaitGetAppIdle(ctx context.Context, name string, + timeout time.Duration, callback func(*App)) (*App, error) + + // WaitGetDeploymentAppSucceeded repeatedly calls [AppsAPI.GetDeployment] and waits to reach SUCCEEDED state + WaitGetDeploymentAppSucceeded(ctx context.Context, appName string, deploymentId string, + timeout time.Duration, callback func(*AppDeployment)) (*AppDeployment, error) + + // Create an app. + // + // Creates a new app. + Create(ctx context.Context, createAppRequest CreateAppRequest) (*WaitGetAppIdle[App], error) + + // Calls [AppsAPIInterface.Create] and waits to reach IDLE state + // + // You can override the default timeout of 20 minutes by calling adding + // retries.Timeout[App](60*time.Minute) functional option. + // + // Deprecated: use [AppsAPIInterface.Create].Get() or [AppsAPIInterface.WaitGetAppIdle] + CreateAndWait(ctx context.Context, createAppRequest CreateAppRequest, options ...retries.Option[App]) (*App, error) + + // Delete an app. + // + // Deletes an app. + Delete(ctx context.Context, request DeleteAppRequest) error + + // Delete an app. + // + // Deletes an app. + DeleteByName(ctx context.Context, name string) error + + // Create an app deployment. + // + // Creates an app deployment for the app with the supplied name. + Deploy(ctx context.Context, createAppDeploymentRequest CreateAppDeploymentRequest) (*WaitGetDeploymentAppSucceeded[AppDeployment], error) + + // Calls [AppsAPIInterface.Deploy] and waits to reach SUCCEEDED state + // + // You can override the default timeout of 20 minutes by calling adding + // retries.Timeout[AppDeployment](60*time.Minute) functional option. + // + // Deprecated: use [AppsAPIInterface.Deploy].Get() or [AppsAPIInterface.WaitGetDeploymentAppSucceeded] + DeployAndWait(ctx context.Context, createAppDeploymentRequest CreateAppDeploymentRequest, options ...retries.Option[AppDeployment]) (*AppDeployment, error) + + // Get an app. + // + // Retrieves information for the app with the supplied name. + Get(ctx context.Context, request GetAppRequest) (*App, error) + + // Get an app. + // + // Retrieves information for the app with the supplied name. + GetByName(ctx context.Context, name string) (*App, error) + + // Get an app deployment. + // + // Retrieves information for the app deployment with the supplied name and + // deployment id. + GetDeployment(ctx context.Context, request GetAppDeploymentRequest) (*AppDeployment, error) + + // Get an app deployment. + // + // Retrieves information for the app deployment with the supplied name and + // deployment id. + GetDeploymentByAppNameAndDeploymentId(ctx context.Context, appName string, deploymentId string) (*AppDeployment, error) + + // Get app permission levels. + // + // Gets the permission levels that a user can have on an object. + GetPermissionLevels(ctx context.Context, request GetAppPermissionLevelsRequest) (*GetAppPermissionLevelsResponse, error) + + // Get app permission levels. + // + // Gets the permission levels that a user can have on an object. + GetPermissionLevelsByAppName(ctx context.Context, appName string) (*GetAppPermissionLevelsResponse, error) + + // Get app permissions. + // + // Gets the permissions of an app. Apps can inherit permissions from their root + // object. + GetPermissions(ctx context.Context, request GetAppPermissionsRequest) (*AppPermissions, error) + + // Get app permissions. + // + // Gets the permissions of an app. Apps can inherit permissions from their root + // object. + GetPermissionsByAppName(ctx context.Context, appName string) (*AppPermissions, error) + + // List apps. + // + // Lists all apps in the workspace. + // + // This method is generated by Databricks SDK Code Generator. + List(ctx context.Context, request ListAppsRequest) listing.Iterator[App] + + // List apps. + // + // Lists all apps in the workspace. + // + // This method is generated by Databricks SDK Code Generator. + ListAll(ctx context.Context, request ListAppsRequest) ([]App, error) + + // List app deployments. + // + // Lists all app deployments for the app with the supplied name. + // + // This method is generated by Databricks SDK Code Generator. + ListDeployments(ctx context.Context, request ListAppDeploymentsRequest) listing.Iterator[AppDeployment] + + // List app deployments. + // + // Lists all app deployments for the app with the supplied name. + // + // This method is generated by Databricks SDK Code Generator. + ListDeploymentsAll(ctx context.Context, request ListAppDeploymentsRequest) ([]AppDeployment, error) + + // List app deployments. + // + // Lists all app deployments for the app with the supplied name. + ListDeploymentsByAppName(ctx context.Context, appName string) (*ListAppDeploymentsResponse, error) + + // Set app permissions. + // + // Sets permissions on an app. Apps can inherit permissions from their root + // object. + SetPermissions(ctx context.Context, request AppPermissionsRequest) (*AppPermissions, error) + + // Start an app. + // + // Start the last active deployment of the app in the workspace. + Start(ctx context.Context, startAppRequest StartAppRequest) (*WaitGetDeploymentAppSucceeded[AppDeployment], error) + + // Calls [AppsAPIInterface.Start] and waits to reach SUCCEEDED state + // + // You can override the default timeout of 20 minutes by calling adding + // retries.Timeout[AppDeployment](60*time.Minute) functional option. + // + // Deprecated: use [AppsAPIInterface.Start].Get() or [AppsAPIInterface.WaitGetDeploymentAppSucceeded] + StartAndWait(ctx context.Context, startAppRequest StartAppRequest, options ...retries.Option[AppDeployment]) (*AppDeployment, error) + + // Stop an app. + // + // Stops the active deployment of the app in the workspace. + Stop(ctx context.Context, request StopAppRequest) error + + // Update an app. + // + // Updates the app with the supplied name. + Update(ctx context.Context, request UpdateAppRequest) (*App, error) + + // Update app permissions. + // + // Updates the permissions on an app. Apps can inherit permissions from their + // root object. + UpdatePermissions(ctx context.Context, request AppPermissionsRequest) (*AppPermissions, error) +} + +func NewApps(client *client.DatabricksClient) *AppsAPI { + return &AppsAPI{ + appsImpl: appsImpl{ + client: client, + }, + } +} + +// Apps run directly on a customer’s Databricks instance, integrate with their +// data, use and extend Databricks services, and enable users to interact +// through single sign-on. +type AppsAPI struct { + appsImpl +} + +// WaitGetAppIdle repeatedly calls [AppsAPI.Get] and waits to reach IDLE state +func (a *AppsAPI) WaitGetAppIdle(ctx context.Context, name string, + timeout time.Duration, callback func(*App)) (*App, error) { + ctx = useragent.InContext(ctx, "sdk-feature", "long-running") + return retries.Poll[App](ctx, timeout, func() (*App, *retries.Err) { + app, err := a.Get(ctx, GetAppRequest{ + Name: name, + }) + if err != nil { + return nil, retries.Halt(err) + } + if callback != nil { + callback(app) + } + status := app.Status.State + statusMessage := fmt.Sprintf("current status: %s", status) + if app.Status != nil { + statusMessage = app.Status.Message + } + switch status { + case AppStateIdle: // target state + return app, nil + case AppStateError: + err := fmt.Errorf("failed to reach %s, got %s: %s", + AppStateIdle, status, statusMessage) + return nil, retries.Halt(err) + default: + return nil, retries.Continues(statusMessage) + } + }) +} + +// WaitGetAppIdle is a wrapper that calls [AppsAPI.WaitGetAppIdle] and waits to reach IDLE state. +type WaitGetAppIdle[R any] struct { + Response *R + Name string `json:"name"` + Poll func(time.Duration, func(*App)) (*App, error) + callback func(*App) + timeout time.Duration +} + +// OnProgress invokes a callback every time it polls for the status update. +func (w *WaitGetAppIdle[R]) OnProgress(callback func(*App)) *WaitGetAppIdle[R] { + w.callback = callback + return w +} + +// Get the App with the default timeout of 20 minutes. +func (w *WaitGetAppIdle[R]) Get() (*App, error) { + return w.Poll(w.timeout, w.callback) +} + +// Get the App with custom timeout. +func (w *WaitGetAppIdle[R]) GetWithTimeout(timeout time.Duration) (*App, error) { + return w.Poll(timeout, w.callback) +} + +// WaitGetDeploymentAppSucceeded repeatedly calls [AppsAPI.GetDeployment] and waits to reach SUCCEEDED state +func (a *AppsAPI) WaitGetDeploymentAppSucceeded(ctx context.Context, appName string, deploymentId string, + timeout time.Duration, callback func(*AppDeployment)) (*AppDeployment, error) { + ctx = useragent.InContext(ctx, "sdk-feature", "long-running") + return retries.Poll[AppDeployment](ctx, timeout, func() (*AppDeployment, *retries.Err) { + appDeployment, err := a.GetDeployment(ctx, GetAppDeploymentRequest{ + AppName: appName, + DeploymentId: deploymentId, + }) + if err != nil { + return nil, retries.Halt(err) + } + if callback != nil { + callback(appDeployment) + } + status := appDeployment.Status.State + statusMessage := fmt.Sprintf("current status: %s", status) + if appDeployment.Status != nil { + statusMessage = appDeployment.Status.Message + } + switch status { + case AppDeploymentStateSucceeded: // target state + return appDeployment, nil + case AppDeploymentStateFailed: + err := fmt.Errorf("failed to reach %s, got %s: %s", + AppDeploymentStateSucceeded, status, statusMessage) + return nil, retries.Halt(err) + default: + return nil, retries.Continues(statusMessage) + } + }) +} + +// WaitGetDeploymentAppSucceeded is a wrapper that calls [AppsAPI.WaitGetDeploymentAppSucceeded] and waits to reach SUCCEEDED state. +type WaitGetDeploymentAppSucceeded[R any] struct { + Response *R + AppName string `json:"app_name"` + DeploymentId string `json:"deployment_id"` + Poll func(time.Duration, func(*AppDeployment)) (*AppDeployment, error) + callback func(*AppDeployment) + timeout time.Duration +} + +// OnProgress invokes a callback every time it polls for the status update. +func (w *WaitGetDeploymentAppSucceeded[R]) OnProgress(callback func(*AppDeployment)) *WaitGetDeploymentAppSucceeded[R] { + w.callback = callback + return w +} + +// Get the AppDeployment with the default timeout of 20 minutes. +func (w *WaitGetDeploymentAppSucceeded[R]) Get() (*AppDeployment, error) { + return w.Poll(w.timeout, w.callback) +} + +// Get the AppDeployment with custom timeout. +func (w *WaitGetDeploymentAppSucceeded[R]) GetWithTimeout(timeout time.Duration) (*AppDeployment, error) { + return w.Poll(timeout, w.callback) +} + +// Create an app. +// +// Creates a new app. +func (a *AppsAPI) Create(ctx context.Context, createAppRequest CreateAppRequest) (*WaitGetAppIdle[App], error) { + app, err := a.appsImpl.Create(ctx, createAppRequest) + if err != nil { + return nil, err + } + return &WaitGetAppIdle[App]{ + Response: app, + Name: app.Name, + Poll: func(timeout time.Duration, callback func(*App)) (*App, error) { + return a.WaitGetAppIdle(ctx, app.Name, timeout, callback) + }, + timeout: 20 * time.Minute, + callback: nil, + }, nil +} + +// Calls [AppsAPI.Create] and waits to reach IDLE state +// +// You can override the default timeout of 20 minutes by calling adding +// retries.Timeout[App](60*time.Minute) functional option. +// +// Deprecated: use [AppsAPI.Create].Get() or [AppsAPI.WaitGetAppIdle] +func (a *AppsAPI) CreateAndWait(ctx context.Context, createAppRequest CreateAppRequest, options ...retries.Option[App]) (*App, error) { + wait, err := a.Create(ctx, createAppRequest) + if err != nil { + return nil, err + } + tmp := &retries.Info[App]{Timeout: 20 * time.Minute} + for _, o := range options { + o(tmp) + } + wait.timeout = tmp.Timeout + wait.callback = func(info *App) { + for _, o := range options { + o(&retries.Info[App]{ + Info: info, + Timeout: wait.timeout, + }) + } + } + return wait.Get() +} + +// Delete an app. +// +// Deletes an app. +func (a *AppsAPI) DeleteByName(ctx context.Context, name string) error { + return a.appsImpl.Delete(ctx, DeleteAppRequest{ + Name: name, + }) +} + +// Create an app deployment. +// +// Creates an app deployment for the app with the supplied name. +func (a *AppsAPI) Deploy(ctx context.Context, createAppDeploymentRequest CreateAppDeploymentRequest) (*WaitGetDeploymentAppSucceeded[AppDeployment], error) { + appDeployment, err := a.appsImpl.Deploy(ctx, createAppDeploymentRequest) + if err != nil { + return nil, err + } + return &WaitGetDeploymentAppSucceeded[AppDeployment]{ + Response: appDeployment, + AppName: createAppDeploymentRequest.AppName, + DeploymentId: appDeployment.DeploymentId, + Poll: func(timeout time.Duration, callback func(*AppDeployment)) (*AppDeployment, error) { + return a.WaitGetDeploymentAppSucceeded(ctx, createAppDeploymentRequest.AppName, appDeployment.DeploymentId, timeout, callback) + }, + timeout: 20 * time.Minute, + callback: nil, + }, nil +} + +// Calls [AppsAPI.Deploy] and waits to reach SUCCEEDED state +// +// You can override the default timeout of 20 minutes by calling adding +// retries.Timeout[AppDeployment](60*time.Minute) functional option. +// +// Deprecated: use [AppsAPI.Deploy].Get() or [AppsAPI.WaitGetDeploymentAppSucceeded] +func (a *AppsAPI) DeployAndWait(ctx context.Context, createAppDeploymentRequest CreateAppDeploymentRequest, options ...retries.Option[AppDeployment]) (*AppDeployment, error) { + wait, err := a.Deploy(ctx, createAppDeploymentRequest) + if err != nil { + return nil, err + } + tmp := &retries.Info[AppDeployment]{Timeout: 20 * time.Minute} + for _, o := range options { + o(tmp) + } + wait.timeout = tmp.Timeout + wait.callback = func(info *AppDeployment) { + for _, o := range options { + o(&retries.Info[AppDeployment]{ + Info: info, + Timeout: wait.timeout, + }) + } + } + return wait.Get() +} + +// Get an app. +// +// Retrieves information for the app with the supplied name. +func (a *AppsAPI) GetByName(ctx context.Context, name string) (*App, error) { + return a.appsImpl.Get(ctx, GetAppRequest{ + Name: name, + }) +} + +// Get an app deployment. +// +// Retrieves information for the app deployment with the supplied name and +// deployment id. +func (a *AppsAPI) GetDeploymentByAppNameAndDeploymentId(ctx context.Context, appName string, deploymentId string) (*AppDeployment, error) { + return a.appsImpl.GetDeployment(ctx, GetAppDeploymentRequest{ + AppName: appName, + DeploymentId: deploymentId, + }) +} + +// Get app permission levels. +// +// Gets the permission levels that a user can have on an object. +func (a *AppsAPI) GetPermissionLevelsByAppName(ctx context.Context, appName string) (*GetAppPermissionLevelsResponse, error) { + return a.appsImpl.GetPermissionLevels(ctx, GetAppPermissionLevelsRequest{ + AppName: appName, + }) +} + +// Get app permissions. +// +// Gets the permissions of an app. Apps can inherit permissions from their root +// object. +func (a *AppsAPI) GetPermissionsByAppName(ctx context.Context, appName string) (*AppPermissions, error) { + return a.appsImpl.GetPermissions(ctx, GetAppPermissionsRequest{ + AppName: appName, + }) +} + +// List apps. +// +// Lists all apps in the workspace. +// +// This method is generated by Databricks SDK Code Generator. +func (a *AppsAPI) List(ctx context.Context, request ListAppsRequest) listing.Iterator[App] { + + getNextPage := func(ctx context.Context, req ListAppsRequest) (*ListAppsResponse, error) { + ctx = useragent.InContext(ctx, "sdk-feature", "pagination") + return a.appsImpl.List(ctx, req) + } + getItems := func(resp *ListAppsResponse) []App { + return resp.Apps + } + getNextReq := func(resp *ListAppsResponse) *ListAppsRequest { + if resp.NextPageToken == "" { + return nil + } + request.PageToken = resp.NextPageToken + return &request + } + iterator := listing.NewIterator( + &request, + getNextPage, + getItems, + getNextReq) + return iterator +} + +// List apps. +// +// Lists all apps in the workspace. +// +// This method is generated by Databricks SDK Code Generator. +func (a *AppsAPI) ListAll(ctx context.Context, request ListAppsRequest) ([]App, error) { + iterator := a.List(ctx, request) + return listing.ToSlice[App](ctx, iterator) +} + +// List app deployments. +// +// Lists all app deployments for the app with the supplied name. +// +// This method is generated by Databricks SDK Code Generator. +func (a *AppsAPI) ListDeployments(ctx context.Context, request ListAppDeploymentsRequest) listing.Iterator[AppDeployment] { + + getNextPage := func(ctx context.Context, req ListAppDeploymentsRequest) (*ListAppDeploymentsResponse, error) { + ctx = useragent.InContext(ctx, "sdk-feature", "pagination") + return a.appsImpl.ListDeployments(ctx, req) + } + getItems := func(resp *ListAppDeploymentsResponse) []AppDeployment { + return resp.AppDeployments + } + getNextReq := func(resp *ListAppDeploymentsResponse) *ListAppDeploymentsRequest { + if resp.NextPageToken == "" { + return nil + } + request.PageToken = resp.NextPageToken + return &request + } + iterator := listing.NewIterator( + &request, + getNextPage, + getItems, + getNextReq) + return iterator +} + +// List app deployments. +// +// Lists all app deployments for the app with the supplied name. +// +// This method is generated by Databricks SDK Code Generator. +func (a *AppsAPI) ListDeploymentsAll(ctx context.Context, request ListAppDeploymentsRequest) ([]AppDeployment, error) { + iterator := a.ListDeployments(ctx, request) + return listing.ToSlice[AppDeployment](ctx, iterator) +} + +// List app deployments. +// +// Lists all app deployments for the app with the supplied name. +func (a *AppsAPI) ListDeploymentsByAppName(ctx context.Context, appName string) (*ListAppDeploymentsResponse, error) { + return a.appsImpl.ListDeployments(ctx, ListAppDeploymentsRequest{ + AppName: appName, + }) +} + +// Start an app. +// +// Start the last active deployment of the app in the workspace. +func (a *AppsAPI) Start(ctx context.Context, startAppRequest StartAppRequest) (*WaitGetDeploymentAppSucceeded[AppDeployment], error) { + appDeployment, err := a.appsImpl.Start(ctx, startAppRequest) + if err != nil { + return nil, err + } + return &WaitGetDeploymentAppSucceeded[AppDeployment]{ + Response: appDeployment, + AppName: startAppRequest.Name, + DeploymentId: appDeployment.DeploymentId, + Poll: func(timeout time.Duration, callback func(*AppDeployment)) (*AppDeployment, error) { + return a.WaitGetDeploymentAppSucceeded(ctx, startAppRequest.Name, appDeployment.DeploymentId, timeout, callback) + }, + timeout: 20 * time.Minute, + callback: nil, + }, nil +} + +// Calls [AppsAPI.Start] and waits to reach SUCCEEDED state +// +// You can override the default timeout of 20 minutes by calling adding +// retries.Timeout[AppDeployment](60*time.Minute) functional option. +// +// Deprecated: use [AppsAPI.Start].Get() or [AppsAPI.WaitGetDeploymentAppSucceeded] +func (a *AppsAPI) StartAndWait(ctx context.Context, startAppRequest StartAppRequest, options ...retries.Option[AppDeployment]) (*AppDeployment, error) { + wait, err := a.Start(ctx, startAppRequest) + if err != nil { + return nil, err + } + tmp := &retries.Info[AppDeployment]{Timeout: 20 * time.Minute} + for _, o := range options { + o(tmp) + } + wait.timeout = tmp.Timeout + wait.callback = func(info *AppDeployment) { + for _, o := range options { + o(&retries.Info[AppDeployment]{ + Info: info, + Timeout: wait.timeout, + }) + } + } + return wait.Get() +} diff --git a/service/apps/impl.go b/service/apps/impl.go new file mode 100755 index 000000000..2f70a3b4f --- /dev/null +++ b/service/apps/impl.go @@ -0,0 +1,149 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package apps + +import ( + "context" + "fmt" + "net/http" + + "github.com/databricks/databricks-sdk-go/client" +) + +// unexported type that holds implementations of just Apps API methods +type appsImpl struct { + client *client.DatabricksClient +} + +func (a *appsImpl) Create(ctx context.Context, request CreateAppRequest) (*App, error) { + var app App + path := "/api/2.0/preview/apps" + headers := make(map[string]string) + headers["Accept"] = "application/json" + headers["Content-Type"] = "application/json" + err := a.client.Do(ctx, http.MethodPost, path, headers, request, &app) + return &app, err +} + +func (a *appsImpl) Delete(ctx context.Context, request DeleteAppRequest) error { + var deleteResponse DeleteResponse + path := fmt.Sprintf("/api/2.0/preview/apps/%v", request.Name) + headers := make(map[string]string) + headers["Accept"] = "application/json" + err := a.client.Do(ctx, http.MethodDelete, path, headers, request, &deleteResponse) + return err +} + +func (a *appsImpl) Deploy(ctx context.Context, request CreateAppDeploymentRequest) (*AppDeployment, error) { + var appDeployment AppDeployment + path := fmt.Sprintf("/api/2.0/preview/apps/%v/deployments", request.AppName) + headers := make(map[string]string) + headers["Accept"] = "application/json" + headers["Content-Type"] = "application/json" + err := a.client.Do(ctx, http.MethodPost, path, headers, request, &appDeployment) + return &appDeployment, err +} + +func (a *appsImpl) Get(ctx context.Context, request GetAppRequest) (*App, error) { + var app App + path := fmt.Sprintf("/api/2.0/preview/apps/%v", request.Name) + headers := make(map[string]string) + headers["Accept"] = "application/json" + err := a.client.Do(ctx, http.MethodGet, path, headers, request, &app) + return &app, err +} + +func (a *appsImpl) GetDeployment(ctx context.Context, request GetAppDeploymentRequest) (*AppDeployment, error) { + var appDeployment AppDeployment + path := fmt.Sprintf("/api/2.0/preview/apps/%v/deployments/%v", request.AppName, request.DeploymentId) + headers := make(map[string]string) + headers["Accept"] = "application/json" + err := a.client.Do(ctx, http.MethodGet, path, headers, request, &appDeployment) + return &appDeployment, err +} + +func (a *appsImpl) GetPermissionLevels(ctx context.Context, request GetAppPermissionLevelsRequest) (*GetAppPermissionLevelsResponse, error) { + var getAppPermissionLevelsResponse GetAppPermissionLevelsResponse + path := fmt.Sprintf("/api/2.0/permissions/apps/%v/permissionLevels", request.AppName) + headers := make(map[string]string) + headers["Accept"] = "application/json" + err := a.client.Do(ctx, http.MethodGet, path, headers, request, &getAppPermissionLevelsResponse) + return &getAppPermissionLevelsResponse, err +} + +func (a *appsImpl) GetPermissions(ctx context.Context, request GetAppPermissionsRequest) (*AppPermissions, error) { + var appPermissions AppPermissions + path := fmt.Sprintf("/api/2.0/permissions/apps/%v", request.AppName) + headers := make(map[string]string) + headers["Accept"] = "application/json" + err := a.client.Do(ctx, http.MethodGet, path, headers, request, &appPermissions) + return &appPermissions, err +} + +func (a *appsImpl) List(ctx context.Context, request ListAppsRequest) (*ListAppsResponse, error) { + var listAppsResponse ListAppsResponse + path := "/api/2.0/preview/apps" + headers := make(map[string]string) + headers["Accept"] = "application/json" + err := a.client.Do(ctx, http.MethodGet, path, headers, request, &listAppsResponse) + return &listAppsResponse, err +} + +func (a *appsImpl) ListDeployments(ctx context.Context, request ListAppDeploymentsRequest) (*ListAppDeploymentsResponse, error) { + var listAppDeploymentsResponse ListAppDeploymentsResponse + path := fmt.Sprintf("/api/2.0/preview/apps/%v/deployments", request.AppName) + headers := make(map[string]string) + headers["Accept"] = "application/json" + err := a.client.Do(ctx, http.MethodGet, path, headers, request, &listAppDeploymentsResponse) + return &listAppDeploymentsResponse, err +} + +func (a *appsImpl) SetPermissions(ctx context.Context, request AppPermissionsRequest) (*AppPermissions, error) { + var appPermissions AppPermissions + path := fmt.Sprintf("/api/2.0/permissions/apps/%v", request.AppName) + headers := make(map[string]string) + headers["Accept"] = "application/json" + headers["Content-Type"] = "application/json" + err := a.client.Do(ctx, http.MethodPut, path, headers, request, &appPermissions) + return &appPermissions, err +} + +func (a *appsImpl) Start(ctx context.Context, request StartAppRequest) (*AppDeployment, error) { + var appDeployment AppDeployment + path := fmt.Sprintf("/api/2.0/preview/apps/%v/start", request.Name) + headers := make(map[string]string) + headers["Accept"] = "application/json" + headers["Content-Type"] = "application/json" + err := a.client.Do(ctx, http.MethodPost, path, headers, request, &appDeployment) + return &appDeployment, err +} + +func (a *appsImpl) Stop(ctx context.Context, request StopAppRequest) error { + var stopAppResponse StopAppResponse + path := fmt.Sprintf("/api/2.0/preview/apps/%v/stop", request.Name) + headers := make(map[string]string) + headers["Accept"] = "application/json" + headers["Content-Type"] = "application/json" + err := a.client.Do(ctx, http.MethodPost, path, headers, request, &stopAppResponse) + return err +} + +func (a *appsImpl) Update(ctx context.Context, request UpdateAppRequest) (*App, error) { + var app App + path := fmt.Sprintf("/api/2.0/preview/apps/%v", request.Name) + headers := make(map[string]string) + headers["Accept"] = "application/json" + headers["Content-Type"] = "application/json" + err := a.client.Do(ctx, http.MethodPatch, path, headers, request, &app) + return &app, err +} + +func (a *appsImpl) UpdatePermissions(ctx context.Context, request AppPermissionsRequest) (*AppPermissions, error) { + var appPermissions AppPermissions + path := fmt.Sprintf("/api/2.0/permissions/apps/%v", request.AppName) + headers := make(map[string]string) + headers["Accept"] = "application/json" + headers["Content-Type"] = "application/json" + err := a.client.Do(ctx, http.MethodPatch, path, headers, request, &appPermissions) + return &appPermissions, err +} diff --git a/service/apps/interface.go b/service/apps/interface.go new file mode 100755 index 000000000..95967598a --- /dev/null +++ b/service/apps/interface.go @@ -0,0 +1,91 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package apps + +import ( + "context" +) + +// Apps run directly on a customer’s Databricks instance, integrate with their +// data, use and extend Databricks services, and enable users to interact +// through single sign-on. +type AppsService interface { + + // Create an app. + // + // Creates a new app. + Create(ctx context.Context, request CreateAppRequest) (*App, error) + + // Delete an app. + // + // Deletes an app. + Delete(ctx context.Context, request DeleteAppRequest) error + + // Create an app deployment. + // + // Creates an app deployment for the app with the supplied name. + Deploy(ctx context.Context, request CreateAppDeploymentRequest) (*AppDeployment, error) + + // Get an app. + // + // Retrieves information for the app with the supplied name. + Get(ctx context.Context, request GetAppRequest) (*App, error) + + // Get an app deployment. + // + // Retrieves information for the app deployment with the supplied name and + // deployment id. + GetDeployment(ctx context.Context, request GetAppDeploymentRequest) (*AppDeployment, error) + + // Get app permission levels. + // + // Gets the permission levels that a user can have on an object. + GetPermissionLevels(ctx context.Context, request GetAppPermissionLevelsRequest) (*GetAppPermissionLevelsResponse, error) + + // Get app permissions. + // + // Gets the permissions of an app. Apps can inherit permissions from their + // root object. + GetPermissions(ctx context.Context, request GetAppPermissionsRequest) (*AppPermissions, error) + + // List apps. + // + // Lists all apps in the workspace. + // + // Use ListAll() to get all App instances, which will iterate over every result page. + List(ctx context.Context, request ListAppsRequest) (*ListAppsResponse, error) + + // List app deployments. + // + // Lists all app deployments for the app with the supplied name. + // + // Use ListDeploymentsAll() to get all AppDeployment instances, which will iterate over every result page. + ListDeployments(ctx context.Context, request ListAppDeploymentsRequest) (*ListAppDeploymentsResponse, error) + + // Set app permissions. + // + // Sets permissions on an app. Apps can inherit permissions from their root + // object. + SetPermissions(ctx context.Context, request AppPermissionsRequest) (*AppPermissions, error) + + // Start an app. + // + // Start the last active deployment of the app in the workspace. + Start(ctx context.Context, request StartAppRequest) (*AppDeployment, error) + + // Stop an app. + // + // Stops the active deployment of the app in the workspace. + Stop(ctx context.Context, request StopAppRequest) error + + // Update an app. + // + // Updates the app with the supplied name. + Update(ctx context.Context, request UpdateAppRequest) (*App, error) + + // Update app permissions. + // + // Updates the permissions on an app. Apps can inherit permissions from + // their root object. + UpdatePermissions(ctx context.Context, request AppPermissionsRequest) (*AppPermissions, error) +} diff --git a/service/apps/model.go b/service/apps/model.go new file mode 100755 index 000000000..23698eac3 --- /dev/null +++ b/service/apps/model.go @@ -0,0 +1,534 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package apps + +import ( + "fmt" + + "github.com/databricks/databricks-sdk-go/marshal" +) + +type App struct { + // The active deployment of the app. + ActiveDeployment *AppDeployment `json:"active_deployment,omitempty"` + // The creation time of the app. Formatted timestamp in ISO 6801. + CreateTime string `json:"create_time,omitempty"` + // The email of the user that created the app. + Creator string `json:"creator,omitempty"` + // The description of the app. + Description string `json:"description,omitempty"` + // The name of the app. The name must contain only lowercase alphanumeric + // characters and hyphens. It must be unique within the workspace. + Name string `json:"name"` + // The pending deployment of the app. + PendingDeployment *AppDeployment `json:"pending_deployment,omitempty"` + + ServicePrincipalId int64 `json:"service_principal_id,omitempty"` + + ServicePrincipalName string `json:"service_principal_name,omitempty"` + + Status *AppStatus `json:"status,omitempty"` + // The update time of the app. Formatted timestamp in ISO 6801. + UpdateTime string `json:"update_time,omitempty"` + // The email of the user that last updated the app. + Updater string `json:"updater,omitempty"` + // The URL of the app once it is deployed. + Url string `json:"url,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *App) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s App) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +type AppAccessControlRequest struct { + // name of the group + GroupName string `json:"group_name,omitempty"` + // Permission level + PermissionLevel AppPermissionLevel `json:"permission_level,omitempty"` + // application ID of a service principal + ServicePrincipalName string `json:"service_principal_name,omitempty"` + // name of the user + UserName string `json:"user_name,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *AppAccessControlRequest) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s AppAccessControlRequest) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +type AppAccessControlResponse struct { + // All permissions. + AllPermissions []AppPermission `json:"all_permissions,omitempty"` + // Display name of the user or service principal. + DisplayName string `json:"display_name,omitempty"` + // name of the group + GroupName string `json:"group_name,omitempty"` + // Name of the service principal. + ServicePrincipalName string `json:"service_principal_name,omitempty"` + // name of the user + UserName string `json:"user_name,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *AppAccessControlResponse) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s AppAccessControlResponse) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +type AppDeployment struct { + // The creation time of the deployment. Formatted timestamp in ISO 6801. + CreateTime string `json:"create_time,omitempty"` + // The email of the user creates the deployment. + Creator string `json:"creator,omitempty"` + // The deployment artifacts for an app. + DeploymentArtifacts *AppDeploymentArtifacts `json:"deployment_artifacts,omitempty"` + // The unique id of the deployment. + DeploymentId string `json:"deployment_id,omitempty"` + // The mode of which the deployment will manage the source code. + Mode AppDeploymentMode `json:"mode,omitempty"` + // The workspace file system path of the source code used to create the app + // deployment. This is different from + // `deployment_artifacts.source_code_path`, which is the path used by the + // deployed app. The former refers to the original source code location of + // the app in the workspace during deployment creation, whereas the latter + // provides a system generated stable snapshotted source code path used by + // the deployment. + SourceCodePath string `json:"source_code_path"` + // Status and status message of the deployment + Status *AppDeploymentStatus `json:"status,omitempty"` + // The update time of the deployment. Formatted timestamp in ISO 6801. + UpdateTime string `json:"update_time,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *AppDeployment) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s AppDeployment) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +type AppDeploymentArtifacts struct { + // The snapshotted workspace file system path of the source code loaded by + // the deployed app. + SourceCodePath string `json:"source_code_path,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *AppDeploymentArtifacts) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s AppDeploymentArtifacts) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +type AppDeploymentMode string + +const AppDeploymentModeAutoSync AppDeploymentMode = `AUTO_SYNC` + +const AppDeploymentModeSnapshot AppDeploymentMode = `SNAPSHOT` + +// String representation for [fmt.Print] +func (f *AppDeploymentMode) String() string { + return string(*f) +} + +// Set raw string value and validate it against allowed values +func (f *AppDeploymentMode) Set(v string) error { + switch v { + case `AUTO_SYNC`, `SNAPSHOT`: + *f = AppDeploymentMode(v) + return nil + default: + return fmt.Errorf(`value "%s" is not one of "AUTO_SYNC", "SNAPSHOT"`, v) + } +} + +// Type always returns AppDeploymentMode to satisfy [pflag.Value] interface +func (f *AppDeploymentMode) Type() string { + return "AppDeploymentMode" +} + +type AppDeploymentState string + +const AppDeploymentStateFailed AppDeploymentState = `FAILED` + +const AppDeploymentStateInProgress AppDeploymentState = `IN_PROGRESS` + +const AppDeploymentStateStopped AppDeploymentState = `STOPPED` + +const AppDeploymentStateSucceeded AppDeploymentState = `SUCCEEDED` + +// String representation for [fmt.Print] +func (f *AppDeploymentState) String() string { + return string(*f) +} + +// Set raw string value and validate it against allowed values +func (f *AppDeploymentState) Set(v string) error { + switch v { + case `FAILED`, `IN_PROGRESS`, `STOPPED`, `SUCCEEDED`: + *f = AppDeploymentState(v) + return nil + default: + return fmt.Errorf(`value "%s" is not one of "FAILED", "IN_PROGRESS", "STOPPED", "SUCCEEDED"`, v) + } +} + +// Type always returns AppDeploymentState to satisfy [pflag.Value] interface +func (f *AppDeploymentState) Type() string { + return "AppDeploymentState" +} + +type AppDeploymentStatus struct { + // Message corresponding with the deployment state. + Message string `json:"message,omitempty"` + // State of the deployment. + State AppDeploymentState `json:"state,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *AppDeploymentStatus) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s AppDeploymentStatus) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +type AppPermission struct { + Inherited bool `json:"inherited,omitempty"` + + InheritedFromObject []string `json:"inherited_from_object,omitempty"` + // Permission level + PermissionLevel AppPermissionLevel `json:"permission_level,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *AppPermission) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s AppPermission) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +// Permission level +type AppPermissionLevel string + +const AppPermissionLevelCanManage AppPermissionLevel = `CAN_MANAGE` + +const AppPermissionLevelCanUse AppPermissionLevel = `CAN_USE` + +// String representation for [fmt.Print] +func (f *AppPermissionLevel) String() string { + return string(*f) +} + +// Set raw string value and validate it against allowed values +func (f *AppPermissionLevel) Set(v string) error { + switch v { + case `CAN_MANAGE`, `CAN_USE`: + *f = AppPermissionLevel(v) + return nil + default: + return fmt.Errorf(`value "%s" is not one of "CAN_MANAGE", "CAN_USE"`, v) + } +} + +// Type always returns AppPermissionLevel to satisfy [pflag.Value] interface +func (f *AppPermissionLevel) Type() string { + return "AppPermissionLevel" +} + +type AppPermissions struct { + AccessControlList []AppAccessControlResponse `json:"access_control_list,omitempty"` + + ObjectId string `json:"object_id,omitempty"` + + ObjectType string `json:"object_type,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *AppPermissions) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s AppPermissions) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +type AppPermissionsDescription struct { + Description string `json:"description,omitempty"` + // Permission level + PermissionLevel AppPermissionLevel `json:"permission_level,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *AppPermissionsDescription) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s AppPermissionsDescription) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +type AppPermissionsRequest struct { + AccessControlList []AppAccessControlRequest `json:"access_control_list,omitempty"` + // The app for which to get or manage permissions. + AppName string `json:"-" url:"-"` +} + +type AppState string + +const AppStateCreating AppState = `CREATING` + +const AppStateDeleted AppState = `DELETED` + +const AppStateDeleting AppState = `DELETING` + +const AppStateError AppState = `ERROR` + +const AppStateIdle AppState = `IDLE` + +const AppStateRunning AppState = `RUNNING` + +const AppStateStarting AppState = `STARTING` + +// String representation for [fmt.Print] +func (f *AppState) String() string { + return string(*f) +} + +// Set raw string value and validate it against allowed values +func (f *AppState) Set(v string) error { + switch v { + case `CREATING`, `DELETED`, `DELETING`, `ERROR`, `IDLE`, `RUNNING`, `STARTING`: + *f = AppState(v) + return nil + default: + return fmt.Errorf(`value "%s" is not one of "CREATING", "DELETED", "DELETING", "ERROR", "IDLE", "RUNNING", "STARTING"`, v) + } +} + +// Type always returns AppState to satisfy [pflag.Value] interface +func (f *AppState) Type() string { + return "AppState" +} + +type AppStatus struct { + // Message corresponding with the app state. + Message string `json:"message,omitempty"` + // State of the app. + State AppState `json:"state,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *AppStatus) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s AppStatus) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +type CreateAppDeploymentRequest struct { + // The name of the app. + AppName string `json:"-" url:"-"` + // The mode of which the deployment will manage the source code. + Mode AppDeploymentMode `json:"mode,omitempty"` + // The workspace file system path of the source code used to create the app + // deployment. This is different from + // `deployment_artifacts.source_code_path`, which is the path used by the + // deployed app. The former refers to the original source code location of + // the app in the workspace during deployment creation, whereas the latter + // provides a system generated stable snapshotted source code path used by + // the deployment. + SourceCodePath string `json:"source_code_path"` +} + +type CreateAppRequest struct { + // The description of the app. + Description string `json:"description,omitempty"` + // The name of the app. The name must contain only lowercase alphanumeric + // characters and hyphens. It must be unique within the workspace. + Name string `json:"name"` + + ForceSendFields []string `json:"-"` +} + +func (s *CreateAppRequest) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s CreateAppRequest) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +// Delete an app +type DeleteAppRequest struct { + // The name of the app. + Name string `json:"-" url:"-"` +} + +type DeleteResponse struct { +} + +// Get an app deployment +type GetAppDeploymentRequest struct { + // The name of the app. + AppName string `json:"-" url:"-"` + // The unique id of the deployment. + DeploymentId string `json:"-" url:"-"` +} + +// Get app permission levels +type GetAppPermissionLevelsRequest struct { + // The app for which to get or manage permissions. + AppName string `json:"-" url:"-"` +} + +type GetAppPermissionLevelsResponse struct { + // Specific permission levels + PermissionLevels []AppPermissionsDescription `json:"permission_levels,omitempty"` +} + +// Get app permissions +type GetAppPermissionsRequest struct { + // The app for which to get or manage permissions. + AppName string `json:"-" url:"-"` +} + +// Get an app +type GetAppRequest struct { + // The name of the app. + Name string `json:"-" url:"-"` +} + +// List app deployments +type ListAppDeploymentsRequest struct { + // The name of the app. + AppName string `json:"-" url:"-"` + // Upper bound for items returned. + PageSize int `json:"-" url:"page_size,omitempty"` + // Pagination token to go to the next page of apps. Requests first page if + // absent. + PageToken string `json:"-" url:"page_token,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *ListAppDeploymentsRequest) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s ListAppDeploymentsRequest) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +type ListAppDeploymentsResponse struct { + // Deployment history of the app. + AppDeployments []AppDeployment `json:"app_deployments,omitempty"` + // Pagination token to request the next page of apps. + NextPageToken string `json:"next_page_token,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *ListAppDeploymentsResponse) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s ListAppDeploymentsResponse) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +// List apps +type ListAppsRequest struct { + // Upper bound for items returned. + PageSize int `json:"-" url:"page_size,omitempty"` + // Pagination token to go to the next page of apps. Requests first page if + // absent. + PageToken string `json:"-" url:"page_token,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *ListAppsRequest) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s ListAppsRequest) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +type ListAppsResponse struct { + Apps []App `json:"apps,omitempty"` + // Pagination token to request the next page of apps. + NextPageToken string `json:"next_page_token,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *ListAppsResponse) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s ListAppsResponse) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +type StartAppRequest struct { + // The name of the app. + Name string `json:"-" url:"-"` +} + +type StopAppRequest struct { + // The name of the app. + Name string `json:"-" url:"-"` +} + +type StopAppResponse struct { +} + +type UpdateAppRequest struct { + // The description of the app. + Description string `json:"description,omitempty"` + // The name of the app. The name must contain only lowercase alphanumeric + // characters and hyphens. It must be unique within the workspace. + Name string `json:"name" url:"-"` + + ForceSendFields []string `json:"-"` +} + +func (s *UpdateAppRequest) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s UpdateAppRequest) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} diff --git a/service/catalog/api.go b/service/catalog/api.go index ef6d6ac24..e4d54e4b5 100755 --- a/service/catalog/api.go +++ b/service/catalog/api.go @@ -3013,12 +3013,18 @@ func (a *SystemSchemasAPI) List(ctx context.Context, request ListSystemSchemasRe getItems := func(resp *ListSystemSchemasResponse) []SystemSchemaInfo { return resp.Schemas } - + getNextReq := func(resp *ListSystemSchemasResponse) *ListSystemSchemasRequest { + if resp.NextPageToken == "" { + return nil + } + request.PageToken = resp.NextPageToken + return &request + } iterator := listing.NewIterator( &request, getNextPage, getItems, - nil) + getNextReq) return iterator } @@ -3030,7 +3036,8 @@ func (a *SystemSchemasAPI) List(ctx context.Context, request ListSystemSchemasRe // This method is generated by Databricks SDK Code Generator. func (a *SystemSchemasAPI) ListAll(ctx context.Context, request ListSystemSchemasRequest) ([]SystemSchemaInfo, error) { iterator := a.List(ctx, request) - return listing.ToSlice[SystemSchemaInfo](ctx, iterator) + return listing.ToSliceN[SystemSchemaInfo, int](ctx, iterator, request.MaxResults) + } // List system schemas. @@ -3818,7 +3825,17 @@ type WorkspaceBindingsInterface interface { // // Gets workspace bindings of the securable. The caller must be a metastore // admin or an owner of the securable. - GetBindings(ctx context.Context, request GetBindingsRequest) (*WorkspaceBindingsResponse, error) + // + // This method is generated by Databricks SDK Code Generator. + GetBindings(ctx context.Context, request GetBindingsRequest) listing.Iterator[WorkspaceBinding] + + // Get securable workspace bindings. + // + // Gets workspace bindings of the securable. The caller must be a metastore + // admin or an owner of the securable. + // + // This method is generated by Databricks SDK Code Generator. + GetBindingsAll(ctx context.Context, request GetBindingsRequest) ([]WorkspaceBinding, error) // Get securable workspace bindings. // @@ -3880,6 +3897,48 @@ func (a *WorkspaceBindingsAPI) GetByName(ctx context.Context, name string) (*Cur }) } +// Get securable workspace bindings. +// +// Gets workspace bindings of the securable. The caller must be a metastore +// admin or an owner of the securable. +// +// This method is generated by Databricks SDK Code Generator. +func (a *WorkspaceBindingsAPI) GetBindings(ctx context.Context, request GetBindingsRequest) listing.Iterator[WorkspaceBinding] { + + getNextPage := func(ctx context.Context, req GetBindingsRequest) (*WorkspaceBindingsResponse, error) { + ctx = useragent.InContext(ctx, "sdk-feature", "pagination") + return a.workspaceBindingsImpl.GetBindings(ctx, req) + } + getItems := func(resp *WorkspaceBindingsResponse) []WorkspaceBinding { + return resp.Bindings + } + getNextReq := func(resp *WorkspaceBindingsResponse) *GetBindingsRequest { + if resp.NextPageToken == "" { + return nil + } + request.PageToken = resp.NextPageToken + return &request + } + iterator := listing.NewIterator( + &request, + getNextPage, + getItems, + getNextReq) + return iterator +} + +// Get securable workspace bindings. +// +// Gets workspace bindings of the securable. The caller must be a metastore +// admin or an owner of the securable. +// +// This method is generated by Databricks SDK Code Generator. +func (a *WorkspaceBindingsAPI) GetBindingsAll(ctx context.Context, request GetBindingsRequest) ([]WorkspaceBinding, error) { + iterator := a.GetBindings(ctx, request) + return listing.ToSliceN[WorkspaceBinding, int](ctx, iterator, request.MaxResults) + +} + // Get securable workspace bindings. // // Gets workspace bindings of the securable. The caller must be a metastore diff --git a/service/catalog/interface.go b/service/catalog/interface.go index 5b80a5606..d41549dd5 100755 --- a/service/catalog/interface.go +++ b/service/catalog/interface.go @@ -962,7 +962,7 @@ type SystemSchemasService interface { // Gets an array of system schemas for a metastore. The caller must be an // account admin or a metastore admin. // - // Use ListAll() to get all SystemSchemaInfo instances + // Use ListAll() to get all SystemSchemaInfo instances, which will iterate over every result page. List(ctx context.Context, request ListSystemSchemasRequest) (*ListSystemSchemasResponse, error) } @@ -1214,6 +1214,8 @@ type WorkspaceBindingsService interface { // // Gets workspace bindings of the securable. The caller must be a metastore // admin or an owner of the securable. + // + // Use GetBindingsAll() to get all WorkspaceBinding instances, which will iterate over every result page. GetBindings(ctx context.Context, request GetBindingsRequest) (*WorkspaceBindingsResponse, error) // Update catalog workspace bindings. diff --git a/service/catalog/model.go b/service/catalog/model.go index cddadd524..a4c1a1127 100755 --- a/service/catalog/model.go +++ b/service/catalog/model.go @@ -2113,10 +2113,29 @@ type GetArtifactAllowlistRequest struct { // Get securable workspace bindings type GetBindingsRequest struct { + // Maximum number of workspace bindings to return. - When set to 0, the page + // length is set to a server configured value (recommended); - When set to a + // value greater than 0, the page length is the minimum of this value and a + // server configured value; - When set to a value less than 0, an invalid + // parameter error is returned; - If not set, all the workspace bindings are + // returned (not recommended). + MaxResults int `json:"-" url:"max_results,omitempty"` + // Opaque pagination token to go to next page based on previous query. + PageToken string `json:"-" url:"page_token,omitempty"` // The name of the securable. SecurableName string `json:"-" url:"-"` // The type of the securable to bind to a workspace. SecurableType GetBindingsSecurableType `json:"-" url:"-"` + + ForceSendFields []string `json:"-"` +} + +func (s *GetBindingsRequest) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s GetBindingsRequest) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) } type GetBindingsSecurableType string @@ -2938,13 +2957,46 @@ func (s ListSummariesRequest) MarshalJSON() ([]byte, error) { // List system schemas type ListSystemSchemasRequest struct { + // Maximum number of schemas to return. - When set to 0, the page length is + // set to a server configured value (recommended); - When set to a value + // greater than 0, the page length is the minimum of this value and a server + // configured value; - When set to a value less than 0, an invalid parameter + // error is returned; - If not set, all the schemas are returned (not + // recommended). + MaxResults int `json:"-" url:"max_results,omitempty"` // The ID for the metastore in which the system schema resides. MetastoreId string `json:"-" url:"-"` + // Opaque pagination token to go to next page based on previous query. + PageToken string `json:"-" url:"page_token,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *ListSystemSchemasRequest) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s ListSystemSchemasRequest) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) } type ListSystemSchemasResponse struct { + // Opaque token to retrieve the next page of results. Absent if there are no + // more pages. __page_token__ should be set to this value for the next + // request (for the next page of results). + NextPageToken string `json:"next_page_token,omitempty"` // An array of system schema information objects. Schemas []SystemSchemaInfo `json:"schemas,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *ListSystemSchemasResponse) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s ListSystemSchemasResponse) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) } type ListTableSummariesResponse struct { @@ -5373,4 +5425,18 @@ func (f *WorkspaceBindingBindingType) Type() string { type WorkspaceBindingsResponse struct { // List of workspace bindings Bindings []WorkspaceBinding `json:"bindings,omitempty"` + // Opaque token to retrieve the next page of results. Absent if there are no + // more pages. __page_token__ should be set to this value for the next + // request (for the next page of results). + NextPageToken string `json:"next_page_token,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *WorkspaceBindingsResponse) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s WorkspaceBindingsResponse) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) } diff --git a/service/compute/api.go b/service/compute/api.go index 8c75093db..e761e0942 100755 --- a/service/compute/api.go +++ b/service/compute/api.go @@ -43,7 +43,7 @@ type ClusterPoliciesInterface interface { // // Get a cluster policy entity. Creation and editing is available to admins // only. - Get(ctx context.Context, request GetClusterPolicyRequest) (*Policy, error) + Get(ctx context.Context, request GetPolicy) (*Policy, error) // Get a cluster policy. // @@ -78,14 +78,14 @@ type ClusterPoliciesInterface interface { // Returns a list of policies accessible by the requesting user. // // This method is generated by Databricks SDK Code Generator. - List(ctx context.Context, request ListClusterPoliciesRequest) listing.Iterator[Policy] + List(ctx context.Context, request ListPolicies) listing.Iterator[Policy] // List cluster policies. // // Returns a list of policies accessible by the requesting user. // // This method is generated by Databricks SDK Code Generator. - ListAll(ctx context.Context, request ListClusterPoliciesRequest) ([]Policy, error) + ListAll(ctx context.Context, request ListPolicies) ([]Policy, error) // PolicyNameToPolicyIdMap calls [ClusterPoliciesAPI.ListAll] and creates a map of results with [Policy].Name as key and [Policy].PolicyId as value. // @@ -94,7 +94,7 @@ type ClusterPoliciesInterface interface { // Note: All [Policy] instances are loaded into memory before creating a map. // // This method is generated by Databricks SDK Code Generator. - PolicyNameToPolicyIdMap(ctx context.Context, request ListClusterPoliciesRequest) (map[string]string, error) + PolicyNameToPolicyIdMap(ctx context.Context, request ListPolicies) (map[string]string, error) // GetByName calls [ClusterPoliciesAPI.PolicyNameToPolicyIdMap] and returns a single [Policy]. // @@ -168,7 +168,7 @@ func (a *ClusterPoliciesAPI) DeleteByPolicyId(ctx context.Context, policyId stri // Get a cluster policy entity. Creation and editing is available to admins // only. func (a *ClusterPoliciesAPI) GetByPolicyId(ctx context.Context, policyId string) (*Policy, error) { - return a.clusterPoliciesImpl.Get(ctx, GetClusterPolicyRequest{ + return a.clusterPoliciesImpl.Get(ctx, GetPolicy{ PolicyId: policyId, }) } @@ -197,9 +197,9 @@ func (a *ClusterPoliciesAPI) GetPermissionsByClusterPolicyId(ctx context.Context // Returns a list of policies accessible by the requesting user. // // This method is generated by Databricks SDK Code Generator. -func (a *ClusterPoliciesAPI) List(ctx context.Context, request ListClusterPoliciesRequest) listing.Iterator[Policy] { +func (a *ClusterPoliciesAPI) List(ctx context.Context, request ListPolicies) listing.Iterator[Policy] { - getNextPage := func(ctx context.Context, req ListClusterPoliciesRequest) (*ListPoliciesResponse, error) { + getNextPage := func(ctx context.Context, req ListPolicies) (*ListPoliciesResponse, error) { ctx = useragent.InContext(ctx, "sdk-feature", "pagination") return a.clusterPoliciesImpl.List(ctx, req) } @@ -220,7 +220,7 @@ func (a *ClusterPoliciesAPI) List(ctx context.Context, request ListClusterPolici // Returns a list of policies accessible by the requesting user. // // This method is generated by Databricks SDK Code Generator. -func (a *ClusterPoliciesAPI) ListAll(ctx context.Context, request ListClusterPoliciesRequest) ([]Policy, error) { +func (a *ClusterPoliciesAPI) ListAll(ctx context.Context, request ListPolicies) ([]Policy, error) { iterator := a.List(ctx, request) return listing.ToSlice[Policy](ctx, iterator) } @@ -232,7 +232,7 @@ func (a *ClusterPoliciesAPI) ListAll(ctx context.Context, request ListClusterPol // Note: All [Policy] instances are loaded into memory before creating a map. // // This method is generated by Databricks SDK Code Generator. -func (a *ClusterPoliciesAPI) PolicyNameToPolicyIdMap(ctx context.Context, request ListClusterPoliciesRequest) (map[string]string, error) { +func (a *ClusterPoliciesAPI) PolicyNameToPolicyIdMap(ctx context.Context, request ListPolicies) (map[string]string, error) { ctx = useragent.InContext(ctx, "sdk-feature", "name-to-id") mapping := map[string]string{} result, err := a.ListAll(ctx, request) @@ -259,7 +259,7 @@ func (a *ClusterPoliciesAPI) PolicyNameToPolicyIdMap(ctx context.Context, reques // This method is generated by Databricks SDK Code Generator. func (a *ClusterPoliciesAPI) GetByName(ctx context.Context, name string) (*Policy, error) { ctx = useragent.InContext(ctx, "sdk-feature", "get-by-name") - result, err := a.ListAll(ctx, ListClusterPoliciesRequest{}) + result, err := a.ListAll(ctx, ListPolicies{}) if err != nil { return nil, err } @@ -588,6 +588,28 @@ type ClustersInterface interface { // This API can only be called by workspace admins. UnpinByClusterId(ctx context.Context, clusterId string) error + // Update cluster configuration (partial). + // + // Updates the configuration of a cluster to match the partial set of attributes + // and size. Denote which fields to update using the `update_mask` field in the + // request body. A cluster can be updated if it is in a `RUNNING` or + // `TERMINATED` state. If a cluster is updated while in a `RUNNING` state, it + // will be restarted so that the new attributes can take effect. If a cluster is + // updated while in a `TERMINATED` state, it will remain `TERMINATED`. The + // updated attributes will take effect the next time the cluster is started + // using the `clusters/start` API. Attempts to update a cluster in any other + // state will be rejected with an `INVALID_STATE` error code. Clusters created + // by the Databricks Jobs service cannot be updated. + Update(ctx context.Context, updateCluster UpdateCluster) (*WaitGetClusterRunning[struct{}], error) + + // Calls [ClustersAPIInterface.Update] and waits to reach RUNNING state + // + // You can override the default timeout of 20 minutes by calling adding + // retries.Timeout[ClusterDetails](60*time.Minute) functional option. + // + // Deprecated: use [ClustersAPIInterface.Update].Get() or [ClustersAPIInterface.WaitGetClusterRunning] + UpdateAndWait(ctx context.Context, updateCluster UpdateCluster, options ...retries.Option[ClusterDetails]) (*ClusterDetails, error) + // Update cluster permissions. // // Updates the permissions on a cluster. Clusters can inherit permissions from @@ -1294,6 +1316,61 @@ func (a *ClustersAPI) UnpinByClusterId(ctx context.Context, clusterId string) er }) } +// Update cluster configuration (partial). +// +// Updates the configuration of a cluster to match the partial set of attributes +// and size. Denote which fields to update using the `update_mask` field in the +// request body. A cluster can be updated if it is in a `RUNNING` or +// `TERMINATED` state. If a cluster is updated while in a `RUNNING` state, it +// will be restarted so that the new attributes can take effect. If a cluster is +// updated while in a `TERMINATED` state, it will remain `TERMINATED`. The +// updated attributes will take effect the next time the cluster is started +// using the `clusters/start` API. Attempts to update a cluster in any other +// state will be rejected with an `INVALID_STATE` error code. Clusters created +// by the Databricks Jobs service cannot be updated. +func (a *ClustersAPI) Update(ctx context.Context, updateCluster UpdateCluster) (*WaitGetClusterRunning[struct{}], error) { + err := a.clustersImpl.Update(ctx, updateCluster) + if err != nil { + return nil, err + } + return &WaitGetClusterRunning[struct{}]{ + + ClusterId: updateCluster.ClusterId, + Poll: func(timeout time.Duration, callback func(*ClusterDetails)) (*ClusterDetails, error) { + return a.WaitGetClusterRunning(ctx, updateCluster.ClusterId, timeout, callback) + }, + timeout: 20 * time.Minute, + callback: nil, + }, nil +} + +// Calls [ClustersAPI.Update] and waits to reach RUNNING state +// +// You can override the default timeout of 20 minutes by calling adding +// retries.Timeout[ClusterDetails](60*time.Minute) functional option. +// +// Deprecated: use [ClustersAPI.Update].Get() or [ClustersAPI.WaitGetClusterRunning] +func (a *ClustersAPI) UpdateAndWait(ctx context.Context, updateCluster UpdateCluster, options ...retries.Option[ClusterDetails]) (*ClusterDetails, error) { + wait, err := a.Update(ctx, updateCluster) + if err != nil { + return nil, err + } + tmp := &retries.Info[ClusterDetails]{Timeout: 20 * time.Minute} + for _, o := range options { + o(tmp) + } + wait.timeout = tmp.Timeout + wait.callback = func(info *ClusterDetails) { + for _, o := range options { + o(&retries.Info[ClusterDetails]{ + Info: info, + Timeout: wait.timeout, + }) + } + } + return wait.Get() +} + type CommandExecutionInterface interface { commandExecutionAPIUtilities @@ -2505,27 +2582,31 @@ type PolicyFamiliesInterface interface { // Get policy family information. // - // Retrieve the information for an policy family based on its identifier. + // Retrieve the information for an policy family based on its identifier and + // version Get(ctx context.Context, request GetPolicyFamilyRequest) (*PolicyFamily, error) // Get policy family information. // - // Retrieve the information for an policy family based on its identifier. + // Retrieve the information for an policy family based on its identifier and + // version GetByPolicyFamilyId(ctx context.Context, policyFamilyId string) (*PolicyFamily, error) // List policy families. // - // Retrieve a list of policy families. This API is paginated. + // Returns the list of policy definition types available to use at their latest + // version. This API is paginated. // // This method is generated by Databricks SDK Code Generator. - List(ctx context.Context, request ListPolicyFamiliesRequest) listing.Iterator[PolicyFamily] + List(ctx context.Context, request ListPolicyFamilies) listing.Iterator[PolicyFamily] // List policy families. // - // Retrieve a list of policy families. This API is paginated. + // Returns the list of policy definition types available to use at their latest + // version. This API is paginated. // // This method is generated by Databricks SDK Code Generator. - ListAll(ctx context.Context, request ListPolicyFamiliesRequest) ([]PolicyFamily, error) + ListAll(ctx context.Context, request ListPolicyFamilies) ([]PolicyFamily, error) } func NewPolicyFamilies(client *client.DatabricksClient) *PolicyFamiliesAPI { @@ -2551,7 +2632,8 @@ type PolicyFamiliesAPI struct { // Get policy family information. // -// Retrieve the information for an policy family based on its identifier. +// Retrieve the information for an policy family based on its identifier and +// version func (a *PolicyFamiliesAPI) GetByPolicyFamilyId(ctx context.Context, policyFamilyId string) (*PolicyFamily, error) { return a.policyFamiliesImpl.Get(ctx, GetPolicyFamilyRequest{ PolicyFamilyId: policyFamilyId, @@ -2560,19 +2642,20 @@ func (a *PolicyFamiliesAPI) GetByPolicyFamilyId(ctx context.Context, policyFamil // List policy families. // -// Retrieve a list of policy families. This API is paginated. +// Returns the list of policy definition types available to use at their latest +// version. This API is paginated. // // This method is generated by Databricks SDK Code Generator. -func (a *PolicyFamiliesAPI) List(ctx context.Context, request ListPolicyFamiliesRequest) listing.Iterator[PolicyFamily] { +func (a *PolicyFamiliesAPI) List(ctx context.Context, request ListPolicyFamilies) listing.Iterator[PolicyFamily] { - getNextPage := func(ctx context.Context, req ListPolicyFamiliesRequest) (*ListPolicyFamiliesResponse, error) { + getNextPage := func(ctx context.Context, req ListPolicyFamilies) (*ListPolicyFamiliesResponse, error) { ctx = useragent.InContext(ctx, "sdk-feature", "pagination") return a.policyFamiliesImpl.List(ctx, req) } getItems := func(resp *ListPolicyFamiliesResponse) []PolicyFamily { return resp.PolicyFamilies } - getNextReq := func(resp *ListPolicyFamiliesResponse) *ListPolicyFamiliesRequest { + getNextReq := func(resp *ListPolicyFamiliesResponse) *ListPolicyFamilies { if resp.NextPageToken == "" { return nil } @@ -2589,11 +2672,11 @@ func (a *PolicyFamiliesAPI) List(ctx context.Context, request ListPolicyFamilies // List policy families. // -// Retrieve a list of policy families. This API is paginated. +// Returns the list of policy definition types available to use at their latest +// version. This API is paginated. // // This method is generated by Databricks SDK Code Generator. -func (a *PolicyFamiliesAPI) ListAll(ctx context.Context, request ListPolicyFamiliesRequest) ([]PolicyFamily, error) { +func (a *PolicyFamiliesAPI) ListAll(ctx context.Context, request ListPolicyFamilies) ([]PolicyFamily, error) { iterator := a.List(ctx, request) - return listing.ToSliceN[PolicyFamily, int64](ctx, iterator, request.MaxResults) - + return listing.ToSlice[PolicyFamily](ctx, iterator) } diff --git a/service/compute/impl.go b/service/compute/impl.go index f62fbc7c1..3b19af508 100755 --- a/service/compute/impl.go +++ b/service/compute/impl.go @@ -45,7 +45,7 @@ func (a *clusterPoliciesImpl) Edit(ctx context.Context, request EditPolicy) erro return err } -func (a *clusterPoliciesImpl) Get(ctx context.Context, request GetClusterPolicyRequest) (*Policy, error) { +func (a *clusterPoliciesImpl) Get(ctx context.Context, request GetPolicy) (*Policy, error) { var policy Policy path := "/api/2.0/policies/clusters/get" headers := make(map[string]string) @@ -72,7 +72,7 @@ func (a *clusterPoliciesImpl) GetPermissions(ctx context.Context, request GetClu return &clusterPolicyPermissions, err } -func (a *clusterPoliciesImpl) List(ctx context.Context, request ListClusterPoliciesRequest) (*ListPoliciesResponse, error) { +func (a *clusterPoliciesImpl) List(ctx context.Context, request ListPolicies) (*ListPoliciesResponse, error) { var listPoliciesResponse ListPoliciesResponse path := "/api/2.0/policies/clusters/list" headers := make(map[string]string) @@ -289,6 +289,16 @@ func (a *clustersImpl) Unpin(ctx context.Context, request UnpinCluster) error { return err } +func (a *clustersImpl) Update(ctx context.Context, request UpdateCluster) error { + var updateClusterResponse UpdateClusterResponse + path := "/api/2.1/clusters/update" + headers := make(map[string]string) + headers["Accept"] = "application/json" + headers["Content-Type"] = "application/json" + err := a.client.Do(ctx, http.MethodPost, path, headers, request, &updateClusterResponse) + return err +} + func (a *clustersImpl) UpdatePermissions(ctx context.Context, request ClusterPermissionsRequest) (*ClusterPermissions, error) { var clusterPermissions ClusterPermissions path := fmt.Sprintf("/api/2.0/permissions/clusters/%v", request.ClusterId) @@ -604,7 +614,7 @@ func (a *policyFamiliesImpl) Get(ctx context.Context, request GetPolicyFamilyReq return &policyFamily, err } -func (a *policyFamiliesImpl) List(ctx context.Context, request ListPolicyFamiliesRequest) (*ListPolicyFamiliesResponse, error) { +func (a *policyFamiliesImpl) List(ctx context.Context, request ListPolicyFamilies) (*ListPolicyFamiliesResponse, error) { var listPolicyFamiliesResponse ListPolicyFamiliesResponse path := "/api/2.0/policy-families" headers := make(map[string]string) diff --git a/service/compute/interface.go b/service/compute/interface.go index 9cb34d95f..a60666d7c 100755 --- a/service/compute/interface.go +++ b/service/compute/interface.go @@ -52,7 +52,7 @@ type ClusterPoliciesService interface { // // Get a cluster policy entity. Creation and editing is available to admins // only. - Get(ctx context.Context, request GetClusterPolicyRequest) (*Policy, error) + Get(ctx context.Context, request GetPolicy) (*Policy, error) // Get cluster policy permission levels. // @@ -70,7 +70,7 @@ type ClusterPoliciesService interface { // Returns a list of policies accessible by the requesting user. // // Use ListAll() to get all Policy instances - List(ctx context.Context, request ListClusterPoliciesRequest) (*ListPoliciesResponse, error) + List(ctx context.Context, request ListPolicies) (*ListPoliciesResponse, error) // Set cluster policy permissions. // @@ -266,6 +266,21 @@ type ClustersService interface { // effect. This API can only be called by workspace admins. Unpin(ctx context.Context, request UnpinCluster) error + // Update cluster configuration (partial). + // + // Updates the configuration of a cluster to match the partial set of + // attributes and size. Denote which fields to update using the + // `update_mask` field in the request body. A cluster can be updated if it + // is in a `RUNNING` or `TERMINATED` state. If a cluster is updated while in + // a `RUNNING` state, it will be restarted so that the new attributes can + // take effect. If a cluster is updated while in a `TERMINATED` state, it + // will remain `TERMINATED`. The updated attributes will take effect the + // next time the cluster is started using the `clusters/start` API. Attempts + // to update a cluster in any other state will be rejected with an + // `INVALID_STATE` error code. Clusters created by the Databricks Jobs + // service cannot be updated. + Update(ctx context.Context, request UpdateCluster) error + // Update cluster permissions. // // Updates the permissions on a cluster. Clusters can inherit permissions @@ -554,13 +569,15 @@ type PolicyFamiliesService interface { // Get policy family information. // - // Retrieve the information for an policy family based on its identifier. + // Retrieve the information for an policy family based on its identifier and + // version Get(ctx context.Context, request GetPolicyFamilyRequest) (*PolicyFamily, error) // List policy families. // - // Retrieve a list of policy families. This API is paginated. + // Returns the list of policy definition types available to use at their + // latest version. This API is paginated. // // Use ListAll() to get all PolicyFamily instances, which will iterate over every result page. - List(ctx context.Context, request ListPolicyFamiliesRequest) (*ListPolicyFamiliesResponse, error) + List(ctx context.Context, request ListPolicyFamilies) (*ListPolicyFamiliesResponse, error) } diff --git a/service/compute/model.go b/service/compute/model.go index 99245d3ab..5b2e6db77 100755 --- a/service/compute/model.go +++ b/service/compute/model.go @@ -1683,7 +1683,7 @@ type CreatePolicy struct { MaxClustersPerUser int64 `json:"max_clusters_per_user,omitempty"` // Cluster Policy name requested by the user. This has to be unique. Length // must be between 1 and 100 characters. - Name string `json:"name"` + Name string `json:"name,omitempty"` // Policy definition JSON document expressed in [Databricks Policy // Definition Language]. The JSON document must be passed as a string and // cannot be embedded in the requests. @@ -2317,7 +2317,7 @@ type EditPolicy struct { MaxClustersPerUser int64 `json:"max_clusters_per_user,omitempty"` // Cluster Policy name requested by the user. This has to be unique. Length // must be between 1 and 100 characters. - Name string `json:"name"` + Name string `json:"name,omitempty"` // Policy definition JSON document expressed in [Databricks Policy // Definition Language]. The JSON document must be passed as a string and // cannot be embedded in the requests. @@ -2654,12 +2654,6 @@ type GetClusterPolicyPermissionsRequest struct { ClusterPolicyId string `json:"-" url:"-"` } -// Get a cluster policy -type GetClusterPolicyRequest struct { - // Canonical unique identifier for the cluster policy. - PolicyId string `json:"-" url:"policy_id"` -} - // Get cluster info type GetClusterRequest struct { // The cluster about which to retrieve information. @@ -2863,9 +2857,29 @@ type GetInstancePoolRequest struct { InstancePoolId string `json:"-" url:"instance_pool_id"` } +// Get a cluster policy +type GetPolicy struct { + // Canonical unique identifier for the Cluster Policy. + PolicyId string `json:"-" url:"policy_id"` +} + // Get policy family information type GetPolicyFamilyRequest struct { + // The family ID about which to retrieve information. PolicyFamilyId string `json:"-" url:"-"` + // The version number for the family to fetch. Defaults to the latest + // version. + Version int64 `json:"-" url:"version,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *GetPolicyFamilyRequest) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s GetPolicyFamilyRequest) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) } type GetSparkVersionsResponse struct { @@ -3757,17 +3771,6 @@ func (s ListAvailableZonesResponse) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } -// List cluster policies -type ListClusterPoliciesRequest struct { - // The cluster policy attribute to sort by. * `POLICY_CREATION_TIME` - Sort - // result list by policy creation time. * `POLICY_NAME` - Sort result list - // by policy name. - SortColumn ListSortColumn `json:"-" url:"sort_column,omitempty"` - // The order in which the policies get listed. * `DESC` - Sort result list - // in descending order. * `ASC` - Sort result list in ascending order. - SortOrder ListSortOrder `json:"-" url:"sort_order,omitempty"` -} - type ListClustersFilterBy struct { // The source of cluster creation. ClusterSources []ClusterSource `json:"cluster_sources,omitempty" url:"cluster_sources,omitempty"` @@ -3921,14 +3924,53 @@ type ListNodeTypesResponse struct { NodeTypes []NodeType `json:"node_types,omitempty"` } +// A generic ordering enum for list-based queries. +type ListOrder string + +const ListOrderAsc ListOrder = `ASC` + +const ListOrderDesc ListOrder = `DESC` + +// String representation for [fmt.Print] +func (f *ListOrder) String() string { + return string(*f) +} + +// Set raw string value and validate it against allowed values +func (f *ListOrder) Set(v string) error { + switch v { + case `ASC`, `DESC`: + *f = ListOrder(v) + return nil + default: + return fmt.Errorf(`value "%s" is not one of "ASC", "DESC"`, v) + } +} + +// Type always returns ListOrder to satisfy [pflag.Value] interface +func (f *ListOrder) Type() string { + return "ListOrder" +} + +// List cluster policies +type ListPolicies struct { + // The cluster policy attribute to sort by. * `POLICY_CREATION_TIME` - Sort + // result list by policy creation time. * `POLICY_NAME` - Sort result list + // by policy name. + SortColumn PolicySortColumn `json:"-" url:"sort_column,omitempty"` + // The order in which the policies get listed. * `DESC` - Sort result list + // in descending order. * `ASC` - Sort result list in ascending order. + SortOrder ListOrder `json:"-" url:"sort_order,omitempty"` +} + type ListPoliciesResponse struct { // List of policies. Policies []Policy `json:"policies,omitempty"` } // List policy families -type ListPolicyFamiliesRequest struct { - // The max number of policy families to return. +type ListPolicyFamilies struct { + // Maximum number of policy families to return. MaxResults int64 `json:"-" url:"max_results,omitempty"` // A token that can be used to get the next page of results. PageToken string `json:"-" url:"page_token,omitempty"` @@ -3936,11 +3978,11 @@ type ListPolicyFamiliesRequest struct { ForceSendFields []string `json:"-"` } -func (s *ListPolicyFamiliesRequest) UnmarshalJSON(b []byte) error { +func (s *ListPolicyFamilies) UnmarshalJSON(b []byte) error { return marshal.Unmarshal(b, s) } -func (s ListPolicyFamiliesRequest) MarshalJSON() ([]byte, error) { +func (s ListPolicyFamilies) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } @@ -3949,7 +3991,7 @@ type ListPolicyFamiliesResponse struct { // there are no more results to show. NextPageToken string `json:"next_page_token,omitempty"` // List of policy families. - PolicyFamilies []PolicyFamily `json:"policy_families"` + PolicyFamilies []PolicyFamily `json:"policy_families,omitempty"` ForceSendFields []string `json:"-"` } @@ -3962,60 +4004,6 @@ func (s ListPolicyFamiliesResponse) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } -type ListSortColumn string - -const ListSortColumnPolicyCreationTime ListSortColumn = `POLICY_CREATION_TIME` - -const ListSortColumnPolicyName ListSortColumn = `POLICY_NAME` - -// String representation for [fmt.Print] -func (f *ListSortColumn) String() string { - return string(*f) -} - -// Set raw string value and validate it against allowed values -func (f *ListSortColumn) Set(v string) error { - switch v { - case `POLICY_CREATION_TIME`, `POLICY_NAME`: - *f = ListSortColumn(v) - return nil - default: - return fmt.Errorf(`value "%s" is not one of "POLICY_CREATION_TIME", "POLICY_NAME"`, v) - } -} - -// Type always returns ListSortColumn to satisfy [pflag.Value] interface -func (f *ListSortColumn) Type() string { - return "ListSortColumn" -} - -type ListSortOrder string - -const ListSortOrderAsc ListSortOrder = `ASC` - -const ListSortOrderDesc ListSortOrder = `DESC` - -// String representation for [fmt.Print] -func (f *ListSortOrder) String() string { - return string(*f) -} - -// Set raw string value and validate it against allowed values -func (f *ListSortOrder) Set(v string) error { - switch v { - case `ASC`, `DESC`: - *f = ListSortOrder(v) - return nil - default: - return fmt.Errorf(`value "%s" is not one of "ASC", "DESC"`, v) - } -} - -// Type always returns ListSortOrder to satisfy [pflag.Value] interface -func (f *ListSortOrder) Type() string { - return "ListSortOrder" -} - type LocalFileInfo struct { // local file destination, e.g. `file:/my/local/file.sh` Destination string `json:"destination"` @@ -4195,6 +4183,7 @@ type PinCluster struct { type PinClusterResponse struct { } +// Describes a Cluster Policy entity. type Policy struct { // Creation time. The timestamp (in millisecond) when this Cluster Policy // was created. @@ -4232,7 +4221,12 @@ type Policy struct { // // [Databricks Policy Definition Language]: https://docs.databricks.com/administration-guide/clusters/policy-definition.html PolicyFamilyDefinitionOverrides string `json:"policy_family_definition_overrides,omitempty"` - // ID of the policy family. + // ID of the policy family. The cluster policy's policy definition inherits + // the policy family's policy definition. + // + // Cannot be used with `definition`. Use + // `policy_family_definition_overrides` instead to customize the policy + // definition. PolicyFamilyId string `json:"policy_family_id,omitempty"` // Canonical unique identifier for the Cluster Policy. PolicyId string `json:"policy_id,omitempty"` @@ -4253,13 +4247,50 @@ type PolicyFamily struct { // Definition Language]. // // [Databricks Cluster Policy Definition Language]: https://docs.databricks.com/administration-guide/clusters/policy-definition.html - Definition string `json:"definition"` + Definition string `json:"definition,omitempty"` // Human-readable description of the purpose of the policy family. - Description string `json:"description"` + Description string `json:"description,omitempty"` // Name of the policy family. - Name string `json:"name"` - // ID of the policy family. - PolicyFamilyId string `json:"policy_family_id"` + Name string `json:"name,omitempty"` + // Unique identifier for the policy family. + PolicyFamilyId string `json:"policy_family_id,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *PolicyFamily) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s PolicyFamily) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +type PolicySortColumn string + +const PolicySortColumnPolicyCreationTime PolicySortColumn = `POLICY_CREATION_TIME` + +const PolicySortColumnPolicyName PolicySortColumn = `POLICY_NAME` + +// String representation for [fmt.Print] +func (f *PolicySortColumn) String() string { + return string(*f) +} + +// Set raw string value and validate it against allowed values +func (f *PolicySortColumn) Set(v string) error { + switch v { + case `POLICY_CREATION_TIME`, `POLICY_NAME`: + *f = PolicySortColumn(v) + return nil + default: + return fmt.Errorf(`value "%s" is not one of "POLICY_CREATION_TIME", "POLICY_NAME"`, v) + } +} + +// Type always returns PolicySortColumn to satisfy [pflag.Value] interface +func (f *PolicySortColumn) Type() string { + return "PolicySortColumn" } type PythonPyPiLibrary struct { @@ -4866,6 +4897,174 @@ type UnpinCluster struct { type UnpinClusterResponse struct { } +type UpdateCluster struct { + // The cluster to be updated. + Cluster *UpdateClusterResource `json:"cluster,omitempty"` + // ID of the cluster. + ClusterId string `json:"cluster_id"` + // Specifies which fields of the cluster will be updated. This is required + // in the POST request. The update mask should be supplied as a single + // string. To specify multiple fields, separate them with commas (no + // spaces). To delete a field from a cluster configuration, add it to the + // `update_mask` string but omit it from the `cluster` object. + UpdateMask string `json:"update_mask"` +} + +type UpdateClusterResource struct { + // Parameters needed in order to automatically scale clusters up and down + // based on load. Note: autoscaling works best with DB runtime versions 3.0 + // or later. + Autoscale *AutoScale `json:"autoscale,omitempty"` + // Automatically terminates the cluster after it is inactive for this time + // in minutes. If not set, this cluster will not be automatically + // terminated. If specified, the threshold must be between 10 and 10000 + // minutes. Users can also set this value to 0 to explicitly disable + // automatic termination. + AutoterminationMinutes int `json:"autotermination_minutes,omitempty"` + // Attributes related to clusters running on Amazon Web Services. If not + // specified at cluster creation, a set of default values will be used. + AwsAttributes *AwsAttributes `json:"aws_attributes,omitempty"` + // Attributes related to clusters running on Microsoft Azure. If not + // specified at cluster creation, a set of default values will be used. + AzureAttributes *AzureAttributes `json:"azure_attributes,omitempty"` + // The configuration for delivering spark logs to a long-term storage + // destination. Two kinds of destinations (dbfs and s3) are supported. Only + // one destination can be specified for one cluster. If the conf is given, + // the logs will be delivered to the destination every `5 mins`. The + // destination of driver logs is `$destination/$clusterId/driver`, while the + // destination of executor logs is `$destination/$clusterId/executor`. + ClusterLogConf *ClusterLogConf `json:"cluster_log_conf,omitempty"` + // Cluster name requested by the user. This doesn't have to be unique. If + // not specified at creation, the cluster name will be an empty string. + ClusterName string `json:"cluster_name,omitempty"` + // Additional tags for cluster resources. Databricks will tag all cluster + // resources (e.g., AWS instances and EBS volumes) with these tags in + // addition to `default_tags`. Notes: + // + // - Currently, Databricks allows at most 45 custom tags + // + // - Clusters can only reuse cloud resources if the resources' tags are a + // subset of the cluster tags + CustomTags map[string]string `json:"custom_tags,omitempty"` + // Data security mode decides what data governance model to use when + // accessing data from a cluster. + // + // * `NONE`: No security isolation for multiple users sharing the cluster. + // Data governance features are not available in this mode. * `SINGLE_USER`: + // A secure cluster that can only be exclusively used by a single user + // specified in `single_user_name`. Most programming languages, cluster + // features and data governance features are available in this mode. * + // `USER_ISOLATION`: A secure cluster that can be shared by multiple users. + // Cluster users are fully isolated so that they cannot see each other's + // data and credentials. Most data governance features are supported in this + // mode. But programming languages and cluster features might be limited. + // + // The following modes are deprecated starting with Databricks Runtime 15.0 + // and will be removed for future Databricks Runtime versions: + // + // * `LEGACY_TABLE_ACL`: This mode is for users migrating from legacy Table + // ACL clusters. * `LEGACY_PASSTHROUGH`: This mode is for users migrating + // from legacy Passthrough on high concurrency clusters. * + // `LEGACY_SINGLE_USER`: This mode is for users migrating from legacy + // Passthrough on standard clusters. * `LEGACY_SINGLE_USER_STANDARD`: This + // mode provides a way that doesn’t have UC nor passthrough enabled. + DataSecurityMode DataSecurityMode `json:"data_security_mode,omitempty"` + + DockerImage *DockerImage `json:"docker_image,omitempty"` + // The optional ID of the instance pool for the driver of the cluster + // belongs. The pool cluster uses the instance pool with id + // (instance_pool_id) if the driver pool is not assigned. + DriverInstancePoolId string `json:"driver_instance_pool_id,omitempty"` + // The node type of the Spark driver. Note that this field is optional; if + // unset, the driver node type will be set as the same value as + // `node_type_id` defined above. + DriverNodeTypeId string `json:"driver_node_type_id,omitempty"` + // Autoscaling Local Storage: when enabled, this cluster will dynamically + // acquire additional disk space when its Spark workers are running low on + // disk space. This feature requires specific AWS permissions to function + // correctly - refer to the User Guide for more details. + EnableElasticDisk bool `json:"enable_elastic_disk,omitempty"` + // Whether to enable LUKS on cluster VMs' local disks + EnableLocalDiskEncryption bool `json:"enable_local_disk_encryption,omitempty"` + // Attributes related to clusters running on Google Cloud Platform. If not + // specified at cluster creation, a set of default values will be used. + GcpAttributes *GcpAttributes `json:"gcp_attributes,omitempty"` + // The configuration for storing init scripts. Any number of destinations + // can be specified. The scripts are executed sequentially in the order + // provided. If `cluster_log_conf` is specified, init script logs are sent + // to `//init_scripts`. + InitScripts []InitScriptInfo `json:"init_scripts,omitempty"` + // The optional ID of the instance pool to which the cluster belongs. + InstancePoolId string `json:"instance_pool_id,omitempty"` + // This field encodes, through a single value, the resources available to + // each of the Spark nodes in this cluster. For example, the Spark nodes can + // be provisioned and optimized for memory or compute intensive workloads. A + // list of available node types can be retrieved by using the + // :method:clusters/listNodeTypes API call. + NodeTypeId string `json:"node_type_id,omitempty"` + // Number of worker nodes that this cluster should have. A cluster has one + // Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 + // Spark nodes. + // + // Note: When reading the properties of a cluster, this field reflects the + // desired number of workers rather than the actual current number of + // workers. For instance, if a cluster is resized from 5 to 10 workers, this + // field will immediately be updated to reflect the target size of 10 + // workers, whereas the workers listed in `spark_info` will gradually + // increase from 5 to 10 as the new nodes are provisioned. + NumWorkers int `json:"num_workers,omitempty"` + // The ID of the cluster policy used to create the cluster if applicable. + PolicyId string `json:"policy_id,omitempty"` + // Decides which runtime engine to be use, e.g. Standard vs. Photon. If + // unspecified, the runtime engine is inferred from spark_version. + RuntimeEngine RuntimeEngine `json:"runtime_engine,omitempty"` + // Single user name if data_security_mode is `SINGLE_USER` + SingleUserName string `json:"single_user_name,omitempty"` + // An object containing a set of optional, user-specified Spark + // configuration key-value pairs. Users can also pass in a string of extra + // JVM options to the driver and the executors via + // `spark.driver.extraJavaOptions` and `spark.executor.extraJavaOptions` + // respectively. + SparkConf map[string]string `json:"spark_conf,omitempty"` + // An object containing a set of optional, user-specified environment + // variable key-value pairs. Please note that key-value pair of the form + // (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the + // driver and workers. + // + // In order to specify an additional set of `SPARK_DAEMON_JAVA_OPTS`, we + // recommend appending them to `$SPARK_DAEMON_JAVA_OPTS` as shown in the + // example below. This ensures that all default databricks managed + // environmental variables are included as well. + // + // Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", + // "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": + // "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` + SparkEnvVars map[string]string `json:"spark_env_vars,omitempty"` + // The Spark version of the cluster, e.g. `3.3.x-scala2.11`. A list of + // available Spark versions can be retrieved by using the + // :method:clusters/sparkVersions API call. + SparkVersion string `json:"spark_version,omitempty"` + // SSH public key contents that will be added to each Spark node in this + // cluster. The corresponding private keys can be used to login with the + // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. + SshPublicKeys []string `json:"ssh_public_keys,omitempty"` + + WorkloadType *WorkloadType `json:"workload_type,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *UpdateClusterResource) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s UpdateClusterResource) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +type UpdateClusterResponse struct { +} + type UpdateResponse struct { } diff --git a/service/dashboards/model.go b/service/dashboards/model.go index b8bc9592e..9b7863452 100755 --- a/service/dashboards/model.go +++ b/service/dashboards/model.go @@ -758,6 +758,8 @@ func (s PublishedDashboard) MarshalJSON() ([]byte, error) { type QueryAttachment struct { // Description of the query Description string `json:"description,omitempty"` + + Id string `json:"id,omitempty"` // If the query was created on an instruction (trusted asset) we link to the // id InstructionId string `json:"instruction_id,omitempty"` @@ -917,6 +919,8 @@ type TextAttachment struct { // AI generated message Content string `json:"content,omitempty"` + Id string `json:"id,omitempty"` + ForceSendFields []string `json:"-"` } diff --git a/service/iam/api.go b/service/iam/api.go index e193d247d..aa4a6e179 100755 --- a/service/iam/api.go +++ b/service/iam/api.go @@ -1033,6 +1033,9 @@ func NewPermissions(client *client.DatabricksClient) *PermissionsAPI { // Permissions API are used to create read, write, edit, update and manage // access for various users on different objects and endpoints. // +// * **[Apps permissions](:service:apps)** — Manage which users can manage or +// use apps. +// // * **[Cluster permissions](:service:clusters)** — Manage which users can // manage, restart, or attach to clusters. // @@ -1071,7 +1074,8 @@ func NewPermissions(client *client.DatabricksClient) *PermissionsAPI { // can create or use tokens. // // * **[Workspace object permissions](:service:workspace)** — Manage which -// users can read, run, edit, or manage directories, files, and notebooks. +// users can read, run, edit, or manage alerts, dbsql-dashboards, directories, +// files, notebooks and queries. // // For the mapping of the required permissions for specific actions or abilities // and other important information, see [Access Control]. diff --git a/service/iam/interface.go b/service/iam/interface.go index 1b8bdb668..1d4a52192 100755 --- a/service/iam/interface.go +++ b/service/iam/interface.go @@ -262,6 +262,9 @@ type PermissionMigrationService interface { // Permissions API are used to create read, write, edit, update and manage // access for various users on different objects and endpoints. // +// * **[Apps permissions](:service:apps)** — Manage which users can manage or +// use apps. +// // * **[Cluster permissions](:service:clusters)** — Manage which users can // manage, restart, or attach to clusters. // @@ -300,7 +303,8 @@ type PermissionMigrationService interface { // can create or use tokens. // // * **[Workspace object permissions](:service:workspace)** — Manage which -// users can read, run, edit, or manage directories, files, and notebooks. +// users can read, run, edit, or manage alerts, dbsql-dashboards, directories, +// files, notebooks and queries. // // For the mapping of the required permissions for specific actions or abilities // and other important information, see [Access Control]. diff --git a/service/iam/model.go b/service/iam/model.go index 6b2568737..50265b0a3 100755 --- a/service/iam/model.go +++ b/service/iam/model.go @@ -211,10 +211,10 @@ type GetPermissionLevelsResponse struct { type GetPermissionRequest struct { // The id of the request object. RequestObjectId string `json:"-" url:"-"` - // The type of the request object. Can be one of the following: - // authorization, clusters, cluster-policies, directories, experiments, - // files, instance-pools, jobs, notebooks, pipelines, registered-models, - // repos, serving-endpoints, or warehouses. + // The type of the request object. Can be one of the following: alerts, + // authorization, clusters, cluster-policies, dbsql-dashboards, directories, + // experiments, files, instance-pools, jobs, notebooks, pipelines, queries, + // registered-models, repos, serving-endpoints, or warehouses. RequestObjectType string `json:"-" url:"-"` } @@ -329,7 +329,7 @@ type Group struct { Groups []ComplexValue `json:"groups,omitempty"` // Databricks group ID - Id string `json:"id,omitempty"` + Id string `json:"id,omitempty" url:"-"` Members []ComplexValue `json:"members,omitempty"` // Container for the group identifier. Workspace local versus account. @@ -1059,6 +1059,8 @@ const PermissionLevelCanManageRun PermissionLevel = `CAN_MANAGE_RUN` const PermissionLevelCanManageStagingVersions PermissionLevel = `CAN_MANAGE_STAGING_VERSIONS` +const PermissionLevelCanMonitor PermissionLevel = `CAN_MONITOR` + const PermissionLevelCanQuery PermissionLevel = `CAN_QUERY` const PermissionLevelCanRead PermissionLevel = `CAN_READ` @@ -1083,11 +1085,11 @@ func (f *PermissionLevel) String() string { // Set raw string value and validate it against allowed values func (f *PermissionLevel) Set(v string) error { switch v { - case `CAN_ATTACH_TO`, `CAN_BIND`, `CAN_EDIT`, `CAN_EDIT_METADATA`, `CAN_MANAGE`, `CAN_MANAGE_PRODUCTION_VERSIONS`, `CAN_MANAGE_RUN`, `CAN_MANAGE_STAGING_VERSIONS`, `CAN_QUERY`, `CAN_READ`, `CAN_RESTART`, `CAN_RUN`, `CAN_USE`, `CAN_VIEW`, `CAN_VIEW_METADATA`, `IS_OWNER`: + case `CAN_ATTACH_TO`, `CAN_BIND`, `CAN_EDIT`, `CAN_EDIT_METADATA`, `CAN_MANAGE`, `CAN_MANAGE_PRODUCTION_VERSIONS`, `CAN_MANAGE_RUN`, `CAN_MANAGE_STAGING_VERSIONS`, `CAN_MONITOR`, `CAN_QUERY`, `CAN_READ`, `CAN_RESTART`, `CAN_RUN`, `CAN_USE`, `CAN_VIEW`, `CAN_VIEW_METADATA`, `IS_OWNER`: *f = PermissionLevel(v) return nil default: - return fmt.Errorf(`value "%s" is not one of "CAN_ATTACH_TO", "CAN_BIND", "CAN_EDIT", "CAN_EDIT_METADATA", "CAN_MANAGE", "CAN_MANAGE_PRODUCTION_VERSIONS", "CAN_MANAGE_RUN", "CAN_MANAGE_STAGING_VERSIONS", "CAN_QUERY", "CAN_READ", "CAN_RESTART", "CAN_RUN", "CAN_USE", "CAN_VIEW", "CAN_VIEW_METADATA", "IS_OWNER"`, v) + return fmt.Errorf(`value "%s" is not one of "CAN_ATTACH_TO", "CAN_BIND", "CAN_EDIT", "CAN_EDIT_METADATA", "CAN_MANAGE", "CAN_MANAGE_PRODUCTION_VERSIONS", "CAN_MANAGE_RUN", "CAN_MANAGE_STAGING_VERSIONS", "CAN_MONITOR", "CAN_QUERY", "CAN_READ", "CAN_RESTART", "CAN_RUN", "CAN_USE", "CAN_VIEW", "CAN_VIEW_METADATA", "IS_OWNER"`, v) } } @@ -1133,10 +1135,10 @@ type PermissionsRequest struct { AccessControlList []AccessControlRequest `json:"access_control_list,omitempty"` // The id of the request object. RequestObjectId string `json:"-" url:"-"` - // The type of the request object. Can be one of the following: - // authorization, clusters, cluster-policies, directories, experiments, - // files, instance-pools, jobs, notebooks, pipelines, registered-models, - // repos, serving-endpoints, or warehouses. + // The type of the request object. Can be one of the following: alerts, + // authorization, clusters, cluster-policies, dbsql-dashboards, directories, + // experiments, files, instance-pools, jobs, notebooks, pipelines, queries, + // registered-models, repos, serving-endpoints, or warehouses. RequestObjectType string `json:"-" url:"-"` } @@ -1233,7 +1235,7 @@ type ServicePrincipal struct { Groups []ComplexValue `json:"groups,omitempty"` // Databricks service principal ID. - Id string `json:"id,omitempty"` + Id string `json:"id,omitempty" url:"-"` // Corresponds to AWS instance profile/arn role. Roles []ComplexValue `json:"roles,omitempty"` // The schema of the List response. @@ -1322,7 +1324,7 @@ type User struct { Groups []ComplexValue `json:"groups,omitempty"` // Databricks user ID. This is automatically set by Databricks. Any value // provided by the client will be ignored. - Id string `json:"id,omitempty"` + Id string `json:"id,omitempty" url:"-"` Name *Name `json:"name,omitempty"` // Corresponds to AWS instance profile/arn role. diff --git a/service/jobs/model.go b/service/jobs/model.go index 029722a4d..ae76ab50b 100755 --- a/service/jobs/model.go +++ b/service/jobs/model.go @@ -7,7 +7,6 @@ import ( "github.com/databricks/databricks-sdk-go/marshal" "github.com/databricks/databricks-sdk-go/service/compute" - "github.com/databricks/databricks-sdk-go/service/iam" ) type BaseJob struct { @@ -354,7 +353,7 @@ type Continuous struct { type CreateJob struct { // List of permissions to set on the job. - AccessControlList []iam.AccessControlRequest `json:"access_control_list,omitempty"` + AccessControlList []JobAccessControlRequest `json:"access_control_list,omitempty"` // An optional continuous property for this job. The continuous property // will ensure that there is always one run executing. Only one of // `schedule` and `continuous` can be used. @@ -753,6 +752,10 @@ type GetRunRequest struct { IncludeHistory bool `json:"-" url:"include_history,omitempty"` // Whether to include resolved parameter values in the response. IncludeResolvedValues bool `json:"-" url:"include_resolved_values,omitempty"` + // To list the next page or the previous page of job tasks, set this field + // to the value of the `next_page_token` or `prev_page_token` returned in + // the GetJob response. + PageToken string `json:"-" url:"page_token,omitempty"` // The canonical identifier of the run for which to retrieve the metadata. // This field is required. RunId int64 `json:"-" url:"run_id"` @@ -2153,6 +2156,9 @@ type Run struct { // Note: dbt and SQL File tasks support only version-controlled sources. If // dbt or SQL File tasks are used, `git_source` must be defined on the job. GitSource *GitSource `json:"git_source,omitempty"` + // Only populated by for-each iterations. The parent for-each task is + // located in tasks array. + Iterations []RunTask `json:"iterations,omitempty"` // A list of job cluster specifications that can be shared and reused by // tasks of this job. Libraries cannot be declared in a shared job cluster. // You must declare dependent libraries in task settings. @@ -2161,6 +2167,8 @@ type Run struct { JobId int64 `json:"job_id,omitempty"` // Job-level parameters used in the run JobParameters []JobParameter `json:"job_parameters,omitempty"` + // A token that can be used to list the next page of sub-resources. + NextPageToken string `json:"next_page_token,omitempty"` // A unique identifier for this job run. This is set to the same value as // `run_id`. NumberInJob int64 `json:"number_in_job,omitempty"` @@ -2169,6 +2177,8 @@ type Run struct { OriginalAttemptRunId int64 `json:"original_attempt_run_id,omitempty"` // The parameters used for this run. OverridingParameters *RunParameters `json:"overriding_parameters,omitempty"` + // A token that can be used to list the previous page of sub-resources. + PrevPageToken string `json:"prev_page_token,omitempty"` // The time in milliseconds that the run has spent in the queue. QueueDuration int64 `json:"queue_duration,omitempty"` // The repair history of the run. @@ -3494,7 +3504,7 @@ func (s SqlTaskSubscription) MarshalJSON() ([]byte, error) { type SubmitRun struct { // List of permissions to set on the job. - AccessControlList []iam.AccessControlRequest `json:"access_control_list,omitempty"` + AccessControlList []JobAccessControlRequest `json:"access_control_list,omitempty"` // An optional set of email addresses notified when the run begins or // completes. EmailNotifications *JobEmailNotifications `json:"email_notifications,omitempty"` diff --git a/service/pipelines/model.go b/service/pipelines/model.go index e68804b2a..067608e41 100755 --- a/service/pipelines/model.go +++ b/service/pipelines/model.go @@ -43,7 +43,7 @@ type CreatePipeline struct { Id string `json:"id,omitempty"` // The configuration for a managed ingestion pipeline. These settings cannot // be used with the 'libraries', 'target' or 'catalog' settings. - IngestionDefinition *ManagedIngestionPipelineDefinition `json:"ingestion_definition,omitempty"` + IngestionDefinition *IngestionPipelineDefinition `json:"ingestion_definition,omitempty"` // Libraries or code needed by this deployment. Libraries []PipelineLibrary `json:"libraries,omitempty"` // Friendly identifier for this pipeline. @@ -196,7 +196,7 @@ type EditPipeline struct { Id string `json:"id,omitempty"` // The configuration for a managed ingestion pipeline. These settings cannot // be used with the 'libraries', 'target' or 'catalog' settings. - IngestionDefinition *ManagedIngestionPipelineDefinition `json:"ingestion_definition,omitempty"` + IngestionDefinition *IngestionPipelineDefinition `json:"ingestion_definition,omitempty"` // Libraries or code needed by this deployment. Libraries []PipelineLibrary `json:"libraries,omitempty"` // Friendly identifier for this pipeline. @@ -417,7 +417,7 @@ type IngestionGatewayPipelineDefinition struct { // Required, Immutable. The name of the catalog for the gateway pipeline's // storage location. GatewayStorageCatalog string `json:"gateway_storage_catalog,omitempty"` - // Required. The Unity Catalog-compatible naming for the gateway storage + // Optional. The Unity Catalog-compatible name for the gateway storage // location. This is the destination to use for the data that is extracted // by the gateway. Delta Live Tables system will automatically create the // storage location under the catalog and schema. @@ -437,6 +437,33 @@ func (s IngestionGatewayPipelineDefinition) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +type IngestionPipelineDefinition struct { + // Immutable. The Unity Catalog connection this ingestion pipeline uses to + // communicate with the source. Specify either ingestion_gateway_id or + // connection_name. + ConnectionName string `json:"connection_name,omitempty"` + // Immutable. Identifier for the ingestion gateway used by this ingestion + // pipeline to communicate with the source. Specify either + // ingestion_gateway_id or connection_name. + IngestionGatewayId string `json:"ingestion_gateway_id,omitempty"` + // Required. Settings specifying tables to replicate and the destination for + // the replicated tables. + Objects []IngestionConfig `json:"objects,omitempty"` + // Configuration settings to control the ingestion of tables. These settings + // are applied to all tables in the pipeline. + TableConfiguration *TableSpecificConfig `json:"table_configuration,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *IngestionPipelineDefinition) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s IngestionPipelineDefinition) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + // List pipeline events type ListPipelineEventsRequest struct { // Criteria to select a subset of results, expressed using a SQL-like @@ -588,33 +615,6 @@ func (s ListUpdatesResponse) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } -type ManagedIngestionPipelineDefinition struct { - // Immutable. The Unity Catalog connection this ingestion pipeline uses to - // communicate with the source. Specify either ingestion_gateway_id or - // connection_name. - ConnectionName string `json:"connection_name,omitempty"` - // Immutable. Identifier for the ingestion gateway used by this ingestion - // pipeline to communicate with the source. Specify either - // ingestion_gateway_id or connection_name. - IngestionGatewayId string `json:"ingestion_gateway_id,omitempty"` - // Required. Settings specifying tables to replicate and the destination for - // the replicated tables. - Objects []IngestionConfig `json:"objects,omitempty"` - // Configuration settings to control the ingestion of tables. These settings - // are applied to all tables in the pipeline. - TableConfiguration *TableSpecificConfig `json:"table_configuration,omitempty"` - - ForceSendFields []string `json:"-"` -} - -func (s *ManagedIngestionPipelineDefinition) UnmarshalJSON(b []byte) error { - return marshal.Unmarshal(b, s) -} - -func (s ManagedIngestionPipelineDefinition) MarshalJSON() ([]byte, error) { - return marshal.Marshal(s) -} - type ManualTrigger struct { } @@ -1115,7 +1115,7 @@ type PipelineSpec struct { Id string `json:"id,omitempty"` // The configuration for a managed ingestion pipeline. These settings cannot // be used with the 'libraries', 'target' or 'catalog' settings. - IngestionDefinition *ManagedIngestionPipelineDefinition `json:"ingestion_definition,omitempty"` + IngestionDefinition *IngestionPipelineDefinition `json:"ingestion_definition,omitempty"` // Libraries or code needed by this deployment. Libraries []PipelineLibrary `json:"libraries,omitempty"` // Friendly identifier for this pipeline. @@ -1267,8 +1267,7 @@ type SchemaSpec struct { SourceSchema string `json:"source_schema,omitempty"` // Configuration settings to control the ingestion of tables. These settings // are applied to all tables in this schema and override the - // table_configuration defined in the ManagedIngestionPipelineDefinition - // object. + // table_configuration defined in the IngestionPipelineDefinition object. TableConfiguration *TableSpecificConfig `json:"table_configuration,omitempty"` ForceSendFields []string `json:"-"` @@ -1444,7 +1443,7 @@ type TableSpec struct { SourceTable string `json:"source_table,omitempty"` // Configuration settings to control the ingestion of tables. These settings // override the table_configuration defined in the - // ManagedIngestionPipelineDefinition object and the SchemaSpec. + // IngestionPipelineDefinition object and the SchemaSpec. TableConfiguration *TableSpecificConfig `json:"table_configuration,omitempty"` ForceSendFields []string `json:"-"` diff --git a/service/pkg.go b/service/pkg.go index 5020ccbf1..56afa4ea3 100644 --- a/service/pkg.go +++ b/service/pkg.go @@ -8,7 +8,7 @@ // // - [sql.AlertsLegacyAPI]: The alerts API can be used to perform CRUD operations on alerts. // -// - [serving.AppsAPI]: Apps run directly on a customer’s Databricks instance, integrate with their data, use and extend Databricks services, and enable users to interact through single sign-on. +// - [apps.AppsAPI]: Apps run directly on a customer’s Databricks instance, integrate with their data, use and extend Databricks services, and enable users to interact through single sign-on. // // - [catalog.ArtifactAllowlistsAPI]: In Databricks Runtime 13.3 and above, you can add libraries and init scripts to the `allowlist` in UC so that users can leverage these artifacts on compute configured with shared access mode. // @@ -244,6 +244,7 @@ package service import ( + "github.com/databricks/databricks-sdk-go/service/apps" "github.com/databricks/databricks-sdk-go/service/billing" "github.com/databricks/databricks-sdk-go/service/catalog" "github.com/databricks/databricks-sdk-go/service/compute" @@ -273,7 +274,7 @@ var ( _ *iam.AccountAccessControlProxyAPI = nil _ *sql.AlertsAPI = nil _ *sql.AlertsLegacyAPI = nil - _ *serving.AppsAPI = nil + _ *apps.AppsAPI = nil _ *catalog.ArtifactAllowlistsAPI = nil _ *settings.AutomaticClusterUpdateAPI = nil _ *billing.BillableUsageAPI = nil diff --git a/service/serving/api.go b/service/serving/api.go index dbb3ef2c5..0b9e37ab5 100755 --- a/service/serving/api.go +++ b/service/serving/api.go @@ -1,6 +1,6 @@ // Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. -// These APIs allow you to manage Apps, Serving Endpoints, Serving Endpoints Data Plane, etc. +// These APIs allow you to manage Serving Endpoints, Serving Endpoints Data Plane, etc. package serving import ( @@ -15,482 +15,6 @@ import ( "github.com/databricks/databricks-sdk-go/useragent" ) -type AppsInterface interface { - - // WaitGetAppIdle repeatedly calls [AppsAPI.Get] and waits to reach IDLE state - WaitGetAppIdle(ctx context.Context, name string, - timeout time.Duration, callback func(*App)) (*App, error) - - // WaitGetDeploymentAppSucceeded repeatedly calls [AppsAPI.GetDeployment] and waits to reach SUCCEEDED state - WaitGetDeploymentAppSucceeded(ctx context.Context, appName string, deploymentId string, - timeout time.Duration, callback func(*AppDeployment)) (*AppDeployment, error) - - // Create an app. - // - // Creates a new app. - Create(ctx context.Context, createAppRequest CreateAppRequest) (*WaitGetAppIdle[App], error) - - // Calls [AppsAPIInterface.Create] and waits to reach IDLE state - // - // You can override the default timeout of 20 minutes by calling adding - // retries.Timeout[App](60*time.Minute) functional option. - // - // Deprecated: use [AppsAPIInterface.Create].Get() or [AppsAPIInterface.WaitGetAppIdle] - CreateAndWait(ctx context.Context, createAppRequest CreateAppRequest, options ...retries.Option[App]) (*App, error) - - // Delete an app. - // - // Deletes an app. - Delete(ctx context.Context, request DeleteAppRequest) error - - // Delete an app. - // - // Deletes an app. - DeleteByName(ctx context.Context, name string) error - - // Create an app deployment. - // - // Creates an app deployment for the app with the supplied name. - Deploy(ctx context.Context, createAppDeploymentRequest CreateAppDeploymentRequest) (*WaitGetDeploymentAppSucceeded[AppDeployment], error) - - // Calls [AppsAPIInterface.Deploy] and waits to reach SUCCEEDED state - // - // You can override the default timeout of 20 minutes by calling adding - // retries.Timeout[AppDeployment](60*time.Minute) functional option. - // - // Deprecated: use [AppsAPIInterface.Deploy].Get() or [AppsAPIInterface.WaitGetDeploymentAppSucceeded] - DeployAndWait(ctx context.Context, createAppDeploymentRequest CreateAppDeploymentRequest, options ...retries.Option[AppDeployment]) (*AppDeployment, error) - - // Get an app. - // - // Retrieves information for the app with the supplied name. - Get(ctx context.Context, request GetAppRequest) (*App, error) - - // Get an app. - // - // Retrieves information for the app with the supplied name. - GetByName(ctx context.Context, name string) (*App, error) - - // Get an app deployment. - // - // Retrieves information for the app deployment with the supplied name and - // deployment id. - GetDeployment(ctx context.Context, request GetAppDeploymentRequest) (*AppDeployment, error) - - // Get an app deployment. - // - // Retrieves information for the app deployment with the supplied name and - // deployment id. - GetDeploymentByAppNameAndDeploymentId(ctx context.Context, appName string, deploymentId string) (*AppDeployment, error) - - // Get app environment. - // - // Retrieves app environment. - GetEnvironment(ctx context.Context, request GetAppEnvironmentRequest) (*AppEnvironment, error) - - // Get app environment. - // - // Retrieves app environment. - GetEnvironmentByName(ctx context.Context, name string) (*AppEnvironment, error) - - // List apps. - // - // Lists all apps in the workspace. - // - // This method is generated by Databricks SDK Code Generator. - List(ctx context.Context, request ListAppsRequest) listing.Iterator[App] - - // List apps. - // - // Lists all apps in the workspace. - // - // This method is generated by Databricks SDK Code Generator. - ListAll(ctx context.Context, request ListAppsRequest) ([]App, error) - - // List app deployments. - // - // Lists all app deployments for the app with the supplied name. - // - // This method is generated by Databricks SDK Code Generator. - ListDeployments(ctx context.Context, request ListAppDeploymentsRequest) listing.Iterator[AppDeployment] - - // List app deployments. - // - // Lists all app deployments for the app with the supplied name. - // - // This method is generated by Databricks SDK Code Generator. - ListDeploymentsAll(ctx context.Context, request ListAppDeploymentsRequest) ([]AppDeployment, error) - - // List app deployments. - // - // Lists all app deployments for the app with the supplied name. - ListDeploymentsByAppName(ctx context.Context, appName string) (*ListAppDeploymentsResponse, error) - - // Start an app. - // - // Start the last active deployment of the app in the workspace. - Start(ctx context.Context, request StartAppRequest) (*AppDeployment, error) - - // Stop an app. - // - // Stops the active deployment of the app in the workspace. - Stop(ctx context.Context, request StopAppRequest) error - - // Update an app. - // - // Updates the app with the supplied name. - Update(ctx context.Context, request UpdateAppRequest) (*App, error) -} - -func NewApps(client *client.DatabricksClient) *AppsAPI { - return &AppsAPI{ - appsImpl: appsImpl{ - client: client, - }, - } -} - -// Apps run directly on a customer’s Databricks instance, integrate with their -// data, use and extend Databricks services, and enable users to interact -// through single sign-on. -type AppsAPI struct { - appsImpl -} - -// WaitGetAppIdle repeatedly calls [AppsAPI.Get] and waits to reach IDLE state -func (a *AppsAPI) WaitGetAppIdle(ctx context.Context, name string, - timeout time.Duration, callback func(*App)) (*App, error) { - ctx = useragent.InContext(ctx, "sdk-feature", "long-running") - return retries.Poll[App](ctx, timeout, func() (*App, *retries.Err) { - app, err := a.Get(ctx, GetAppRequest{ - Name: name, - }) - if err != nil { - return nil, retries.Halt(err) - } - if callback != nil { - callback(app) - } - status := app.Status.State - statusMessage := fmt.Sprintf("current status: %s", status) - if app.Status != nil { - statusMessage = app.Status.Message - } - switch status { - case AppStateIdle: // target state - return app, nil - case AppStateError: - err := fmt.Errorf("failed to reach %s, got %s: %s", - AppStateIdle, status, statusMessage) - return nil, retries.Halt(err) - default: - return nil, retries.Continues(statusMessage) - } - }) -} - -// WaitGetAppIdle is a wrapper that calls [AppsAPI.WaitGetAppIdle] and waits to reach IDLE state. -type WaitGetAppIdle[R any] struct { - Response *R - Name string `json:"name"` - Poll func(time.Duration, func(*App)) (*App, error) - callback func(*App) - timeout time.Duration -} - -// OnProgress invokes a callback every time it polls for the status update. -func (w *WaitGetAppIdle[R]) OnProgress(callback func(*App)) *WaitGetAppIdle[R] { - w.callback = callback - return w -} - -// Get the App with the default timeout of 20 minutes. -func (w *WaitGetAppIdle[R]) Get() (*App, error) { - return w.Poll(w.timeout, w.callback) -} - -// Get the App with custom timeout. -func (w *WaitGetAppIdle[R]) GetWithTimeout(timeout time.Duration) (*App, error) { - return w.Poll(timeout, w.callback) -} - -// WaitGetDeploymentAppSucceeded repeatedly calls [AppsAPI.GetDeployment] and waits to reach SUCCEEDED state -func (a *AppsAPI) WaitGetDeploymentAppSucceeded(ctx context.Context, appName string, deploymentId string, - timeout time.Duration, callback func(*AppDeployment)) (*AppDeployment, error) { - ctx = useragent.InContext(ctx, "sdk-feature", "long-running") - return retries.Poll[AppDeployment](ctx, timeout, func() (*AppDeployment, *retries.Err) { - appDeployment, err := a.GetDeployment(ctx, GetAppDeploymentRequest{ - AppName: appName, - DeploymentId: deploymentId, - }) - if err != nil { - return nil, retries.Halt(err) - } - if callback != nil { - callback(appDeployment) - } - status := appDeployment.Status.State - statusMessage := fmt.Sprintf("current status: %s", status) - if appDeployment.Status != nil { - statusMessage = appDeployment.Status.Message - } - switch status { - case AppDeploymentStateSucceeded: // target state - return appDeployment, nil - case AppDeploymentStateFailed: - err := fmt.Errorf("failed to reach %s, got %s: %s", - AppDeploymentStateSucceeded, status, statusMessage) - return nil, retries.Halt(err) - default: - return nil, retries.Continues(statusMessage) - } - }) -} - -// WaitGetDeploymentAppSucceeded is a wrapper that calls [AppsAPI.WaitGetDeploymentAppSucceeded] and waits to reach SUCCEEDED state. -type WaitGetDeploymentAppSucceeded[R any] struct { - Response *R - AppName string `json:"app_name"` - DeploymentId string `json:"deployment_id"` - Poll func(time.Duration, func(*AppDeployment)) (*AppDeployment, error) - callback func(*AppDeployment) - timeout time.Duration -} - -// OnProgress invokes a callback every time it polls for the status update. -func (w *WaitGetDeploymentAppSucceeded[R]) OnProgress(callback func(*AppDeployment)) *WaitGetDeploymentAppSucceeded[R] { - w.callback = callback - return w -} - -// Get the AppDeployment with the default timeout of 20 minutes. -func (w *WaitGetDeploymentAppSucceeded[R]) Get() (*AppDeployment, error) { - return w.Poll(w.timeout, w.callback) -} - -// Get the AppDeployment with custom timeout. -func (w *WaitGetDeploymentAppSucceeded[R]) GetWithTimeout(timeout time.Duration) (*AppDeployment, error) { - return w.Poll(timeout, w.callback) -} - -// Create an app. -// -// Creates a new app. -func (a *AppsAPI) Create(ctx context.Context, createAppRequest CreateAppRequest) (*WaitGetAppIdle[App], error) { - app, err := a.appsImpl.Create(ctx, createAppRequest) - if err != nil { - return nil, err - } - return &WaitGetAppIdle[App]{ - Response: app, - Name: app.Name, - Poll: func(timeout time.Duration, callback func(*App)) (*App, error) { - return a.WaitGetAppIdle(ctx, app.Name, timeout, callback) - }, - timeout: 20 * time.Minute, - callback: nil, - }, nil -} - -// Calls [AppsAPI.Create] and waits to reach IDLE state -// -// You can override the default timeout of 20 minutes by calling adding -// retries.Timeout[App](60*time.Minute) functional option. -// -// Deprecated: use [AppsAPI.Create].Get() or [AppsAPI.WaitGetAppIdle] -func (a *AppsAPI) CreateAndWait(ctx context.Context, createAppRequest CreateAppRequest, options ...retries.Option[App]) (*App, error) { - wait, err := a.Create(ctx, createAppRequest) - if err != nil { - return nil, err - } - tmp := &retries.Info[App]{Timeout: 20 * time.Minute} - for _, o := range options { - o(tmp) - } - wait.timeout = tmp.Timeout - wait.callback = func(info *App) { - for _, o := range options { - o(&retries.Info[App]{ - Info: info, - Timeout: wait.timeout, - }) - } - } - return wait.Get() -} - -// Delete an app. -// -// Deletes an app. -func (a *AppsAPI) DeleteByName(ctx context.Context, name string) error { - return a.appsImpl.Delete(ctx, DeleteAppRequest{ - Name: name, - }) -} - -// Create an app deployment. -// -// Creates an app deployment for the app with the supplied name. -func (a *AppsAPI) Deploy(ctx context.Context, createAppDeploymentRequest CreateAppDeploymentRequest) (*WaitGetDeploymentAppSucceeded[AppDeployment], error) { - appDeployment, err := a.appsImpl.Deploy(ctx, createAppDeploymentRequest) - if err != nil { - return nil, err - } - return &WaitGetDeploymentAppSucceeded[AppDeployment]{ - Response: appDeployment, - AppName: createAppDeploymentRequest.AppName, - DeploymentId: appDeployment.DeploymentId, - Poll: func(timeout time.Duration, callback func(*AppDeployment)) (*AppDeployment, error) { - return a.WaitGetDeploymentAppSucceeded(ctx, createAppDeploymentRequest.AppName, appDeployment.DeploymentId, timeout, callback) - }, - timeout: 20 * time.Minute, - callback: nil, - }, nil -} - -// Calls [AppsAPI.Deploy] and waits to reach SUCCEEDED state -// -// You can override the default timeout of 20 minutes by calling adding -// retries.Timeout[AppDeployment](60*time.Minute) functional option. -// -// Deprecated: use [AppsAPI.Deploy].Get() or [AppsAPI.WaitGetDeploymentAppSucceeded] -func (a *AppsAPI) DeployAndWait(ctx context.Context, createAppDeploymentRequest CreateAppDeploymentRequest, options ...retries.Option[AppDeployment]) (*AppDeployment, error) { - wait, err := a.Deploy(ctx, createAppDeploymentRequest) - if err != nil { - return nil, err - } - tmp := &retries.Info[AppDeployment]{Timeout: 20 * time.Minute} - for _, o := range options { - o(tmp) - } - wait.timeout = tmp.Timeout - wait.callback = func(info *AppDeployment) { - for _, o := range options { - o(&retries.Info[AppDeployment]{ - Info: info, - Timeout: wait.timeout, - }) - } - } - return wait.Get() -} - -// Get an app. -// -// Retrieves information for the app with the supplied name. -func (a *AppsAPI) GetByName(ctx context.Context, name string) (*App, error) { - return a.appsImpl.Get(ctx, GetAppRequest{ - Name: name, - }) -} - -// Get an app deployment. -// -// Retrieves information for the app deployment with the supplied name and -// deployment id. -func (a *AppsAPI) GetDeploymentByAppNameAndDeploymentId(ctx context.Context, appName string, deploymentId string) (*AppDeployment, error) { - return a.appsImpl.GetDeployment(ctx, GetAppDeploymentRequest{ - AppName: appName, - DeploymentId: deploymentId, - }) -} - -// Get app environment. -// -// Retrieves app environment. -func (a *AppsAPI) GetEnvironmentByName(ctx context.Context, name string) (*AppEnvironment, error) { - return a.appsImpl.GetEnvironment(ctx, GetAppEnvironmentRequest{ - Name: name, - }) -} - -// List apps. -// -// Lists all apps in the workspace. -// -// This method is generated by Databricks SDK Code Generator. -func (a *AppsAPI) List(ctx context.Context, request ListAppsRequest) listing.Iterator[App] { - - getNextPage := func(ctx context.Context, req ListAppsRequest) (*ListAppsResponse, error) { - ctx = useragent.InContext(ctx, "sdk-feature", "pagination") - return a.appsImpl.List(ctx, req) - } - getItems := func(resp *ListAppsResponse) []App { - return resp.Apps - } - getNextReq := func(resp *ListAppsResponse) *ListAppsRequest { - if resp.NextPageToken == "" { - return nil - } - request.PageToken = resp.NextPageToken - return &request - } - iterator := listing.NewIterator( - &request, - getNextPage, - getItems, - getNextReq) - return iterator -} - -// List apps. -// -// Lists all apps in the workspace. -// -// This method is generated by Databricks SDK Code Generator. -func (a *AppsAPI) ListAll(ctx context.Context, request ListAppsRequest) ([]App, error) { - iterator := a.List(ctx, request) - return listing.ToSlice[App](ctx, iterator) -} - -// List app deployments. -// -// Lists all app deployments for the app with the supplied name. -// -// This method is generated by Databricks SDK Code Generator. -func (a *AppsAPI) ListDeployments(ctx context.Context, request ListAppDeploymentsRequest) listing.Iterator[AppDeployment] { - - getNextPage := func(ctx context.Context, req ListAppDeploymentsRequest) (*ListAppDeploymentsResponse, error) { - ctx = useragent.InContext(ctx, "sdk-feature", "pagination") - return a.appsImpl.ListDeployments(ctx, req) - } - getItems := func(resp *ListAppDeploymentsResponse) []AppDeployment { - return resp.AppDeployments - } - getNextReq := func(resp *ListAppDeploymentsResponse) *ListAppDeploymentsRequest { - if resp.NextPageToken == "" { - return nil - } - request.PageToken = resp.NextPageToken - return &request - } - iterator := listing.NewIterator( - &request, - getNextPage, - getItems, - getNextReq) - return iterator -} - -// List app deployments. -// -// Lists all app deployments for the app with the supplied name. -// -// This method is generated by Databricks SDK Code Generator. -func (a *AppsAPI) ListDeploymentsAll(ctx context.Context, request ListAppDeploymentsRequest) ([]AppDeployment, error) { - iterator := a.ListDeployments(ctx, request) - return listing.ToSlice[AppDeployment](ctx, iterator) -} - -// List app deployments. -// -// Lists all app deployments for the app with the supplied name. -func (a *AppsAPI) ListDeploymentsByAppName(ctx context.Context, appName string) (*ListAppDeploymentsResponse, error) { - return a.appsImpl.ListDeployments(ctx, ListAppDeploymentsRequest{ - AppName: appName, - }) -} - type ServingEndpointsInterface interface { // WaitGetServingEndpointNotUpdating repeatedly calls [ServingEndpointsAPI.Get] and waits to reach NOT_UPDATING state diff --git a/service/serving/impl.go b/service/serving/impl.go index 65ddf3f5e..812ae7f6f 100755 --- a/service/serving/impl.go +++ b/service/serving/impl.go @@ -15,115 +15,6 @@ import ( "github.com/databricks/databricks-sdk-go/service/oauth2" ) -// unexported type that holds implementations of just Apps API methods -type appsImpl struct { - client *client.DatabricksClient -} - -func (a *appsImpl) Create(ctx context.Context, request CreateAppRequest) (*App, error) { - var app App - path := "/api/2.0/preview/apps" - headers := make(map[string]string) - headers["Accept"] = "application/json" - headers["Content-Type"] = "application/json" - err := a.client.Do(ctx, http.MethodPost, path, headers, request, &app) - return &app, err -} - -func (a *appsImpl) Delete(ctx context.Context, request DeleteAppRequest) error { - var deleteResponse DeleteResponse - path := fmt.Sprintf("/api/2.0/preview/apps/%v", request.Name) - headers := make(map[string]string) - headers["Accept"] = "application/json" - err := a.client.Do(ctx, http.MethodDelete, path, headers, request, &deleteResponse) - return err -} - -func (a *appsImpl) Deploy(ctx context.Context, request CreateAppDeploymentRequest) (*AppDeployment, error) { - var appDeployment AppDeployment - path := fmt.Sprintf("/api/2.0/preview/apps/%v/deployments", request.AppName) - headers := make(map[string]string) - headers["Accept"] = "application/json" - headers["Content-Type"] = "application/json" - err := a.client.Do(ctx, http.MethodPost, path, headers, request, &appDeployment) - return &appDeployment, err -} - -func (a *appsImpl) Get(ctx context.Context, request GetAppRequest) (*App, error) { - var app App - path := fmt.Sprintf("/api/2.0/preview/apps/%v", request.Name) - headers := make(map[string]string) - headers["Accept"] = "application/json" - err := a.client.Do(ctx, http.MethodGet, path, headers, request, &app) - return &app, err -} - -func (a *appsImpl) GetDeployment(ctx context.Context, request GetAppDeploymentRequest) (*AppDeployment, error) { - var appDeployment AppDeployment - path := fmt.Sprintf("/api/2.0/preview/apps/%v/deployments/%v", request.AppName, request.DeploymentId) - headers := make(map[string]string) - headers["Accept"] = "application/json" - err := a.client.Do(ctx, http.MethodGet, path, headers, request, &appDeployment) - return &appDeployment, err -} - -func (a *appsImpl) GetEnvironment(ctx context.Context, request GetAppEnvironmentRequest) (*AppEnvironment, error) { - var appEnvironment AppEnvironment - path := fmt.Sprintf("/api/2.0/preview/apps/%v/environment", request.Name) - headers := make(map[string]string) - headers["Accept"] = "application/json" - err := a.client.Do(ctx, http.MethodGet, path, headers, request, &appEnvironment) - return &appEnvironment, err -} - -func (a *appsImpl) List(ctx context.Context, request ListAppsRequest) (*ListAppsResponse, error) { - var listAppsResponse ListAppsResponse - path := "/api/2.0/preview/apps" - headers := make(map[string]string) - headers["Accept"] = "application/json" - err := a.client.Do(ctx, http.MethodGet, path, headers, request, &listAppsResponse) - return &listAppsResponse, err -} - -func (a *appsImpl) ListDeployments(ctx context.Context, request ListAppDeploymentsRequest) (*ListAppDeploymentsResponse, error) { - var listAppDeploymentsResponse ListAppDeploymentsResponse - path := fmt.Sprintf("/api/2.0/preview/apps/%v/deployments", request.AppName) - headers := make(map[string]string) - headers["Accept"] = "application/json" - err := a.client.Do(ctx, http.MethodGet, path, headers, request, &listAppDeploymentsResponse) - return &listAppDeploymentsResponse, err -} - -func (a *appsImpl) Start(ctx context.Context, request StartAppRequest) (*AppDeployment, error) { - var appDeployment AppDeployment - path := fmt.Sprintf("/api/2.0/preview/apps/%v/start", request.Name) - headers := make(map[string]string) - headers["Accept"] = "application/json" - headers["Content-Type"] = "application/json" - err := a.client.Do(ctx, http.MethodPost, path, headers, request, &appDeployment) - return &appDeployment, err -} - -func (a *appsImpl) Stop(ctx context.Context, request StopAppRequest) error { - var stopAppResponse StopAppResponse - path := fmt.Sprintf("/api/2.0/preview/apps/%v/stop", request.Name) - headers := make(map[string]string) - headers["Accept"] = "application/json" - headers["Content-Type"] = "application/json" - err := a.client.Do(ctx, http.MethodPost, path, headers, request, &stopAppResponse) - return err -} - -func (a *appsImpl) Update(ctx context.Context, request UpdateAppRequest) (*App, error) { - var app App - path := fmt.Sprintf("/api/2.0/preview/apps/%v", request.Name) - headers := make(map[string]string) - headers["Accept"] = "application/json" - headers["Content-Type"] = "application/json" - err := a.client.Do(ctx, http.MethodPatch, path, headers, request, &app) - return &app, err -} - // unexported type that holds implementations of just ServingEndpoints API methods type servingEndpointsImpl struct { client *client.DatabricksClient diff --git a/service/serving/interface.go b/service/serving/interface.go index 727ce8876..1f3185047 100755 --- a/service/serving/interface.go +++ b/service/serving/interface.go @@ -6,72 +6,6 @@ import ( "context" ) -// Apps run directly on a customer’s Databricks instance, integrate with their -// data, use and extend Databricks services, and enable users to interact -// through single sign-on. -type AppsService interface { - - // Create an app. - // - // Creates a new app. - Create(ctx context.Context, request CreateAppRequest) (*App, error) - - // Delete an app. - // - // Deletes an app. - Delete(ctx context.Context, request DeleteAppRequest) error - - // Create an app deployment. - // - // Creates an app deployment for the app with the supplied name. - Deploy(ctx context.Context, request CreateAppDeploymentRequest) (*AppDeployment, error) - - // Get an app. - // - // Retrieves information for the app with the supplied name. - Get(ctx context.Context, request GetAppRequest) (*App, error) - - // Get an app deployment. - // - // Retrieves information for the app deployment with the supplied name and - // deployment id. - GetDeployment(ctx context.Context, request GetAppDeploymentRequest) (*AppDeployment, error) - - // Get app environment. - // - // Retrieves app environment. - GetEnvironment(ctx context.Context, request GetAppEnvironmentRequest) (*AppEnvironment, error) - - // List apps. - // - // Lists all apps in the workspace. - // - // Use ListAll() to get all App instances, which will iterate over every result page. - List(ctx context.Context, request ListAppsRequest) (*ListAppsResponse, error) - - // List app deployments. - // - // Lists all app deployments for the app with the supplied name. - // - // Use ListDeploymentsAll() to get all AppDeployment instances, which will iterate over every result page. - ListDeployments(ctx context.Context, request ListAppDeploymentsRequest) (*ListAppDeploymentsResponse, error) - - // Start an app. - // - // Start the last active deployment of the app in the workspace. - Start(ctx context.Context, request StartAppRequest) (*AppDeployment, error) - - // Stop an app. - // - // Stops the active deployment of the app in the workspace. - Stop(ctx context.Context, request StopAppRequest) error - - // Update an app. - // - // Updates the app with the supplied name. - Update(ctx context.Context, request UpdateAppRequest) (*App, error) -} - // The Serving Endpoints API allows you to create, update, and delete model // serving endpoints. // diff --git a/service/serving/model.go b/service/serving/model.go index 2c9a06bc7..f481113c0 100755 --- a/service/serving/model.go +++ b/service/serving/model.go @@ -133,228 +133,6 @@ func (s AnthropicConfig) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } -type App struct { - // The active deployment of the app. - ActiveDeployment *AppDeployment `json:"active_deployment,omitempty"` - // The creation time of the app. Formatted timestamp in ISO 6801. - CreateTime string `json:"create_time,omitempty"` - // The email of the user that created the app. - Creator string `json:"creator,omitempty"` - // The description of the app. - Description string `json:"description,omitempty"` - // The name of the app. The name must contain only lowercase alphanumeric - // characters and hyphens. It must be unique within the workspace. - Name string `json:"name"` - // The pending deployment of the app. - PendingDeployment *AppDeployment `json:"pending_deployment,omitempty"` - - ServicePrincipalId int64 `json:"service_principal_id,omitempty"` - - ServicePrincipalName string `json:"service_principal_name,omitempty"` - - Status *AppStatus `json:"status,omitempty"` - // The update time of the app. Formatted timestamp in ISO 6801. - UpdateTime string `json:"update_time,omitempty"` - // The email of the user that last updated the app. - Updater string `json:"updater,omitempty"` - // The URL of the app once it is deployed. - Url string `json:"url,omitempty"` - - ForceSendFields []string `json:"-"` -} - -func (s *App) UnmarshalJSON(b []byte) error { - return marshal.Unmarshal(b, s) -} - -func (s App) MarshalJSON() ([]byte, error) { - return marshal.Marshal(s) -} - -type AppDeployment struct { - // The creation time of the deployment. Formatted timestamp in ISO 6801. - CreateTime string `json:"create_time,omitempty"` - // The email of the user creates the deployment. - Creator string `json:"creator,omitempty"` - // The deployment artifacts for an app. - DeploymentArtifacts *AppDeploymentArtifacts `json:"deployment_artifacts,omitempty"` - // The unique id of the deployment. - DeploymentId string `json:"deployment_id,omitempty"` - // The mode of which the deployment will manage the source code. - Mode AppDeploymentMode `json:"mode"` - // The workspace file system path of the source code used to create the app - // deployment. This is different from - // `deployment_artifacts.source_code_path`, which is the path used by the - // deployed app. The former refers to the original source code location of - // the app in the workspace during deployment creation, whereas the latter - // provides a system generated stable snapshotted source code path used by - // the deployment. - SourceCodePath string `json:"source_code_path"` - // Status and status message of the deployment - Status *AppDeploymentStatus `json:"status,omitempty"` - // The update time of the deployment. Formatted timestamp in ISO 6801. - UpdateTime string `json:"update_time,omitempty"` - - ForceSendFields []string `json:"-"` -} - -func (s *AppDeployment) UnmarshalJSON(b []byte) error { - return marshal.Unmarshal(b, s) -} - -func (s AppDeployment) MarshalJSON() ([]byte, error) { - return marshal.Marshal(s) -} - -type AppDeploymentArtifacts struct { - // The snapshotted workspace file system path of the source code loaded by - // the deployed app. - SourceCodePath string `json:"source_code_path,omitempty"` - - ForceSendFields []string `json:"-"` -} - -func (s *AppDeploymentArtifacts) UnmarshalJSON(b []byte) error { - return marshal.Unmarshal(b, s) -} - -func (s AppDeploymentArtifacts) MarshalJSON() ([]byte, error) { - return marshal.Marshal(s) -} - -type AppDeploymentMode string - -const AppDeploymentModeAutoSync AppDeploymentMode = `AUTO_SYNC` - -const AppDeploymentModeSnapshot AppDeploymentMode = `SNAPSHOT` - -// String representation for [fmt.Print] -func (f *AppDeploymentMode) String() string { - return string(*f) -} - -// Set raw string value and validate it against allowed values -func (f *AppDeploymentMode) Set(v string) error { - switch v { - case `AUTO_SYNC`, `SNAPSHOT`: - *f = AppDeploymentMode(v) - return nil - default: - return fmt.Errorf(`value "%s" is not one of "AUTO_SYNC", "SNAPSHOT"`, v) - } -} - -// Type always returns AppDeploymentMode to satisfy [pflag.Value] interface -func (f *AppDeploymentMode) Type() string { - return "AppDeploymentMode" -} - -type AppDeploymentState string - -const AppDeploymentStateFailed AppDeploymentState = `FAILED` - -const AppDeploymentStateInProgress AppDeploymentState = `IN_PROGRESS` - -const AppDeploymentStateStopped AppDeploymentState = `STOPPED` - -const AppDeploymentStateSucceeded AppDeploymentState = `SUCCEEDED` - -// String representation for [fmt.Print] -func (f *AppDeploymentState) String() string { - return string(*f) -} - -// Set raw string value and validate it against allowed values -func (f *AppDeploymentState) Set(v string) error { - switch v { - case `FAILED`, `IN_PROGRESS`, `STOPPED`, `SUCCEEDED`: - *f = AppDeploymentState(v) - return nil - default: - return fmt.Errorf(`value "%s" is not one of "FAILED", "IN_PROGRESS", "STOPPED", "SUCCEEDED"`, v) - } -} - -// Type always returns AppDeploymentState to satisfy [pflag.Value] interface -func (f *AppDeploymentState) Type() string { - return "AppDeploymentState" -} - -type AppDeploymentStatus struct { - // Message corresponding with the deployment state. - Message string `json:"message,omitempty"` - // State of the deployment. - State AppDeploymentState `json:"state,omitempty"` - - ForceSendFields []string `json:"-"` -} - -func (s *AppDeploymentStatus) UnmarshalJSON(b []byte) error { - return marshal.Unmarshal(b, s) -} - -func (s AppDeploymentStatus) MarshalJSON() ([]byte, error) { - return marshal.Marshal(s) -} - -type AppEnvironment struct { - Env []EnvVariable `json:"env,omitempty"` -} - -type AppState string - -const AppStateCreating AppState = `CREATING` - -const AppStateDeleted AppState = `DELETED` - -const AppStateDeleting AppState = `DELETING` - -const AppStateError AppState = `ERROR` - -const AppStateIdle AppState = `IDLE` - -const AppStateRunning AppState = `RUNNING` - -const AppStateStarting AppState = `STARTING` - -// String representation for [fmt.Print] -func (f *AppState) String() string { - return string(*f) -} - -// Set raw string value and validate it against allowed values -func (f *AppState) Set(v string) error { - switch v { - case `CREATING`, `DELETED`, `DELETING`, `ERROR`, `IDLE`, `RUNNING`, `STARTING`: - *f = AppState(v) - return nil - default: - return fmt.Errorf(`value "%s" is not one of "CREATING", "DELETED", "DELETING", "ERROR", "IDLE", "RUNNING", "STARTING"`, v) - } -} - -// Type always returns AppState to satisfy [pflag.Value] interface -func (f *AppState) Type() string { - return "AppState" -} - -type AppStatus struct { - // Message corresponding with the app state. - Message string `json:"message,omitempty"` - // State of the app. - State AppState `json:"state,omitempty"` - - ForceSendFields []string `json:"-"` -} - -func (s *AppStatus) UnmarshalJSON(b []byte) error { - return marshal.Unmarshal(b, s) -} - -func (s AppStatus) MarshalJSON() ([]byte, error) { - return marshal.Marshal(s) -} - type AutoCaptureConfigInput struct { // The name of the catalog in Unity Catalog. NOTE: On update, you cannot // change the catalog name if the inference table is already enabled. @@ -494,39 +272,6 @@ func (s CohereConfig) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } -type CreateAppDeploymentRequest struct { - // The name of the app. - AppName string `json:"-" url:"-"` - // The mode of which the deployment will manage the source code. - Mode AppDeploymentMode `json:"mode"` - // The workspace file system path of the source code used to create the app - // deployment. This is different from - // `deployment_artifacts.source_code_path`, which is the path used by the - // deployed app. The former refers to the original source code location of - // the app in the workspace during deployment creation, whereas the latter - // provides a system generated stable snapshotted source code path used by - // the deployment. - SourceCodePath string `json:"source_code_path"` -} - -type CreateAppRequest struct { - // The description of the app. - Description string `json:"description,omitempty"` - // The name of the app. The name must contain only lowercase alphanumeric - // characters and hyphens. It must be unique within the workspace. - Name string `json:"name"` - - ForceSendFields []string `json:"-"` -} - -func (s *CreateAppRequest) UnmarshalJSON(b []byte) error { - return marshal.Unmarshal(b, s) -} - -func (s CreateAppRequest) MarshalJSON() ([]byte, error) { - return marshal.Marshal(s) -} - type CreateServingEndpoint struct { // The core config of the serving endpoint. Config EndpointCoreConfigInput `json:"config"` @@ -592,12 +337,6 @@ type DataframeSplitInput struct { Index []int `json:"index,omitempty"` } -// Delete an app -type DeleteAppRequest struct { - // The name of the app. - Name string `json:"-" url:"-"` -} - type DeleteResponse struct { } @@ -828,24 +567,6 @@ func (s EndpointTag) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } -type EnvVariable struct { - Name string `json:"name,omitempty"` - - Value string `json:"value,omitempty"` - - ValueFrom string `json:"value_from,omitempty"` - - ForceSendFields []string `json:"-"` -} - -func (s *EnvVariable) UnmarshalJSON(b []byte) error { - return marshal.Unmarshal(b, s) -} - -func (s EnvVariable) MarshalJSON() ([]byte, error) { - return marshal.Marshal(s) -} - // Get metrics of a serving endpoint type ExportMetricsRequest struct { // The name of the serving endpoint to retrieve metrics for. This field is @@ -969,26 +690,6 @@ func (s FoundationModel) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } -// Get an app deployment -type GetAppDeploymentRequest struct { - // The name of the app. - AppName string `json:"-" url:"-"` - // The unique id of the deployment. - DeploymentId string `json:"-" url:"-"` -} - -// Get app environment -type GetAppEnvironmentRequest struct { - // The name of the app. - Name string `json:"-" url:"-"` -} - -// Get an app -type GetAppRequest struct { - // The name of the app. - Name string `json:"-" url:"-"` -} - // Get the schema for a serving endpoint type GetOpenApiRequest struct { // The name of the serving endpoint that the served model belongs to. This @@ -1064,79 +765,6 @@ func (s GoogleCloudVertexAiConfig) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } -// List app deployments -type ListAppDeploymentsRequest struct { - // The name of the app. - AppName string `json:"-" url:"-"` - // Upper bound for items returned. - PageSize int `json:"-" url:"page_size,omitempty"` - // Pagination token to go to the next page of apps. Requests first page if - // absent. - PageToken string `json:"-" url:"page_token,omitempty"` - - ForceSendFields []string `json:"-"` -} - -func (s *ListAppDeploymentsRequest) UnmarshalJSON(b []byte) error { - return marshal.Unmarshal(b, s) -} - -func (s ListAppDeploymentsRequest) MarshalJSON() ([]byte, error) { - return marshal.Marshal(s) -} - -type ListAppDeploymentsResponse struct { - // Deployment history of the app. - AppDeployments []AppDeployment `json:"app_deployments,omitempty"` - // Pagination token to request the next page of apps. - NextPageToken string `json:"next_page_token,omitempty"` - - ForceSendFields []string `json:"-"` -} - -func (s *ListAppDeploymentsResponse) UnmarshalJSON(b []byte) error { - return marshal.Unmarshal(b, s) -} - -func (s ListAppDeploymentsResponse) MarshalJSON() ([]byte, error) { - return marshal.Marshal(s) -} - -// List apps -type ListAppsRequest struct { - // Upper bound for items returned. - PageSize int `json:"-" url:"page_size,omitempty"` - // Pagination token to go to the next page of apps. Requests first page if - // absent. - PageToken string `json:"-" url:"page_token,omitempty"` - - ForceSendFields []string `json:"-"` -} - -func (s *ListAppsRequest) UnmarshalJSON(b []byte) error { - return marshal.Unmarshal(b, s) -} - -func (s ListAppsRequest) MarshalJSON() ([]byte, error) { - return marshal.Marshal(s) -} - -type ListAppsResponse struct { - Apps []App `json:"apps,omitempty"` - // Pagination token to request the next page of apps. - NextPageToken string `json:"next_page_token,omitempty"` - - ForceSendFields []string `json:"-"` -} - -func (s *ListAppsResponse) UnmarshalJSON(b []byte) error { - return marshal.Unmarshal(b, s) -} - -func (s ListAppsResponse) MarshalJSON() ([]byte, error) { - return marshal.Marshal(s) -} - type ListEndpointsResponse struct { // The list of endpoints. Endpoints []ServingEndpoint `json:"endpoints,omitempty"` @@ -2196,42 +1824,11 @@ type ServingEndpointPermissionsRequest struct { ServingEndpointId string `json:"-" url:"-"` } -type StartAppRequest struct { - // The name of the app. - Name string `json:"-" url:"-"` -} - -type StopAppRequest struct { - // The name of the app. - Name string `json:"-" url:"-"` -} - -type StopAppResponse struct { -} - type TrafficConfig struct { // The list of routes that define traffic to each served entity. Routes []Route `json:"routes,omitempty"` } -type UpdateAppRequest struct { - // The description of the app. - Description string `json:"description,omitempty"` - // The name of the app. The name must contain only lowercase alphanumeric - // characters and hyphens. It must be unique within the workspace. - Name string `json:"name" url:"-"` - - ForceSendFields []string `json:"-"` -} - -func (s *UpdateAppRequest) UnmarshalJSON(b []byte) error { - return marshal.Unmarshal(b, s) -} - -func (s UpdateAppRequest) MarshalJSON() ([]byte, error) { - return marshal.Marshal(s) -} - type V1ResponseChoiceElement struct { // The finish reason returned by the endpoint. FinishReason string `json:"finishReason,omitempty"` diff --git a/service/sharing/model.go b/service/sharing/model.go index 7c1b62a3f..3a1a73345 100755 --- a/service/sharing/model.go +++ b/service/sharing/model.go @@ -1519,6 +1519,28 @@ func (s UpdateShare) MarshalJSON() ([]byte, error) { type UpdateSharePermissions struct { // Array of permission changes. Changes []catalog.PermissionsChange `json:"changes,omitempty"` + // Maximum number of permissions to return. - when set to 0, the page length + // is set to a server configured value (recommended); - when set to a value + // greater than 0, the page length is the minimum of this value and a server + // configured value; - when set to a value less than 0, an invalid parameter + // error is returned; - If not set, all valid permissions are returned (not + // recommended). - Note: The number of returned permissions might be less + // than the specified max_results size, even zero. The only definitive + // indication that no further permissions can be fetched is when the + // next_page_token is unset from the response. + MaxResults int `json:"-" url:"max_results,omitempty"` // The name of the share. Name string `json:"-" url:"-"` + // Opaque pagination token to go to next page based on previous query. + PageToken string `json:"-" url:"page_token,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *UpdateSharePermissions) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s UpdateSharePermissions) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) } diff --git a/service/sql/api.go b/service/sql/api.go index c29830cae..255e668f7 100755 --- a/service/sql/api.go +++ b/service/sql/api.go @@ -229,7 +229,9 @@ type AlertsLegacyInterface interface { // notification destinations if the condition was met. // // **Note**: A new version of the Databricks SQL API is now available. Please - // use :method:alerts/create instead. + // use :method:alerts/create instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Create(ctx context.Context, request CreateAlert) (*LegacyAlert, error) // Delete an alert. @@ -239,7 +241,9 @@ type AlertsLegacyInterface interface { // the trash. // // **Note**: A new version of the Databricks SQL API is now available. Please - // use :method:alerts/delete instead. + // use :method:alerts/delete instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Delete(ctx context.Context, request DeleteAlertsLegacyRequest) error // Delete an alert. @@ -249,7 +253,9 @@ type AlertsLegacyInterface interface { // the trash. // // **Note**: A new version of the Databricks SQL API is now available. Please - // use :method:alerts/delete instead. + // use :method:alerts/delete instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html DeleteByAlertId(ctx context.Context, alertId string) error // Get an alert. @@ -257,7 +263,9 @@ type AlertsLegacyInterface interface { // Gets an alert. // // **Note**: A new version of the Databricks SQL API is now available. Please - // use :method:alerts/get instead. + // use :method:alerts/get instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Get(ctx context.Context, request GetAlertsLegacyRequest) (*LegacyAlert, error) // Get an alert. @@ -265,7 +273,9 @@ type AlertsLegacyInterface interface { // Gets an alert. // // **Note**: A new version of the Databricks SQL API is now available. Please - // use :method:alerts/get instead. + // use :method:alerts/get instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html GetByAlertId(ctx context.Context, alertId string) (*LegacyAlert, error) // Get alerts. @@ -273,7 +283,9 @@ type AlertsLegacyInterface interface { // Gets a list of alerts. // // **Note**: A new version of the Databricks SQL API is now available. Please - // use :method:alerts/list instead. + // use :method:alerts/list instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html List(ctx context.Context) ([]LegacyAlert, error) // LegacyAlertNameToIdMap calls [AlertsLegacyAPI.List] and creates a map of results with [LegacyAlert].Name as key and [LegacyAlert].Id as value. @@ -299,7 +311,9 @@ type AlertsLegacyInterface interface { // Updates an alert. // // **Note**: A new version of the Databricks SQL API is now available. Please - // use :method:alerts/update instead. + // use :method:alerts/update instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Update(ctx context.Context, request EditAlert) error } @@ -318,7 +332,9 @@ func NewAlertsLegacy(client *client.DatabricksClient) *AlertsLegacyAPI { // `sql_task` type of the Jobs API, e.g. :method:jobs/create. // // **Note**: A new version of the Databricks SQL API is now available. Please -// see the latest version. +// see the latest version. [Learn more] +// +// [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html type AlertsLegacyAPI struct { alertsLegacyImpl } @@ -330,7 +346,9 @@ type AlertsLegacyAPI struct { // the trash. // // **Note**: A new version of the Databricks SQL API is now available. Please -// use :method:alerts/delete instead. +// use :method:alerts/delete instead. [Learn more] +// +// [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html func (a *AlertsLegacyAPI) DeleteByAlertId(ctx context.Context, alertId string) error { return a.alertsLegacyImpl.Delete(ctx, DeleteAlertsLegacyRequest{ AlertId: alertId, @@ -342,7 +360,9 @@ func (a *AlertsLegacyAPI) DeleteByAlertId(ctx context.Context, alertId string) e // Gets an alert. // // **Note**: A new version of the Databricks SQL API is now available. Please -// use :method:alerts/get instead. +// use :method:alerts/get instead. [Learn more] +// +// [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html func (a *AlertsLegacyAPI) GetByAlertId(ctx context.Context, alertId string) (*LegacyAlert, error) { return a.alertsLegacyImpl.Get(ctx, GetAlertsLegacyRequest{ AlertId: alertId, @@ -673,7 +693,9 @@ type DataSourcesInterface interface { // you need only a SQL warehouse's `id` to create new queries against it. // // **Note**: A new version of the Databricks SQL API is now available. Please - // use :method:warehouses/list instead. + // use :method:warehouses/list instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html List(ctx context.Context) ([]DataSource, error) // DataSourceNameToIdMap calls [DataSourcesAPI.List] and creates a map of results with [DataSource].Name as key and [DataSource].Id as value. @@ -714,8 +736,10 @@ func NewDataSources(client *client.DatabricksClient) *DataSourcesAPI { // client, or `grep` to search the response from this API for the name of your // SQL warehouse as it appears in Databricks SQL. // -// **Note**: A new version of the Databricks SQL API is now available. Please -// see the latest version. +// **Note**: A new version of the Databricks SQL API is now available. [Learn +// more] +// +// [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html type DataSourcesAPI struct { dataSourcesImpl } @@ -779,18 +803,33 @@ type DbsqlPermissionsInterface interface { // // Gets a JSON representation of the access control list (ACL) for a specified // object. + // + // **Note**: A new version of the Databricks SQL API is now available. Please + // use :method:workspace/getpermissions instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Get(ctx context.Context, request GetDbsqlPermissionRequest) (*GetResponse, error) // Get object ACL. // // Gets a JSON representation of the access control list (ACL) for a specified // object. + // + // **Note**: A new version of the Databricks SQL API is now available. Please + // use :method:workspace/getpermissions instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html GetByObjectTypeAndObjectId(ctx context.Context, objectType ObjectTypePlural, objectId string) (*GetResponse, error) // Set object ACL. // // Sets the access control list (ACL) for a specified object. This operation // will complete rewrite the ACL. + // + // **Note**: A new version of the Databricks SQL API is now available. Please + // use :method:workspace/setpermissions instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Set(ctx context.Context, request SetRequest) (*SetResponse, error) // Transfer object ownership. @@ -800,7 +839,9 @@ type DbsqlPermissionsInterface interface { // // **Note**: A new version of the Databricks SQL API is now available. For // queries and alerts, please use :method:queries/update and - // :method:alerts/update respectively instead. + // :method:alerts/update respectively instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html TransferOwnership(ctx context.Context, request TransferOwnershipRequest) (*Success, error) } @@ -826,8 +867,10 @@ func NewDbsqlPermissions(client *client.DatabricksClient) *DbsqlPermissionsAPI { // - `CAN_MANAGE`: Allows all actions: read, run, edit, delete, modify // permissions (superset of `CAN_RUN`) // -// **Note**: A new version of the Databricks SQL API is now available. Please -// see the latest version. +// **Note**: A new version of the Databricks SQL API is now available. [Learn +// more] +// +// [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html type DbsqlPermissionsAPI struct { dbsqlPermissionsImpl } @@ -836,6 +879,11 @@ type DbsqlPermissionsAPI struct { // // Gets a JSON representation of the access control list (ACL) for a specified // object. +// +// **Note**: A new version of the Databricks SQL API is now available. Please +// use :method:workspace/getpermissions instead. [Learn more] +// +// [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html func (a *DbsqlPermissionsAPI) GetByObjectTypeAndObjectId(ctx context.Context, objectType ObjectTypePlural, objectId string) (*GetResponse, error) { return a.dbsqlPermissionsImpl.Get(ctx, GetDbsqlPermissionRequest{ ObjectType: objectType, @@ -1133,7 +1181,9 @@ type QueriesLegacyInterface interface { // **Note**: You cannot add a visualization until you create the query. // // **Note**: A new version of the Databricks SQL API is now available. Please - // use :method:queries/create instead. + // use :method:queries/create instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Create(ctx context.Context, request QueryPostContent) (*LegacyQuery, error) // Delete a query. @@ -1143,7 +1193,9 @@ type QueriesLegacyInterface interface { // deleted after 30 days. // // **Note**: A new version of the Databricks SQL API is now available. Please - // use :method:queries/delete instead. + // use :method:queries/delete instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Delete(ctx context.Context, request DeleteQueriesLegacyRequest) error // Delete a query. @@ -1153,7 +1205,9 @@ type QueriesLegacyInterface interface { // deleted after 30 days. // // **Note**: A new version of the Databricks SQL API is now available. Please - // use :method:queries/delete instead. + // use :method:queries/delete instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html DeleteByQueryId(ctx context.Context, queryId string) error // Get a query definition. @@ -1162,7 +1216,9 @@ type QueriesLegacyInterface interface { // information about the currently authenticated user. // // **Note**: A new version of the Databricks SQL API is now available. Please - // use :method:queries/get instead. + // use :method:queries/get instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Get(ctx context.Context, request GetQueriesLegacyRequest) (*LegacyQuery, error) // Get a query definition. @@ -1171,7 +1227,9 @@ type QueriesLegacyInterface interface { // information about the currently authenticated user. // // **Note**: A new version of the Databricks SQL API is now available. Please - // use :method:queries/get instead. + // use :method:queries/get instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html GetByQueryId(ctx context.Context, queryId string) (*LegacyQuery, error) // Get a list of queries. @@ -1183,7 +1241,9 @@ type QueriesLegacyInterface interface { // throttling, service degradation, or a temporary ban. // // **Note**: A new version of the Databricks SQL API is now available. Please - // use :method:queries/list instead. + // use :method:queries/list instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html // // This method is generated by Databricks SDK Code Generator. List(ctx context.Context, request ListQueriesLegacyRequest) listing.Iterator[LegacyQuery] @@ -1197,7 +1257,9 @@ type QueriesLegacyInterface interface { // throttling, service degradation, or a temporary ban. // // **Note**: A new version of the Databricks SQL API is now available. Please - // use :method:queries/list instead. + // use :method:queries/list instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html // // This method is generated by Databricks SDK Code Generator. ListAll(ctx context.Context, request ListQueriesLegacyRequest) ([]LegacyQuery, error) @@ -1226,7 +1288,9 @@ type QueriesLegacyInterface interface { // list views and searches. You can use restored queries for alerts. // // **Note**: A new version of the Databricks SQL API is now available. Please - // see the latest version. + // see the latest version. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Restore(ctx context.Context, request RestoreQueriesLegacyRequest) error // Change a query definition. @@ -1236,7 +1300,9 @@ type QueriesLegacyInterface interface { // **Note**: You cannot undo this operation. // // **Note**: A new version of the Databricks SQL API is now available. Please - // use :method:queries/update instead. + // use :method:queries/update instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Update(ctx context.Context, request QueryEditContent) (*LegacyQuery, error) } @@ -1254,7 +1320,9 @@ func NewQueriesLegacy(client *client.DatabricksClient) *QueriesLegacyAPI { // `sql_task` type of the Jobs API, e.g. :method:jobs/create. // // **Note**: A new version of the Databricks SQL API is now available. Please -// see the latest version. +// see the latest version. [Learn more] +// +// [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html type QueriesLegacyAPI struct { queriesLegacyImpl } @@ -1266,7 +1334,9 @@ type QueriesLegacyAPI struct { // deleted after 30 days. // // **Note**: A new version of the Databricks SQL API is now available. Please -// use :method:queries/delete instead. +// use :method:queries/delete instead. [Learn more] +// +// [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html func (a *QueriesLegacyAPI) DeleteByQueryId(ctx context.Context, queryId string) error { return a.queriesLegacyImpl.Delete(ctx, DeleteQueriesLegacyRequest{ QueryId: queryId, @@ -1279,7 +1349,9 @@ func (a *QueriesLegacyAPI) DeleteByQueryId(ctx context.Context, queryId string) // information about the currently authenticated user. // // **Note**: A new version of the Databricks SQL API is now available. Please -// use :method:queries/get instead. +// use :method:queries/get instead. [Learn more] +// +// [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html func (a *QueriesLegacyAPI) GetByQueryId(ctx context.Context, queryId string) (*LegacyQuery, error) { return a.queriesLegacyImpl.Get(ctx, GetQueriesLegacyRequest{ QueryId: queryId, @@ -1295,9 +1367,11 @@ func (a *QueriesLegacyAPI) GetByQueryId(ctx context.Context, queryId string) (*L // throttling, service degradation, or a temporary ban. // // **Note**: A new version of the Databricks SQL API is now available. Please -// use :method:queries/list instead. +// use :method:queries/list instead. [Learn more] // // This method is generated by Databricks SDK Code Generator. +// +// [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html func (a *QueriesLegacyAPI) List(ctx context.Context, request ListQueriesLegacyRequest) listing.Iterator[LegacyQuery] { request.Page = 1 // start iterating from the first page @@ -1338,9 +1412,11 @@ func (a *QueriesLegacyAPI) List(ctx context.Context, request ListQueriesLegacyRe // throttling, service degradation, or a temporary ban. // // **Note**: A new version of the Databricks SQL API is now available. Please -// use :method:queries/list instead. +// use :method:queries/list instead. [Learn more] // // This method is generated by Databricks SDK Code Generator. +// +// [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html func (a *QueriesLegacyAPI) ListAll(ctx context.Context, request ListQueriesLegacyRequest) ([]LegacyQuery, error) { iterator := a.List(ctx, request) return listing.ToSliceN[LegacyQuery, int](ctx, iterator, request.PageSize) @@ -1482,7 +1558,9 @@ type QueryVisualizationsLegacyInterface interface { // Creates visualization in the query. // // **Note**: A new version of the Databricks SQL API is now available. Please - // use :method:queryvisualizations/create instead. + // use :method:queryvisualizations/create instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Create(ctx context.Context, request CreateQueryVisualizationsLegacyRequest) (*LegacyVisualization, error) // Remove visualization. @@ -1490,7 +1568,9 @@ type QueryVisualizationsLegacyInterface interface { // Removes a visualization from the query. // // **Note**: A new version of the Databricks SQL API is now available. Please - // use :method:queryvisualizations/delete instead. + // use :method:queryvisualizations/delete instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Delete(ctx context.Context, request DeleteQueryVisualizationsLegacyRequest) error // Remove visualization. @@ -1498,7 +1578,9 @@ type QueryVisualizationsLegacyInterface interface { // Removes a visualization from the query. // // **Note**: A new version of the Databricks SQL API is now available. Please - // use :method:queryvisualizations/delete instead. + // use :method:queryvisualizations/delete instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html DeleteById(ctx context.Context, id string) error // Edit existing visualization. @@ -1506,7 +1588,9 @@ type QueryVisualizationsLegacyInterface interface { // Updates visualization in the query. // // **Note**: A new version of the Databricks SQL API is now available. Please - // use :method:queryvisualizations/update instead. + // use :method:queryvisualizations/update instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Update(ctx context.Context, request LegacyVisualization) (*LegacyVisualization, error) } @@ -1523,7 +1607,9 @@ func NewQueryVisualizationsLegacy(client *client.DatabricksClient) *QueryVisuali // structures may change over time. // // **Note**: A new version of the Databricks SQL API is now available. Please -// see the latest version. +// see the latest version. [Learn more] +// +// [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html type QueryVisualizationsLegacyAPI struct { queryVisualizationsLegacyImpl } @@ -1533,7 +1619,9 @@ type QueryVisualizationsLegacyAPI struct { // Removes a visualization from the query. // // **Note**: A new version of the Databricks SQL API is now available. Please -// use :method:queryvisualizations/delete instead. +// use :method:queryvisualizations/delete instead. [Learn more] +// +// [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html func (a *QueryVisualizationsLegacyAPI) DeleteById(ctx context.Context, id string) error { return a.queryVisualizationsLegacyImpl.Delete(ctx, DeleteQueryVisualizationsLegacyRequest{ Id: id, diff --git a/service/sql/interface.go b/service/sql/interface.go index f13d53a42..06933d534 100755 --- a/service/sql/interface.go +++ b/service/sql/interface.go @@ -53,7 +53,9 @@ type AlertsService interface { // `sql_task` type of the Jobs API, e.g. :method:jobs/create. // // **Note**: A new version of the Databricks SQL API is now available. Please -// see the latest version. +// see the latest version. [Learn more] +// +// [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html type AlertsLegacyService interface { // Create an alert. @@ -63,7 +65,9 @@ type AlertsLegacyService interface { // notification destinations if the condition was met. // // **Note**: A new version of the Databricks SQL API is now available. - // Please use :method:alerts/create instead. + // Please use :method:alerts/create instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Create(ctx context.Context, request CreateAlert) (*LegacyAlert, error) // Delete an alert. @@ -73,7 +77,9 @@ type AlertsLegacyService interface { // to the trash. // // **Note**: A new version of the Databricks SQL API is now available. - // Please use :method:alerts/delete instead. + // Please use :method:alerts/delete instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Delete(ctx context.Context, request DeleteAlertsLegacyRequest) error // Get an alert. @@ -81,7 +87,9 @@ type AlertsLegacyService interface { // Gets an alert. // // **Note**: A new version of the Databricks SQL API is now available. - // Please use :method:alerts/get instead. + // Please use :method:alerts/get instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Get(ctx context.Context, request GetAlertsLegacyRequest) (*LegacyAlert, error) // Get alerts. @@ -89,7 +97,9 @@ type AlertsLegacyService interface { // Gets a list of alerts. // // **Note**: A new version of the Databricks SQL API is now available. - // Please use :method:alerts/list instead. + // Please use :method:alerts/list instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html List(ctx context.Context) ([]LegacyAlert, error) // Update an alert. @@ -97,7 +107,9 @@ type AlertsLegacyService interface { // Updates an alert. // // **Note**: A new version of the Databricks SQL API is now available. - // Please use :method:alerts/update instead. + // Please use :method:alerts/update instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Update(ctx context.Context, request EditAlert) error } @@ -175,8 +187,10 @@ type DashboardsService interface { // client, or `grep` to search the response from this API for the name of your // SQL warehouse as it appears in Databricks SQL. // -// **Note**: A new version of the Databricks SQL API is now available. Please -// see the latest version. +// **Note**: A new version of the Databricks SQL API is now available. [Learn +// more] +// +// [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html type DataSourcesService interface { // Get a list of SQL warehouses. @@ -187,7 +201,9 @@ type DataSourcesService interface { // against it. // // **Note**: A new version of the Databricks SQL API is now available. - // Please use :method:warehouses/list instead. + // Please use :method:warehouses/list instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html List(ctx context.Context) ([]DataSource, error) } @@ -205,20 +221,32 @@ type DataSourcesService interface { // - `CAN_MANAGE`: Allows all actions: read, run, edit, delete, modify // permissions (superset of `CAN_RUN`) // -// **Note**: A new version of the Databricks SQL API is now available. Please -// see the latest version. +// **Note**: A new version of the Databricks SQL API is now available. [Learn +// more] +// +// [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html type DbsqlPermissionsService interface { // Get object ACL. // // Gets a JSON representation of the access control list (ACL) for a // specified object. + // + // **Note**: A new version of the Databricks SQL API is now available. + // Please use :method:workspace/getpermissions instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Get(ctx context.Context, request GetDbsqlPermissionRequest) (*GetResponse, error) // Set object ACL. // // Sets the access control list (ACL) for a specified object. This operation // will complete rewrite the ACL. + // + // **Note**: A new version of the Databricks SQL API is now available. + // Please use :method:workspace/setpermissions instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Set(ctx context.Context, request SetRequest) (*SetResponse, error) // Transfer object ownership. @@ -228,7 +256,9 @@ type DbsqlPermissionsService interface { // // **Note**: A new version of the Databricks SQL API is now available. For // queries and alerts, please use :method:queries/update and - // :method:alerts/update respectively instead. + // :method:alerts/update respectively instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html TransferOwnership(ctx context.Context, request TransferOwnershipRequest) (*Success, error) } @@ -284,7 +314,9 @@ type QueriesService interface { // `sql_task` type of the Jobs API, e.g. :method:jobs/create. // // **Note**: A new version of the Databricks SQL API is now available. Please -// see the latest version. +// see the latest version. [Learn more] +// +// [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html type QueriesLegacyService interface { // Create a new query definition. @@ -300,7 +332,9 @@ type QueriesLegacyService interface { // **Note**: You cannot add a visualization until you create the query. // // **Note**: A new version of the Databricks SQL API is now available. - // Please use :method:queries/create instead. + // Please use :method:queries/create instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Create(ctx context.Context, request QueryPostContent) (*LegacyQuery, error) // Delete a query. @@ -310,7 +344,9 @@ type QueriesLegacyService interface { // deleted after 30 days. // // **Note**: A new version of the Databricks SQL API is now available. - // Please use :method:queries/delete instead. + // Please use :method:queries/delete instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Delete(ctx context.Context, request DeleteQueriesLegacyRequest) error // Get a query definition. @@ -319,7 +355,9 @@ type QueriesLegacyService interface { // information about the currently authenticated user. // // **Note**: A new version of the Databricks SQL API is now available. - // Please use :method:queries/get instead. + // Please use :method:queries/get instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Get(ctx context.Context, request GetQueriesLegacyRequest) (*LegacyQuery, error) // Get a list of queries. @@ -331,7 +369,9 @@ type QueriesLegacyService interface { // in throttling, service degradation, or a temporary ban. // // **Note**: A new version of the Databricks SQL API is now available. - // Please use :method:queries/list instead. + // Please use :method:queries/list instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html // // Use ListAll() to get all LegacyQuery instances, which will iterate over every result page. List(ctx context.Context, request ListQueriesLegacyRequest) (*QueryList, error) @@ -343,7 +383,9 @@ type QueriesLegacyService interface { // alerts. // // **Note**: A new version of the Databricks SQL API is now available. - // Please see the latest version. + // Please see the latest version. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Restore(ctx context.Context, request RestoreQueriesLegacyRequest) error // Change a query definition. @@ -353,7 +395,9 @@ type QueriesLegacyService interface { // **Note**: You cannot undo this operation. // // **Note**: A new version of the Databricks SQL API is now available. - // Please use :method:queries/update instead. + // Please use :method:queries/update instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Update(ctx context.Context, request QueryEditContent) (*LegacyQuery, error) } @@ -399,7 +443,9 @@ type QueryVisualizationsService interface { // structures may change over time. // // **Note**: A new version of the Databricks SQL API is now available. Please -// see the latest version. +// see the latest version. [Learn more] +// +// [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html type QueryVisualizationsLegacyService interface { // Add visualization to a query. @@ -407,7 +453,9 @@ type QueryVisualizationsLegacyService interface { // Creates visualization in the query. // // **Note**: A new version of the Databricks SQL API is now available. - // Please use :method:queryvisualizations/create instead. + // Please use :method:queryvisualizations/create instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Create(ctx context.Context, request CreateQueryVisualizationsLegacyRequest) (*LegacyVisualization, error) // Remove visualization. @@ -415,7 +463,9 @@ type QueryVisualizationsLegacyService interface { // Removes a visualization from the query. // // **Note**: A new version of the Databricks SQL API is now available. - // Please use :method:queryvisualizations/delete instead. + // Please use :method:queryvisualizations/delete instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Delete(ctx context.Context, request DeleteQueryVisualizationsLegacyRequest) error // Edit existing visualization. @@ -423,7 +473,9 @@ type QueryVisualizationsLegacyService interface { // Updates visualization in the query. // // **Note**: A new version of the Databricks SQL API is now available. - // Please use :method:queryvisualizations/update instead. + // Please use :method:queryvisualizations/update instead. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html Update(ctx context.Context, request LegacyVisualization) (*LegacyVisualization, error) } diff --git a/service/sql/model.go b/service/sql/model.go index 967b271e1..7929be900 100755 --- a/service/sql/model.go +++ b/service/sql/model.go @@ -398,8 +398,6 @@ const ChannelNameChannelNamePreview ChannelName = `CHANNEL_NAME_PREVIEW` const ChannelNameChannelNamePrevious ChannelName = `CHANNEL_NAME_PREVIOUS` -const ChannelNameChannelNameUnspecified ChannelName = `CHANNEL_NAME_UNSPECIFIED` - // String representation for [fmt.Print] func (f *ChannelName) String() string { return string(*f) @@ -408,11 +406,11 @@ func (f *ChannelName) String() string { // Set raw string value and validate it against allowed values func (f *ChannelName) Set(v string) error { switch v { - case `CHANNEL_NAME_CURRENT`, `CHANNEL_NAME_CUSTOM`, `CHANNEL_NAME_PREVIEW`, `CHANNEL_NAME_PREVIOUS`, `CHANNEL_NAME_UNSPECIFIED`: + case `CHANNEL_NAME_CURRENT`, `CHANNEL_NAME_CUSTOM`, `CHANNEL_NAME_PREVIEW`, `CHANNEL_NAME_PREVIOUS`: *f = ChannelName(v) return nil default: - return fmt.Errorf(`value "%s" is not one of "CHANNEL_NAME_CURRENT", "CHANNEL_NAME_CUSTOM", "CHANNEL_NAME_PREVIEW", "CHANNEL_NAME_PREVIOUS", "CHANNEL_NAME_UNSPECIFIED"`, v) + return fmt.Errorf(`value "%s" is not one of "CHANNEL_NAME_CURRENT", "CHANNEL_NAME_CUSTOM", "CHANNEL_NAME_PREVIEW", "CHANNEL_NAME_PREVIOUS"`, v) } } @@ -1248,30 +1246,6 @@ type DeleteWarehouseRequest struct { type DeleteWarehouseResponse struct { } -// The fetch disposition provides two modes of fetching results: `INLINE` and -// `EXTERNAL_LINKS`. -// -// Statements executed with `INLINE` disposition will return result data inline, -// in `JSON_ARRAY` format, in a series of chunks. If a given statement produces -// a result set with a size larger than 25 MiB, that statement execution is -// aborted, and no result set will be available. -// -// **NOTE** Byte limits are computed based upon internal representations of the -// result set data, and might not match the sizes visible in JSON responses. -// -// Statements executed with `EXTERNAL_LINKS` disposition will return result data -// as external links: URLs that point to cloud storage internal to the -// workspace. Using `EXTERNAL_LINKS` disposition allows statements to generate -// arbitrarily sized result sets for fetching up to 100 GiB. The resulting links -// have two important properties: -// -// 1. They point to resources _external_ to the Databricks compute; therefore -// any associated authentication information (typically a personal access token, -// OAuth token, or similar) _must be removed_ when fetching from these links. -// -// 2. These are presigned URLs with a specific expiration, indicated in the -// response. The behavior when attempting to use an expired link is cloud -// specific. type Disposition string const DispositionExternalLinks Disposition = `EXTERNAL_LINKS` @@ -1694,32 +1668,7 @@ type ExecuteStatementRequest struct { // // [`USE CATALOG`]: https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-use-catalog.html Catalog string `json:"catalog,omitempty"` - // The fetch disposition provides two modes of fetching results: `INLINE` - // and `EXTERNAL_LINKS`. - // - // Statements executed with `INLINE` disposition will return result data - // inline, in `JSON_ARRAY` format, in a series of chunks. If a given - // statement produces a result set with a size larger than 25 MiB, that - // statement execution is aborted, and no result set will be available. - // - // **NOTE** Byte limits are computed based upon internal representations of - // the result set data, and might not match the sizes visible in JSON - // responses. - // - // Statements executed with `EXTERNAL_LINKS` disposition will return result - // data as external links: URLs that point to cloud storage internal to the - // workspace. Using `EXTERNAL_LINKS` disposition allows statements to - // generate arbitrarily sized result sets for fetching up to 100 GiB. The - // resulting links have two important properties: - // - // 1. They point to resources _external_ to the Databricks compute; - // therefore any associated authentication information (typically a personal - // access token, OAuth token, or similar) _must be removed_ when fetching - // from these links. - // - // 2. These are presigned URLs with a specific expiration, indicated in the - // response. The behavior when attempting to use an expired link is cloud - // specific. + Disposition Disposition `json:"disposition,omitempty"` // Statement execution supports three result formats: `JSON_ARRAY` // (default), `ARROW_STREAM`, and `CSV`. @@ -1886,10 +1835,7 @@ type ExternalLink struct { // becomes invalid, after which point a new `external_link` must be // requested. Expiration string `json:"expiration,omitempty"` - // A presigned URL pointing to a chunk of result data, hosted by an external - // service, with a short expiration time (<= 15 minutes). As this URL - // contains a temporary credential, it should be considered sensitive and - // the client should not expose this URL in a log. + ExternalLink string `json:"external_link,omitempty"` // HTTP headers that must be included with a GET request to the // `external_link`. Each header is provided as a key-value pair. Headers are @@ -3783,12 +3729,6 @@ type RestoreQueriesLegacyRequest struct { type RestoreResponse struct { } -// Contains the result data of a single chunk when using `INLINE` disposition. -// When using `EXTERNAL_LINKS` disposition, the array `external_links` is used -// instead to provide presigned URLs to the result data in cloud storage. -// Exactly one of these alternatives is used. (While the `external_links` array -// prepares the API to return multiple links in a single response. Currently -// only a single link is returned.) type ResultData struct { // The number of bytes in the result chunk. This field is not available when // using `INLINE` disposition. @@ -4205,12 +4145,7 @@ func (s StatementParameterListItem) MarshalJSON() ([]byte, error) { type StatementResponse struct { // The result manifest provides schema and metadata for the result set. Manifest *ResultManifest `json:"manifest,omitempty"` - // Contains the result data of a single chunk when using `INLINE` - // disposition. When using `EXTERNAL_LINKS` disposition, the array - // `external_links` is used instead to provide presigned URLs to the result - // data in cloud storage. Exactly one of these alternatives is used. (While - // the `external_links` array prepares the API to return multiple links in a - // single response. Currently only a single link is returned.) + Result *ResultData `json:"result,omitempty"` // The statement ID is returned upon successfully submitting a SQL // statement, and is a required reference for all subsequent calls. @@ -4916,6 +4851,8 @@ type WarehousePermissionLevel string const WarehousePermissionLevelCanManage WarehousePermissionLevel = `CAN_MANAGE` +const WarehousePermissionLevelCanMonitor WarehousePermissionLevel = `CAN_MONITOR` + const WarehousePermissionLevelCanUse WarehousePermissionLevel = `CAN_USE` const WarehousePermissionLevelIsOwner WarehousePermissionLevel = `IS_OWNER` @@ -4928,11 +4865,11 @@ func (f *WarehousePermissionLevel) String() string { // Set raw string value and validate it against allowed values func (f *WarehousePermissionLevel) Set(v string) error { switch v { - case `CAN_MANAGE`, `CAN_USE`, `IS_OWNER`: + case `CAN_MANAGE`, `CAN_MONITOR`, `CAN_USE`, `IS_OWNER`: *f = WarehousePermissionLevel(v) return nil default: - return fmt.Errorf(`value "%s" is not one of "CAN_MANAGE", "CAN_USE", "IS_OWNER"`, v) + return fmt.Errorf(`value "%s" is not one of "CAN_MANAGE", "CAN_MONITOR", "CAN_USE", "IS_OWNER"`, v) } } diff --git a/service/sql/warehouses_usage_test.go b/service/sql/warehouses_usage_test.go index 3b0983323..6eb2f60fc 100755 --- a/service/sql/warehouses_usage_test.go +++ b/service/sql/warehouses_usage_test.go @@ -25,6 +25,12 @@ func ExampleWarehousesAPI_Create_sqlWarehouses() { ClusterSize: "2X-Small", MaxNumClusters: 1, AutoStopMins: 10, + Tags: &sql.EndpointTags{ + CustomTags: []sql.EndpointTagPair{sql.EndpointTagPair{ + Key: "Owner", + Value: "eng-dev-ecosystem-team_at_databricks.com", + }}, + }, }) if err != nil { panic(err) @@ -52,6 +58,12 @@ func ExampleWarehousesAPI_Edit_sqlWarehouses() { ClusterSize: "2X-Small", MaxNumClusters: 1, AutoStopMins: 10, + Tags: &sql.EndpointTags{ + CustomTags: []sql.EndpointTagPair{sql.EndpointTagPair{ + Key: "Owner", + Value: "eng-dev-ecosystem-team_at_databricks.com", + }}, + }, }) if err != nil { panic(err) @@ -90,6 +102,12 @@ func ExampleWarehousesAPI_Get_sqlWarehouses() { ClusterSize: "2X-Small", MaxNumClusters: 1, AutoStopMins: 10, + Tags: &sql.EndpointTags{ + CustomTags: []sql.EndpointTagPair{sql.EndpointTagPair{ + Key: "Owner", + Value: "eng-dev-ecosystem-team_at_databricks.com", + }}, + }, }) if err != nil { panic(err) diff --git a/version/version.go b/version/version.go index 183640c91..842d7439d 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.43.2" +const Version = "0.44.0" diff --git a/workspace_client.go b/workspace_client.go index cdbd376a0..7aabe107c 100755 --- a/workspace_client.go +++ b/workspace_client.go @@ -9,6 +9,7 @@ import ( "github.com/databricks/databricks-sdk-go/config" "github.com/databricks/databricks-sdk-go/httpclient" + "github.com/databricks/databricks-sdk-go/service/apps" "github.com/databricks/databricks-sdk-go/service/catalog" "github.com/databricks/databricks-sdk-go/service/compute" "github.com/databricks/databricks-sdk-go/service/dashboards" @@ -52,13 +53,15 @@ type WorkspaceClient struct { // :method:jobs/create. // // **Note**: A new version of the Databricks SQL API is now available. - // Please see the latest version. + // Please see the latest version. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html AlertsLegacy sql.AlertsLegacyInterface // Apps run directly on a customer’s Databricks instance, integrate with // their data, use and extend Databricks services, and enable users to // interact through single sign-on. - Apps serving.AppsInterface + Apps apps.AppsInterface // In Databricks Runtime 13.3 and above, you can add libraries and init // scripts to the `allowlist` in UC so that users can leverage these @@ -207,7 +210,9 @@ type WorkspaceClient struct { // your SQL warehouse as it appears in Databricks SQL. // // **Note**: A new version of the Databricks SQL API is now available. - // Please see the latest version. + // [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html DataSources sql.DataSourcesInterface // DBFS API makes it simple to interact with various data sources without @@ -229,7 +234,9 @@ type WorkspaceClient struct { // permissions (superset of `CAN_RUN`) // // **Note**: A new version of the Databricks SQL API is now available. - // Please see the latest version. + // [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html DbsqlPermissions sql.DbsqlPermissionsInterface // Experiments are the primary unit of organization in MLflow; all MLflow @@ -487,6 +494,9 @@ type WorkspaceClient struct { // Permissions API are used to create read, write, edit, update and manage // access for various users on different objects and endpoints. // + // * **[Apps permissions](:service:apps)** — Manage which users can manage + // or use apps. + // // * **[Cluster permissions](:service:clusters)** — Manage which users can // manage, restart, or attach to clusters. // @@ -525,7 +535,8 @@ type WorkspaceClient struct { // users can create or use tokens. // // * **[Workspace object permissions](:service:workspace)** — Manage which - // users can read, run, edit, or manage directories, files, and notebooks. + // users can read, run, edit, or manage alerts, dbsql-dashboards, + // directories, files, notebooks and queries. // // For the mapping of the required permissions for specific actions or // abilities and other important information, see [Access Control]. @@ -619,7 +630,9 @@ type WorkspaceClient struct { // :method:jobs/create. // // **Note**: A new version of the Databricks SQL API is now available. - // Please see the latest version. + // Please see the latest version. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html QueriesLegacy sql.QueriesLegacyInterface // A service responsible for storing and retrieving the list of queries run @@ -636,7 +649,9 @@ type WorkspaceClient struct { // Data structures may change over time. // // **Note**: A new version of the Databricks SQL API is now available. - // Please see the latest version. + // Please see the latest version. [Learn more] + // + // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html QueryVisualizationsLegacy sql.QueryVisualizationsLegacyInterface // The Recipient Activation API is only applicable in the open sharing model @@ -1062,7 +1077,7 @@ func NewWorkspaceClient(c ...*Config) (*WorkspaceClient, error) { AccountAccessControlProxy: iam.NewAccountAccessControlProxy(databricksClient), Alerts: sql.NewAlerts(databricksClient), AlertsLegacy: sql.NewAlertsLegacy(databricksClient), - Apps: serving.NewApps(databricksClient), + Apps: apps.NewApps(databricksClient), ArtifactAllowlists: catalog.NewArtifactAllowlists(databricksClient), Catalogs: catalog.NewCatalogs(databricksClient), CleanRooms: sharing.NewCleanRooms(databricksClient),