From e227ff15db9ea63df78029bfab82ece342bcd7c8 Mon Sep 17 00:00:00 2001 From: "M. Adil Fayyaz" <62440954+AdilFayyaz@users.noreply.github.com> Date: Mon, 13 Apr 2026 18:25:02 -0700 Subject: [PATCH 01/11] wip Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com> --- actions/k8s/client.go | 26 +++- runs/repository/impl/action.go | 218 ++++++++++++++++++++++++--- runs/repository/interfaces/action.go | 5 +- runs/repository/mocks/mocks.go | 29 ++-- runs/service/abort_reconciler.go | 22 ++- runs/service/run_service.go | 28 +++- runs/service/run_service_test.go | 6 +- tasks/lessons.md | 19 +++ 8 files changed, 308 insertions(+), 45 deletions(-) create mode 100644 tasks/lessons.md diff --git a/actions/k8s/client.go b/actions/k8s/client.go index fd3d5a10cd..ae35c8e15f 100644 --- a/actions/k8s/client.go +++ b/actions/k8s/client.go @@ -422,6 +422,18 @@ func (c *ActionsClient) setupInformer(ctx context.Context) error { } c.dispatchEvent(taskAction, watch.Modified) }, + DeleteFunc: func(obj interface{}) { + // The informer may deliver a DeletedFinalStateUnknown tombstone + // when a delete event was missed; unwrap it first. + if tombstone, ok := obj.(toolscache.DeletedFinalStateUnknown); ok { + obj = tombstone.Obj + } + taskAction, ok := obj.(*executorv1.TaskAction) + if !ok { + return + } + c.dispatchEvent(taskAction, watch.Deleted) + }, }) if err != nil { return fmt.Errorf("failed to add TaskAction informer handler: %w", err) @@ -494,6 +506,14 @@ func buildActionUpdate(ctx context.Context, taskAction *executorv1.TaskAction, e shortName = extractShortNameFromTemplate(taskAction.Spec.TaskTemplate) } + phase := GetPhaseFromConditions(taskAction) + // A TaskAction deleted without a terminal condition was cascade-deleted by K8s + // (e.g. its parent was aborted). Treat it as aborted so the DB and UI reflect + // the real outcome instead of leaving the phase as UNSPECIFIED. + if eventType == watch.Deleted && phase == common.ActionPhase_ACTION_PHASE_UNSPECIFIED { + phase = common.ActionPhase_ACTION_PHASE_ABORTED + } + return &ActionUpdate{ ActionID: &common.ActionIdentifier{ Run: &common.RunIdentifier{ @@ -505,7 +525,7 @@ func buildActionUpdate(ctx context.Context, taskAction *executorv1.TaskAction, e }, ParentActionName: parentName, StateJSON: taskAction.Status.StateJSON, - Phase: GetPhaseFromConditions(taskAction), + Phase: phase, OutputUri: buildOutputUri(ctx, taskAction), IsDeleted: eventType == watch.Deleted, TaskType: taskAction.Spec.TaskType, @@ -618,7 +638,9 @@ func (c *ActionsClient) notifyRunService(ctx context.Context, taskAction *execut } if _, err := c.runClient.UpdateActionStatus(ctx, connect.NewRequest(statusReq)); err != nil { logger.Warnf(ctx, "Failed to update action status in run service for %s: %v", update.ActionID.Name, err) - } else if isTerminalPhase(update.Phase) { + } else if isTerminalPhase(update.Phase) && !update.IsDeleted { + // Skip label patching for deleted CRs — the patch would always fail + // with "not found" since the object is already gone. if err := c.markTerminalStatusRecorded(ctx, taskAction); err != nil { logger.Warnf(ctx, "Failed to mark terminal status recorded for %s: %v", update.ActionID.Name, err) } diff --git a/runs/repository/impl/action.go b/runs/repository/impl/action.go index e1a56ebf7f..1025499054 100644 --- a/runs/repository/impl/action.go +++ b/runs/repository/impl/action.go @@ -15,6 +15,8 @@ import ( "github.com/jmoiron/sqlx" "github.com/lib/pq" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/timestamppb" "github.com/flyteorg/flyte/v2/flytestdlib/database" "github.com/flyteorg/flyte/v2/flytestdlib/logger" @@ -136,25 +138,100 @@ func (r *actionRepo) ListRuns(ctx context.Context, req *workflow.ListRunsRequest return runs, nextToken, nil } -// AbortRun aborts a run and all its actions -func (r *actionRepo) AbortRun(ctx context.Context, runID *common.RunIdentifier, reason string, abortedBy *common.EnrichedIdentity) error { +// AbortRun marks the root action as aborted and sets abort_requested_at on all +// non-terminal child actions so the reconciler can terminate their pods. +// Returns the ActionIdentifiers of the child actions that were marked. +func (r *actionRepo) AbortRun(ctx context.Context, runID *common.RunIdentifier, reason string, abortedBy *common.EnrichedIdentity) ([]*common.ActionIdentifier, error) { now := time.Now() + abortedPhase := int32(common.ActionPhase_ACTION_PHASE_ABORTED) + succeededPhase := int32(common.ActionPhase_ACTION_PHASE_SUCCEEDED) - _, err := r.db.ExecContext(ctx, - `UPDATE actions SET phase = $1, updated_at = $2, abort_requested_at = $3, abort_attempt_count = $4, abort_reason = $5 - WHERE project = $6 AND domain = $7 AND run_name = $8 AND parent_action_name IS NULL`, - int32(common.ActionPhase_ACTION_PHASE_ABORTED), now, now, 0, reason, - runID.Project, runID.Domain, runID.Name) - + // Mark the root action as aborted. + var rootName string + var rootAttempts uint32 + err := r.db.QueryRowxContext(ctx, + `UPDATE actions SET phase = $1, updated_at = $2, abort_requested_at = $3, abort_attempt_count = $4, abort_reason = $5, + ended_at = COALESCE(ended_at, GREATEST($2, created_at)), + duration_ms = EXTRACT(EPOCH FROM (COALESCE(ended_at, GREATEST($2, created_at)) - created_at)) * 1000 + WHERE project = $6 AND domain = $7 AND run_name = $8 AND parent_action_name IS NULL + RETURNING name, attempts`, + abortedPhase, now, now, 0, reason, + runID.Project, runID.Domain, runID.Name, + ).Scan(&rootName, &rootAttempts) + if errors.Is(err, sql.ErrNoRows) { + return nil, fmt.Errorf("run not found: %w", sql.ErrNoRows) + } + if err != nil { + return nil, fmt.Errorf("failed to abort run: %w", err) + } + + // Cascade abort to non-terminal child actions so the reconciler terminates their pods. + // Skip SUCCEEDED and ABORTED rows — they are already done. + rows, err := r.db.QueryxContext(ctx, + `UPDATE actions SET phase = $1, updated_at = $2, abort_requested_at = $3, abort_attempt_count = 0, abort_reason = $4, + ended_at = COALESCE(ended_at, GREATEST($2, created_at)), + duration_ms = EXTRACT(EPOCH FROM (COALESCE(ended_at, GREATEST($2, created_at)) - created_at)) * 1000 + WHERE project = $5 AND domain = $6 AND run_name = $7 + AND parent_action_name IS NOT NULL + AND phase != $8 AND phase != $1 + RETURNING name, attempts`, + abortedPhase, now, now, reason, + runID.Project, runID.Domain, runID.Name, + succeededPhase, + ) if err != nil { - return fmt.Errorf("failed to abort run: %w", err) + return nil, fmt.Errorf("failed to abort child actions: %w", err) + } + defer rows.Close() + + type childRow struct { + name string + attempts uint32 + } + var children []childRow + var childIDs []*common.ActionIdentifier + for rows.Next() { + var cr childRow + if scanErr := rows.Scan(&cr.name, &cr.attempts); scanErr != nil { + return nil, fmt.Errorf("failed to scan child action name: %w", scanErr) + } + children = append(children, cr) + childIDs = append(childIDs, &common.ActionIdentifier{ + Run: runID, + Name: cr.name, + }) + } + if err := rows.Err(); err != nil { + return nil, fmt.Errorf("failed to iterate child actions: %w", err) + } + + // Insert ABORTED phase-transition events so WatchActionDetails returns a + // phaseTransitions entry with ABORTED for each affected action. + rootID := &common.ActionIdentifier{Run: runID, Name: rootName} + if err := r.insertAbortEvent(ctx, rootID, rootAttempts, reason, now); err != nil { + logger.Warnf(ctx, "AbortRun: failed to insert abort event for root %s: %v", rootName, err) + } + for _, cr := range children { + childID := &common.ActionIdentifier{Run: runID, Name: cr.name} + if err := r.insertAbortEvent(ctx, childID, cr.attempts, reason, now); err != nil { + logger.Warnf(ctx, "AbortRun: failed to insert abort event for %s: %v", cr.name, err) + } } // Notify run subscribers. r.notifyRunUpdate(ctx, runID) - logger.Infof(ctx, "Aborted run: %s/%s/%s", runID.Project, runID.Domain, runID.Name) - return nil + // Notify action subscribers for the root and every aborted child so that + // WatchAllActionUpdates (used by the UI to show per-action status) reflects + // the phase change immediately. + r.notifyActionUpdate(ctx, rootID) + for _, id := range childIDs { + r.notifyActionUpdate(ctx, id) + } + + logger.Infof(ctx, "Aborted run: %s/%s/%s (%d child action(s) queued for termination)", + runID.Project, runID.Domain, runID.Name, len(childIDs)) + return childIDs, nil } // InsertEvents inserts a batch of action events, ignoring duplicates (same PK = idempotent). @@ -431,6 +508,14 @@ func (r *actionRepo) UpdateActionPhase( return err } if rowsAffected > 0 { + // Insert an abort event so WatchActionDetails phaseTransitions include ABORTED. + // This must happen before notifyActionUpdate so the event is visible when the + // subscriber re-fetches action events in response to the notification. + if phase == common.ActionPhase_ACTION_PHASE_ABORTED { + if err := r.insertAbortEvent(ctx, actionID, attempts, "", now); err != nil { + logger.Warnf(ctx, "UpdateActionPhase: failed to insert abort event for %s: %v", actionID.Name, err) + } + } // Notify subscribers of the action update r.notifyActionUpdate(ctx, actionID) } @@ -444,27 +529,120 @@ func (r *actionRepo) UpdateActionPhase( return nil } -// AbortAction aborts a specific action +// AbortAction aborts a specific action and all of its descendants. +// Children cannot run without their parent, so they are marked ABORTED immediately. +// K8s OwnerReferences handle pod/CR termination for task-action children; trace +// children have no pods and require only the DB update. func (r *actionRepo) AbortAction(ctx context.Context, actionID *common.ActionIdentifier, reason string, abortedBy *common.EnrichedIdentity) error { now := time.Now() + abortedPhase := int32(common.ActionPhase_ACTION_PHASE_ABORTED) + succeededPhase := int32(common.ActionPhase_ACTION_PHASE_SUCCEEDED) - _, err := r.db.ExecContext(ctx, - `UPDATE actions SET phase = $1, updated_at = $2, abort_requested_at = $3, abort_attempt_count = $4, abort_reason = $5 - WHERE project = $6 AND domain = $7 AND run_name = $8 AND name = $9`, - int32(common.ActionPhase_ACTION_PHASE_ABORTED), now, now, 0, reason, - actionID.Run.Project, actionID.Run.Domain, actionID.Run.Name, actionID.Name) - + var name string + var attempts uint32 + err := r.db.QueryRowxContext(ctx, + `UPDATE actions SET phase = $1, updated_at = $2, abort_requested_at = $3, abort_attempt_count = $4, abort_reason = $5, + ended_at = COALESCE(ended_at, GREATEST($2, created_at)), + duration_ms = EXTRACT(EPOCH FROM (COALESCE(ended_at, GREATEST($2, created_at)) - created_at)) * 1000 + WHERE project = $6 AND domain = $7 AND run_name = $8 AND name = $9 + RETURNING name, attempts`, + abortedPhase, now, now, 0, reason, + actionID.Run.Project, actionID.Run.Domain, actionID.Run.Name, actionID.Name, + ).Scan(&name, &attempts) + if errors.Is(err, sql.ErrNoRows) { + return fmt.Errorf("action not found: %w", sql.ErrNoRows) + } if err != nil { return fmt.Errorf("failed to abort action: %w", err) } + if err := r.insertAbortEvent(ctx, actionID, attempts, reason, now); err != nil { + logger.Warnf(ctx, "AbortAction: failed to insert abort event for %s: %v", actionID.Name, err) + } + // Notify action subscribers. r.notifyActionUpdate(ctx, actionID) - logger.Infof(ctx, "Aborted action: %s", actionID.Name) + // Cascade ABORTED to all descendants of this action (recursive: children, + // grandchildren, etc.) that are not yet in a terminal phase. + // We use a recursive CTE so all depths are handled in a single round-trip. + rows, err := r.db.QueryxContext(ctx, + `WITH RECURSIVE descendants AS ( + SELECT name, attempts + FROM actions + WHERE project = $1 AND domain = $2 AND run_name = $3 + AND parent_action_name = $4 + UNION ALL + SELECT a.name, a.attempts + FROM actions a + JOIN descendants d ON a.parent_action_name = d.name + WHERE a.project = $1 AND a.domain = $2 AND a.run_name = $3 + ) + UPDATE actions + SET phase = $5, updated_at = $6, abort_reason = $7, + ended_at = COALESCE(ended_at, GREATEST($6, created_at)), + duration_ms = EXTRACT(EPOCH FROM (COALESCE(ended_at, GREATEST($6, created_at)) - created_at)) * 1000 + FROM descendants + WHERE actions.project = $1 AND actions.domain = $2 AND actions.run_name = $3 + AND actions.name = descendants.name + AND actions.phase != $5 AND actions.phase != $8 + RETURNING actions.name, actions.attempts`, + actionID.Run.Project, actionID.Run.Domain, actionID.Run.Name, actionID.Name, + abortedPhase, now, reason, succeededPhase, + ) + if err != nil { + logger.Warnf(ctx, "AbortAction: failed to cascade abort to descendants of %s: %v", actionID.Name, err) + return nil + } + defer rows.Close() + + for rows.Next() { + var childName string + var childAttempts uint32 + if scanErr := rows.Scan(&childName, &childAttempts); scanErr != nil { + logger.Warnf(ctx, "AbortAction: failed to scan descendant row: %v", scanErr) + continue + } + childID := &common.ActionIdentifier{Run: actionID.Run, Name: childName} + if err := r.insertAbortEvent(ctx, childID, childAttempts, reason, now); err != nil { + logger.Warnf(ctx, "AbortAction: failed to insert abort event for descendant %s: %v", childName, err) + } + r.notifyActionUpdate(ctx, childID) + } + if err := rows.Err(); err != nil { + logger.Warnf(ctx, "AbortAction: error iterating descendant rows for %s: %v", actionID.Name, err) + } + + logger.Infof(ctx, "Aborted action %s and its descendants", actionID.Name) return nil } +// insertAbortEvent writes a single ABORTED phase-transition event into action_events so that +// WatchActionDetails returns a phaseTransitions entry with phase = ABORTED for the action. +// Failures are non-fatal — the caller should log and continue. +func (r *actionRepo) insertAbortEvent(ctx context.Context, actionID *common.ActionIdentifier, attempts uint32, reason string, now time.Time) error { + // Build the minimal ActionEvent proto that mergeEvents will pick up. + event := &workflow.ActionEvent{ + Id: actionID, + Phase: common.ActionPhase_ACTION_PHASE_ABORTED, + Attempt: attempts, + UpdatedTime: timestamppb.New(now), + } + info, err := proto.Marshal(event) + if err != nil { + return fmt.Errorf("marshal abort event: %w", err) + } + + _, err = r.db.ExecContext(ctx, + `INSERT INTO action_events (project, domain, run_name, name, attempt, phase, version, info, error_kind, created_at, updated_at) + VALUES ($1, $2, $3, $4, $5, $6, 0, $7, NULL, $8, $8) + ON CONFLICT DO NOTHING`, + actionID.Run.Project, actionID.Run.Domain, actionID.Run.Name, actionID.Name, + attempts, int32(common.ActionPhase_ACTION_PHASE_ABORTED), info, now, + ) + return err +} + // ListPendingAborts returns all actions that have abort_requested_at set (i.e. awaiting pod termination). func (r *actionRepo) ListPendingAborts(ctx context.Context) ([]*models.Action, error) { var actions []*models.Action @@ -495,7 +673,7 @@ func (r *actionRepo) MarkAbortAttempt(ctx context.Context, actionID *common.Acti // ClearAbortRequest clears abort_requested_at (and resets counters) once the pod is confirmed terminated. func (r *actionRepo) ClearAbortRequest(ctx context.Context, actionID *common.ActionIdentifier) error { _, err := r.db.ExecContext(ctx, - `UPDATE actions SET abort_requested_at = NULL, abort_attempt_count = 0, abort_reason = NULL, updated_at = $1 + `UPDATE actions SET abort_requested_at = NULL, abort_attempt_count = 0, updated_at = $1 WHERE project = $2 AND domain = $3 AND run_name = $4 AND name = $5`, time.Now(), actionID.Run.Project, actionID.Run.Domain, actionID.Run.Name, actionID.Name) if err != nil { diff --git a/runs/repository/interfaces/action.go b/runs/repository/interfaces/action.go index c5fd776cb9..d0a3f16c67 100644 --- a/runs/repository/interfaces/action.go +++ b/runs/repository/interfaces/action.go @@ -15,7 +15,10 @@ type ActionRepo interface { // Run operations GetRun(ctx context.Context, runID *common.RunIdentifier) (*models.Run, error) ListRuns(ctx context.Context, req *workflow.ListRunsRequest) ([]*models.Run, string, error) - AbortRun(ctx context.Context, runID *common.RunIdentifier, reason string, abortedBy *common.EnrichedIdentity) error + // AbortRun marks the root action as aborted and sets abort_requested_at on all + // non-terminal child actions. Returns the identifiers of those child actions so + // the caller can push them to the AbortReconciler for pod termination. + AbortRun(ctx context.Context, runID *common.RunIdentifier, reason string, abortedBy *common.EnrichedIdentity) ([]*common.ActionIdentifier, error) // Action operations CreateAction(ctx context.Context, action *models.Action, updateTriggeredAt bool) (*models.Action, error) diff --git a/runs/repository/mocks/mocks.go b/runs/repository/mocks/mocks.go index 06bc646609..26911b441b 100644 --- a/runs/repository/mocks/mocks.go +++ b/runs/repository/mocks/mocks.go @@ -113,20 +113,24 @@ func (_c *ActionRepo_AbortAction_Call) RunAndReturn(run func(ctx context.Context } // AbortRun provides a mock function for the type ActionRepo -func (_mock *ActionRepo) AbortRun(ctx context.Context, runID *common.RunIdentifier, reason string, abortedBy *common.EnrichedIdentity) error { +func (_mock *ActionRepo) AbortRun(ctx context.Context, runID *common.RunIdentifier, reason string, abortedBy *common.EnrichedIdentity) ([]*common.ActionIdentifier, error) { ret := _mock.Called(ctx, runID, reason, abortedBy) if len(ret) == 0 { panic("no return value specified for AbortRun") } - var r0 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *common.RunIdentifier, string, *common.EnrichedIdentity) error); ok { - r0 = returnFunc(ctx, runID, reason, abortedBy) + var r0 []*common.ActionIdentifier + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *common.RunIdentifier, string, *common.EnrichedIdentity) ([]*common.ActionIdentifier, error)); ok { + r0, r1 = returnFunc(ctx, runID, reason, abortedBy) } else { - r0 = ret.Error(0) + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*common.ActionIdentifier) + } + r1 = ret.Error(1) } - return r0 + return r0, r1 } // ActionRepo_AbortRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortRun' @@ -161,22 +165,17 @@ func (_c *ActionRepo_AbortRun_Call) Run(run func(ctx context.Context, runID *com if args[3] != nil { arg3 = args[3].(*common.EnrichedIdentity) } - run( - arg0, - arg1, - arg2, - arg3, - ) + run(arg0, arg1, arg2, arg3) }) return _c } -func (_c *ActionRepo_AbortRun_Call) Return(err error) *ActionRepo_AbortRun_Call { - _c.Call.Return(err) +func (_c *ActionRepo_AbortRun_Call) Return(childActions []*common.ActionIdentifier, err error) *ActionRepo_AbortRun_Call { + _c.Call.Return(childActions, err) return _c } -func (_c *ActionRepo_AbortRun_Call) RunAndReturn(run func(ctx context.Context, runID *common.RunIdentifier, reason string, abortedBy *common.EnrichedIdentity) error) *ActionRepo_AbortRun_Call { +func (_c *ActionRepo_AbortRun_Call) RunAndReturn(run func(ctx context.Context, runID *common.RunIdentifier, reason string, abortedBy *common.EnrichedIdentity) ([]*common.ActionIdentifier, error)) *ActionRepo_AbortRun_Call { _c.Call.Return(run) return _c } diff --git a/runs/service/abort_reconciler.go b/runs/service/abort_reconciler.go index adbd32ddb8..27d91e863e 100644 --- a/runs/service/abort_reconciler.go +++ b/runs/service/abort_reconciler.go @@ -2,8 +2,11 @@ package service import ( "context" + "database/sql" + "errors" "fmt" "math/rand" + "strings" "sync" "time" @@ -217,6 +220,12 @@ func (r *AbortReconciler) runWorker(ctx context.Context) { func (r *AbortReconciler) processTask(ctx context.Context, task abortTask) { attemptCount, err := r.repo.ActionRepo().MarkAbortAttempt(ctx, task.actionID) if err != nil { + if errors.Is(err, sql.ErrNoRows) { + // Action no longer exists in the DB — nothing to abort, drop it. + r.queue.remove(task.key) + logger.Warnf(ctx, "AbortReconciler: action %s not found in DB, dropping abort task", task.key) + return + } logger.Errorf(ctx, "AbortReconciler: failed to mark attempt for %s: %v", task.key, err) // Re-enqueue without counting — the DB row is authoritative; try again later. r.queue.scheduleRequeue(ctx, task, r.cfg.InitialDelay) @@ -264,6 +273,8 @@ func (r *AbortReconciler) processTask(ctx context.Context, task abortTask) { } // isAlreadyTerminated returns true for errors that indicate the action is already gone. +// The actions service may wrap a Kubernetes "not found" error as CodeInternal rather +// than CodeNotFound, so we also check for that case by inspecting the message. func isAlreadyTerminated(err error) bool { if err == nil { return false @@ -272,5 +283,14 @@ func isAlreadyTerminated(err error) bool { if !ok { return false } - return connectErr.Code() == connect.CodeNotFound + if connectErr.Code() == connect.CodeNotFound { + return true + } + // The actions service forwards Kubernetes API "not found" errors with CodeInternal. + // Treat those as "already gone" so the reconciler clears the DB entry instead of + // retrying indefinitely. + if connectErr.Code() == connect.CodeInternal && strings.Contains(connectErr.Message(), "not found") { + return true + } + return false } diff --git a/runs/service/run_service.go b/runs/service/run_service.go index abcbabeada..1b2c1f7b6d 100644 --- a/runs/service/run_service.go +++ b/runs/service/run_service.go @@ -388,13 +388,26 @@ func (s *RunService) AbortRun( } // Abort in database, then push to reconciler for background pod termination. - if err := s.repo.ActionRepo().AbortRun(ctx, req.Msg.RunId, reason, nil); err != nil { + // AbortRun marks the root action aborted and returns identifiers for any + // non-terminal child actions so we can push them to the reconciler too. + childActions, err := s.repo.ActionRepo().AbortRun(ctx, req.Msg.RunId, reason, nil) + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return nil, connect.NewError(connect.CodeNotFound, fmt.Errorf("run not found: %s/%s/%s", req.Msg.RunId.Project, req.Msg.RunId.Domain, req.Msg.RunId.Name)) + } logger.Errorf(ctx, "Failed to abort run: %v", err) return nil, connect.NewError(connect.CodeInternal, err) } if s.abortReconciler != nil { - s.abortReconciler.Push(ctx, &common.ActionIdentifier{Run: req.Msg.RunId, Name: req.Msg.RunId.Name}, reason) + // Push child actions first — they own the TaskAction CRDs and pods. + for _, actionID := range childActions { + s.abortReconciler.Push(ctx, actionID, reason) + } + // Also push the root action ("a0"). Its TaskAction CRD may not exist (it is + // a workflow-level composite action), but the reconciler handles that case + // gracefully via isAlreadyTerminated. + s.abortReconciler.Push(ctx, &common.ActionIdentifier{Run: req.Msg.RunId, Name: "a0"}, reason) } return connect.NewResponse(&workflow.AbortRunResponse{}), nil @@ -553,7 +566,13 @@ func (s *RunService) buildActionDetails(ctx context.Context, model *models.Actio } } case common.ActionPhase_ACTION_PHASE_ABORTED: - // TODO: set AbortInfo + abortInfo := &workflow.AbortInfo{} + if model.AbortReason != nil { + abortInfo.Reason = *model.AbortReason + } + action.Result = &workflow.ActionDetails_AbortInfo{ + AbortInfo: abortInfo, + } } return action, nil @@ -982,6 +1001,9 @@ func (s *RunService) AbortAction( // Abort in database, then push to reconciler for background pod termination. if err := s.repo.ActionRepo().AbortAction(ctx, req.Msg.ActionId, reason, nil); err != nil { + if errors.Is(err, sql.ErrNoRows) { + return nil, connect.NewError(connect.CodeNotFound, fmt.Errorf("action not found: %s", req.Msg.ActionId.Name)) + } logger.Errorf(ctx, "Failed to abort action: %v", err) return nil, connect.NewError(connect.CodeInternal, err) } diff --git a/runs/service/run_service_test.go b/runs/service/run_service_test.go index 624b8b15a9..cd7af55262 100644 --- a/runs/service/run_service_test.go +++ b/runs/service/run_service_test.go @@ -653,7 +653,7 @@ func TestAbortRun(t *testing.T) { t.Run("success with default reason", func(t *testing.T) { actionRepo, actionsClient, svc := newTestService(t) - actionRepo.On("AbortRun", mock.Anything, runID, "User requested abort", (*common.EnrichedIdentity)(nil)).Return(nil) + actionRepo.On("AbortRun", mock.Anything, runID, "User requested abort", (*common.EnrichedIdentity)(nil)).Return(([]*common.ActionIdentifier)(nil), nil) _, err := svc.AbortRun(context.Background(), connect.NewRequest(&workflow.AbortRunRequest{RunId: runID})) assert.NoError(t, err) @@ -664,7 +664,7 @@ func TestAbortRun(t *testing.T) { actionRepo, actionsClient, svc := newTestService(t) reason := "timeout exceeded" - actionRepo.On("AbortRun", mock.Anything, runID, reason, (*common.EnrichedIdentity)(nil)).Return(nil) + actionRepo.On("AbortRun", mock.Anything, runID, reason, (*common.EnrichedIdentity)(nil)).Return(([]*common.ActionIdentifier)(nil), nil) _, err := svc.AbortRun(context.Background(), connect.NewRequest(&workflow.AbortRunRequest{RunId: runID, Reason: &reason})) assert.NoError(t, err) @@ -674,7 +674,7 @@ func TestAbortRun(t *testing.T) { t.Run("db error returns error", func(t *testing.T) { actionRepo, actionsClient, svc := newTestService(t) - actionRepo.On("AbortRun", mock.Anything, runID, mock.Anything, mock.Anything).Return(errors.New("db unavailable")) + actionRepo.On("AbortRun", mock.Anything, runID, mock.Anything, mock.Anything).Return(([]*common.ActionIdentifier)(nil), errors.New("db unavailable")) _, err := svc.AbortRun(context.Background(), connect.NewRequest(&workflow.AbortRunRequest{RunId: runID})) assert.Error(t, err) diff --git a/tasks/lessons.md b/tasks/lessons.md new file mode 100644 index 0000000000..e5ed3e44e2 --- /dev/null +++ b/tasks/lessons.md @@ -0,0 +1,19 @@ +# Claude Lessons Learned + +This file tracks patterns and corrections from past sessions. +Updated after every user correction. Reviewed at session start. + +## Code Quality + + +## Architecture Decisions + + +## Testing Patterns + + +## Communication + + +## Project-Specific Gotchas + From 4b8719d31ab1ea12d5123924e820e2f7dcf189eb Mon Sep 17 00:00:00 2001 From: "M. Adil Fayyaz" <62440954+AdilFayyaz@users.noreply.github.com> Date: Wed, 15 Apr 2026 10:30:45 -0700 Subject: [PATCH 02/11] fix Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com> --- runs/repository/impl/action.go | 5 ++++- runs/service/run_service.go | 11 ++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/runs/repository/impl/action.go b/runs/repository/impl/action.go index 1025499054..11a1a43401 100644 --- a/runs/repository/impl/action.go +++ b/runs/repository/impl/action.go @@ -596,6 +596,7 @@ func (r *actionRepo) AbortAction(ctx context.Context, actionID *common.ActionIde } defer rows.Close() + var descendantCount int for rows.Next() { var childName string var childAttempts uint32 @@ -603,17 +604,19 @@ func (r *actionRepo) AbortAction(ctx context.Context, actionID *common.ActionIde logger.Warnf(ctx, "AbortAction: failed to scan descendant row: %v", scanErr) continue } + descendantCount++ childID := &common.ActionIdentifier{Run: actionID.Run, Name: childName} if err := r.insertAbortEvent(ctx, childID, childAttempts, reason, now); err != nil { logger.Warnf(ctx, "AbortAction: failed to insert abort event for descendant %s: %v", childName, err) } r.notifyActionUpdate(ctx, childID) + logger.Infof(ctx, "AbortAction: cascade-aborted descendant %s of %s", childName, actionID.Name) } if err := rows.Err(); err != nil { logger.Warnf(ctx, "AbortAction: error iterating descendant rows for %s: %v", actionID.Name, err) } - logger.Infof(ctx, "Aborted action %s and its descendants", actionID.Name) + logger.Infof(ctx, "AbortAction: aborted %s and %d descendant(s)", actionID.Name, descendantCount) return nil } diff --git a/runs/service/run_service.go b/runs/service/run_service.go index 1b2c1f7b6d..f058ee7983 100644 --- a/runs/service/run_service.go +++ b/runs/service/run_service.go @@ -1077,6 +1077,12 @@ func (s *RunService) WatchActionDetails( actionID := req.Msg.ActionId logger.Infof(ctx, "Received WatchActionDetails request for: %s/%s", actionID.Run.Name, actionID.Name) + // Subscribe FIRST to avoid missing notifications that fire between the DB + // read and the subscription setup (same pattern as WatchActions). + updates := make(chan *models.Action, 50) + errs := make(chan error, 1) + go s.repo.ActionRepo().WatchActionUpdates(ctx, actionID, updates, errs) + // Step 1: Send initial state from DB details, err := s.getActionDetails(ctx, req.Msg.GetActionId()) if err != nil { @@ -1094,11 +1100,6 @@ func (s *RunService) WatchActionDetails( return nil } - // Step 2: Watch DB for updates - updates := make(chan *models.Action, 50) - errs := make(chan error, 1) - go s.repo.ActionRepo().WatchActionUpdates(ctx, actionID, updates, errs) - for { select { case <-ctx.Done(): From 9d61690ab8731ca069f4ee8d2766136d3c0637d2 Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Wed, 15 Apr 2026 18:26:04 -0700 Subject: [PATCH 03/11] fix Signed-off-by: Kevin Su --- actions/k8s/client.go | 5 +---- runs/repository/impl/action.go | 8 +++++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/actions/k8s/client.go b/actions/k8s/client.go index ae35c8e15f..3c1c8157a0 100644 --- a/actions/k8s/client.go +++ b/actions/k8s/client.go @@ -507,10 +507,7 @@ func buildActionUpdate(ctx context.Context, taskAction *executorv1.TaskAction, e } phase := GetPhaseFromConditions(taskAction) - // A TaskAction deleted without a terminal condition was cascade-deleted by K8s - // (e.g. its parent was aborted). Treat it as aborted so the DB and UI reflect - // the real outcome instead of leaving the phase as UNSPECIFIED. - if eventType == watch.Deleted && phase == common.ActionPhase_ACTION_PHASE_UNSPECIFIED { + if eventType == watch.Deleted { phase = common.ActionPhase_ACTION_PHASE_ABORTED } diff --git a/runs/repository/impl/action.go b/runs/repository/impl/action.go index 11a1a43401..0be4131c0d 100644 --- a/runs/repository/impl/action.go +++ b/runs/repository/impl/action.go @@ -154,7 +154,8 @@ func (r *actionRepo) AbortRun(ctx context.Context, runID *common.RunIdentifier, ended_at = COALESCE(ended_at, GREATEST($2, created_at)), duration_ms = EXTRACT(EPOCH FROM (COALESCE(ended_at, GREATEST($2, created_at)) - created_at)) * 1000 WHERE project = $6 AND domain = $7 AND run_name = $8 AND parent_action_name IS NULL - RETURNING name, attempts`, + RETURNING name, COALESCE((SELECT MAX(attempt) FROM action_events + WHERE project = $6 AND domain = $7 AND run_name = $8 AND name = actions.name), attempts)`, abortedPhase, now, now, 0, reason, runID.Project, runID.Domain, runID.Name, ).Scan(&rootName, &rootAttempts) @@ -174,7 +175,8 @@ func (r *actionRepo) AbortRun(ctx context.Context, runID *common.RunIdentifier, WHERE project = $5 AND domain = $6 AND run_name = $7 AND parent_action_name IS NOT NULL AND phase != $8 AND phase != $1 - RETURNING name, attempts`, + RETURNING name, COALESCE((SELECT MAX(attempt) FROM action_events + WHERE project = $5 AND domain = $6 AND run_name = $7 AND name = actions.name), attempts)`, abortedPhase, now, now, reason, runID.Project, runID.Domain, runID.Name, succeededPhase, @@ -1037,7 +1039,7 @@ func (r *actionRepo) processNotifications() { select { case ch <- notif.Extra: default: - logger.Warnf(context.Background(), "Action subscriber channel full, dropping notification") + logger.Warnf(context.Background(), "Action subscriber channel full, dropping notification payload=%s", notif.Extra) } } r.mu.RUnlock() From d7096cae19d41df2e4d4b6fcd9fd1382bffa3f61 Mon Sep 17 00:00:00 2001 From: "M. Adil Fayyaz" <62440954+AdilFayyaz@users.noreply.github.com> Date: Thu, 16 Apr 2026 11:39:46 -0700 Subject: [PATCH 04/11] fix: child CRD deletion gets handled by k8s natively Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com> --- runs/repository/impl/action.go | 151 +++------------------------ runs/repository/interfaces/action.go | 10 +- runs/repository/mocks/mocks.go | 22 ++-- runs/service/run_service.go | 16 +-- runs/service/run_service_test.go | 6 +- 5 files changed, 38 insertions(+), 167 deletions(-) diff --git a/runs/repository/impl/action.go b/runs/repository/impl/action.go index 0be4131c0d..4b44289773 100644 --- a/runs/repository/impl/action.go +++ b/runs/repository/impl/action.go @@ -138,15 +138,12 @@ func (r *actionRepo) ListRuns(ctx context.Context, req *workflow.ListRunsRequest return runs, nextToken, nil } -// AbortRun marks the root action as aborted and sets abort_requested_at on all -// non-terminal child actions so the reconciler can terminate their pods. -// Returns the ActionIdentifiers of the child actions that were marked. -func (r *actionRepo) AbortRun(ctx context.Context, runID *common.RunIdentifier, reason string, abortedBy *common.EnrichedIdentity) ([]*common.ActionIdentifier, error) { +// AbortRun marks only the root action as ABORTED and sets abort_requested_at on it. +// K8s cascades CRD deletion to child actions via OwnerReferences; the action service +// informer handles marking them ABORTED in DB when their CRDs are deleted. +func (r *actionRepo) AbortRun(ctx context.Context, runID *common.RunIdentifier, reason string, abortedBy *common.EnrichedIdentity) error { now := time.Now() - abortedPhase := int32(common.ActionPhase_ACTION_PHASE_ABORTED) - succeededPhase := int32(common.ActionPhase_ACTION_PHASE_SUCCEEDED) - // Mark the root action as aborted. var rootName string var rootAttempts uint32 err := r.db.QueryRowxContext(ctx, @@ -156,84 +153,26 @@ func (r *actionRepo) AbortRun(ctx context.Context, runID *common.RunIdentifier, WHERE project = $6 AND domain = $7 AND run_name = $8 AND parent_action_name IS NULL RETURNING name, COALESCE((SELECT MAX(attempt) FROM action_events WHERE project = $6 AND domain = $7 AND run_name = $8 AND name = actions.name), attempts)`, - abortedPhase, now, now, 0, reason, + int32(common.ActionPhase_ACTION_PHASE_ABORTED), now, now, 0, reason, runID.Project, runID.Domain, runID.Name, ).Scan(&rootName, &rootAttempts) if errors.Is(err, sql.ErrNoRows) { - return nil, fmt.Errorf("run not found: %w", sql.ErrNoRows) + return fmt.Errorf("run not found: %w", sql.ErrNoRows) } if err != nil { - return nil, fmt.Errorf("failed to abort run: %w", err) + return fmt.Errorf("failed to abort run: %w", err) } - // Cascade abort to non-terminal child actions so the reconciler terminates their pods. - // Skip SUCCEEDED and ABORTED rows — they are already done. - rows, err := r.db.QueryxContext(ctx, - `UPDATE actions SET phase = $1, updated_at = $2, abort_requested_at = $3, abort_attempt_count = 0, abort_reason = $4, - ended_at = COALESCE(ended_at, GREATEST($2, created_at)), - duration_ms = EXTRACT(EPOCH FROM (COALESCE(ended_at, GREATEST($2, created_at)) - created_at)) * 1000 - WHERE project = $5 AND domain = $6 AND run_name = $7 - AND parent_action_name IS NOT NULL - AND phase != $8 AND phase != $1 - RETURNING name, COALESCE((SELECT MAX(attempt) FROM action_events - WHERE project = $5 AND domain = $6 AND run_name = $7 AND name = actions.name), attempts)`, - abortedPhase, now, now, reason, - runID.Project, runID.Domain, runID.Name, - succeededPhase, - ) - if err != nil { - return nil, fmt.Errorf("failed to abort child actions: %w", err) - } - defer rows.Close() - - type childRow struct { - name string - attempts uint32 - } - var children []childRow - var childIDs []*common.ActionIdentifier - for rows.Next() { - var cr childRow - if scanErr := rows.Scan(&cr.name, &cr.attempts); scanErr != nil { - return nil, fmt.Errorf("failed to scan child action name: %w", scanErr) - } - children = append(children, cr) - childIDs = append(childIDs, &common.ActionIdentifier{ - Run: runID, - Name: cr.name, - }) - } - if err := rows.Err(); err != nil { - return nil, fmt.Errorf("failed to iterate child actions: %w", err) - } - - // Insert ABORTED phase-transition events so WatchActionDetails returns a - // phaseTransitions entry with ABORTED for each affected action. rootID := &common.ActionIdentifier{Run: runID, Name: rootName} if err := r.insertAbortEvent(ctx, rootID, rootAttempts, reason, now); err != nil { logger.Warnf(ctx, "AbortRun: failed to insert abort event for root %s: %v", rootName, err) } - for _, cr := range children { - childID := &common.ActionIdentifier{Run: runID, Name: cr.name} - if err := r.insertAbortEvent(ctx, childID, cr.attempts, reason, now); err != nil { - logger.Warnf(ctx, "AbortRun: failed to insert abort event for %s: %v", cr.name, err) - } - } - // Notify run subscribers. r.notifyRunUpdate(ctx, runID) - - // Notify action subscribers for the root and every aborted child so that - // WatchAllActionUpdates (used by the UI to show per-action status) reflects - // the phase change immediately. r.notifyActionUpdate(ctx, rootID) - for _, id := range childIDs { - r.notifyActionUpdate(ctx, id) - } - logger.Infof(ctx, "Aborted run: %s/%s/%s (%d child action(s) queued for termination)", - runID.Project, runID.Domain, runID.Name, len(childIDs)) - return childIDs, nil + logger.Infof(ctx, "Aborted run: %s/%s/%s", runID.Project, runID.Domain, runID.Name) + return nil } // InsertEvents inserts a batch of action events, ignoring duplicates (same PK = idempotent). @@ -531,26 +470,22 @@ func (r *actionRepo) UpdateActionPhase( return nil } -// AbortAction aborts a specific action and all of its descendants. -// Children cannot run without their parent, so they are marked ABORTED immediately. -// K8s OwnerReferences handle pod/CR termination for task-action children; trace -// children have no pods and require only the DB update. +// AbortAction marks only the targeted action as ABORTED and sets abort_requested_at. +// K8s cascades CRD deletion to descendants via OwnerReferences; the action service +// informer handles marking them ABORTED in DB when their CRDs are deleted. func (r *actionRepo) AbortAction(ctx context.Context, actionID *common.ActionIdentifier, reason string, abortedBy *common.EnrichedIdentity) error { now := time.Now() - abortedPhase := int32(common.ActionPhase_ACTION_PHASE_ABORTED) - succeededPhase := int32(common.ActionPhase_ACTION_PHASE_SUCCEEDED) - var name string var attempts uint32 err := r.db.QueryRowxContext(ctx, `UPDATE actions SET phase = $1, updated_at = $2, abort_requested_at = $3, abort_attempt_count = $4, abort_reason = $5, ended_at = COALESCE(ended_at, GREATEST($2, created_at)), duration_ms = EXTRACT(EPOCH FROM (COALESCE(ended_at, GREATEST($2, created_at)) - created_at)) * 1000 WHERE project = $6 AND domain = $7 AND run_name = $8 AND name = $9 - RETURNING name, attempts`, - abortedPhase, now, now, 0, reason, + RETURNING attempts`, + int32(common.ActionPhase_ACTION_PHASE_ABORTED), now, now, 0, reason, actionID.Run.Project, actionID.Run.Domain, actionID.Run.Name, actionID.Name, - ).Scan(&name, &attempts) + ).Scan(&attempts) if errors.Is(err, sql.ErrNoRows) { return fmt.Errorf("action not found: %w", sql.ErrNoRows) } @@ -562,63 +497,9 @@ func (r *actionRepo) AbortAction(ctx context.Context, actionID *common.ActionIde logger.Warnf(ctx, "AbortAction: failed to insert abort event for %s: %v", actionID.Name, err) } - // Notify action subscribers. r.notifyActionUpdate(ctx, actionID) - // Cascade ABORTED to all descendants of this action (recursive: children, - // grandchildren, etc.) that are not yet in a terminal phase. - // We use a recursive CTE so all depths are handled in a single round-trip. - rows, err := r.db.QueryxContext(ctx, - `WITH RECURSIVE descendants AS ( - SELECT name, attempts - FROM actions - WHERE project = $1 AND domain = $2 AND run_name = $3 - AND parent_action_name = $4 - UNION ALL - SELECT a.name, a.attempts - FROM actions a - JOIN descendants d ON a.parent_action_name = d.name - WHERE a.project = $1 AND a.domain = $2 AND a.run_name = $3 - ) - UPDATE actions - SET phase = $5, updated_at = $6, abort_reason = $7, - ended_at = COALESCE(ended_at, GREATEST($6, created_at)), - duration_ms = EXTRACT(EPOCH FROM (COALESCE(ended_at, GREATEST($6, created_at)) - created_at)) * 1000 - FROM descendants - WHERE actions.project = $1 AND actions.domain = $2 AND actions.run_name = $3 - AND actions.name = descendants.name - AND actions.phase != $5 AND actions.phase != $8 - RETURNING actions.name, actions.attempts`, - actionID.Run.Project, actionID.Run.Domain, actionID.Run.Name, actionID.Name, - abortedPhase, now, reason, succeededPhase, - ) - if err != nil { - logger.Warnf(ctx, "AbortAction: failed to cascade abort to descendants of %s: %v", actionID.Name, err) - return nil - } - defer rows.Close() - - var descendantCount int - for rows.Next() { - var childName string - var childAttempts uint32 - if scanErr := rows.Scan(&childName, &childAttempts); scanErr != nil { - logger.Warnf(ctx, "AbortAction: failed to scan descendant row: %v", scanErr) - continue - } - descendantCount++ - childID := &common.ActionIdentifier{Run: actionID.Run, Name: childName} - if err := r.insertAbortEvent(ctx, childID, childAttempts, reason, now); err != nil { - logger.Warnf(ctx, "AbortAction: failed to insert abort event for descendant %s: %v", childName, err) - } - r.notifyActionUpdate(ctx, childID) - logger.Infof(ctx, "AbortAction: cascade-aborted descendant %s of %s", childName, actionID.Name) - } - if err := rows.Err(); err != nil { - logger.Warnf(ctx, "AbortAction: error iterating descendant rows for %s: %v", actionID.Name, err) - } - - logger.Infof(ctx, "AbortAction: aborted %s and %d descendant(s)", actionID.Name, descendantCount) + logger.Infof(ctx, "AbortAction: aborted %s", actionID.Name) return nil } diff --git a/runs/repository/interfaces/action.go b/runs/repository/interfaces/action.go index d0a3f16c67..48f5b3d73c 100644 --- a/runs/repository/interfaces/action.go +++ b/runs/repository/interfaces/action.go @@ -15,10 +15,10 @@ type ActionRepo interface { // Run operations GetRun(ctx context.Context, runID *common.RunIdentifier) (*models.Run, error) ListRuns(ctx context.Context, req *workflow.ListRunsRequest) ([]*models.Run, string, error) - // AbortRun marks the root action as aborted and sets abort_requested_at on all - // non-terminal child actions. Returns the identifiers of those child actions so - // the caller can push them to the AbortReconciler for pod termination. - AbortRun(ctx context.Context, runID *common.RunIdentifier, reason string, abortedBy *common.EnrichedIdentity) ([]*common.ActionIdentifier, error) + // AbortRun marks only the root action as ABORTED and sets abort_requested_at on it. + // K8s cascades CRD deletion to child actions via OwnerReferences; the action service + // informer handles marking them ABORTED in DB when their CRDs are deleted. + AbortRun(ctx context.Context, runID *common.RunIdentifier, reason string, abortedBy *common.EnrichedIdentity) error // Action operations CreateAction(ctx context.Context, action *models.Action, updateTriggeredAt bool) (*models.Action, error) @@ -29,6 +29,8 @@ type ActionRepo interface { GetAction(ctx context.Context, actionID *common.ActionIdentifier) (*models.Action, error) ListActions(ctx context.Context, runID *common.RunIdentifier, limit int, token string) ([]*models.Action, string, error) UpdateActionPhase(ctx context.Context, actionID *common.ActionIdentifier, phase common.ActionPhase, attempts uint32, cacheStatus core.CatalogCacheStatus, endTime *time.Time) error + // AbortAction marks only the targeted action as ABORTED and sets abort_requested_at. + // K8s cascades CRD deletion to descendants via OwnerReferences. AbortAction(ctx context.Context, actionID *common.ActionIdentifier, reason string, abortedBy *common.EnrichedIdentity) error // Abort reconciliation — used by the background AbortReconciler. diff --git a/runs/repository/mocks/mocks.go b/runs/repository/mocks/mocks.go index 26911b441b..a941637f86 100644 --- a/runs/repository/mocks/mocks.go +++ b/runs/repository/mocks/mocks.go @@ -113,24 +113,20 @@ func (_c *ActionRepo_AbortAction_Call) RunAndReturn(run func(ctx context.Context } // AbortRun provides a mock function for the type ActionRepo -func (_mock *ActionRepo) AbortRun(ctx context.Context, runID *common.RunIdentifier, reason string, abortedBy *common.EnrichedIdentity) ([]*common.ActionIdentifier, error) { +func (_mock *ActionRepo) AbortRun(ctx context.Context, runID *common.RunIdentifier, reason string, abortedBy *common.EnrichedIdentity) error { ret := _mock.Called(ctx, runID, reason, abortedBy) if len(ret) == 0 { panic("no return value specified for AbortRun") } - var r0 []*common.ActionIdentifier - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *common.RunIdentifier, string, *common.EnrichedIdentity) ([]*common.ActionIdentifier, error)); ok { - r0, r1 = returnFunc(ctx, runID, reason, abortedBy) + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *common.RunIdentifier, string, *common.EnrichedIdentity) error); ok { + r0 = returnFunc(ctx, runID, reason, abortedBy) } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*common.ActionIdentifier) - } - r1 = ret.Error(1) + r0 = ret.Error(0) } - return r0, r1 + return r0 } // ActionRepo_AbortRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortRun' @@ -170,12 +166,12 @@ func (_c *ActionRepo_AbortRun_Call) Run(run func(ctx context.Context, runID *com return _c } -func (_c *ActionRepo_AbortRun_Call) Return(childActions []*common.ActionIdentifier, err error) *ActionRepo_AbortRun_Call { - _c.Call.Return(childActions, err) +func (_c *ActionRepo_AbortRun_Call) Return(err error) *ActionRepo_AbortRun_Call { + _c.Call.Return(err) return _c } -func (_c *ActionRepo_AbortRun_Call) RunAndReturn(run func(ctx context.Context, runID *common.RunIdentifier, reason string, abortedBy *common.EnrichedIdentity) ([]*common.ActionIdentifier, error)) *ActionRepo_AbortRun_Call { +func (_c *ActionRepo_AbortRun_Call) RunAndReturn(run func(ctx context.Context, runID *common.RunIdentifier, reason string, abortedBy *common.EnrichedIdentity) error) *ActionRepo_AbortRun_Call { _c.Call.Return(run) return _c } diff --git a/runs/service/run_service.go b/runs/service/run_service.go index f058ee7983..9bf5dd5076 100644 --- a/runs/service/run_service.go +++ b/runs/service/run_service.go @@ -387,11 +387,10 @@ func (s *RunService) AbortRun( reason = *req.Msg.Reason } - // Abort in database, then push to reconciler for background pod termination. - // AbortRun marks the root action aborted and returns identifiers for any - // non-terminal child actions so we can push them to the reconciler too. - childActions, err := s.repo.ActionRepo().AbortRun(ctx, req.Msg.RunId, reason, nil) - if err != nil { + // Mark only the root action ABORTED in DB, then push it to the reconciler. + // The reconciler deletes "a0"'s CRD; K8s cascades deletion to all child CRDs + // via OwnerReferences, and the action service informer marks them ABORTED in DB. + if err := s.repo.ActionRepo().AbortRun(ctx, req.Msg.RunId, reason, nil); err != nil { if errors.Is(err, sql.ErrNoRows) { return nil, connect.NewError(connect.CodeNotFound, fmt.Errorf("run not found: %s/%s/%s", req.Msg.RunId.Project, req.Msg.RunId.Domain, req.Msg.RunId.Name)) } @@ -400,13 +399,6 @@ func (s *RunService) AbortRun( } if s.abortReconciler != nil { - // Push child actions first — they own the TaskAction CRDs and pods. - for _, actionID := range childActions { - s.abortReconciler.Push(ctx, actionID, reason) - } - // Also push the root action ("a0"). Its TaskAction CRD may not exist (it is - // a workflow-level composite action), but the reconciler handles that case - // gracefully via isAlreadyTerminated. s.abortReconciler.Push(ctx, &common.ActionIdentifier{Run: req.Msg.RunId, Name: "a0"}, reason) } diff --git a/runs/service/run_service_test.go b/runs/service/run_service_test.go index cd7af55262..624b8b15a9 100644 --- a/runs/service/run_service_test.go +++ b/runs/service/run_service_test.go @@ -653,7 +653,7 @@ func TestAbortRun(t *testing.T) { t.Run("success with default reason", func(t *testing.T) { actionRepo, actionsClient, svc := newTestService(t) - actionRepo.On("AbortRun", mock.Anything, runID, "User requested abort", (*common.EnrichedIdentity)(nil)).Return(([]*common.ActionIdentifier)(nil), nil) + actionRepo.On("AbortRun", mock.Anything, runID, "User requested abort", (*common.EnrichedIdentity)(nil)).Return(nil) _, err := svc.AbortRun(context.Background(), connect.NewRequest(&workflow.AbortRunRequest{RunId: runID})) assert.NoError(t, err) @@ -664,7 +664,7 @@ func TestAbortRun(t *testing.T) { actionRepo, actionsClient, svc := newTestService(t) reason := "timeout exceeded" - actionRepo.On("AbortRun", mock.Anything, runID, reason, (*common.EnrichedIdentity)(nil)).Return(([]*common.ActionIdentifier)(nil), nil) + actionRepo.On("AbortRun", mock.Anything, runID, reason, (*common.EnrichedIdentity)(nil)).Return(nil) _, err := svc.AbortRun(context.Background(), connect.NewRequest(&workflow.AbortRunRequest{RunId: runID, Reason: &reason})) assert.NoError(t, err) @@ -674,7 +674,7 @@ func TestAbortRun(t *testing.T) { t.Run("db error returns error", func(t *testing.T) { actionRepo, actionsClient, svc := newTestService(t) - actionRepo.On("AbortRun", mock.Anything, runID, mock.Anything, mock.Anything).Return(([]*common.ActionIdentifier)(nil), errors.New("db unavailable")) + actionRepo.On("AbortRun", mock.Anything, runID, mock.Anything, mock.Anything).Return(errors.New("db unavailable")) _, err := svc.AbortRun(context.Background(), connect.NewRequest(&workflow.AbortRunRequest{RunId: runID})) assert.Error(t, err) From 53e570ea73f665ea4e9f159d84fe4f5aee0d6138 Mon Sep 17 00:00:00 2001 From: "M. Adil Fayyaz" <62440954+AdilFayyaz@users.noreply.github.com> Date: Thu, 16 Apr 2026 11:42:39 -0700 Subject: [PATCH 05/11] remove lessons.md Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com> --- tasks/lessons.md | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 tasks/lessons.md diff --git a/tasks/lessons.md b/tasks/lessons.md deleted file mode 100644 index e5ed3e44e2..0000000000 --- a/tasks/lessons.md +++ /dev/null @@ -1,19 +0,0 @@ -# Claude Lessons Learned - -This file tracks patterns and corrections from past sessions. -Updated after every user correction. Reviewed at session start. - -## Code Quality - - -## Architecture Decisions - - -## Testing Patterns - - -## Communication - - -## Project-Specific Gotchas - From 727c51a61a86889e1d927bcc3a9378723ed7e5bf Mon Sep 17 00:00:00 2001 From: "M. Adil Fayyaz" <62440954+AdilFayyaz@users.noreply.github.com> Date: Thu, 16 Apr 2026 12:52:47 -0700 Subject: [PATCH 06/11] buggy fix Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com> --- docker/demo-bundled/manifests/complete.yaml | 180 ++++++++++++++++++++ docker/demo-bundled/manifests/dev.yaml | 180 ++++++++++++++++++++ runs/repository/impl/action.go | 27 +-- 3 files changed, 367 insertions(+), 20 deletions(-) diff --git a/docker/demo-bundled/manifests/complete.yaml b/docker/demo-bundled/manifests/complete.yaml index a452dabf7c..b0bc496aa1 100644 --- a/docker/demo-bundled/manifests/complete.yaml +++ b/docker/demo-bundled/manifests/complete.yaml @@ -301,6 +301,20 @@ metadata: name: flyte-binary namespace: flyte --- +apiVersion: v1 +automountServiceAccountToken: true +kind: ServiceAccount +metadata: + labels: + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: minio + helm.sh/chart: minio-12.6.7 + name: flyte-demo-minio + namespace: flyte +secrets: +- name: flyte-demo-minio +--- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -630,6 +644,21 @@ stringData: type: Opaque --- apiVersion: v1 +data: + root-password: T0IwSHZXUVVjaA== + root-user: YWRtaW4= +kind: Secret +metadata: + labels: + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: minio + helm.sh/chart: minio-12.6.7 + name: flyte-demo-minio + namespace: flyte +type: Opaque +--- +apiVersion: v1 data: access-key: cnVzdGZz secret-key: cnVzdGZzc3RvcmFnZQ== @@ -748,6 +777,31 @@ spec: --- apiVersion: v1 kind: Service +metadata: + labels: + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: minio + helm.sh/chart: minio-12.6.7 + name: flyte-demo-minio + namespace: flyte +spec: + ports: + - name: minio-api + nodePort: null + port: 9000 + targetPort: minio-api + - name: minio-console + nodePort: null + port: 9001 + targetPort: minio-console + selector: + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/name: minio + type: ClusterIP +--- +apiVersion: v1 +kind: Service metadata: labels: app.kubernetes.io/name: embedded-postgresql @@ -805,6 +859,23 @@ spec: --- apiVersion: v1 kind: PersistentVolumeClaim +metadata: + labels: + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: minio + helm.sh/chart: minio-12.6.7 + name: flyte-demo-minio + namespace: flyte +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 8Gi +--- +apiVersion: v1 +kind: PersistentVolumeClaim metadata: labels: app.kubernetes.io/instance: flyte-demo @@ -1037,6 +1108,115 @@ spec: --- apiVersion: apps/v1 kind: Deployment +metadata: + labels: + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: minio + helm.sh/chart: minio-12.6.7 + name: flyte-demo-minio + namespace: flyte +spec: + selector: + matchLabels: + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/name: minio + strategy: + type: Recreate + template: + metadata: + annotations: + checksum/credentials-secret: 493f14e3979438a37d8ff17219ddaa5322fd83fc44d3918296e8e7a4dd95ab0b + labels: + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: minio + helm.sh/chart: minio-12.6.7 + spec: + affinity: + nodeAffinity: null + podAffinity: null + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchLabels: + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/name: minio + topologyKey: kubernetes.io/hostname + weight: 1 + containers: + - env: + - name: BITNAMI_DEBUG + value: "false" + - name: MINIO_SCHEME + value: http + - name: MINIO_FORCE_NEW_KEYS + value: "no" + - name: MINIO_ROOT_USER + valueFrom: + secretKeyRef: + key: root-user + name: flyte-demo-minio + - name: MINIO_ROOT_PASSWORD + valueFrom: + secretKeyRef: + key: root-password + name: flyte-demo-minio + - name: MINIO_BROWSER + value: "on" + - name: MINIO_PROMETHEUS_AUTH_TYPE + value: public + - name: MINIO_CONSOLE_PORT_NUMBER + value: "9001" + envFrom: null + image: docker.io/bitnami/minio:2023.7.11-debian-11-r0 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 5 + httpGet: + path: /minio/health/live + port: minio-api + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 5 + successThreshold: 1 + timeoutSeconds: 5 + name: minio + ports: + - containerPort: 9000 + name: minio-api + protocol: TCP + - containerPort: 9001 + name: minio-console + protocol: TCP + readinessProbe: + failureThreshold: 5 + initialDelaySeconds: 5 + periodSeconds: 5 + successThreshold: 1 + tcpSocket: + port: minio-api + timeoutSeconds: 1 + resources: + limits: {} + requests: {} + securityContext: + runAsNonRoot: true + runAsUser: 1001 + volumeMounts: + - mountPath: /data + name: data + securityContext: + fsGroup: 1001 + serviceAccountName: flyte-demo-minio + volumes: + - name: data + persistentVolumeClaim: + claimName: flyte-demo-minio +--- +apiVersion: apps/v1 +kind: Deployment metadata: labels: app.kubernetes.io/instance: flyte-demo diff --git a/docker/demo-bundled/manifests/dev.yaml b/docker/demo-bundled/manifests/dev.yaml index 55e645545f..720a5fa8ae 100644 --- a/docker/demo-bundled/manifests/dev.yaml +++ b/docker/demo-bundled/manifests/dev.yaml @@ -291,6 +291,20 @@ spec: status: {} --- apiVersion: v1 +automountServiceAccountToken: true +kind: ServiceAccount +metadata: + labels: + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: minio + helm.sh/chart: minio-12.6.7 + name: flyte-demo-minio + namespace: flyte +secrets: +- name: flyte-demo-minio +--- +apiVersion: v1 data: config.yml: |- health: @@ -342,6 +356,21 @@ metadata: type: Opaque --- apiVersion: v1 +data: + root-password: eDlxRWpkVUh1TA== + root-user: YWRtaW4= +kind: Secret +metadata: + labels: + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: minio + helm.sh/chart: minio-12.6.7 + name: flyte-demo-minio + namespace: flyte +type: Opaque +--- +apiVersion: v1 data: access-key: cnVzdGZz secret-key: cnVzdGZzc3RvcmFnZQ== @@ -460,6 +489,31 @@ spec: --- apiVersion: v1 kind: Service +metadata: + labels: + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: minio + helm.sh/chart: minio-12.6.7 + name: flyte-demo-minio + namespace: flyte +spec: + ports: + - name: minio-api + nodePort: null + port: 9000 + targetPort: minio-api + - name: minio-console + nodePort: null + port: 9001 + targetPort: minio-console + selector: + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/name: minio + type: ClusterIP +--- +apiVersion: v1 +kind: Service metadata: labels: app.kubernetes.io/name: embedded-postgresql @@ -517,6 +571,23 @@ spec: --- apiVersion: v1 kind: PersistentVolumeClaim +metadata: + labels: + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: minio + helm.sh/chart: minio-12.6.7 + name: flyte-demo-minio + namespace: flyte +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 8Gi +--- +apiVersion: v1 +kind: PersistentVolumeClaim metadata: labels: app.kubernetes.io/instance: flyte-demo @@ -651,6 +722,115 @@ spec: --- apiVersion: apps/v1 kind: Deployment +metadata: + labels: + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: minio + helm.sh/chart: minio-12.6.7 + name: flyte-demo-minio + namespace: flyte +spec: + selector: + matchLabels: + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/name: minio + strategy: + type: Recreate + template: + metadata: + annotations: + checksum/credentials-secret: 3a3d603fbe8175a402767b322dd849f1cd7768ab92b1a995877db1731889ce28 + labels: + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: minio + helm.sh/chart: minio-12.6.7 + spec: + affinity: + nodeAffinity: null + podAffinity: null + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchLabels: + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/name: minio + topologyKey: kubernetes.io/hostname + weight: 1 + containers: + - env: + - name: BITNAMI_DEBUG + value: "false" + - name: MINIO_SCHEME + value: http + - name: MINIO_FORCE_NEW_KEYS + value: "no" + - name: MINIO_ROOT_USER + valueFrom: + secretKeyRef: + key: root-user + name: flyte-demo-minio + - name: MINIO_ROOT_PASSWORD + valueFrom: + secretKeyRef: + key: root-password + name: flyte-demo-minio + - name: MINIO_BROWSER + value: "on" + - name: MINIO_PROMETHEUS_AUTH_TYPE + value: public + - name: MINIO_CONSOLE_PORT_NUMBER + value: "9001" + envFrom: null + image: docker.io/bitnami/minio:2023.7.11-debian-11-r0 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 5 + httpGet: + path: /minio/health/live + port: minio-api + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 5 + successThreshold: 1 + timeoutSeconds: 5 + name: minio + ports: + - containerPort: 9000 + name: minio-api + protocol: TCP + - containerPort: 9001 + name: minio-console + protocol: TCP + readinessProbe: + failureThreshold: 5 + initialDelaySeconds: 5 + periodSeconds: 5 + successThreshold: 1 + tcpSocket: + port: minio-api + timeoutSeconds: 1 + resources: + limits: {} + requests: {} + securityContext: + runAsNonRoot: true + runAsUser: 1001 + volumeMounts: + - mountPath: /data + name: data + securityContext: + fsGroup: 1001 + serviceAccountName: flyte-demo-minio + volumes: + - name: data + persistentVolumeClaim: + claimName: flyte-demo-minio +--- +apiVersion: apps/v1 +kind: Deployment metadata: labels: app.kubernetes.io/instance: flyte-demo diff --git a/runs/repository/impl/action.go b/runs/repository/impl/action.go index 4b44289773..fa2e9f02d8 100644 --- a/runs/repository/impl/action.go +++ b/runs/repository/impl/action.go @@ -145,17 +145,15 @@ func (r *actionRepo) AbortRun(ctx context.Context, runID *common.RunIdentifier, now := time.Now() var rootName string - var rootAttempts uint32 err := r.db.QueryRowxContext(ctx, `UPDATE actions SET phase = $1, updated_at = $2, abort_requested_at = $3, abort_attempt_count = $4, abort_reason = $5, ended_at = COALESCE(ended_at, GREATEST($2, created_at)), duration_ms = EXTRACT(EPOCH FROM (COALESCE(ended_at, GREATEST($2, created_at)) - created_at)) * 1000 WHERE project = $6 AND domain = $7 AND run_name = $8 AND parent_action_name IS NULL - RETURNING name, COALESCE((SELECT MAX(attempt) FROM action_events - WHERE project = $6 AND domain = $7 AND run_name = $8 AND name = actions.name), attempts)`, + RETURNING name`, int32(common.ActionPhase_ACTION_PHASE_ABORTED), now, now, 0, reason, runID.Project, runID.Domain, runID.Name, - ).Scan(&rootName, &rootAttempts) + ).Scan(&rootName) if errors.Is(err, sql.ErrNoRows) { return fmt.Errorf("run not found: %w", sql.ErrNoRows) } @@ -164,10 +162,6 @@ func (r *actionRepo) AbortRun(ctx context.Context, runID *common.RunIdentifier, } rootID := &common.ActionIdentifier{Run: runID, Name: rootName} - if err := r.insertAbortEvent(ctx, rootID, rootAttempts, reason, now); err != nil { - logger.Warnf(ctx, "AbortRun: failed to insert abort event for root %s: %v", rootName, err) - } - r.notifyRunUpdate(ctx, runID) r.notifyActionUpdate(ctx, rootID) @@ -476,25 +470,18 @@ func (r *actionRepo) UpdateActionPhase( func (r *actionRepo) AbortAction(ctx context.Context, actionID *common.ActionIdentifier, reason string, abortedBy *common.EnrichedIdentity) error { now := time.Now() - var attempts uint32 - err := r.db.QueryRowxContext(ctx, + result, err := r.db.ExecContext(ctx, `UPDATE actions SET phase = $1, updated_at = $2, abort_requested_at = $3, abort_attempt_count = $4, abort_reason = $5, ended_at = COALESCE(ended_at, GREATEST($2, created_at)), duration_ms = EXTRACT(EPOCH FROM (COALESCE(ended_at, GREATEST($2, created_at)) - created_at)) * 1000 - WHERE project = $6 AND domain = $7 AND run_name = $8 AND name = $9 - RETURNING attempts`, + WHERE project = $6 AND domain = $7 AND run_name = $8 AND name = $9`, int32(common.ActionPhase_ACTION_PHASE_ABORTED), now, now, 0, reason, - actionID.Run.Project, actionID.Run.Domain, actionID.Run.Name, actionID.Name, - ).Scan(&attempts) - if errors.Is(err, sql.ErrNoRows) { - return fmt.Errorf("action not found: %w", sql.ErrNoRows) - } + actionID.Run.Project, actionID.Run.Domain, actionID.Run.Name, actionID.Name) if err != nil { return fmt.Errorf("failed to abort action: %w", err) } - - if err := r.insertAbortEvent(ctx, actionID, attempts, reason, now); err != nil { - logger.Warnf(ctx, "AbortAction: failed to insert abort event for %s: %v", actionID.Name, err) + if n, _ := result.RowsAffected(); n == 0 { + return fmt.Errorf("action not found: %w", sql.ErrNoRows) } r.notifyActionUpdate(ctx, actionID) From b961612d6be3174909513a3d0efa312dee200c10 Mon Sep 17 00:00:00 2001 From: "M. Adil Fayyaz" <62440954+AdilFayyaz@users.noreply.github.com> Date: Thu, 16 Apr 2026 14:49:30 -0700 Subject: [PATCH 07/11] fix Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com> --- docker/demo-bundled/manifests/complete.yaml | 4 ++-- docker/demo-bundled/manifests/dev.yaml | 4 ++-- runs/repository/impl/action.go | 7 +++++- runs/service/run_service.go | 24 +++++++++++++++++---- 4 files changed, 30 insertions(+), 9 deletions(-) diff --git a/docker/demo-bundled/manifests/complete.yaml b/docker/demo-bundled/manifests/complete.yaml index b0bc496aa1..9fb613920e 100644 --- a/docker/demo-bundled/manifests/complete.yaml +++ b/docker/demo-bundled/manifests/complete.yaml @@ -645,7 +645,7 @@ type: Opaque --- apiVersion: v1 data: - root-password: T0IwSHZXUVVjaA== + root-password: cjF2aUFDVDlUYg== root-user: YWRtaW4= kind: Secret metadata: @@ -1126,7 +1126,7 @@ spec: template: metadata: annotations: - checksum/credentials-secret: 493f14e3979438a37d8ff17219ddaa5322fd83fc44d3918296e8e7a4dd95ab0b + checksum/credentials-secret: 43f71db202ade73034d075432e7cf0c825dfe9c3d78a690ec0bb4efc71df68fc labels: app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm diff --git a/docker/demo-bundled/manifests/dev.yaml b/docker/demo-bundled/manifests/dev.yaml index 720a5fa8ae..361ed12003 100644 --- a/docker/demo-bundled/manifests/dev.yaml +++ b/docker/demo-bundled/manifests/dev.yaml @@ -357,7 +357,7 @@ type: Opaque --- apiVersion: v1 data: - root-password: eDlxRWpkVUh1TA== + root-password: UE5CVFV3NFlWaA== root-user: YWRtaW4= kind: Secret metadata: @@ -740,7 +740,7 @@ spec: template: metadata: annotations: - checksum/credentials-secret: 3a3d603fbe8175a402767b322dd849f1cd7768ab92b1a995877db1731889ce28 + checksum/credentials-secret: 461ff2fb69f8a3fe29a90caf76a71cb0e0c5fb57b7e11b74b88c8e9efb4624df labels: app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm diff --git a/runs/repository/impl/action.go b/runs/repository/impl/action.go index fa2e9f02d8..235272388c 100644 --- a/runs/repository/impl/action.go +++ b/runs/repository/impl/action.go @@ -513,7 +513,12 @@ func (r *actionRepo) insertAbortEvent(ctx context.Context, actionID *common.Acti actionID.Run.Project, actionID.Run.Domain, actionID.Run.Name, actionID.Name, attempts, int32(common.ActionPhase_ACTION_PHASE_ABORTED), info, now, ) - return err + if err != nil { + return err + } + // Notify after the event is written so WatchActionDetails sees it when it re-fetches. + r.notifyActionUpdate(ctx, actionID) + return nil } // ListPendingAborts returns all actions that have abort_requested_at set (i.e. awaiting pod termination). diff --git a/runs/service/run_service.go b/runs/service/run_service.go index 9bf5dd5076..b9f8d7cdd2 100644 --- a/runs/service/run_service.go +++ b/runs/service/run_service.go @@ -722,6 +722,22 @@ func IsTerminalPhase(phase common.ActionPhase) bool { phase == common.ActionPhase_ACTION_PHASE_ABORTED } +// lastAttemptIsTerminal returns true when the highest-numbered attempt has reached a +// terminal phase. Used by WatchActionDetails to close the stream only after action_events +// reflects the terminal transition, not just the actions table. +func lastAttemptIsTerminal(attempts []*workflow.ActionAttempt) bool { + if len(attempts) == 0 { + return false + } + var last *workflow.ActionAttempt + for _, a := range attempts { + if last == nil || a.GetAttempt() > last.GetAttempt() { + last = a + } + } + return IsTerminalPhase(last.GetPhase()) +} + // GetActionData gets input and output data for an action by reading from storage. func (s *RunService) GetActionData( ctx context.Context, @@ -1087,8 +1103,8 @@ func (s *RunService) WatchActionDetails( return err } - // If the action is already in a terminal phase, no further updates are expected. - if IsTerminalPhase(details.GetStatus().GetPhase()) { + // Close only once action_events reflects the terminal phase, not just actions table. + if lastAttemptIsTerminal(details.GetAttempts()) { return nil } @@ -1116,8 +1132,8 @@ func (s *RunService) WatchActionDetails( }); err != nil { return err } - // Close the stream once the action reaches a terminal phase. - if IsTerminalPhase(details.GetStatus().GetPhase()) { + // Close once action_events reflects the terminal phase. + if lastAttemptIsTerminal(details.GetAttempts()) { return nil } } From c70c1692d372a57710b6c6c08a8c31d08807a505 Mon Sep 17 00:00:00 2001 From: "M. Adil Fayyaz" <62440954+AdilFayyaz@users.noreply.github.com> Date: Thu, 16 Apr 2026 14:53:39 -0700 Subject: [PATCH 08/11] make buf Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com> --- buf.lock | 4 +- gen/go/flyteidl2/connector/mocks/mocks.go | 2119 ------- .../workflow/workflowconnect/mocks/mocks.go | 4897 ----------------- 3 files changed, 2 insertions(+), 7018 deletions(-) delete mode 100644 gen/go/flyteidl2/connector/mocks/mocks.go delete mode 100644 gen/go/flyteidl2/workflow/workflowconnect/mocks/mocks.go diff --git a/buf.lock b/buf.lock index c6b7e8e3b3..5e8e6b51fb 100644 --- a/buf.lock +++ b/buf.lock @@ -8,5 +8,5 @@ deps: commit: 62f35d8aed1149c291d606d958a7ce32 digest: b5:d66bf04adc77a0870bdc9328aaf887c7188a36fb02b83a480dc45ef9dc031b4d39fc6e9dc6435120ccf4fe5bfd5c6cb6592533c6c316595571f9a31420ab47fe - name: buf.build/grpc-ecosystem/grpc-gateway - commit: 6467306b4f624747aaf6266762ee7a1c - digest: b5:c2caa61467d992749812c909f93c07e9a667da33c758a7c1973d63136c23b3cafcc079985b12cdf54a10049ed3297418f1eda42cdffdcf34113792dcc3a990af + commit: 4836b6d552304e1bbe47e66a523f0daa + digest: b5:c3fefd4d3dfa9b0478bbb1a4ad87d7b38146e3ce6eff4214e32f2c5834c2e4afc3be218316f0fbd53e925a001c3ed1e2fc99fb76b3121ede642989f0d0d7c71c diff --git a/gen/go/flyteidl2/connector/mocks/mocks.go b/gen/go/flyteidl2/connector/mocks/mocks.go deleted file mode 100644 index 4f9110e52c..0000000000 --- a/gen/go/flyteidl2/connector/mocks/mocks.go +++ /dev/null @@ -1,2119 +0,0 @@ -// Code generated by mockery; DO NOT EDIT. -// github.com/vektra/mockery -// template: testify - -package mocks - -import ( - "context" - - "github.com/flyteorg/flyte/v2/gen/go/flyteidl2/connector" - mock "github.com/stretchr/testify/mock" - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" -) - -// newIsGetTaskLogsResponse_Part creates a new instance of isGetTaskLogsResponse_Part. 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 newIsGetTaskLogsResponse_Part(t interface { - mock.TestingT - Cleanup(func()) -}) *isGetTaskLogsResponse_Part { - mock := &isGetTaskLogsResponse_Part{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} - -// isGetTaskLogsResponse_Part is an autogenerated mock type for the isGetTaskLogsResponse_Part type -type isGetTaskLogsResponse_Part struct { - mock.Mock -} - -type isGetTaskLogsResponse_Part_Expecter struct { - mock *mock.Mock -} - -func (_m *isGetTaskLogsResponse_Part) EXPECT() *isGetTaskLogsResponse_Part_Expecter { - return &isGetTaskLogsResponse_Part_Expecter{mock: &_m.Mock} -} - -// isGetTaskLogsResponse_Part provides a mock function for the type isGetTaskLogsResponse_Part -func (_mock *isGetTaskLogsResponse_Part) isGetTaskLogsResponse_Part() { - _mock.Called() - return -} - -// isGetTaskLogsResponse_Part_isGetTaskLogsResponse_Part_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'isGetTaskLogsResponse_Part' -type isGetTaskLogsResponse_Part_isGetTaskLogsResponse_Part_Call struct { - *mock.Call -} - -// isGetTaskLogsResponse_Part is a helper method to define mock.On call -func (_e *isGetTaskLogsResponse_Part_Expecter) isGetTaskLogsResponse_Part() *isGetTaskLogsResponse_Part_isGetTaskLogsResponse_Part_Call { - return &isGetTaskLogsResponse_Part_isGetTaskLogsResponse_Part_Call{Call: _e.mock.On("isGetTaskLogsResponse_Part")} -} - -func (_c *isGetTaskLogsResponse_Part_isGetTaskLogsResponse_Part_Call) Run(run func()) *isGetTaskLogsResponse_Part_isGetTaskLogsResponse_Part_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *isGetTaskLogsResponse_Part_isGetTaskLogsResponse_Part_Call) Return() *isGetTaskLogsResponse_Part_isGetTaskLogsResponse_Part_Call { - _c.Call.Return() - return _c -} - -func (_c *isGetTaskLogsResponse_Part_isGetTaskLogsResponse_Part_Call) RunAndReturn(run func()) *isGetTaskLogsResponse_Part_isGetTaskLogsResponse_Part_Call { - _c.Run(run) - return _c -} - -// NewAsyncConnectorServiceClient creates a new instance of AsyncConnectorServiceClient. 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 NewAsyncConnectorServiceClient(t interface { - mock.TestingT - Cleanup(func()) -}) *AsyncConnectorServiceClient { - mock := &AsyncConnectorServiceClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} - -// AsyncConnectorServiceClient is an autogenerated mock type for the AsyncConnectorServiceClient type -type AsyncConnectorServiceClient struct { - mock.Mock -} - -type AsyncConnectorServiceClient_Expecter struct { - mock *mock.Mock -} - -func (_m *AsyncConnectorServiceClient) EXPECT() *AsyncConnectorServiceClient_Expecter { - return &AsyncConnectorServiceClient_Expecter{mock: &_m.Mock} -} - -// CreateTask provides a mock function for the type AsyncConnectorServiceClient -func (_mock *AsyncConnectorServiceClient) CreateTask(ctx context.Context, in *connector.CreateTaskRequest, opts ...grpc.CallOption) (*connector.CreateTaskResponse, error) { - // grpc.CallOption - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _mock.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for CreateTask") - } - - var r0 *connector.CreateTaskResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.CreateTaskRequest, ...grpc.CallOption) (*connector.CreateTaskResponse, error)); ok { - return returnFunc(ctx, in, opts...) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.CreateTaskRequest, ...grpc.CallOption) *connector.CreateTaskResponse); ok { - r0 = returnFunc(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connector.CreateTaskResponse) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.CreateTaskRequest, ...grpc.CallOption) error); ok { - r1 = returnFunc(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// AsyncConnectorServiceClient_CreateTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTask' -type AsyncConnectorServiceClient_CreateTask_Call struct { - *mock.Call -} - -// CreateTask is a helper method to define mock.On call -// - ctx context.Context -// - in *connector.CreateTaskRequest -// - opts ...grpc.CallOption -func (_e *AsyncConnectorServiceClient_Expecter) CreateTask(ctx interface{}, in interface{}, opts ...interface{}) *AsyncConnectorServiceClient_CreateTask_Call { - return &AsyncConnectorServiceClient_CreateTask_Call{Call: _e.mock.On("CreateTask", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *AsyncConnectorServiceClient_CreateTask_Call) Run(run func(ctx context.Context, in *connector.CreateTaskRequest, opts ...grpc.CallOption)) *AsyncConnectorServiceClient_CreateTask_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connector.CreateTaskRequest - if args[1] != nil { - arg1 = args[1].(*connector.CreateTaskRequest) - } - var arg2 []grpc.CallOption - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - arg2 = variadicArgs - run( - arg0, - arg1, - arg2..., - ) - }) - return _c -} - -func (_c *AsyncConnectorServiceClient_CreateTask_Call) Return(createTaskResponse *connector.CreateTaskResponse, err error) *AsyncConnectorServiceClient_CreateTask_Call { - _c.Call.Return(createTaskResponse, err) - return _c -} - -func (_c *AsyncConnectorServiceClient_CreateTask_Call) RunAndReturn(run func(ctx context.Context, in *connector.CreateTaskRequest, opts ...grpc.CallOption) (*connector.CreateTaskResponse, error)) *AsyncConnectorServiceClient_CreateTask_Call { - _c.Call.Return(run) - return _c -} - -// DeleteTask provides a mock function for the type AsyncConnectorServiceClient -func (_mock *AsyncConnectorServiceClient) DeleteTask(ctx context.Context, in *connector.DeleteTaskRequest, opts ...grpc.CallOption) (*connector.DeleteTaskResponse, error) { - // grpc.CallOption - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _mock.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for DeleteTask") - } - - var r0 *connector.DeleteTaskResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.DeleteTaskRequest, ...grpc.CallOption) (*connector.DeleteTaskResponse, error)); ok { - return returnFunc(ctx, in, opts...) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.DeleteTaskRequest, ...grpc.CallOption) *connector.DeleteTaskResponse); ok { - r0 = returnFunc(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connector.DeleteTaskResponse) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.DeleteTaskRequest, ...grpc.CallOption) error); ok { - r1 = returnFunc(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// AsyncConnectorServiceClient_DeleteTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteTask' -type AsyncConnectorServiceClient_DeleteTask_Call struct { - *mock.Call -} - -// DeleteTask is a helper method to define mock.On call -// - ctx context.Context -// - in *connector.DeleteTaskRequest -// - opts ...grpc.CallOption -func (_e *AsyncConnectorServiceClient_Expecter) DeleteTask(ctx interface{}, in interface{}, opts ...interface{}) *AsyncConnectorServiceClient_DeleteTask_Call { - return &AsyncConnectorServiceClient_DeleteTask_Call{Call: _e.mock.On("DeleteTask", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *AsyncConnectorServiceClient_DeleteTask_Call) Run(run func(ctx context.Context, in *connector.DeleteTaskRequest, opts ...grpc.CallOption)) *AsyncConnectorServiceClient_DeleteTask_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connector.DeleteTaskRequest - if args[1] != nil { - arg1 = args[1].(*connector.DeleteTaskRequest) - } - var arg2 []grpc.CallOption - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - arg2 = variadicArgs - run( - arg0, - arg1, - arg2..., - ) - }) - return _c -} - -func (_c *AsyncConnectorServiceClient_DeleteTask_Call) Return(deleteTaskResponse *connector.DeleteTaskResponse, err error) *AsyncConnectorServiceClient_DeleteTask_Call { - _c.Call.Return(deleteTaskResponse, err) - return _c -} - -func (_c *AsyncConnectorServiceClient_DeleteTask_Call) RunAndReturn(run func(ctx context.Context, in *connector.DeleteTaskRequest, opts ...grpc.CallOption) (*connector.DeleteTaskResponse, error)) *AsyncConnectorServiceClient_DeleteTask_Call { - _c.Call.Return(run) - return _c -} - -// GetTask provides a mock function for the type AsyncConnectorServiceClient -func (_mock *AsyncConnectorServiceClient) GetTask(ctx context.Context, in *connector.GetTaskRequest, opts ...grpc.CallOption) (*connector.GetTaskResponse, error) { - // grpc.CallOption - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _mock.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for GetTask") - } - - var r0 *connector.GetTaskResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetTaskRequest, ...grpc.CallOption) (*connector.GetTaskResponse, error)); ok { - return returnFunc(ctx, in, opts...) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetTaskRequest, ...grpc.CallOption) *connector.GetTaskResponse); ok { - r0 = returnFunc(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connector.GetTaskResponse) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.GetTaskRequest, ...grpc.CallOption) error); ok { - r1 = returnFunc(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// AsyncConnectorServiceClient_GetTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTask' -type AsyncConnectorServiceClient_GetTask_Call struct { - *mock.Call -} - -// GetTask is a helper method to define mock.On call -// - ctx context.Context -// - in *connector.GetTaskRequest -// - opts ...grpc.CallOption -func (_e *AsyncConnectorServiceClient_Expecter) GetTask(ctx interface{}, in interface{}, opts ...interface{}) *AsyncConnectorServiceClient_GetTask_Call { - return &AsyncConnectorServiceClient_GetTask_Call{Call: _e.mock.On("GetTask", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *AsyncConnectorServiceClient_GetTask_Call) Run(run func(ctx context.Context, in *connector.GetTaskRequest, opts ...grpc.CallOption)) *AsyncConnectorServiceClient_GetTask_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connector.GetTaskRequest - if args[1] != nil { - arg1 = args[1].(*connector.GetTaskRequest) - } - var arg2 []grpc.CallOption - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - arg2 = variadicArgs - run( - arg0, - arg1, - arg2..., - ) - }) - return _c -} - -func (_c *AsyncConnectorServiceClient_GetTask_Call) Return(getTaskResponse *connector.GetTaskResponse, err error) *AsyncConnectorServiceClient_GetTask_Call { - _c.Call.Return(getTaskResponse, err) - return _c -} - -func (_c *AsyncConnectorServiceClient_GetTask_Call) RunAndReturn(run func(ctx context.Context, in *connector.GetTaskRequest, opts ...grpc.CallOption) (*connector.GetTaskResponse, error)) *AsyncConnectorServiceClient_GetTask_Call { - _c.Call.Return(run) - return _c -} - -// GetTaskLogs provides a mock function for the type AsyncConnectorServiceClient -func (_mock *AsyncConnectorServiceClient) GetTaskLogs(ctx context.Context, in *connector.GetTaskLogsRequest, opts ...grpc.CallOption) (connector.AsyncConnectorService_GetTaskLogsClient, error) { - // grpc.CallOption - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _mock.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for GetTaskLogs") - } - - var r0 connector.AsyncConnectorService_GetTaskLogsClient - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetTaskLogsRequest, ...grpc.CallOption) (connector.AsyncConnectorService_GetTaskLogsClient, error)); ok { - return returnFunc(ctx, in, opts...) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetTaskLogsRequest, ...grpc.CallOption) connector.AsyncConnectorService_GetTaskLogsClient); ok { - r0 = returnFunc(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(connector.AsyncConnectorService_GetTaskLogsClient) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.GetTaskLogsRequest, ...grpc.CallOption) error); ok { - r1 = returnFunc(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// AsyncConnectorServiceClient_GetTaskLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTaskLogs' -type AsyncConnectorServiceClient_GetTaskLogs_Call struct { - *mock.Call -} - -// GetTaskLogs is a helper method to define mock.On call -// - ctx context.Context -// - in *connector.GetTaskLogsRequest -// - opts ...grpc.CallOption -func (_e *AsyncConnectorServiceClient_Expecter) GetTaskLogs(ctx interface{}, in interface{}, opts ...interface{}) *AsyncConnectorServiceClient_GetTaskLogs_Call { - return &AsyncConnectorServiceClient_GetTaskLogs_Call{Call: _e.mock.On("GetTaskLogs", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *AsyncConnectorServiceClient_GetTaskLogs_Call) Run(run func(ctx context.Context, in *connector.GetTaskLogsRequest, opts ...grpc.CallOption)) *AsyncConnectorServiceClient_GetTaskLogs_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connector.GetTaskLogsRequest - if args[1] != nil { - arg1 = args[1].(*connector.GetTaskLogsRequest) - } - var arg2 []grpc.CallOption - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - arg2 = variadicArgs - run( - arg0, - arg1, - arg2..., - ) - }) - return _c -} - -func (_c *AsyncConnectorServiceClient_GetTaskLogs_Call) Return(asyncConnectorService_GetTaskLogsClient connector.AsyncConnectorService_GetTaskLogsClient, err error) *AsyncConnectorServiceClient_GetTaskLogs_Call { - _c.Call.Return(asyncConnectorService_GetTaskLogsClient, err) - return _c -} - -func (_c *AsyncConnectorServiceClient_GetTaskLogs_Call) RunAndReturn(run func(ctx context.Context, in *connector.GetTaskLogsRequest, opts ...grpc.CallOption) (connector.AsyncConnectorService_GetTaskLogsClient, error)) *AsyncConnectorServiceClient_GetTaskLogs_Call { - _c.Call.Return(run) - return _c -} - -// GetTaskMetrics provides a mock function for the type AsyncConnectorServiceClient -func (_mock *AsyncConnectorServiceClient) GetTaskMetrics(ctx context.Context, in *connector.GetTaskMetricsRequest, opts ...grpc.CallOption) (*connector.GetTaskMetricsResponse, error) { - // grpc.CallOption - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _mock.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for GetTaskMetrics") - } - - var r0 *connector.GetTaskMetricsResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetTaskMetricsRequest, ...grpc.CallOption) (*connector.GetTaskMetricsResponse, error)); ok { - return returnFunc(ctx, in, opts...) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetTaskMetricsRequest, ...grpc.CallOption) *connector.GetTaskMetricsResponse); ok { - r0 = returnFunc(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connector.GetTaskMetricsResponse) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.GetTaskMetricsRequest, ...grpc.CallOption) error); ok { - r1 = returnFunc(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// AsyncConnectorServiceClient_GetTaskMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTaskMetrics' -type AsyncConnectorServiceClient_GetTaskMetrics_Call struct { - *mock.Call -} - -// GetTaskMetrics is a helper method to define mock.On call -// - ctx context.Context -// - in *connector.GetTaskMetricsRequest -// - opts ...grpc.CallOption -func (_e *AsyncConnectorServiceClient_Expecter) GetTaskMetrics(ctx interface{}, in interface{}, opts ...interface{}) *AsyncConnectorServiceClient_GetTaskMetrics_Call { - return &AsyncConnectorServiceClient_GetTaskMetrics_Call{Call: _e.mock.On("GetTaskMetrics", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *AsyncConnectorServiceClient_GetTaskMetrics_Call) Run(run func(ctx context.Context, in *connector.GetTaskMetricsRequest, opts ...grpc.CallOption)) *AsyncConnectorServiceClient_GetTaskMetrics_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connector.GetTaskMetricsRequest - if args[1] != nil { - arg1 = args[1].(*connector.GetTaskMetricsRequest) - } - var arg2 []grpc.CallOption - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - arg2 = variadicArgs - run( - arg0, - arg1, - arg2..., - ) - }) - return _c -} - -func (_c *AsyncConnectorServiceClient_GetTaskMetrics_Call) Return(getTaskMetricsResponse *connector.GetTaskMetricsResponse, err error) *AsyncConnectorServiceClient_GetTaskMetrics_Call { - _c.Call.Return(getTaskMetricsResponse, err) - return _c -} - -func (_c *AsyncConnectorServiceClient_GetTaskMetrics_Call) RunAndReturn(run func(ctx context.Context, in *connector.GetTaskMetricsRequest, opts ...grpc.CallOption) (*connector.GetTaskMetricsResponse, error)) *AsyncConnectorServiceClient_GetTaskMetrics_Call { - _c.Call.Return(run) - return _c -} - -// NewAsyncConnectorService_GetTaskLogsClient creates a new instance of AsyncConnectorService_GetTaskLogsClient. 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 NewAsyncConnectorService_GetTaskLogsClient(t interface { - mock.TestingT - Cleanup(func()) -}) *AsyncConnectorService_GetTaskLogsClient { - mock := &AsyncConnectorService_GetTaskLogsClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} - -// AsyncConnectorService_GetTaskLogsClient is an autogenerated mock type for the AsyncConnectorService_GetTaskLogsClient type -type AsyncConnectorService_GetTaskLogsClient struct { - mock.Mock -} - -type AsyncConnectorService_GetTaskLogsClient_Expecter struct { - mock *mock.Mock -} - -func (_m *AsyncConnectorService_GetTaskLogsClient) EXPECT() *AsyncConnectorService_GetTaskLogsClient_Expecter { - return &AsyncConnectorService_GetTaskLogsClient_Expecter{mock: &_m.Mock} -} - -// CloseSend provides a mock function for the type AsyncConnectorService_GetTaskLogsClient -func (_mock *AsyncConnectorService_GetTaskLogsClient) CloseSend() error { - ret := _mock.Called() - - if len(ret) == 0 { - panic("no return value specified for CloseSend") - } - - var r0 error - if returnFunc, ok := ret.Get(0).(func() error); ok { - r0 = returnFunc() - } else { - r0 = ret.Error(0) - } - return r0 -} - -// AsyncConnectorService_GetTaskLogsClient_CloseSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CloseSend' -type AsyncConnectorService_GetTaskLogsClient_CloseSend_Call struct { - *mock.Call -} - -// CloseSend is a helper method to define mock.On call -func (_e *AsyncConnectorService_GetTaskLogsClient_Expecter) CloseSend() *AsyncConnectorService_GetTaskLogsClient_CloseSend_Call { - return &AsyncConnectorService_GetTaskLogsClient_CloseSend_Call{Call: _e.mock.On("CloseSend")} -} - -func (_c *AsyncConnectorService_GetTaskLogsClient_CloseSend_Call) Run(run func()) *AsyncConnectorService_GetTaskLogsClient_CloseSend_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsClient_CloseSend_Call) Return(err error) *AsyncConnectorService_GetTaskLogsClient_CloseSend_Call { - _c.Call.Return(err) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsClient_CloseSend_Call) RunAndReturn(run func() error) *AsyncConnectorService_GetTaskLogsClient_CloseSend_Call { - _c.Call.Return(run) - return _c -} - -// Context provides a mock function for the type AsyncConnectorService_GetTaskLogsClient -func (_mock *AsyncConnectorService_GetTaskLogsClient) Context() context.Context { - ret := _mock.Called() - - if len(ret) == 0 { - panic("no return value specified for Context") - } - - var r0 context.Context - if returnFunc, ok := ret.Get(0).(func() context.Context); ok { - r0 = returnFunc() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(context.Context) - } - } - return r0 -} - -// AsyncConnectorService_GetTaskLogsClient_Context_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Context' -type AsyncConnectorService_GetTaskLogsClient_Context_Call struct { - *mock.Call -} - -// Context is a helper method to define mock.On call -func (_e *AsyncConnectorService_GetTaskLogsClient_Expecter) Context() *AsyncConnectorService_GetTaskLogsClient_Context_Call { - return &AsyncConnectorService_GetTaskLogsClient_Context_Call{Call: _e.mock.On("Context")} -} - -func (_c *AsyncConnectorService_GetTaskLogsClient_Context_Call) Run(run func()) *AsyncConnectorService_GetTaskLogsClient_Context_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsClient_Context_Call) Return(context1 context.Context) *AsyncConnectorService_GetTaskLogsClient_Context_Call { - _c.Call.Return(context1) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsClient_Context_Call) RunAndReturn(run func() context.Context) *AsyncConnectorService_GetTaskLogsClient_Context_Call { - _c.Call.Return(run) - return _c -} - -// Header provides a mock function for the type AsyncConnectorService_GetTaskLogsClient -func (_mock *AsyncConnectorService_GetTaskLogsClient) Header() (metadata.MD, error) { - ret := _mock.Called() - - if len(ret) == 0 { - panic("no return value specified for Header") - } - - var r0 metadata.MD - var r1 error - if returnFunc, ok := ret.Get(0).(func() (metadata.MD, error)); ok { - return returnFunc() - } - if returnFunc, ok := ret.Get(0).(func() metadata.MD); ok { - r0 = returnFunc() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(metadata.MD) - } - } - if returnFunc, ok := ret.Get(1).(func() error); ok { - r1 = returnFunc() - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// AsyncConnectorService_GetTaskLogsClient_Header_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Header' -type AsyncConnectorService_GetTaskLogsClient_Header_Call struct { - *mock.Call -} - -// Header is a helper method to define mock.On call -func (_e *AsyncConnectorService_GetTaskLogsClient_Expecter) Header() *AsyncConnectorService_GetTaskLogsClient_Header_Call { - return &AsyncConnectorService_GetTaskLogsClient_Header_Call{Call: _e.mock.On("Header")} -} - -func (_c *AsyncConnectorService_GetTaskLogsClient_Header_Call) Run(run func()) *AsyncConnectorService_GetTaskLogsClient_Header_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsClient_Header_Call) Return(mD metadata.MD, err error) *AsyncConnectorService_GetTaskLogsClient_Header_Call { - _c.Call.Return(mD, err) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsClient_Header_Call) RunAndReturn(run func() (metadata.MD, error)) *AsyncConnectorService_GetTaskLogsClient_Header_Call { - _c.Call.Return(run) - return _c -} - -// Recv provides a mock function for the type AsyncConnectorService_GetTaskLogsClient -func (_mock *AsyncConnectorService_GetTaskLogsClient) Recv() (*connector.GetTaskLogsResponse, error) { - ret := _mock.Called() - - if len(ret) == 0 { - panic("no return value specified for Recv") - } - - var r0 *connector.GetTaskLogsResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func() (*connector.GetTaskLogsResponse, error)); ok { - return returnFunc() - } - if returnFunc, ok := ret.Get(0).(func() *connector.GetTaskLogsResponse); ok { - r0 = returnFunc() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connector.GetTaskLogsResponse) - } - } - if returnFunc, ok := ret.Get(1).(func() error); ok { - r1 = returnFunc() - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// AsyncConnectorService_GetTaskLogsClient_Recv_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Recv' -type AsyncConnectorService_GetTaskLogsClient_Recv_Call struct { - *mock.Call -} - -// Recv is a helper method to define mock.On call -func (_e *AsyncConnectorService_GetTaskLogsClient_Expecter) Recv() *AsyncConnectorService_GetTaskLogsClient_Recv_Call { - return &AsyncConnectorService_GetTaskLogsClient_Recv_Call{Call: _e.mock.On("Recv")} -} - -func (_c *AsyncConnectorService_GetTaskLogsClient_Recv_Call) Run(run func()) *AsyncConnectorService_GetTaskLogsClient_Recv_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsClient_Recv_Call) Return(getTaskLogsResponse *connector.GetTaskLogsResponse, err error) *AsyncConnectorService_GetTaskLogsClient_Recv_Call { - _c.Call.Return(getTaskLogsResponse, err) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsClient_Recv_Call) RunAndReturn(run func() (*connector.GetTaskLogsResponse, error)) *AsyncConnectorService_GetTaskLogsClient_Recv_Call { - _c.Call.Return(run) - return _c -} - -// RecvMsg provides a mock function for the type AsyncConnectorService_GetTaskLogsClient -func (_mock *AsyncConnectorService_GetTaskLogsClient) RecvMsg(m any) error { - ret := _mock.Called(m) - - if len(ret) == 0 { - panic("no return value specified for RecvMsg") - } - - var r0 error - if returnFunc, ok := ret.Get(0).(func(any) error); ok { - r0 = returnFunc(m) - } else { - r0 = ret.Error(0) - } - return r0 -} - -// AsyncConnectorService_GetTaskLogsClient_RecvMsg_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecvMsg' -type AsyncConnectorService_GetTaskLogsClient_RecvMsg_Call struct { - *mock.Call -} - -// RecvMsg is a helper method to define mock.On call -// - m any -func (_e *AsyncConnectorService_GetTaskLogsClient_Expecter) RecvMsg(m interface{}) *AsyncConnectorService_GetTaskLogsClient_RecvMsg_Call { - return &AsyncConnectorService_GetTaskLogsClient_RecvMsg_Call{Call: _e.mock.On("RecvMsg", m)} -} - -func (_c *AsyncConnectorService_GetTaskLogsClient_RecvMsg_Call) Run(run func(m any)) *AsyncConnectorService_GetTaskLogsClient_RecvMsg_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 any - if args[0] != nil { - arg0 = args[0].(any) - } - run( - arg0, - ) - }) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsClient_RecvMsg_Call) Return(err error) *AsyncConnectorService_GetTaskLogsClient_RecvMsg_Call { - _c.Call.Return(err) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsClient_RecvMsg_Call) RunAndReturn(run func(m any) error) *AsyncConnectorService_GetTaskLogsClient_RecvMsg_Call { - _c.Call.Return(run) - return _c -} - -// SendMsg provides a mock function for the type AsyncConnectorService_GetTaskLogsClient -func (_mock *AsyncConnectorService_GetTaskLogsClient) SendMsg(m any) error { - ret := _mock.Called(m) - - if len(ret) == 0 { - panic("no return value specified for SendMsg") - } - - var r0 error - if returnFunc, ok := ret.Get(0).(func(any) error); ok { - r0 = returnFunc(m) - } else { - r0 = ret.Error(0) - } - return r0 -} - -// AsyncConnectorService_GetTaskLogsClient_SendMsg_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendMsg' -type AsyncConnectorService_GetTaskLogsClient_SendMsg_Call struct { - *mock.Call -} - -// SendMsg is a helper method to define mock.On call -// - m any -func (_e *AsyncConnectorService_GetTaskLogsClient_Expecter) SendMsg(m interface{}) *AsyncConnectorService_GetTaskLogsClient_SendMsg_Call { - return &AsyncConnectorService_GetTaskLogsClient_SendMsg_Call{Call: _e.mock.On("SendMsg", m)} -} - -func (_c *AsyncConnectorService_GetTaskLogsClient_SendMsg_Call) Run(run func(m any)) *AsyncConnectorService_GetTaskLogsClient_SendMsg_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 any - if args[0] != nil { - arg0 = args[0].(any) - } - run( - arg0, - ) - }) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsClient_SendMsg_Call) Return(err error) *AsyncConnectorService_GetTaskLogsClient_SendMsg_Call { - _c.Call.Return(err) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsClient_SendMsg_Call) RunAndReturn(run func(m any) error) *AsyncConnectorService_GetTaskLogsClient_SendMsg_Call { - _c.Call.Return(run) - return _c -} - -// Trailer provides a mock function for the type AsyncConnectorService_GetTaskLogsClient -func (_mock *AsyncConnectorService_GetTaskLogsClient) Trailer() metadata.MD { - ret := _mock.Called() - - if len(ret) == 0 { - panic("no return value specified for Trailer") - } - - var r0 metadata.MD - if returnFunc, ok := ret.Get(0).(func() metadata.MD); ok { - r0 = returnFunc() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(metadata.MD) - } - } - return r0 -} - -// AsyncConnectorService_GetTaskLogsClient_Trailer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Trailer' -type AsyncConnectorService_GetTaskLogsClient_Trailer_Call struct { - *mock.Call -} - -// Trailer is a helper method to define mock.On call -func (_e *AsyncConnectorService_GetTaskLogsClient_Expecter) Trailer() *AsyncConnectorService_GetTaskLogsClient_Trailer_Call { - return &AsyncConnectorService_GetTaskLogsClient_Trailer_Call{Call: _e.mock.On("Trailer")} -} - -func (_c *AsyncConnectorService_GetTaskLogsClient_Trailer_Call) Run(run func()) *AsyncConnectorService_GetTaskLogsClient_Trailer_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsClient_Trailer_Call) Return(mD metadata.MD) *AsyncConnectorService_GetTaskLogsClient_Trailer_Call { - _c.Call.Return(mD) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsClient_Trailer_Call) RunAndReturn(run func() metadata.MD) *AsyncConnectorService_GetTaskLogsClient_Trailer_Call { - _c.Call.Return(run) - return _c -} - -// NewAsyncConnectorServiceServer creates a new instance of AsyncConnectorServiceServer. 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 NewAsyncConnectorServiceServer(t interface { - mock.TestingT - Cleanup(func()) -}) *AsyncConnectorServiceServer { - mock := &AsyncConnectorServiceServer{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} - -// AsyncConnectorServiceServer is an autogenerated mock type for the AsyncConnectorServiceServer type -type AsyncConnectorServiceServer struct { - mock.Mock -} - -type AsyncConnectorServiceServer_Expecter struct { - mock *mock.Mock -} - -func (_m *AsyncConnectorServiceServer) EXPECT() *AsyncConnectorServiceServer_Expecter { - return &AsyncConnectorServiceServer_Expecter{mock: &_m.Mock} -} - -// CreateTask provides a mock function for the type AsyncConnectorServiceServer -func (_mock *AsyncConnectorServiceServer) CreateTask(context1 context.Context, createTaskRequest *connector.CreateTaskRequest) (*connector.CreateTaskResponse, error) { - ret := _mock.Called(context1, createTaskRequest) - - if len(ret) == 0 { - panic("no return value specified for CreateTask") - } - - var r0 *connector.CreateTaskResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.CreateTaskRequest) (*connector.CreateTaskResponse, error)); ok { - return returnFunc(context1, createTaskRequest) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.CreateTaskRequest) *connector.CreateTaskResponse); ok { - r0 = returnFunc(context1, createTaskRequest) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connector.CreateTaskResponse) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.CreateTaskRequest) error); ok { - r1 = returnFunc(context1, createTaskRequest) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// AsyncConnectorServiceServer_CreateTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTask' -type AsyncConnectorServiceServer_CreateTask_Call struct { - *mock.Call -} - -// CreateTask is a helper method to define mock.On call -// - context1 context.Context -// - createTaskRequest *connector.CreateTaskRequest -func (_e *AsyncConnectorServiceServer_Expecter) CreateTask(context1 interface{}, createTaskRequest interface{}) *AsyncConnectorServiceServer_CreateTask_Call { - return &AsyncConnectorServiceServer_CreateTask_Call{Call: _e.mock.On("CreateTask", context1, createTaskRequest)} -} - -func (_c *AsyncConnectorServiceServer_CreateTask_Call) Run(run func(context1 context.Context, createTaskRequest *connector.CreateTaskRequest)) *AsyncConnectorServiceServer_CreateTask_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connector.CreateTaskRequest - if args[1] != nil { - arg1 = args[1].(*connector.CreateTaskRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *AsyncConnectorServiceServer_CreateTask_Call) Return(createTaskResponse *connector.CreateTaskResponse, err error) *AsyncConnectorServiceServer_CreateTask_Call { - _c.Call.Return(createTaskResponse, err) - return _c -} - -func (_c *AsyncConnectorServiceServer_CreateTask_Call) RunAndReturn(run func(context1 context.Context, createTaskRequest *connector.CreateTaskRequest) (*connector.CreateTaskResponse, error)) *AsyncConnectorServiceServer_CreateTask_Call { - _c.Call.Return(run) - return _c -} - -// DeleteTask provides a mock function for the type AsyncConnectorServiceServer -func (_mock *AsyncConnectorServiceServer) DeleteTask(context1 context.Context, deleteTaskRequest *connector.DeleteTaskRequest) (*connector.DeleteTaskResponse, error) { - ret := _mock.Called(context1, deleteTaskRequest) - - if len(ret) == 0 { - panic("no return value specified for DeleteTask") - } - - var r0 *connector.DeleteTaskResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.DeleteTaskRequest) (*connector.DeleteTaskResponse, error)); ok { - return returnFunc(context1, deleteTaskRequest) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.DeleteTaskRequest) *connector.DeleteTaskResponse); ok { - r0 = returnFunc(context1, deleteTaskRequest) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connector.DeleteTaskResponse) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.DeleteTaskRequest) error); ok { - r1 = returnFunc(context1, deleteTaskRequest) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// AsyncConnectorServiceServer_DeleteTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteTask' -type AsyncConnectorServiceServer_DeleteTask_Call struct { - *mock.Call -} - -// DeleteTask is a helper method to define mock.On call -// - context1 context.Context -// - deleteTaskRequest *connector.DeleteTaskRequest -func (_e *AsyncConnectorServiceServer_Expecter) DeleteTask(context1 interface{}, deleteTaskRequest interface{}) *AsyncConnectorServiceServer_DeleteTask_Call { - return &AsyncConnectorServiceServer_DeleteTask_Call{Call: _e.mock.On("DeleteTask", context1, deleteTaskRequest)} -} - -func (_c *AsyncConnectorServiceServer_DeleteTask_Call) Run(run func(context1 context.Context, deleteTaskRequest *connector.DeleteTaskRequest)) *AsyncConnectorServiceServer_DeleteTask_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connector.DeleteTaskRequest - if args[1] != nil { - arg1 = args[1].(*connector.DeleteTaskRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *AsyncConnectorServiceServer_DeleteTask_Call) Return(deleteTaskResponse *connector.DeleteTaskResponse, err error) *AsyncConnectorServiceServer_DeleteTask_Call { - _c.Call.Return(deleteTaskResponse, err) - return _c -} - -func (_c *AsyncConnectorServiceServer_DeleteTask_Call) RunAndReturn(run func(context1 context.Context, deleteTaskRequest *connector.DeleteTaskRequest) (*connector.DeleteTaskResponse, error)) *AsyncConnectorServiceServer_DeleteTask_Call { - _c.Call.Return(run) - return _c -} - -// GetTask provides a mock function for the type AsyncConnectorServiceServer -func (_mock *AsyncConnectorServiceServer) GetTask(context1 context.Context, getTaskRequest *connector.GetTaskRequest) (*connector.GetTaskResponse, error) { - ret := _mock.Called(context1, getTaskRequest) - - if len(ret) == 0 { - panic("no return value specified for GetTask") - } - - var r0 *connector.GetTaskResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetTaskRequest) (*connector.GetTaskResponse, error)); ok { - return returnFunc(context1, getTaskRequest) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetTaskRequest) *connector.GetTaskResponse); ok { - r0 = returnFunc(context1, getTaskRequest) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connector.GetTaskResponse) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.GetTaskRequest) error); ok { - r1 = returnFunc(context1, getTaskRequest) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// AsyncConnectorServiceServer_GetTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTask' -type AsyncConnectorServiceServer_GetTask_Call struct { - *mock.Call -} - -// GetTask is a helper method to define mock.On call -// - context1 context.Context -// - getTaskRequest *connector.GetTaskRequest -func (_e *AsyncConnectorServiceServer_Expecter) GetTask(context1 interface{}, getTaskRequest interface{}) *AsyncConnectorServiceServer_GetTask_Call { - return &AsyncConnectorServiceServer_GetTask_Call{Call: _e.mock.On("GetTask", context1, getTaskRequest)} -} - -func (_c *AsyncConnectorServiceServer_GetTask_Call) Run(run func(context1 context.Context, getTaskRequest *connector.GetTaskRequest)) *AsyncConnectorServiceServer_GetTask_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connector.GetTaskRequest - if args[1] != nil { - arg1 = args[1].(*connector.GetTaskRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *AsyncConnectorServiceServer_GetTask_Call) Return(getTaskResponse *connector.GetTaskResponse, err error) *AsyncConnectorServiceServer_GetTask_Call { - _c.Call.Return(getTaskResponse, err) - return _c -} - -func (_c *AsyncConnectorServiceServer_GetTask_Call) RunAndReturn(run func(context1 context.Context, getTaskRequest *connector.GetTaskRequest) (*connector.GetTaskResponse, error)) *AsyncConnectorServiceServer_GetTask_Call { - _c.Call.Return(run) - return _c -} - -// GetTaskLogs provides a mock function for the type AsyncConnectorServiceServer -func (_mock *AsyncConnectorServiceServer) GetTaskLogs(getTaskLogsRequest *connector.GetTaskLogsRequest, asyncConnectorService_GetTaskLogsServer connector.AsyncConnectorService_GetTaskLogsServer) error { - ret := _mock.Called(getTaskLogsRequest, asyncConnectorService_GetTaskLogsServer) - - if len(ret) == 0 { - panic("no return value specified for GetTaskLogs") - } - - var r0 error - if returnFunc, ok := ret.Get(0).(func(*connector.GetTaskLogsRequest, connector.AsyncConnectorService_GetTaskLogsServer) error); ok { - r0 = returnFunc(getTaskLogsRequest, asyncConnectorService_GetTaskLogsServer) - } else { - r0 = ret.Error(0) - } - return r0 -} - -// AsyncConnectorServiceServer_GetTaskLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTaskLogs' -type AsyncConnectorServiceServer_GetTaskLogs_Call struct { - *mock.Call -} - -// GetTaskLogs is a helper method to define mock.On call -// - getTaskLogsRequest *connector.GetTaskLogsRequest -// - asyncConnectorService_GetTaskLogsServer connector.AsyncConnectorService_GetTaskLogsServer -func (_e *AsyncConnectorServiceServer_Expecter) GetTaskLogs(getTaskLogsRequest interface{}, asyncConnectorService_GetTaskLogsServer interface{}) *AsyncConnectorServiceServer_GetTaskLogs_Call { - return &AsyncConnectorServiceServer_GetTaskLogs_Call{Call: _e.mock.On("GetTaskLogs", getTaskLogsRequest, asyncConnectorService_GetTaskLogsServer)} -} - -func (_c *AsyncConnectorServiceServer_GetTaskLogs_Call) Run(run func(getTaskLogsRequest *connector.GetTaskLogsRequest, asyncConnectorService_GetTaskLogsServer connector.AsyncConnectorService_GetTaskLogsServer)) *AsyncConnectorServiceServer_GetTaskLogs_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 *connector.GetTaskLogsRequest - if args[0] != nil { - arg0 = args[0].(*connector.GetTaskLogsRequest) - } - var arg1 connector.AsyncConnectorService_GetTaskLogsServer - if args[1] != nil { - arg1 = args[1].(connector.AsyncConnectorService_GetTaskLogsServer) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *AsyncConnectorServiceServer_GetTaskLogs_Call) Return(err error) *AsyncConnectorServiceServer_GetTaskLogs_Call { - _c.Call.Return(err) - return _c -} - -func (_c *AsyncConnectorServiceServer_GetTaskLogs_Call) RunAndReturn(run func(getTaskLogsRequest *connector.GetTaskLogsRequest, asyncConnectorService_GetTaskLogsServer connector.AsyncConnectorService_GetTaskLogsServer) error) *AsyncConnectorServiceServer_GetTaskLogs_Call { - _c.Call.Return(run) - return _c -} - -// GetTaskMetrics provides a mock function for the type AsyncConnectorServiceServer -func (_mock *AsyncConnectorServiceServer) GetTaskMetrics(context1 context.Context, getTaskMetricsRequest *connector.GetTaskMetricsRequest) (*connector.GetTaskMetricsResponse, error) { - ret := _mock.Called(context1, getTaskMetricsRequest) - - if len(ret) == 0 { - panic("no return value specified for GetTaskMetrics") - } - - var r0 *connector.GetTaskMetricsResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetTaskMetricsRequest) (*connector.GetTaskMetricsResponse, error)); ok { - return returnFunc(context1, getTaskMetricsRequest) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetTaskMetricsRequest) *connector.GetTaskMetricsResponse); ok { - r0 = returnFunc(context1, getTaskMetricsRequest) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connector.GetTaskMetricsResponse) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.GetTaskMetricsRequest) error); ok { - r1 = returnFunc(context1, getTaskMetricsRequest) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// AsyncConnectorServiceServer_GetTaskMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTaskMetrics' -type AsyncConnectorServiceServer_GetTaskMetrics_Call struct { - *mock.Call -} - -// GetTaskMetrics is a helper method to define mock.On call -// - context1 context.Context -// - getTaskMetricsRequest *connector.GetTaskMetricsRequest -func (_e *AsyncConnectorServiceServer_Expecter) GetTaskMetrics(context1 interface{}, getTaskMetricsRequest interface{}) *AsyncConnectorServiceServer_GetTaskMetrics_Call { - return &AsyncConnectorServiceServer_GetTaskMetrics_Call{Call: _e.mock.On("GetTaskMetrics", context1, getTaskMetricsRequest)} -} - -func (_c *AsyncConnectorServiceServer_GetTaskMetrics_Call) Run(run func(context1 context.Context, getTaskMetricsRequest *connector.GetTaskMetricsRequest)) *AsyncConnectorServiceServer_GetTaskMetrics_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connector.GetTaskMetricsRequest - if args[1] != nil { - arg1 = args[1].(*connector.GetTaskMetricsRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *AsyncConnectorServiceServer_GetTaskMetrics_Call) Return(getTaskMetricsResponse *connector.GetTaskMetricsResponse, err error) *AsyncConnectorServiceServer_GetTaskMetrics_Call { - _c.Call.Return(getTaskMetricsResponse, err) - return _c -} - -func (_c *AsyncConnectorServiceServer_GetTaskMetrics_Call) RunAndReturn(run func(context1 context.Context, getTaskMetricsRequest *connector.GetTaskMetricsRequest) (*connector.GetTaskMetricsResponse, error)) *AsyncConnectorServiceServer_GetTaskMetrics_Call { - _c.Call.Return(run) - return _c -} - -// NewUnsafeAsyncConnectorServiceServer creates a new instance of UnsafeAsyncConnectorServiceServer. 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 NewUnsafeAsyncConnectorServiceServer(t interface { - mock.TestingT - Cleanup(func()) -}) *UnsafeAsyncConnectorServiceServer { - mock := &UnsafeAsyncConnectorServiceServer{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} - -// UnsafeAsyncConnectorServiceServer is an autogenerated mock type for the UnsafeAsyncConnectorServiceServer type -type UnsafeAsyncConnectorServiceServer struct { - mock.Mock -} - -type UnsafeAsyncConnectorServiceServer_Expecter struct { - mock *mock.Mock -} - -func (_m *UnsafeAsyncConnectorServiceServer) EXPECT() *UnsafeAsyncConnectorServiceServer_Expecter { - return &UnsafeAsyncConnectorServiceServer_Expecter{mock: &_m.Mock} -} - -// mustEmbedUnimplementedAsyncConnectorServiceServer provides a mock function for the type UnsafeAsyncConnectorServiceServer -func (_mock *UnsafeAsyncConnectorServiceServer) mustEmbedUnimplementedAsyncConnectorServiceServer() { - _mock.Called() - return -} - -// UnsafeAsyncConnectorServiceServer_mustEmbedUnimplementedAsyncConnectorServiceServer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'mustEmbedUnimplementedAsyncConnectorServiceServer' -type UnsafeAsyncConnectorServiceServer_mustEmbedUnimplementedAsyncConnectorServiceServer_Call struct { - *mock.Call -} - -// mustEmbedUnimplementedAsyncConnectorServiceServer is a helper method to define mock.On call -func (_e *UnsafeAsyncConnectorServiceServer_Expecter) mustEmbedUnimplementedAsyncConnectorServiceServer() *UnsafeAsyncConnectorServiceServer_mustEmbedUnimplementedAsyncConnectorServiceServer_Call { - return &UnsafeAsyncConnectorServiceServer_mustEmbedUnimplementedAsyncConnectorServiceServer_Call{Call: _e.mock.On("mustEmbedUnimplementedAsyncConnectorServiceServer")} -} - -func (_c *UnsafeAsyncConnectorServiceServer_mustEmbedUnimplementedAsyncConnectorServiceServer_Call) Run(run func()) *UnsafeAsyncConnectorServiceServer_mustEmbedUnimplementedAsyncConnectorServiceServer_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *UnsafeAsyncConnectorServiceServer_mustEmbedUnimplementedAsyncConnectorServiceServer_Call) Return() *UnsafeAsyncConnectorServiceServer_mustEmbedUnimplementedAsyncConnectorServiceServer_Call { - _c.Call.Return() - return _c -} - -func (_c *UnsafeAsyncConnectorServiceServer_mustEmbedUnimplementedAsyncConnectorServiceServer_Call) RunAndReturn(run func()) *UnsafeAsyncConnectorServiceServer_mustEmbedUnimplementedAsyncConnectorServiceServer_Call { - _c.Run(run) - return _c -} - -// NewAsyncConnectorService_GetTaskLogsServer creates a new instance of AsyncConnectorService_GetTaskLogsServer. 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 NewAsyncConnectorService_GetTaskLogsServer(t interface { - mock.TestingT - Cleanup(func()) -}) *AsyncConnectorService_GetTaskLogsServer { - mock := &AsyncConnectorService_GetTaskLogsServer{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} - -// AsyncConnectorService_GetTaskLogsServer is an autogenerated mock type for the AsyncConnectorService_GetTaskLogsServer type -type AsyncConnectorService_GetTaskLogsServer struct { - mock.Mock -} - -type AsyncConnectorService_GetTaskLogsServer_Expecter struct { - mock *mock.Mock -} - -func (_m *AsyncConnectorService_GetTaskLogsServer) EXPECT() *AsyncConnectorService_GetTaskLogsServer_Expecter { - return &AsyncConnectorService_GetTaskLogsServer_Expecter{mock: &_m.Mock} -} - -// Context provides a mock function for the type AsyncConnectorService_GetTaskLogsServer -func (_mock *AsyncConnectorService_GetTaskLogsServer) Context() context.Context { - ret := _mock.Called() - - if len(ret) == 0 { - panic("no return value specified for Context") - } - - var r0 context.Context - if returnFunc, ok := ret.Get(0).(func() context.Context); ok { - r0 = returnFunc() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(context.Context) - } - } - return r0 -} - -// AsyncConnectorService_GetTaskLogsServer_Context_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Context' -type AsyncConnectorService_GetTaskLogsServer_Context_Call struct { - *mock.Call -} - -// Context is a helper method to define mock.On call -func (_e *AsyncConnectorService_GetTaskLogsServer_Expecter) Context() *AsyncConnectorService_GetTaskLogsServer_Context_Call { - return &AsyncConnectorService_GetTaskLogsServer_Context_Call{Call: _e.mock.On("Context")} -} - -func (_c *AsyncConnectorService_GetTaskLogsServer_Context_Call) Run(run func()) *AsyncConnectorService_GetTaskLogsServer_Context_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsServer_Context_Call) Return(context1 context.Context) *AsyncConnectorService_GetTaskLogsServer_Context_Call { - _c.Call.Return(context1) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsServer_Context_Call) RunAndReturn(run func() context.Context) *AsyncConnectorService_GetTaskLogsServer_Context_Call { - _c.Call.Return(run) - return _c -} - -// RecvMsg provides a mock function for the type AsyncConnectorService_GetTaskLogsServer -func (_mock *AsyncConnectorService_GetTaskLogsServer) RecvMsg(m any) error { - ret := _mock.Called(m) - - if len(ret) == 0 { - panic("no return value specified for RecvMsg") - } - - var r0 error - if returnFunc, ok := ret.Get(0).(func(any) error); ok { - r0 = returnFunc(m) - } else { - r0 = ret.Error(0) - } - return r0 -} - -// AsyncConnectorService_GetTaskLogsServer_RecvMsg_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecvMsg' -type AsyncConnectorService_GetTaskLogsServer_RecvMsg_Call struct { - *mock.Call -} - -// RecvMsg is a helper method to define mock.On call -// - m any -func (_e *AsyncConnectorService_GetTaskLogsServer_Expecter) RecvMsg(m interface{}) *AsyncConnectorService_GetTaskLogsServer_RecvMsg_Call { - return &AsyncConnectorService_GetTaskLogsServer_RecvMsg_Call{Call: _e.mock.On("RecvMsg", m)} -} - -func (_c *AsyncConnectorService_GetTaskLogsServer_RecvMsg_Call) Run(run func(m any)) *AsyncConnectorService_GetTaskLogsServer_RecvMsg_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 any - if args[0] != nil { - arg0 = args[0].(any) - } - run( - arg0, - ) - }) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsServer_RecvMsg_Call) Return(err error) *AsyncConnectorService_GetTaskLogsServer_RecvMsg_Call { - _c.Call.Return(err) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsServer_RecvMsg_Call) RunAndReturn(run func(m any) error) *AsyncConnectorService_GetTaskLogsServer_RecvMsg_Call { - _c.Call.Return(run) - return _c -} - -// Send provides a mock function for the type AsyncConnectorService_GetTaskLogsServer -func (_mock *AsyncConnectorService_GetTaskLogsServer) Send(getTaskLogsResponse *connector.GetTaskLogsResponse) error { - ret := _mock.Called(getTaskLogsResponse) - - if len(ret) == 0 { - panic("no return value specified for Send") - } - - var r0 error - if returnFunc, ok := ret.Get(0).(func(*connector.GetTaskLogsResponse) error); ok { - r0 = returnFunc(getTaskLogsResponse) - } else { - r0 = ret.Error(0) - } - return r0 -} - -// AsyncConnectorService_GetTaskLogsServer_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send' -type AsyncConnectorService_GetTaskLogsServer_Send_Call struct { - *mock.Call -} - -// Send is a helper method to define mock.On call -// - getTaskLogsResponse *connector.GetTaskLogsResponse -func (_e *AsyncConnectorService_GetTaskLogsServer_Expecter) Send(getTaskLogsResponse interface{}) *AsyncConnectorService_GetTaskLogsServer_Send_Call { - return &AsyncConnectorService_GetTaskLogsServer_Send_Call{Call: _e.mock.On("Send", getTaskLogsResponse)} -} - -func (_c *AsyncConnectorService_GetTaskLogsServer_Send_Call) Run(run func(getTaskLogsResponse *connector.GetTaskLogsResponse)) *AsyncConnectorService_GetTaskLogsServer_Send_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 *connector.GetTaskLogsResponse - if args[0] != nil { - arg0 = args[0].(*connector.GetTaskLogsResponse) - } - run( - arg0, - ) - }) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsServer_Send_Call) Return(err error) *AsyncConnectorService_GetTaskLogsServer_Send_Call { - _c.Call.Return(err) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsServer_Send_Call) RunAndReturn(run func(getTaskLogsResponse *connector.GetTaskLogsResponse) error) *AsyncConnectorService_GetTaskLogsServer_Send_Call { - _c.Call.Return(run) - return _c -} - -// SendHeader provides a mock function for the type AsyncConnectorService_GetTaskLogsServer -func (_mock *AsyncConnectorService_GetTaskLogsServer) SendHeader(mD metadata.MD) error { - ret := _mock.Called(mD) - - if len(ret) == 0 { - panic("no return value specified for SendHeader") - } - - var r0 error - if returnFunc, ok := ret.Get(0).(func(metadata.MD) error); ok { - r0 = returnFunc(mD) - } else { - r0 = ret.Error(0) - } - return r0 -} - -// AsyncConnectorService_GetTaskLogsServer_SendHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendHeader' -type AsyncConnectorService_GetTaskLogsServer_SendHeader_Call struct { - *mock.Call -} - -// SendHeader is a helper method to define mock.On call -// - mD metadata.MD -func (_e *AsyncConnectorService_GetTaskLogsServer_Expecter) SendHeader(mD interface{}) *AsyncConnectorService_GetTaskLogsServer_SendHeader_Call { - return &AsyncConnectorService_GetTaskLogsServer_SendHeader_Call{Call: _e.mock.On("SendHeader", mD)} -} - -func (_c *AsyncConnectorService_GetTaskLogsServer_SendHeader_Call) Run(run func(mD metadata.MD)) *AsyncConnectorService_GetTaskLogsServer_SendHeader_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 metadata.MD - if args[0] != nil { - arg0 = args[0].(metadata.MD) - } - run( - arg0, - ) - }) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsServer_SendHeader_Call) Return(err error) *AsyncConnectorService_GetTaskLogsServer_SendHeader_Call { - _c.Call.Return(err) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsServer_SendHeader_Call) RunAndReturn(run func(mD metadata.MD) error) *AsyncConnectorService_GetTaskLogsServer_SendHeader_Call { - _c.Call.Return(run) - return _c -} - -// SendMsg provides a mock function for the type AsyncConnectorService_GetTaskLogsServer -func (_mock *AsyncConnectorService_GetTaskLogsServer) SendMsg(m any) error { - ret := _mock.Called(m) - - if len(ret) == 0 { - panic("no return value specified for SendMsg") - } - - var r0 error - if returnFunc, ok := ret.Get(0).(func(any) error); ok { - r0 = returnFunc(m) - } else { - r0 = ret.Error(0) - } - return r0 -} - -// AsyncConnectorService_GetTaskLogsServer_SendMsg_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendMsg' -type AsyncConnectorService_GetTaskLogsServer_SendMsg_Call struct { - *mock.Call -} - -// SendMsg is a helper method to define mock.On call -// - m any -func (_e *AsyncConnectorService_GetTaskLogsServer_Expecter) SendMsg(m interface{}) *AsyncConnectorService_GetTaskLogsServer_SendMsg_Call { - return &AsyncConnectorService_GetTaskLogsServer_SendMsg_Call{Call: _e.mock.On("SendMsg", m)} -} - -func (_c *AsyncConnectorService_GetTaskLogsServer_SendMsg_Call) Run(run func(m any)) *AsyncConnectorService_GetTaskLogsServer_SendMsg_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 any - if args[0] != nil { - arg0 = args[0].(any) - } - run( - arg0, - ) - }) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsServer_SendMsg_Call) Return(err error) *AsyncConnectorService_GetTaskLogsServer_SendMsg_Call { - _c.Call.Return(err) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsServer_SendMsg_Call) RunAndReturn(run func(m any) error) *AsyncConnectorService_GetTaskLogsServer_SendMsg_Call { - _c.Call.Return(run) - return _c -} - -// SetHeader provides a mock function for the type AsyncConnectorService_GetTaskLogsServer -func (_mock *AsyncConnectorService_GetTaskLogsServer) SetHeader(mD metadata.MD) error { - ret := _mock.Called(mD) - - if len(ret) == 0 { - panic("no return value specified for SetHeader") - } - - var r0 error - if returnFunc, ok := ret.Get(0).(func(metadata.MD) error); ok { - r0 = returnFunc(mD) - } else { - r0 = ret.Error(0) - } - return r0 -} - -// AsyncConnectorService_GetTaskLogsServer_SetHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHeader' -type AsyncConnectorService_GetTaskLogsServer_SetHeader_Call struct { - *mock.Call -} - -// SetHeader is a helper method to define mock.On call -// - mD metadata.MD -func (_e *AsyncConnectorService_GetTaskLogsServer_Expecter) SetHeader(mD interface{}) *AsyncConnectorService_GetTaskLogsServer_SetHeader_Call { - return &AsyncConnectorService_GetTaskLogsServer_SetHeader_Call{Call: _e.mock.On("SetHeader", mD)} -} - -func (_c *AsyncConnectorService_GetTaskLogsServer_SetHeader_Call) Run(run func(mD metadata.MD)) *AsyncConnectorService_GetTaskLogsServer_SetHeader_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 metadata.MD - if args[0] != nil { - arg0 = args[0].(metadata.MD) - } - run( - arg0, - ) - }) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsServer_SetHeader_Call) Return(err error) *AsyncConnectorService_GetTaskLogsServer_SetHeader_Call { - _c.Call.Return(err) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsServer_SetHeader_Call) RunAndReturn(run func(mD metadata.MD) error) *AsyncConnectorService_GetTaskLogsServer_SetHeader_Call { - _c.Call.Return(run) - return _c -} - -// SetTrailer provides a mock function for the type AsyncConnectorService_GetTaskLogsServer -func (_mock *AsyncConnectorService_GetTaskLogsServer) SetTrailer(mD metadata.MD) { - _mock.Called(mD) - return -} - -// AsyncConnectorService_GetTaskLogsServer_SetTrailer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetTrailer' -type AsyncConnectorService_GetTaskLogsServer_SetTrailer_Call struct { - *mock.Call -} - -// SetTrailer is a helper method to define mock.On call -// - mD metadata.MD -func (_e *AsyncConnectorService_GetTaskLogsServer_Expecter) SetTrailer(mD interface{}) *AsyncConnectorService_GetTaskLogsServer_SetTrailer_Call { - return &AsyncConnectorService_GetTaskLogsServer_SetTrailer_Call{Call: _e.mock.On("SetTrailer", mD)} -} - -func (_c *AsyncConnectorService_GetTaskLogsServer_SetTrailer_Call) Run(run func(mD metadata.MD)) *AsyncConnectorService_GetTaskLogsServer_SetTrailer_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 metadata.MD - if args[0] != nil { - arg0 = args[0].(metadata.MD) - } - run( - arg0, - ) - }) - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsServer_SetTrailer_Call) Return() *AsyncConnectorService_GetTaskLogsServer_SetTrailer_Call { - _c.Call.Return() - return _c -} - -func (_c *AsyncConnectorService_GetTaskLogsServer_SetTrailer_Call) RunAndReturn(run func(mD metadata.MD)) *AsyncConnectorService_GetTaskLogsServer_SetTrailer_Call { - _c.Run(run) - return _c -} - -// NewConnectorMetadataServiceClient creates a new instance of ConnectorMetadataServiceClient. 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 NewConnectorMetadataServiceClient(t interface { - mock.TestingT - Cleanup(func()) -}) *ConnectorMetadataServiceClient { - mock := &ConnectorMetadataServiceClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} - -// ConnectorMetadataServiceClient is an autogenerated mock type for the ConnectorMetadataServiceClient type -type ConnectorMetadataServiceClient struct { - mock.Mock -} - -type ConnectorMetadataServiceClient_Expecter struct { - mock *mock.Mock -} - -func (_m *ConnectorMetadataServiceClient) EXPECT() *ConnectorMetadataServiceClient_Expecter { - return &ConnectorMetadataServiceClient_Expecter{mock: &_m.Mock} -} - -// GetConnector provides a mock function for the type ConnectorMetadataServiceClient -func (_mock *ConnectorMetadataServiceClient) GetConnector(ctx context.Context, in *connector.GetConnectorRequest, opts ...grpc.CallOption) (*connector.GetConnectorResponse, error) { - // grpc.CallOption - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _mock.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for GetConnector") - } - - var r0 *connector.GetConnectorResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetConnectorRequest, ...grpc.CallOption) (*connector.GetConnectorResponse, error)); ok { - return returnFunc(ctx, in, opts...) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetConnectorRequest, ...grpc.CallOption) *connector.GetConnectorResponse); ok { - r0 = returnFunc(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connector.GetConnectorResponse) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.GetConnectorRequest, ...grpc.CallOption) error); ok { - r1 = returnFunc(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// ConnectorMetadataServiceClient_GetConnector_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConnector' -type ConnectorMetadataServiceClient_GetConnector_Call struct { - *mock.Call -} - -// GetConnector is a helper method to define mock.On call -// - ctx context.Context -// - in *connector.GetConnectorRequest -// - opts ...grpc.CallOption -func (_e *ConnectorMetadataServiceClient_Expecter) GetConnector(ctx interface{}, in interface{}, opts ...interface{}) *ConnectorMetadataServiceClient_GetConnector_Call { - return &ConnectorMetadataServiceClient_GetConnector_Call{Call: _e.mock.On("GetConnector", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *ConnectorMetadataServiceClient_GetConnector_Call) Run(run func(ctx context.Context, in *connector.GetConnectorRequest, opts ...grpc.CallOption)) *ConnectorMetadataServiceClient_GetConnector_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connector.GetConnectorRequest - if args[1] != nil { - arg1 = args[1].(*connector.GetConnectorRequest) - } - var arg2 []grpc.CallOption - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - arg2 = variadicArgs - run( - arg0, - arg1, - arg2..., - ) - }) - return _c -} - -func (_c *ConnectorMetadataServiceClient_GetConnector_Call) Return(getConnectorResponse *connector.GetConnectorResponse, err error) *ConnectorMetadataServiceClient_GetConnector_Call { - _c.Call.Return(getConnectorResponse, err) - return _c -} - -func (_c *ConnectorMetadataServiceClient_GetConnector_Call) RunAndReturn(run func(ctx context.Context, in *connector.GetConnectorRequest, opts ...grpc.CallOption) (*connector.GetConnectorResponse, error)) *ConnectorMetadataServiceClient_GetConnector_Call { - _c.Call.Return(run) - return _c -} - -// ListConnectors provides a mock function for the type ConnectorMetadataServiceClient -func (_mock *ConnectorMetadataServiceClient) ListConnectors(ctx context.Context, in *connector.ListConnectorsRequest, opts ...grpc.CallOption) (*connector.ListConnectorsResponse, error) { - // grpc.CallOption - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _mock.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for ListConnectors") - } - - var r0 *connector.ListConnectorsResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.ListConnectorsRequest, ...grpc.CallOption) (*connector.ListConnectorsResponse, error)); ok { - return returnFunc(ctx, in, opts...) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.ListConnectorsRequest, ...grpc.CallOption) *connector.ListConnectorsResponse); ok { - r0 = returnFunc(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connector.ListConnectorsResponse) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.ListConnectorsRequest, ...grpc.CallOption) error); ok { - r1 = returnFunc(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// ConnectorMetadataServiceClient_ListConnectors_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListConnectors' -type ConnectorMetadataServiceClient_ListConnectors_Call struct { - *mock.Call -} - -// ListConnectors is a helper method to define mock.On call -// - ctx context.Context -// - in *connector.ListConnectorsRequest -// - opts ...grpc.CallOption -func (_e *ConnectorMetadataServiceClient_Expecter) ListConnectors(ctx interface{}, in interface{}, opts ...interface{}) *ConnectorMetadataServiceClient_ListConnectors_Call { - return &ConnectorMetadataServiceClient_ListConnectors_Call{Call: _e.mock.On("ListConnectors", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *ConnectorMetadataServiceClient_ListConnectors_Call) Run(run func(ctx context.Context, in *connector.ListConnectorsRequest, opts ...grpc.CallOption)) *ConnectorMetadataServiceClient_ListConnectors_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connector.ListConnectorsRequest - if args[1] != nil { - arg1 = args[1].(*connector.ListConnectorsRequest) - } - var arg2 []grpc.CallOption - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - arg2 = variadicArgs - run( - arg0, - arg1, - arg2..., - ) - }) - return _c -} - -func (_c *ConnectorMetadataServiceClient_ListConnectors_Call) Return(listConnectorsResponse *connector.ListConnectorsResponse, err error) *ConnectorMetadataServiceClient_ListConnectors_Call { - _c.Call.Return(listConnectorsResponse, err) - return _c -} - -func (_c *ConnectorMetadataServiceClient_ListConnectors_Call) RunAndReturn(run func(ctx context.Context, in *connector.ListConnectorsRequest, opts ...grpc.CallOption) (*connector.ListConnectorsResponse, error)) *ConnectorMetadataServiceClient_ListConnectors_Call { - _c.Call.Return(run) - return _c -} - -// NewConnectorMetadataServiceServer creates a new instance of ConnectorMetadataServiceServer. 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 NewConnectorMetadataServiceServer(t interface { - mock.TestingT - Cleanup(func()) -}) *ConnectorMetadataServiceServer { - mock := &ConnectorMetadataServiceServer{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} - -// ConnectorMetadataServiceServer is an autogenerated mock type for the ConnectorMetadataServiceServer type -type ConnectorMetadataServiceServer struct { - mock.Mock -} - -type ConnectorMetadataServiceServer_Expecter struct { - mock *mock.Mock -} - -func (_m *ConnectorMetadataServiceServer) EXPECT() *ConnectorMetadataServiceServer_Expecter { - return &ConnectorMetadataServiceServer_Expecter{mock: &_m.Mock} -} - -// GetConnector provides a mock function for the type ConnectorMetadataServiceServer -func (_mock *ConnectorMetadataServiceServer) GetConnector(context1 context.Context, getConnectorRequest *connector.GetConnectorRequest) (*connector.GetConnectorResponse, error) { - ret := _mock.Called(context1, getConnectorRequest) - - if len(ret) == 0 { - panic("no return value specified for GetConnector") - } - - var r0 *connector.GetConnectorResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetConnectorRequest) (*connector.GetConnectorResponse, error)); ok { - return returnFunc(context1, getConnectorRequest) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetConnectorRequest) *connector.GetConnectorResponse); ok { - r0 = returnFunc(context1, getConnectorRequest) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connector.GetConnectorResponse) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.GetConnectorRequest) error); ok { - r1 = returnFunc(context1, getConnectorRequest) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// ConnectorMetadataServiceServer_GetConnector_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConnector' -type ConnectorMetadataServiceServer_GetConnector_Call struct { - *mock.Call -} - -// GetConnector is a helper method to define mock.On call -// - context1 context.Context -// - getConnectorRequest *connector.GetConnectorRequest -func (_e *ConnectorMetadataServiceServer_Expecter) GetConnector(context1 interface{}, getConnectorRequest interface{}) *ConnectorMetadataServiceServer_GetConnector_Call { - return &ConnectorMetadataServiceServer_GetConnector_Call{Call: _e.mock.On("GetConnector", context1, getConnectorRequest)} -} - -func (_c *ConnectorMetadataServiceServer_GetConnector_Call) Run(run func(context1 context.Context, getConnectorRequest *connector.GetConnectorRequest)) *ConnectorMetadataServiceServer_GetConnector_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connector.GetConnectorRequest - if args[1] != nil { - arg1 = args[1].(*connector.GetConnectorRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *ConnectorMetadataServiceServer_GetConnector_Call) Return(getConnectorResponse *connector.GetConnectorResponse, err error) *ConnectorMetadataServiceServer_GetConnector_Call { - _c.Call.Return(getConnectorResponse, err) - return _c -} - -func (_c *ConnectorMetadataServiceServer_GetConnector_Call) RunAndReturn(run func(context1 context.Context, getConnectorRequest *connector.GetConnectorRequest) (*connector.GetConnectorResponse, error)) *ConnectorMetadataServiceServer_GetConnector_Call { - _c.Call.Return(run) - return _c -} - -// ListConnectors provides a mock function for the type ConnectorMetadataServiceServer -func (_mock *ConnectorMetadataServiceServer) ListConnectors(context1 context.Context, listConnectorsRequest *connector.ListConnectorsRequest) (*connector.ListConnectorsResponse, error) { - ret := _mock.Called(context1, listConnectorsRequest) - - if len(ret) == 0 { - panic("no return value specified for ListConnectors") - } - - var r0 *connector.ListConnectorsResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.ListConnectorsRequest) (*connector.ListConnectorsResponse, error)); ok { - return returnFunc(context1, listConnectorsRequest) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.ListConnectorsRequest) *connector.ListConnectorsResponse); ok { - r0 = returnFunc(context1, listConnectorsRequest) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connector.ListConnectorsResponse) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.ListConnectorsRequest) error); ok { - r1 = returnFunc(context1, listConnectorsRequest) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// ConnectorMetadataServiceServer_ListConnectors_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListConnectors' -type ConnectorMetadataServiceServer_ListConnectors_Call struct { - *mock.Call -} - -// ListConnectors is a helper method to define mock.On call -// - context1 context.Context -// - listConnectorsRequest *connector.ListConnectorsRequest -func (_e *ConnectorMetadataServiceServer_Expecter) ListConnectors(context1 interface{}, listConnectorsRequest interface{}) *ConnectorMetadataServiceServer_ListConnectors_Call { - return &ConnectorMetadataServiceServer_ListConnectors_Call{Call: _e.mock.On("ListConnectors", context1, listConnectorsRequest)} -} - -func (_c *ConnectorMetadataServiceServer_ListConnectors_Call) Run(run func(context1 context.Context, listConnectorsRequest *connector.ListConnectorsRequest)) *ConnectorMetadataServiceServer_ListConnectors_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connector.ListConnectorsRequest - if args[1] != nil { - arg1 = args[1].(*connector.ListConnectorsRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *ConnectorMetadataServiceServer_ListConnectors_Call) Return(listConnectorsResponse *connector.ListConnectorsResponse, err error) *ConnectorMetadataServiceServer_ListConnectors_Call { - _c.Call.Return(listConnectorsResponse, err) - return _c -} - -func (_c *ConnectorMetadataServiceServer_ListConnectors_Call) RunAndReturn(run func(context1 context.Context, listConnectorsRequest *connector.ListConnectorsRequest) (*connector.ListConnectorsResponse, error)) *ConnectorMetadataServiceServer_ListConnectors_Call { - _c.Call.Return(run) - return _c -} - -// NewUnsafeConnectorMetadataServiceServer creates a new instance of UnsafeConnectorMetadataServiceServer. 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 NewUnsafeConnectorMetadataServiceServer(t interface { - mock.TestingT - Cleanup(func()) -}) *UnsafeConnectorMetadataServiceServer { - mock := &UnsafeConnectorMetadataServiceServer{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} - -// UnsafeConnectorMetadataServiceServer is an autogenerated mock type for the UnsafeConnectorMetadataServiceServer type -type UnsafeConnectorMetadataServiceServer struct { - mock.Mock -} - -type UnsafeConnectorMetadataServiceServer_Expecter struct { - mock *mock.Mock -} - -func (_m *UnsafeConnectorMetadataServiceServer) EXPECT() *UnsafeConnectorMetadataServiceServer_Expecter { - return &UnsafeConnectorMetadataServiceServer_Expecter{mock: &_m.Mock} -} - -// mustEmbedUnimplementedConnectorMetadataServiceServer provides a mock function for the type UnsafeConnectorMetadataServiceServer -func (_mock *UnsafeConnectorMetadataServiceServer) mustEmbedUnimplementedConnectorMetadataServiceServer() { - _mock.Called() - return -} - -// UnsafeConnectorMetadataServiceServer_mustEmbedUnimplementedConnectorMetadataServiceServer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'mustEmbedUnimplementedConnectorMetadataServiceServer' -type UnsafeConnectorMetadataServiceServer_mustEmbedUnimplementedConnectorMetadataServiceServer_Call struct { - *mock.Call -} - -// mustEmbedUnimplementedConnectorMetadataServiceServer is a helper method to define mock.On call -func (_e *UnsafeConnectorMetadataServiceServer_Expecter) mustEmbedUnimplementedConnectorMetadataServiceServer() *UnsafeConnectorMetadataServiceServer_mustEmbedUnimplementedConnectorMetadataServiceServer_Call { - return &UnsafeConnectorMetadataServiceServer_mustEmbedUnimplementedConnectorMetadataServiceServer_Call{Call: _e.mock.On("mustEmbedUnimplementedConnectorMetadataServiceServer")} -} - -func (_c *UnsafeConnectorMetadataServiceServer_mustEmbedUnimplementedConnectorMetadataServiceServer_Call) Run(run func()) *UnsafeConnectorMetadataServiceServer_mustEmbedUnimplementedConnectorMetadataServiceServer_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *UnsafeConnectorMetadataServiceServer_mustEmbedUnimplementedConnectorMetadataServiceServer_Call) Return() *UnsafeConnectorMetadataServiceServer_mustEmbedUnimplementedConnectorMetadataServiceServer_Call { - _c.Call.Return() - return _c -} - -func (_c *UnsafeConnectorMetadataServiceServer_mustEmbedUnimplementedConnectorMetadataServiceServer_Call) RunAndReturn(run func()) *UnsafeConnectorMetadataServiceServer_mustEmbedUnimplementedConnectorMetadataServiceServer_Call { - _c.Run(run) - return _c -} diff --git a/gen/go/flyteidl2/workflow/workflowconnect/mocks/mocks.go b/gen/go/flyteidl2/workflow/workflowconnect/mocks/mocks.go deleted file mode 100644 index 7422492823..0000000000 --- a/gen/go/flyteidl2/workflow/workflowconnect/mocks/mocks.go +++ /dev/null @@ -1,4897 +0,0 @@ -// Code generated by mockery; DO NOT EDIT. -// github.com/vektra/mockery -// template: testify - -package mocks - -import ( - "context" - - "connectrpc.com/connect" - "github.com/flyteorg/flyte/v2/gen/go/flyteidl2/workflow" - mock "github.com/stretchr/testify/mock" -) - -// NewEventsProxyServiceClient creates a new instance of EventsProxyServiceClient. 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 NewEventsProxyServiceClient(t interface { - mock.TestingT - Cleanup(func()) -}) *EventsProxyServiceClient { - mock := &EventsProxyServiceClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} - -// EventsProxyServiceClient is an autogenerated mock type for the EventsProxyServiceClient type -type EventsProxyServiceClient struct { - mock.Mock -} - -type EventsProxyServiceClient_Expecter struct { - mock *mock.Mock -} - -func (_m *EventsProxyServiceClient) EXPECT() *EventsProxyServiceClient_Expecter { - return &EventsProxyServiceClient_Expecter{mock: &_m.Mock} -} - -// Record provides a mock function for the type EventsProxyServiceClient -func (_mock *EventsProxyServiceClient) Record(context1 context.Context, request *connect.Request[workflow.RecordRequest]) (*connect.Response[workflow.RecordResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for Record") - } - - var r0 *connect.Response[workflow.RecordResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.RecordRequest]) (*connect.Response[workflow.RecordResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.RecordRequest]) *connect.Response[workflow.RecordResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.RecordResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.RecordRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// EventsProxyServiceClient_Record_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Record' -type EventsProxyServiceClient_Record_Call struct { - *mock.Call -} - -// Record is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.RecordRequest] -func (_e *EventsProxyServiceClient_Expecter) Record(context1 interface{}, request interface{}) *EventsProxyServiceClient_Record_Call { - return &EventsProxyServiceClient_Record_Call{Call: _e.mock.On("Record", context1, request)} -} - -func (_c *EventsProxyServiceClient_Record_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.RecordRequest])) *EventsProxyServiceClient_Record_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.RecordRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.RecordRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *EventsProxyServiceClient_Record_Call) Return(response *connect.Response[workflow.RecordResponse], err error) *EventsProxyServiceClient_Record_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *EventsProxyServiceClient_Record_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.RecordRequest]) (*connect.Response[workflow.RecordResponse], error)) *EventsProxyServiceClient_Record_Call { - _c.Call.Return(run) - return _c -} - -// NewEventsProxyServiceHandler creates a new instance of EventsProxyServiceHandler. 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 NewEventsProxyServiceHandler(t interface { - mock.TestingT - Cleanup(func()) -}) *EventsProxyServiceHandler { - mock := &EventsProxyServiceHandler{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} - -// EventsProxyServiceHandler is an autogenerated mock type for the EventsProxyServiceHandler type -type EventsProxyServiceHandler struct { - mock.Mock -} - -type EventsProxyServiceHandler_Expecter struct { - mock *mock.Mock -} - -func (_m *EventsProxyServiceHandler) EXPECT() *EventsProxyServiceHandler_Expecter { - return &EventsProxyServiceHandler_Expecter{mock: &_m.Mock} -} - -// Record provides a mock function for the type EventsProxyServiceHandler -func (_mock *EventsProxyServiceHandler) Record(context1 context.Context, request *connect.Request[workflow.RecordRequest]) (*connect.Response[workflow.RecordResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for Record") - } - - var r0 *connect.Response[workflow.RecordResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.RecordRequest]) (*connect.Response[workflow.RecordResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.RecordRequest]) *connect.Response[workflow.RecordResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.RecordResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.RecordRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// EventsProxyServiceHandler_Record_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Record' -type EventsProxyServiceHandler_Record_Call struct { - *mock.Call -} - -// Record is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.RecordRequest] -func (_e *EventsProxyServiceHandler_Expecter) Record(context1 interface{}, request interface{}) *EventsProxyServiceHandler_Record_Call { - return &EventsProxyServiceHandler_Record_Call{Call: _e.mock.On("Record", context1, request)} -} - -func (_c *EventsProxyServiceHandler_Record_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.RecordRequest])) *EventsProxyServiceHandler_Record_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.RecordRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.RecordRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *EventsProxyServiceHandler_Record_Call) Return(response *connect.Response[workflow.RecordResponse], err error) *EventsProxyServiceHandler_Record_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *EventsProxyServiceHandler_Record_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.RecordRequest]) (*connect.Response[workflow.RecordResponse], error)) *EventsProxyServiceHandler_Record_Call { - _c.Call.Return(run) - return _c -} - -// NewInternalRunServiceClient creates a new instance of InternalRunServiceClient. 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 NewInternalRunServiceClient(t interface { - mock.TestingT - Cleanup(func()) -}) *InternalRunServiceClient { - mock := &InternalRunServiceClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} - -// InternalRunServiceClient is an autogenerated mock type for the InternalRunServiceClient type -type InternalRunServiceClient struct { - mock.Mock -} - -type InternalRunServiceClient_Expecter struct { - mock *mock.Mock -} - -func (_m *InternalRunServiceClient) EXPECT() *InternalRunServiceClient_Expecter { - return &InternalRunServiceClient_Expecter{mock: &_m.Mock} -} - -// RecordAction provides a mock function for the type InternalRunServiceClient -func (_mock *InternalRunServiceClient) RecordAction(context1 context.Context, request *connect.Request[workflow.RecordActionRequest]) (*connect.Response[workflow.RecordActionResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for RecordAction") - } - - var r0 *connect.Response[workflow.RecordActionResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.RecordActionRequest]) (*connect.Response[workflow.RecordActionResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.RecordActionRequest]) *connect.Response[workflow.RecordActionResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.RecordActionResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.RecordActionRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// InternalRunServiceClient_RecordAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecordAction' -type InternalRunServiceClient_RecordAction_Call struct { - *mock.Call -} - -// RecordAction is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.RecordActionRequest] -func (_e *InternalRunServiceClient_Expecter) RecordAction(context1 interface{}, request interface{}) *InternalRunServiceClient_RecordAction_Call { - return &InternalRunServiceClient_RecordAction_Call{Call: _e.mock.On("RecordAction", context1, request)} -} - -func (_c *InternalRunServiceClient_RecordAction_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.RecordActionRequest])) *InternalRunServiceClient_RecordAction_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.RecordActionRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.RecordActionRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *InternalRunServiceClient_RecordAction_Call) Return(response *connect.Response[workflow.RecordActionResponse], err error) *InternalRunServiceClient_RecordAction_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *InternalRunServiceClient_RecordAction_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.RecordActionRequest]) (*connect.Response[workflow.RecordActionResponse], error)) *InternalRunServiceClient_RecordAction_Call { - _c.Call.Return(run) - return _c -} - -// RecordActionEventStream provides a mock function for the type InternalRunServiceClient -func (_mock *InternalRunServiceClient) RecordActionEventStream(context1 context.Context) *connect.BidiStreamForClient[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse] { - ret := _mock.Called(context1) - - if len(ret) == 0 { - panic("no return value specified for RecordActionEventStream") - } - - var r0 *connect.BidiStreamForClient[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse] - if returnFunc, ok := ret.Get(0).(func(context.Context) *connect.BidiStreamForClient[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse]); ok { - r0 = returnFunc(context1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.BidiStreamForClient[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse]) - } - } - return r0 -} - -// InternalRunServiceClient_RecordActionEventStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecordActionEventStream' -type InternalRunServiceClient_RecordActionEventStream_Call struct { - *mock.Call -} - -// RecordActionEventStream is a helper method to define mock.On call -// - context1 context.Context -func (_e *InternalRunServiceClient_Expecter) RecordActionEventStream(context1 interface{}) *InternalRunServiceClient_RecordActionEventStream_Call { - return &InternalRunServiceClient_RecordActionEventStream_Call{Call: _e.mock.On("RecordActionEventStream", context1)} -} - -func (_c *InternalRunServiceClient_RecordActionEventStream_Call) Run(run func(context1 context.Context)) *InternalRunServiceClient_RecordActionEventStream_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - run( - arg0, - ) - }) - return _c -} - -func (_c *InternalRunServiceClient_RecordActionEventStream_Call) Return(bidiStreamForClient *connect.BidiStreamForClient[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse]) *InternalRunServiceClient_RecordActionEventStream_Call { - _c.Call.Return(bidiStreamForClient) - return _c -} - -func (_c *InternalRunServiceClient_RecordActionEventStream_Call) RunAndReturn(run func(context1 context.Context) *connect.BidiStreamForClient[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse]) *InternalRunServiceClient_RecordActionEventStream_Call { - _c.Call.Return(run) - return _c -} - -// RecordActionEvents provides a mock function for the type InternalRunServiceClient -func (_mock *InternalRunServiceClient) RecordActionEvents(context1 context.Context, request *connect.Request[workflow.RecordActionEventsRequest]) (*connect.Response[workflow.RecordActionEventsResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for RecordActionEvents") - } - - var r0 *connect.Response[workflow.RecordActionEventsResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.RecordActionEventsRequest]) (*connect.Response[workflow.RecordActionEventsResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.RecordActionEventsRequest]) *connect.Response[workflow.RecordActionEventsResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.RecordActionEventsResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.RecordActionEventsRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// InternalRunServiceClient_RecordActionEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecordActionEvents' -type InternalRunServiceClient_RecordActionEvents_Call struct { - *mock.Call -} - -// RecordActionEvents is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.RecordActionEventsRequest] -func (_e *InternalRunServiceClient_Expecter) RecordActionEvents(context1 interface{}, request interface{}) *InternalRunServiceClient_RecordActionEvents_Call { - return &InternalRunServiceClient_RecordActionEvents_Call{Call: _e.mock.On("RecordActionEvents", context1, request)} -} - -func (_c *InternalRunServiceClient_RecordActionEvents_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.RecordActionEventsRequest])) *InternalRunServiceClient_RecordActionEvents_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.RecordActionEventsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.RecordActionEventsRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *InternalRunServiceClient_RecordActionEvents_Call) Return(response *connect.Response[workflow.RecordActionEventsResponse], err error) *InternalRunServiceClient_RecordActionEvents_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *InternalRunServiceClient_RecordActionEvents_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.RecordActionEventsRequest]) (*connect.Response[workflow.RecordActionEventsResponse], error)) *InternalRunServiceClient_RecordActionEvents_Call { - _c.Call.Return(run) - return _c -} - -// RecordActionStream provides a mock function for the type InternalRunServiceClient -func (_mock *InternalRunServiceClient) RecordActionStream(context1 context.Context) *connect.BidiStreamForClient[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse] { - ret := _mock.Called(context1) - - if len(ret) == 0 { - panic("no return value specified for RecordActionStream") - } - - var r0 *connect.BidiStreamForClient[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse] - if returnFunc, ok := ret.Get(0).(func(context.Context) *connect.BidiStreamForClient[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse]); ok { - r0 = returnFunc(context1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.BidiStreamForClient[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse]) - } - } - return r0 -} - -// InternalRunServiceClient_RecordActionStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecordActionStream' -type InternalRunServiceClient_RecordActionStream_Call struct { - *mock.Call -} - -// RecordActionStream is a helper method to define mock.On call -// - context1 context.Context -func (_e *InternalRunServiceClient_Expecter) RecordActionStream(context1 interface{}) *InternalRunServiceClient_RecordActionStream_Call { - return &InternalRunServiceClient_RecordActionStream_Call{Call: _e.mock.On("RecordActionStream", context1)} -} - -func (_c *InternalRunServiceClient_RecordActionStream_Call) Run(run func(context1 context.Context)) *InternalRunServiceClient_RecordActionStream_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - run( - arg0, - ) - }) - return _c -} - -func (_c *InternalRunServiceClient_RecordActionStream_Call) Return(bidiStreamForClient *connect.BidiStreamForClient[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse]) *InternalRunServiceClient_RecordActionStream_Call { - _c.Call.Return(bidiStreamForClient) - return _c -} - -func (_c *InternalRunServiceClient_RecordActionStream_Call) RunAndReturn(run func(context1 context.Context) *connect.BidiStreamForClient[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse]) *InternalRunServiceClient_RecordActionStream_Call { - _c.Call.Return(run) - return _c -} - -// UpdateActionStatus provides a mock function for the type InternalRunServiceClient -func (_mock *InternalRunServiceClient) UpdateActionStatus(context1 context.Context, request *connect.Request[workflow.UpdateActionStatusRequest]) (*connect.Response[workflow.UpdateActionStatusResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for UpdateActionStatus") - } - - var r0 *connect.Response[workflow.UpdateActionStatusResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.UpdateActionStatusRequest]) (*connect.Response[workflow.UpdateActionStatusResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.UpdateActionStatusRequest]) *connect.Response[workflow.UpdateActionStatusResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.UpdateActionStatusResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.UpdateActionStatusRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// InternalRunServiceClient_UpdateActionStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateActionStatus' -type InternalRunServiceClient_UpdateActionStatus_Call struct { - *mock.Call -} - -// UpdateActionStatus is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.UpdateActionStatusRequest] -func (_e *InternalRunServiceClient_Expecter) UpdateActionStatus(context1 interface{}, request interface{}) *InternalRunServiceClient_UpdateActionStatus_Call { - return &InternalRunServiceClient_UpdateActionStatus_Call{Call: _e.mock.On("UpdateActionStatus", context1, request)} -} - -func (_c *InternalRunServiceClient_UpdateActionStatus_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.UpdateActionStatusRequest])) *InternalRunServiceClient_UpdateActionStatus_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.UpdateActionStatusRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.UpdateActionStatusRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *InternalRunServiceClient_UpdateActionStatus_Call) Return(response *connect.Response[workflow.UpdateActionStatusResponse], err error) *InternalRunServiceClient_UpdateActionStatus_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *InternalRunServiceClient_UpdateActionStatus_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.UpdateActionStatusRequest]) (*connect.Response[workflow.UpdateActionStatusResponse], error)) *InternalRunServiceClient_UpdateActionStatus_Call { - _c.Call.Return(run) - return _c -} - -// UpdateActionStatusStream provides a mock function for the type InternalRunServiceClient -func (_mock *InternalRunServiceClient) UpdateActionStatusStream(context1 context.Context) *connect.BidiStreamForClient[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse] { - ret := _mock.Called(context1) - - if len(ret) == 0 { - panic("no return value specified for UpdateActionStatusStream") - } - - var r0 *connect.BidiStreamForClient[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse] - if returnFunc, ok := ret.Get(0).(func(context.Context) *connect.BidiStreamForClient[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse]); ok { - r0 = returnFunc(context1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.BidiStreamForClient[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse]) - } - } - return r0 -} - -// InternalRunServiceClient_UpdateActionStatusStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateActionStatusStream' -type InternalRunServiceClient_UpdateActionStatusStream_Call struct { - *mock.Call -} - -// UpdateActionStatusStream is a helper method to define mock.On call -// - context1 context.Context -func (_e *InternalRunServiceClient_Expecter) UpdateActionStatusStream(context1 interface{}) *InternalRunServiceClient_UpdateActionStatusStream_Call { - return &InternalRunServiceClient_UpdateActionStatusStream_Call{Call: _e.mock.On("UpdateActionStatusStream", context1)} -} - -func (_c *InternalRunServiceClient_UpdateActionStatusStream_Call) Run(run func(context1 context.Context)) *InternalRunServiceClient_UpdateActionStatusStream_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - run( - arg0, - ) - }) - return _c -} - -func (_c *InternalRunServiceClient_UpdateActionStatusStream_Call) Return(bidiStreamForClient *connect.BidiStreamForClient[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse]) *InternalRunServiceClient_UpdateActionStatusStream_Call { - _c.Call.Return(bidiStreamForClient) - return _c -} - -func (_c *InternalRunServiceClient_UpdateActionStatusStream_Call) RunAndReturn(run func(context1 context.Context) *connect.BidiStreamForClient[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse]) *InternalRunServiceClient_UpdateActionStatusStream_Call { - _c.Call.Return(run) - return _c -} - -// NewInternalRunServiceHandler creates a new instance of InternalRunServiceHandler. 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 NewInternalRunServiceHandler(t interface { - mock.TestingT - Cleanup(func()) -}) *InternalRunServiceHandler { - mock := &InternalRunServiceHandler{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} - -// InternalRunServiceHandler is an autogenerated mock type for the InternalRunServiceHandler type -type InternalRunServiceHandler struct { - mock.Mock -} - -type InternalRunServiceHandler_Expecter struct { - mock *mock.Mock -} - -func (_m *InternalRunServiceHandler) EXPECT() *InternalRunServiceHandler_Expecter { - return &InternalRunServiceHandler_Expecter{mock: &_m.Mock} -} - -// RecordAction provides a mock function for the type InternalRunServiceHandler -func (_mock *InternalRunServiceHandler) RecordAction(context1 context.Context, request *connect.Request[workflow.RecordActionRequest]) (*connect.Response[workflow.RecordActionResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for RecordAction") - } - - var r0 *connect.Response[workflow.RecordActionResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.RecordActionRequest]) (*connect.Response[workflow.RecordActionResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.RecordActionRequest]) *connect.Response[workflow.RecordActionResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.RecordActionResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.RecordActionRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// InternalRunServiceHandler_RecordAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecordAction' -type InternalRunServiceHandler_RecordAction_Call struct { - *mock.Call -} - -// RecordAction is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.RecordActionRequest] -func (_e *InternalRunServiceHandler_Expecter) RecordAction(context1 interface{}, request interface{}) *InternalRunServiceHandler_RecordAction_Call { - return &InternalRunServiceHandler_RecordAction_Call{Call: _e.mock.On("RecordAction", context1, request)} -} - -func (_c *InternalRunServiceHandler_RecordAction_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.RecordActionRequest])) *InternalRunServiceHandler_RecordAction_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.RecordActionRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.RecordActionRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *InternalRunServiceHandler_RecordAction_Call) Return(response *connect.Response[workflow.RecordActionResponse], err error) *InternalRunServiceHandler_RecordAction_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *InternalRunServiceHandler_RecordAction_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.RecordActionRequest]) (*connect.Response[workflow.RecordActionResponse], error)) *InternalRunServiceHandler_RecordAction_Call { - _c.Call.Return(run) - return _c -} - -// RecordActionEventStream provides a mock function for the type InternalRunServiceHandler -func (_mock *InternalRunServiceHandler) RecordActionEventStream(context1 context.Context, bidiStream *connect.BidiStream[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse]) error { - ret := _mock.Called(context1, bidiStream) - - if len(ret) == 0 { - panic("no return value specified for RecordActionEventStream") - } - - var r0 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.BidiStream[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse]) error); ok { - r0 = returnFunc(context1, bidiStream) - } else { - r0 = ret.Error(0) - } - return r0 -} - -// InternalRunServiceHandler_RecordActionEventStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecordActionEventStream' -type InternalRunServiceHandler_RecordActionEventStream_Call struct { - *mock.Call -} - -// RecordActionEventStream is a helper method to define mock.On call -// - context1 context.Context -// - bidiStream *connect.BidiStream[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse] -func (_e *InternalRunServiceHandler_Expecter) RecordActionEventStream(context1 interface{}, bidiStream interface{}) *InternalRunServiceHandler_RecordActionEventStream_Call { - return &InternalRunServiceHandler_RecordActionEventStream_Call{Call: _e.mock.On("RecordActionEventStream", context1, bidiStream)} -} - -func (_c *InternalRunServiceHandler_RecordActionEventStream_Call) Run(run func(context1 context.Context, bidiStream *connect.BidiStream[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse])) *InternalRunServiceHandler_RecordActionEventStream_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.BidiStream[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse] - if args[1] != nil { - arg1 = args[1].(*connect.BidiStream[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *InternalRunServiceHandler_RecordActionEventStream_Call) Return(err error) *InternalRunServiceHandler_RecordActionEventStream_Call { - _c.Call.Return(err) - return _c -} - -func (_c *InternalRunServiceHandler_RecordActionEventStream_Call) RunAndReturn(run func(context1 context.Context, bidiStream *connect.BidiStream[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse]) error) *InternalRunServiceHandler_RecordActionEventStream_Call { - _c.Call.Return(run) - return _c -} - -// RecordActionEvents provides a mock function for the type InternalRunServiceHandler -func (_mock *InternalRunServiceHandler) RecordActionEvents(context1 context.Context, request *connect.Request[workflow.RecordActionEventsRequest]) (*connect.Response[workflow.RecordActionEventsResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for RecordActionEvents") - } - - var r0 *connect.Response[workflow.RecordActionEventsResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.RecordActionEventsRequest]) (*connect.Response[workflow.RecordActionEventsResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.RecordActionEventsRequest]) *connect.Response[workflow.RecordActionEventsResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.RecordActionEventsResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.RecordActionEventsRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// InternalRunServiceHandler_RecordActionEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecordActionEvents' -type InternalRunServiceHandler_RecordActionEvents_Call struct { - *mock.Call -} - -// RecordActionEvents is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.RecordActionEventsRequest] -func (_e *InternalRunServiceHandler_Expecter) RecordActionEvents(context1 interface{}, request interface{}) *InternalRunServiceHandler_RecordActionEvents_Call { - return &InternalRunServiceHandler_RecordActionEvents_Call{Call: _e.mock.On("RecordActionEvents", context1, request)} -} - -func (_c *InternalRunServiceHandler_RecordActionEvents_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.RecordActionEventsRequest])) *InternalRunServiceHandler_RecordActionEvents_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.RecordActionEventsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.RecordActionEventsRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *InternalRunServiceHandler_RecordActionEvents_Call) Return(response *connect.Response[workflow.RecordActionEventsResponse], err error) *InternalRunServiceHandler_RecordActionEvents_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *InternalRunServiceHandler_RecordActionEvents_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.RecordActionEventsRequest]) (*connect.Response[workflow.RecordActionEventsResponse], error)) *InternalRunServiceHandler_RecordActionEvents_Call { - _c.Call.Return(run) - return _c -} - -// RecordActionStream provides a mock function for the type InternalRunServiceHandler -func (_mock *InternalRunServiceHandler) RecordActionStream(context1 context.Context, bidiStream *connect.BidiStream[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse]) error { - ret := _mock.Called(context1, bidiStream) - - if len(ret) == 0 { - panic("no return value specified for RecordActionStream") - } - - var r0 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.BidiStream[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse]) error); ok { - r0 = returnFunc(context1, bidiStream) - } else { - r0 = ret.Error(0) - } - return r0 -} - -// InternalRunServiceHandler_RecordActionStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecordActionStream' -type InternalRunServiceHandler_RecordActionStream_Call struct { - *mock.Call -} - -// RecordActionStream is a helper method to define mock.On call -// - context1 context.Context -// - bidiStream *connect.BidiStream[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse] -func (_e *InternalRunServiceHandler_Expecter) RecordActionStream(context1 interface{}, bidiStream interface{}) *InternalRunServiceHandler_RecordActionStream_Call { - return &InternalRunServiceHandler_RecordActionStream_Call{Call: _e.mock.On("RecordActionStream", context1, bidiStream)} -} - -func (_c *InternalRunServiceHandler_RecordActionStream_Call) Run(run func(context1 context.Context, bidiStream *connect.BidiStream[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse])) *InternalRunServiceHandler_RecordActionStream_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.BidiStream[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse] - if args[1] != nil { - arg1 = args[1].(*connect.BidiStream[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *InternalRunServiceHandler_RecordActionStream_Call) Return(err error) *InternalRunServiceHandler_RecordActionStream_Call { - _c.Call.Return(err) - return _c -} - -func (_c *InternalRunServiceHandler_RecordActionStream_Call) RunAndReturn(run func(context1 context.Context, bidiStream *connect.BidiStream[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse]) error) *InternalRunServiceHandler_RecordActionStream_Call { - _c.Call.Return(run) - return _c -} - -// UpdateActionStatus provides a mock function for the type InternalRunServiceHandler -func (_mock *InternalRunServiceHandler) UpdateActionStatus(context1 context.Context, request *connect.Request[workflow.UpdateActionStatusRequest]) (*connect.Response[workflow.UpdateActionStatusResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for UpdateActionStatus") - } - - var r0 *connect.Response[workflow.UpdateActionStatusResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.UpdateActionStatusRequest]) (*connect.Response[workflow.UpdateActionStatusResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.UpdateActionStatusRequest]) *connect.Response[workflow.UpdateActionStatusResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.UpdateActionStatusResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.UpdateActionStatusRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// InternalRunServiceHandler_UpdateActionStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateActionStatus' -type InternalRunServiceHandler_UpdateActionStatus_Call struct { - *mock.Call -} - -// UpdateActionStatus is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.UpdateActionStatusRequest] -func (_e *InternalRunServiceHandler_Expecter) UpdateActionStatus(context1 interface{}, request interface{}) *InternalRunServiceHandler_UpdateActionStatus_Call { - return &InternalRunServiceHandler_UpdateActionStatus_Call{Call: _e.mock.On("UpdateActionStatus", context1, request)} -} - -func (_c *InternalRunServiceHandler_UpdateActionStatus_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.UpdateActionStatusRequest])) *InternalRunServiceHandler_UpdateActionStatus_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.UpdateActionStatusRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.UpdateActionStatusRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *InternalRunServiceHandler_UpdateActionStatus_Call) Return(response *connect.Response[workflow.UpdateActionStatusResponse], err error) *InternalRunServiceHandler_UpdateActionStatus_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *InternalRunServiceHandler_UpdateActionStatus_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.UpdateActionStatusRequest]) (*connect.Response[workflow.UpdateActionStatusResponse], error)) *InternalRunServiceHandler_UpdateActionStatus_Call { - _c.Call.Return(run) - return _c -} - -// UpdateActionStatusStream provides a mock function for the type InternalRunServiceHandler -func (_mock *InternalRunServiceHandler) UpdateActionStatusStream(context1 context.Context, bidiStream *connect.BidiStream[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse]) error { - ret := _mock.Called(context1, bidiStream) - - if len(ret) == 0 { - panic("no return value specified for UpdateActionStatusStream") - } - - var r0 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.BidiStream[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse]) error); ok { - r0 = returnFunc(context1, bidiStream) - } else { - r0 = ret.Error(0) - } - return r0 -} - -// InternalRunServiceHandler_UpdateActionStatusStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateActionStatusStream' -type InternalRunServiceHandler_UpdateActionStatusStream_Call struct { - *mock.Call -} - -// UpdateActionStatusStream is a helper method to define mock.On call -// - context1 context.Context -// - bidiStream *connect.BidiStream[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse] -func (_e *InternalRunServiceHandler_Expecter) UpdateActionStatusStream(context1 interface{}, bidiStream interface{}) *InternalRunServiceHandler_UpdateActionStatusStream_Call { - return &InternalRunServiceHandler_UpdateActionStatusStream_Call{Call: _e.mock.On("UpdateActionStatusStream", context1, bidiStream)} -} - -func (_c *InternalRunServiceHandler_UpdateActionStatusStream_Call) Run(run func(context1 context.Context, bidiStream *connect.BidiStream[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse])) *InternalRunServiceHandler_UpdateActionStatusStream_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.BidiStream[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse] - if args[1] != nil { - arg1 = args[1].(*connect.BidiStream[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *InternalRunServiceHandler_UpdateActionStatusStream_Call) Return(err error) *InternalRunServiceHandler_UpdateActionStatusStream_Call { - _c.Call.Return(err) - return _c -} - -func (_c *InternalRunServiceHandler_UpdateActionStatusStream_Call) RunAndReturn(run func(context1 context.Context, bidiStream *connect.BidiStream[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse]) error) *InternalRunServiceHandler_UpdateActionStatusStream_Call { - _c.Call.Return(run) - return _c -} - -// NewQueueServiceClient creates a new instance of QueueServiceClient. 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 NewQueueServiceClient(t interface { - mock.TestingT - Cleanup(func()) -}) *QueueServiceClient { - mock := &QueueServiceClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} - -// QueueServiceClient is an autogenerated mock type for the QueueServiceClient type -type QueueServiceClient struct { - mock.Mock -} - -type QueueServiceClient_Expecter struct { - mock *mock.Mock -} - -func (_m *QueueServiceClient) EXPECT() *QueueServiceClient_Expecter { - return &QueueServiceClient_Expecter{mock: &_m.Mock} -} - -// AbortQueuedAction provides a mock function for the type QueueServiceClient -func (_mock *QueueServiceClient) AbortQueuedAction(context1 context.Context, request *connect.Request[workflow.AbortQueuedActionRequest]) (*connect.Response[workflow.AbortQueuedActionResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for AbortQueuedAction") - } - - var r0 *connect.Response[workflow.AbortQueuedActionResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortQueuedActionRequest]) (*connect.Response[workflow.AbortQueuedActionResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortQueuedActionRequest]) *connect.Response[workflow.AbortQueuedActionResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.AbortQueuedActionResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.AbortQueuedActionRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// QueueServiceClient_AbortQueuedAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortQueuedAction' -type QueueServiceClient_AbortQueuedAction_Call struct { - *mock.Call -} - -// AbortQueuedAction is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.AbortQueuedActionRequest] -func (_e *QueueServiceClient_Expecter) AbortQueuedAction(context1 interface{}, request interface{}) *QueueServiceClient_AbortQueuedAction_Call { - return &QueueServiceClient_AbortQueuedAction_Call{Call: _e.mock.On("AbortQueuedAction", context1, request)} -} - -func (_c *QueueServiceClient_AbortQueuedAction_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.AbortQueuedActionRequest])) *QueueServiceClient_AbortQueuedAction_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.AbortQueuedActionRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.AbortQueuedActionRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *QueueServiceClient_AbortQueuedAction_Call) Return(response *connect.Response[workflow.AbortQueuedActionResponse], err error) *QueueServiceClient_AbortQueuedAction_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *QueueServiceClient_AbortQueuedAction_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.AbortQueuedActionRequest]) (*connect.Response[workflow.AbortQueuedActionResponse], error)) *QueueServiceClient_AbortQueuedAction_Call { - _c.Call.Return(run) - return _c -} - -// AbortQueuedRun provides a mock function for the type QueueServiceClient -func (_mock *QueueServiceClient) AbortQueuedRun(context1 context.Context, request *connect.Request[workflow.AbortQueuedRunRequest]) (*connect.Response[workflow.AbortQueuedRunResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for AbortQueuedRun") - } - - var r0 *connect.Response[workflow.AbortQueuedRunResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortQueuedRunRequest]) (*connect.Response[workflow.AbortQueuedRunResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortQueuedRunRequest]) *connect.Response[workflow.AbortQueuedRunResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.AbortQueuedRunResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.AbortQueuedRunRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// QueueServiceClient_AbortQueuedRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortQueuedRun' -type QueueServiceClient_AbortQueuedRun_Call struct { - *mock.Call -} - -// AbortQueuedRun is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.AbortQueuedRunRequest] -func (_e *QueueServiceClient_Expecter) AbortQueuedRun(context1 interface{}, request interface{}) *QueueServiceClient_AbortQueuedRun_Call { - return &QueueServiceClient_AbortQueuedRun_Call{Call: _e.mock.On("AbortQueuedRun", context1, request)} -} - -func (_c *QueueServiceClient_AbortQueuedRun_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.AbortQueuedRunRequest])) *QueueServiceClient_AbortQueuedRun_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.AbortQueuedRunRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.AbortQueuedRunRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *QueueServiceClient_AbortQueuedRun_Call) Return(response *connect.Response[workflow.AbortQueuedRunResponse], err error) *QueueServiceClient_AbortQueuedRun_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *QueueServiceClient_AbortQueuedRun_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.AbortQueuedRunRequest]) (*connect.Response[workflow.AbortQueuedRunResponse], error)) *QueueServiceClient_AbortQueuedRun_Call { - _c.Call.Return(run) - return _c -} - -// EnqueueAction provides a mock function for the type QueueServiceClient -func (_mock *QueueServiceClient) EnqueueAction(context1 context.Context, request *connect.Request[workflow.EnqueueActionRequest]) (*connect.Response[workflow.EnqueueActionResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for EnqueueAction") - } - - var r0 *connect.Response[workflow.EnqueueActionResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.EnqueueActionRequest]) (*connect.Response[workflow.EnqueueActionResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.EnqueueActionRequest]) *connect.Response[workflow.EnqueueActionResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.EnqueueActionResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.EnqueueActionRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// QueueServiceClient_EnqueueAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnqueueAction' -type QueueServiceClient_EnqueueAction_Call struct { - *mock.Call -} - -// EnqueueAction is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.EnqueueActionRequest] -func (_e *QueueServiceClient_Expecter) EnqueueAction(context1 interface{}, request interface{}) *QueueServiceClient_EnqueueAction_Call { - return &QueueServiceClient_EnqueueAction_Call{Call: _e.mock.On("EnqueueAction", context1, request)} -} - -func (_c *QueueServiceClient_EnqueueAction_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.EnqueueActionRequest])) *QueueServiceClient_EnqueueAction_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.EnqueueActionRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.EnqueueActionRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *QueueServiceClient_EnqueueAction_Call) Return(response *connect.Response[workflow.EnqueueActionResponse], err error) *QueueServiceClient_EnqueueAction_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *QueueServiceClient_EnqueueAction_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.EnqueueActionRequest]) (*connect.Response[workflow.EnqueueActionResponse], error)) *QueueServiceClient_EnqueueAction_Call { - _c.Call.Return(run) - return _c -} - -// NewQueueServiceHandler creates a new instance of QueueServiceHandler. 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 NewQueueServiceHandler(t interface { - mock.TestingT - Cleanup(func()) -}) *QueueServiceHandler { - mock := &QueueServiceHandler{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} - -// QueueServiceHandler is an autogenerated mock type for the QueueServiceHandler type -type QueueServiceHandler struct { - mock.Mock -} - -type QueueServiceHandler_Expecter struct { - mock *mock.Mock -} - -func (_m *QueueServiceHandler) EXPECT() *QueueServiceHandler_Expecter { - return &QueueServiceHandler_Expecter{mock: &_m.Mock} -} - -// AbortQueuedAction provides a mock function for the type QueueServiceHandler -func (_mock *QueueServiceHandler) AbortQueuedAction(context1 context.Context, request *connect.Request[workflow.AbortQueuedActionRequest]) (*connect.Response[workflow.AbortQueuedActionResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for AbortQueuedAction") - } - - var r0 *connect.Response[workflow.AbortQueuedActionResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortQueuedActionRequest]) (*connect.Response[workflow.AbortQueuedActionResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortQueuedActionRequest]) *connect.Response[workflow.AbortQueuedActionResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.AbortQueuedActionResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.AbortQueuedActionRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// QueueServiceHandler_AbortQueuedAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortQueuedAction' -type QueueServiceHandler_AbortQueuedAction_Call struct { - *mock.Call -} - -// AbortQueuedAction is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.AbortQueuedActionRequest] -func (_e *QueueServiceHandler_Expecter) AbortQueuedAction(context1 interface{}, request interface{}) *QueueServiceHandler_AbortQueuedAction_Call { - return &QueueServiceHandler_AbortQueuedAction_Call{Call: _e.mock.On("AbortQueuedAction", context1, request)} -} - -func (_c *QueueServiceHandler_AbortQueuedAction_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.AbortQueuedActionRequest])) *QueueServiceHandler_AbortQueuedAction_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.AbortQueuedActionRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.AbortQueuedActionRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *QueueServiceHandler_AbortQueuedAction_Call) Return(response *connect.Response[workflow.AbortQueuedActionResponse], err error) *QueueServiceHandler_AbortQueuedAction_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *QueueServiceHandler_AbortQueuedAction_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.AbortQueuedActionRequest]) (*connect.Response[workflow.AbortQueuedActionResponse], error)) *QueueServiceHandler_AbortQueuedAction_Call { - _c.Call.Return(run) - return _c -} - -// AbortQueuedRun provides a mock function for the type QueueServiceHandler -func (_mock *QueueServiceHandler) AbortQueuedRun(context1 context.Context, request *connect.Request[workflow.AbortQueuedRunRequest]) (*connect.Response[workflow.AbortQueuedRunResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for AbortQueuedRun") - } - - var r0 *connect.Response[workflow.AbortQueuedRunResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortQueuedRunRequest]) (*connect.Response[workflow.AbortQueuedRunResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortQueuedRunRequest]) *connect.Response[workflow.AbortQueuedRunResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.AbortQueuedRunResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.AbortQueuedRunRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// QueueServiceHandler_AbortQueuedRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortQueuedRun' -type QueueServiceHandler_AbortQueuedRun_Call struct { - *mock.Call -} - -// AbortQueuedRun is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.AbortQueuedRunRequest] -func (_e *QueueServiceHandler_Expecter) AbortQueuedRun(context1 interface{}, request interface{}) *QueueServiceHandler_AbortQueuedRun_Call { - return &QueueServiceHandler_AbortQueuedRun_Call{Call: _e.mock.On("AbortQueuedRun", context1, request)} -} - -func (_c *QueueServiceHandler_AbortQueuedRun_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.AbortQueuedRunRequest])) *QueueServiceHandler_AbortQueuedRun_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.AbortQueuedRunRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.AbortQueuedRunRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *QueueServiceHandler_AbortQueuedRun_Call) Return(response *connect.Response[workflow.AbortQueuedRunResponse], err error) *QueueServiceHandler_AbortQueuedRun_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *QueueServiceHandler_AbortQueuedRun_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.AbortQueuedRunRequest]) (*connect.Response[workflow.AbortQueuedRunResponse], error)) *QueueServiceHandler_AbortQueuedRun_Call { - _c.Call.Return(run) - return _c -} - -// EnqueueAction provides a mock function for the type QueueServiceHandler -func (_mock *QueueServiceHandler) EnqueueAction(context1 context.Context, request *connect.Request[workflow.EnqueueActionRequest]) (*connect.Response[workflow.EnqueueActionResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for EnqueueAction") - } - - var r0 *connect.Response[workflow.EnqueueActionResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.EnqueueActionRequest]) (*connect.Response[workflow.EnqueueActionResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.EnqueueActionRequest]) *connect.Response[workflow.EnqueueActionResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.EnqueueActionResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.EnqueueActionRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// QueueServiceHandler_EnqueueAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnqueueAction' -type QueueServiceHandler_EnqueueAction_Call struct { - *mock.Call -} - -// EnqueueAction is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.EnqueueActionRequest] -func (_e *QueueServiceHandler_Expecter) EnqueueAction(context1 interface{}, request interface{}) *QueueServiceHandler_EnqueueAction_Call { - return &QueueServiceHandler_EnqueueAction_Call{Call: _e.mock.On("EnqueueAction", context1, request)} -} - -func (_c *QueueServiceHandler_EnqueueAction_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.EnqueueActionRequest])) *QueueServiceHandler_EnqueueAction_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.EnqueueActionRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.EnqueueActionRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *QueueServiceHandler_EnqueueAction_Call) Return(response *connect.Response[workflow.EnqueueActionResponse], err error) *QueueServiceHandler_EnqueueAction_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *QueueServiceHandler_EnqueueAction_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.EnqueueActionRequest]) (*connect.Response[workflow.EnqueueActionResponse], error)) *QueueServiceHandler_EnqueueAction_Call { - _c.Call.Return(run) - return _c -} - -// NewRunLogsServiceClient creates a new instance of RunLogsServiceClient. 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 NewRunLogsServiceClient(t interface { - mock.TestingT - Cleanup(func()) -}) *RunLogsServiceClient { - mock := &RunLogsServiceClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} - -// RunLogsServiceClient is an autogenerated mock type for the RunLogsServiceClient type -type RunLogsServiceClient struct { - mock.Mock -} - -type RunLogsServiceClient_Expecter struct { - mock *mock.Mock -} - -func (_m *RunLogsServiceClient) EXPECT() *RunLogsServiceClient_Expecter { - return &RunLogsServiceClient_Expecter{mock: &_m.Mock} -} - -// TailLogs provides a mock function for the type RunLogsServiceClient -func (_mock *RunLogsServiceClient) TailLogs(context1 context.Context, request *connect.Request[workflow.TailLogsRequest]) (*connect.ServerStreamForClient[workflow.TailLogsResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for TailLogs") - } - - var r0 *connect.ServerStreamForClient[workflow.TailLogsResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.TailLogsRequest]) (*connect.ServerStreamForClient[workflow.TailLogsResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.TailLogsRequest]) *connect.ServerStreamForClient[workflow.TailLogsResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.ServerStreamForClient[workflow.TailLogsResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.TailLogsRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunLogsServiceClient_TailLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TailLogs' -type RunLogsServiceClient_TailLogs_Call struct { - *mock.Call -} - -// TailLogs is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.TailLogsRequest] -func (_e *RunLogsServiceClient_Expecter) TailLogs(context1 interface{}, request interface{}) *RunLogsServiceClient_TailLogs_Call { - return &RunLogsServiceClient_TailLogs_Call{Call: _e.mock.On("TailLogs", context1, request)} -} - -func (_c *RunLogsServiceClient_TailLogs_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.TailLogsRequest])) *RunLogsServiceClient_TailLogs_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.TailLogsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.TailLogsRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunLogsServiceClient_TailLogs_Call) Return(serverStreamForClient *connect.ServerStreamForClient[workflow.TailLogsResponse], err error) *RunLogsServiceClient_TailLogs_Call { - _c.Call.Return(serverStreamForClient, err) - return _c -} - -func (_c *RunLogsServiceClient_TailLogs_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.TailLogsRequest]) (*connect.ServerStreamForClient[workflow.TailLogsResponse], error)) *RunLogsServiceClient_TailLogs_Call { - _c.Call.Return(run) - return _c -} - -// NewRunLogsServiceHandler creates a new instance of RunLogsServiceHandler. 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 NewRunLogsServiceHandler(t interface { - mock.TestingT - Cleanup(func()) -}) *RunLogsServiceHandler { - mock := &RunLogsServiceHandler{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} - -// RunLogsServiceHandler is an autogenerated mock type for the RunLogsServiceHandler type -type RunLogsServiceHandler struct { - mock.Mock -} - -type RunLogsServiceHandler_Expecter struct { - mock *mock.Mock -} - -func (_m *RunLogsServiceHandler) EXPECT() *RunLogsServiceHandler_Expecter { - return &RunLogsServiceHandler_Expecter{mock: &_m.Mock} -} - -// TailLogs provides a mock function for the type RunLogsServiceHandler -func (_mock *RunLogsServiceHandler) TailLogs(context1 context.Context, request *connect.Request[workflow.TailLogsRequest], serverStream *connect.ServerStream[workflow.TailLogsResponse]) error { - ret := _mock.Called(context1, request, serverStream) - - if len(ret) == 0 { - panic("no return value specified for TailLogs") - } - - var r0 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.TailLogsRequest], *connect.ServerStream[workflow.TailLogsResponse]) error); ok { - r0 = returnFunc(context1, request, serverStream) - } else { - r0 = ret.Error(0) - } - return r0 -} - -// RunLogsServiceHandler_TailLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TailLogs' -type RunLogsServiceHandler_TailLogs_Call struct { - *mock.Call -} - -// TailLogs is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.TailLogsRequest] -// - serverStream *connect.ServerStream[workflow.TailLogsResponse] -func (_e *RunLogsServiceHandler_Expecter) TailLogs(context1 interface{}, request interface{}, serverStream interface{}) *RunLogsServiceHandler_TailLogs_Call { - return &RunLogsServiceHandler_TailLogs_Call{Call: _e.mock.On("TailLogs", context1, request, serverStream)} -} - -func (_c *RunLogsServiceHandler_TailLogs_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.TailLogsRequest], serverStream *connect.ServerStream[workflow.TailLogsResponse])) *RunLogsServiceHandler_TailLogs_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.TailLogsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.TailLogsRequest]) - } - var arg2 *connect.ServerStream[workflow.TailLogsResponse] - if args[2] != nil { - arg2 = args[2].(*connect.ServerStream[workflow.TailLogsResponse]) - } - run( - arg0, - arg1, - arg2, - ) - }) - return _c -} - -func (_c *RunLogsServiceHandler_TailLogs_Call) Return(err error) *RunLogsServiceHandler_TailLogs_Call { - _c.Call.Return(err) - return _c -} - -func (_c *RunLogsServiceHandler_TailLogs_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.TailLogsRequest], serverStream *connect.ServerStream[workflow.TailLogsResponse]) error) *RunLogsServiceHandler_TailLogs_Call { - _c.Call.Return(run) - return _c -} - -// NewRunServiceClient creates a new instance of RunServiceClient. 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 NewRunServiceClient(t interface { - mock.TestingT - Cleanup(func()) -}) *RunServiceClient { - mock := &RunServiceClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} - -// RunServiceClient is an autogenerated mock type for the RunServiceClient type -type RunServiceClient struct { - mock.Mock -} - -type RunServiceClient_Expecter struct { - mock *mock.Mock -} - -func (_m *RunServiceClient) EXPECT() *RunServiceClient_Expecter { - return &RunServiceClient_Expecter{mock: &_m.Mock} -} - -// AbortAction provides a mock function for the type RunServiceClient -func (_mock *RunServiceClient) AbortAction(context1 context.Context, request *connect.Request[workflow.AbortActionRequest]) (*connect.Response[workflow.AbortActionResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for AbortAction") - } - - var r0 *connect.Response[workflow.AbortActionResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortActionRequest]) (*connect.Response[workflow.AbortActionResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortActionRequest]) *connect.Response[workflow.AbortActionResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.AbortActionResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.AbortActionRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceClient_AbortAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortAction' -type RunServiceClient_AbortAction_Call struct { - *mock.Call -} - -// AbortAction is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.AbortActionRequest] -func (_e *RunServiceClient_Expecter) AbortAction(context1 interface{}, request interface{}) *RunServiceClient_AbortAction_Call { - return &RunServiceClient_AbortAction_Call{Call: _e.mock.On("AbortAction", context1, request)} -} - -func (_c *RunServiceClient_AbortAction_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.AbortActionRequest])) *RunServiceClient_AbortAction_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.AbortActionRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.AbortActionRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceClient_AbortAction_Call) Return(response *connect.Response[workflow.AbortActionResponse], err error) *RunServiceClient_AbortAction_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *RunServiceClient_AbortAction_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.AbortActionRequest]) (*connect.Response[workflow.AbortActionResponse], error)) *RunServiceClient_AbortAction_Call { - _c.Call.Return(run) - return _c -} - -// AbortRun provides a mock function for the type RunServiceClient -func (_mock *RunServiceClient) AbortRun(context1 context.Context, request *connect.Request[workflow.AbortRunRequest]) (*connect.Response[workflow.AbortRunResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for AbortRun") - } - - var r0 *connect.Response[workflow.AbortRunResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortRunRequest]) (*connect.Response[workflow.AbortRunResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortRunRequest]) *connect.Response[workflow.AbortRunResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.AbortRunResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.AbortRunRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceClient_AbortRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortRun' -type RunServiceClient_AbortRun_Call struct { - *mock.Call -} - -// AbortRun is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.AbortRunRequest] -func (_e *RunServiceClient_Expecter) AbortRun(context1 interface{}, request interface{}) *RunServiceClient_AbortRun_Call { - return &RunServiceClient_AbortRun_Call{Call: _e.mock.On("AbortRun", context1, request)} -} - -func (_c *RunServiceClient_AbortRun_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.AbortRunRequest])) *RunServiceClient_AbortRun_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.AbortRunRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.AbortRunRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceClient_AbortRun_Call) Return(response *connect.Response[workflow.AbortRunResponse], err error) *RunServiceClient_AbortRun_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *RunServiceClient_AbortRun_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.AbortRunRequest]) (*connect.Response[workflow.AbortRunResponse], error)) *RunServiceClient_AbortRun_Call { - _c.Call.Return(run) - return _c -} - -// CreateRun provides a mock function for the type RunServiceClient -func (_mock *RunServiceClient) CreateRun(context1 context.Context, request *connect.Request[workflow.CreateRunRequest]) (*connect.Response[workflow.CreateRunResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for CreateRun") - } - - var r0 *connect.Response[workflow.CreateRunResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.CreateRunRequest]) (*connect.Response[workflow.CreateRunResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.CreateRunRequest]) *connect.Response[workflow.CreateRunResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.CreateRunResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.CreateRunRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceClient_CreateRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRun' -type RunServiceClient_CreateRun_Call struct { - *mock.Call -} - -// CreateRun is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.CreateRunRequest] -func (_e *RunServiceClient_Expecter) CreateRun(context1 interface{}, request interface{}) *RunServiceClient_CreateRun_Call { - return &RunServiceClient_CreateRun_Call{Call: _e.mock.On("CreateRun", context1, request)} -} - -func (_c *RunServiceClient_CreateRun_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.CreateRunRequest])) *RunServiceClient_CreateRun_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.CreateRunRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.CreateRunRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceClient_CreateRun_Call) Return(response *connect.Response[workflow.CreateRunResponse], err error) *RunServiceClient_CreateRun_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *RunServiceClient_CreateRun_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.CreateRunRequest]) (*connect.Response[workflow.CreateRunResponse], error)) *RunServiceClient_CreateRun_Call { - _c.Call.Return(run) - return _c -} - -// GetActionData provides a mock function for the type RunServiceClient -func (_mock *RunServiceClient) GetActionData(context1 context.Context, request *connect.Request[workflow.GetActionDataRequest]) (*connect.Response[workflow.GetActionDataResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for GetActionData") - } - - var r0 *connect.Response[workflow.GetActionDataResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionDataRequest]) (*connect.Response[workflow.GetActionDataResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionDataRequest]) *connect.Response[workflow.GetActionDataResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.GetActionDataResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.GetActionDataRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceClient_GetActionData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActionData' -type RunServiceClient_GetActionData_Call struct { - *mock.Call -} - -// GetActionData is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.GetActionDataRequest] -func (_e *RunServiceClient_Expecter) GetActionData(context1 interface{}, request interface{}) *RunServiceClient_GetActionData_Call { - return &RunServiceClient_GetActionData_Call{Call: _e.mock.On("GetActionData", context1, request)} -} - -func (_c *RunServiceClient_GetActionData_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.GetActionDataRequest])) *RunServiceClient_GetActionData_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.GetActionDataRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.GetActionDataRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceClient_GetActionData_Call) Return(response *connect.Response[workflow.GetActionDataResponse], err error) *RunServiceClient_GetActionData_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *RunServiceClient_GetActionData_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.GetActionDataRequest]) (*connect.Response[workflow.GetActionDataResponse], error)) *RunServiceClient_GetActionData_Call { - _c.Call.Return(run) - return _c -} - -// GetActionDataURIs provides a mock function for the type RunServiceClient -func (_mock *RunServiceClient) GetActionDataURIs(context1 context.Context, request *connect.Request[workflow.GetActionDataURIsRequest]) (*connect.Response[workflow.GetActionDataURIsResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for GetActionDataURIs") - } - - var r0 *connect.Response[workflow.GetActionDataURIsResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionDataURIsRequest]) (*connect.Response[workflow.GetActionDataURIsResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionDataURIsRequest]) *connect.Response[workflow.GetActionDataURIsResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.GetActionDataURIsResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.GetActionDataURIsRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceClient_GetActionDataURIs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActionDataURIs' -type RunServiceClient_GetActionDataURIs_Call struct { - *mock.Call -} - -// GetActionDataURIs is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.GetActionDataURIsRequest] -func (_e *RunServiceClient_Expecter) GetActionDataURIs(context1 interface{}, request interface{}) *RunServiceClient_GetActionDataURIs_Call { - return &RunServiceClient_GetActionDataURIs_Call{Call: _e.mock.On("GetActionDataURIs", context1, request)} -} - -func (_c *RunServiceClient_GetActionDataURIs_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.GetActionDataURIsRequest])) *RunServiceClient_GetActionDataURIs_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.GetActionDataURIsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.GetActionDataURIsRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceClient_GetActionDataURIs_Call) Return(response *connect.Response[workflow.GetActionDataURIsResponse], err error) *RunServiceClient_GetActionDataURIs_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *RunServiceClient_GetActionDataURIs_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.GetActionDataURIsRequest]) (*connect.Response[workflow.GetActionDataURIsResponse], error)) *RunServiceClient_GetActionDataURIs_Call { - _c.Call.Return(run) - return _c -} - -// GetActionDetails provides a mock function for the type RunServiceClient -func (_mock *RunServiceClient) GetActionDetails(context1 context.Context, request *connect.Request[workflow.GetActionDetailsRequest]) (*connect.Response[workflow.GetActionDetailsResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for GetActionDetails") - } - - var r0 *connect.Response[workflow.GetActionDetailsResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionDetailsRequest]) (*connect.Response[workflow.GetActionDetailsResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionDetailsRequest]) *connect.Response[workflow.GetActionDetailsResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.GetActionDetailsResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.GetActionDetailsRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceClient_GetActionDetails_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActionDetails' -type RunServiceClient_GetActionDetails_Call struct { - *mock.Call -} - -// GetActionDetails is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.GetActionDetailsRequest] -func (_e *RunServiceClient_Expecter) GetActionDetails(context1 interface{}, request interface{}) *RunServiceClient_GetActionDetails_Call { - return &RunServiceClient_GetActionDetails_Call{Call: _e.mock.On("GetActionDetails", context1, request)} -} - -func (_c *RunServiceClient_GetActionDetails_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.GetActionDetailsRequest])) *RunServiceClient_GetActionDetails_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.GetActionDetailsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.GetActionDetailsRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceClient_GetActionDetails_Call) Return(response *connect.Response[workflow.GetActionDetailsResponse], err error) *RunServiceClient_GetActionDetails_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *RunServiceClient_GetActionDetails_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.GetActionDetailsRequest]) (*connect.Response[workflow.GetActionDetailsResponse], error)) *RunServiceClient_GetActionDetails_Call { - _c.Call.Return(run) - return _c -} - -// GetActionLogContext provides a mock function for the type RunServiceClient -func (_mock *RunServiceClient) GetActionLogContext(context1 context.Context, request *connect.Request[workflow.GetActionLogContextRequest]) (*connect.Response[workflow.GetActionLogContextResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for GetActionLogContext") - } - - var r0 *connect.Response[workflow.GetActionLogContextResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionLogContextRequest]) (*connect.Response[workflow.GetActionLogContextResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionLogContextRequest]) *connect.Response[workflow.GetActionLogContextResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.GetActionLogContextResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.GetActionLogContextRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceClient_GetActionLogContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActionLogContext' -type RunServiceClient_GetActionLogContext_Call struct { - *mock.Call -} - -// GetActionLogContext is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.GetActionLogContextRequest] -func (_e *RunServiceClient_Expecter) GetActionLogContext(context1 interface{}, request interface{}) *RunServiceClient_GetActionLogContext_Call { - return &RunServiceClient_GetActionLogContext_Call{Call: _e.mock.On("GetActionLogContext", context1, request)} -} - -func (_c *RunServiceClient_GetActionLogContext_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.GetActionLogContextRequest])) *RunServiceClient_GetActionLogContext_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.GetActionLogContextRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.GetActionLogContextRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceClient_GetActionLogContext_Call) Return(response *connect.Response[workflow.GetActionLogContextResponse], err error) *RunServiceClient_GetActionLogContext_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *RunServiceClient_GetActionLogContext_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.GetActionLogContextRequest]) (*connect.Response[workflow.GetActionLogContextResponse], error)) *RunServiceClient_GetActionLogContext_Call { - _c.Call.Return(run) - return _c -} - -// GetRunDetails provides a mock function for the type RunServiceClient -func (_mock *RunServiceClient) GetRunDetails(context1 context.Context, request *connect.Request[workflow.GetRunDetailsRequest]) (*connect.Response[workflow.GetRunDetailsResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for GetRunDetails") - } - - var r0 *connect.Response[workflow.GetRunDetailsResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetRunDetailsRequest]) (*connect.Response[workflow.GetRunDetailsResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetRunDetailsRequest]) *connect.Response[workflow.GetRunDetailsResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.GetRunDetailsResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.GetRunDetailsRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceClient_GetRunDetails_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRunDetails' -type RunServiceClient_GetRunDetails_Call struct { - *mock.Call -} - -// GetRunDetails is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.GetRunDetailsRequest] -func (_e *RunServiceClient_Expecter) GetRunDetails(context1 interface{}, request interface{}) *RunServiceClient_GetRunDetails_Call { - return &RunServiceClient_GetRunDetails_Call{Call: _e.mock.On("GetRunDetails", context1, request)} -} - -func (_c *RunServiceClient_GetRunDetails_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.GetRunDetailsRequest])) *RunServiceClient_GetRunDetails_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.GetRunDetailsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.GetRunDetailsRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceClient_GetRunDetails_Call) Return(response *connect.Response[workflow.GetRunDetailsResponse], err error) *RunServiceClient_GetRunDetails_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *RunServiceClient_GetRunDetails_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.GetRunDetailsRequest]) (*connect.Response[workflow.GetRunDetailsResponse], error)) *RunServiceClient_GetRunDetails_Call { - _c.Call.Return(run) - return _c -} - -// ListActions provides a mock function for the type RunServiceClient -func (_mock *RunServiceClient) ListActions(context1 context.Context, request *connect.Request[workflow.ListActionsRequest]) (*connect.Response[workflow.ListActionsResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for ListActions") - } - - var r0 *connect.Response[workflow.ListActionsResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.ListActionsRequest]) (*connect.Response[workflow.ListActionsResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.ListActionsRequest]) *connect.Response[workflow.ListActionsResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.ListActionsResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.ListActionsRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceClient_ListActions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListActions' -type RunServiceClient_ListActions_Call struct { - *mock.Call -} - -// ListActions is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.ListActionsRequest] -func (_e *RunServiceClient_Expecter) ListActions(context1 interface{}, request interface{}) *RunServiceClient_ListActions_Call { - return &RunServiceClient_ListActions_Call{Call: _e.mock.On("ListActions", context1, request)} -} - -func (_c *RunServiceClient_ListActions_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.ListActionsRequest])) *RunServiceClient_ListActions_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.ListActionsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.ListActionsRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceClient_ListActions_Call) Return(response *connect.Response[workflow.ListActionsResponse], err error) *RunServiceClient_ListActions_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *RunServiceClient_ListActions_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.ListActionsRequest]) (*connect.Response[workflow.ListActionsResponse], error)) *RunServiceClient_ListActions_Call { - _c.Call.Return(run) - return _c -} - -// ListRuns provides a mock function for the type RunServiceClient -func (_mock *RunServiceClient) ListRuns(context1 context.Context, request *connect.Request[workflow.ListRunsRequest]) (*connect.Response[workflow.ListRunsResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for ListRuns") - } - - var r0 *connect.Response[workflow.ListRunsResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.ListRunsRequest]) (*connect.Response[workflow.ListRunsResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.ListRunsRequest]) *connect.Response[workflow.ListRunsResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.ListRunsResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.ListRunsRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceClient_ListRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRuns' -type RunServiceClient_ListRuns_Call struct { - *mock.Call -} - -// ListRuns is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.ListRunsRequest] -func (_e *RunServiceClient_Expecter) ListRuns(context1 interface{}, request interface{}) *RunServiceClient_ListRuns_Call { - return &RunServiceClient_ListRuns_Call{Call: _e.mock.On("ListRuns", context1, request)} -} - -func (_c *RunServiceClient_ListRuns_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.ListRunsRequest])) *RunServiceClient_ListRuns_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.ListRunsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.ListRunsRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceClient_ListRuns_Call) Return(response *connect.Response[workflow.ListRunsResponse], err error) *RunServiceClient_ListRuns_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *RunServiceClient_ListRuns_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.ListRunsRequest]) (*connect.Response[workflow.ListRunsResponse], error)) *RunServiceClient_ListRuns_Call { - _c.Call.Return(run) - return _c -} - -// WatchActionDetails provides a mock function for the type RunServiceClient -func (_mock *RunServiceClient) WatchActionDetails(context1 context.Context, request *connect.Request[workflow.WatchActionDetailsRequest]) (*connect.ServerStreamForClient[workflow.WatchActionDetailsResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for WatchActionDetails") - } - - var r0 *connect.ServerStreamForClient[workflow.WatchActionDetailsResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchActionDetailsRequest]) (*connect.ServerStreamForClient[workflow.WatchActionDetailsResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchActionDetailsRequest]) *connect.ServerStreamForClient[workflow.WatchActionDetailsResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.ServerStreamForClient[workflow.WatchActionDetailsResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.WatchActionDetailsRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceClient_WatchActionDetails_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchActionDetails' -type RunServiceClient_WatchActionDetails_Call struct { - *mock.Call -} - -// WatchActionDetails is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.WatchActionDetailsRequest] -func (_e *RunServiceClient_Expecter) WatchActionDetails(context1 interface{}, request interface{}) *RunServiceClient_WatchActionDetails_Call { - return &RunServiceClient_WatchActionDetails_Call{Call: _e.mock.On("WatchActionDetails", context1, request)} -} - -func (_c *RunServiceClient_WatchActionDetails_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchActionDetailsRequest])) *RunServiceClient_WatchActionDetails_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.WatchActionDetailsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.WatchActionDetailsRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceClient_WatchActionDetails_Call) Return(serverStreamForClient *connect.ServerStreamForClient[workflow.WatchActionDetailsResponse], err error) *RunServiceClient_WatchActionDetails_Call { - _c.Call.Return(serverStreamForClient, err) - return _c -} - -func (_c *RunServiceClient_WatchActionDetails_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchActionDetailsRequest]) (*connect.ServerStreamForClient[workflow.WatchActionDetailsResponse], error)) *RunServiceClient_WatchActionDetails_Call { - _c.Call.Return(run) - return _c -} - -// WatchActions provides a mock function for the type RunServiceClient -func (_mock *RunServiceClient) WatchActions(context1 context.Context, request *connect.Request[workflow.WatchActionsRequest]) (*connect.ServerStreamForClient[workflow.WatchActionsResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for WatchActions") - } - - var r0 *connect.ServerStreamForClient[workflow.WatchActionsResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchActionsRequest]) (*connect.ServerStreamForClient[workflow.WatchActionsResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchActionsRequest]) *connect.ServerStreamForClient[workflow.WatchActionsResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.ServerStreamForClient[workflow.WatchActionsResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.WatchActionsRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceClient_WatchActions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchActions' -type RunServiceClient_WatchActions_Call struct { - *mock.Call -} - -// WatchActions is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.WatchActionsRequest] -func (_e *RunServiceClient_Expecter) WatchActions(context1 interface{}, request interface{}) *RunServiceClient_WatchActions_Call { - return &RunServiceClient_WatchActions_Call{Call: _e.mock.On("WatchActions", context1, request)} -} - -func (_c *RunServiceClient_WatchActions_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchActionsRequest])) *RunServiceClient_WatchActions_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.WatchActionsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.WatchActionsRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceClient_WatchActions_Call) Return(serverStreamForClient *connect.ServerStreamForClient[workflow.WatchActionsResponse], err error) *RunServiceClient_WatchActions_Call { - _c.Call.Return(serverStreamForClient, err) - return _c -} - -func (_c *RunServiceClient_WatchActions_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchActionsRequest]) (*connect.ServerStreamForClient[workflow.WatchActionsResponse], error)) *RunServiceClient_WatchActions_Call { - _c.Call.Return(run) - return _c -} - -// WatchClusterEvents provides a mock function for the type RunServiceClient -func (_mock *RunServiceClient) WatchClusterEvents(context1 context.Context, request *connect.Request[workflow.WatchClusterEventsRequest]) (*connect.ServerStreamForClient[workflow.WatchClusterEventsResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for WatchClusterEvents") - } - - var r0 *connect.ServerStreamForClient[workflow.WatchClusterEventsResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchClusterEventsRequest]) (*connect.ServerStreamForClient[workflow.WatchClusterEventsResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchClusterEventsRequest]) *connect.ServerStreamForClient[workflow.WatchClusterEventsResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.ServerStreamForClient[workflow.WatchClusterEventsResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.WatchClusterEventsRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceClient_WatchClusterEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchClusterEvents' -type RunServiceClient_WatchClusterEvents_Call struct { - *mock.Call -} - -// WatchClusterEvents is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.WatchClusterEventsRequest] -func (_e *RunServiceClient_Expecter) WatchClusterEvents(context1 interface{}, request interface{}) *RunServiceClient_WatchClusterEvents_Call { - return &RunServiceClient_WatchClusterEvents_Call{Call: _e.mock.On("WatchClusterEvents", context1, request)} -} - -func (_c *RunServiceClient_WatchClusterEvents_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchClusterEventsRequest])) *RunServiceClient_WatchClusterEvents_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.WatchClusterEventsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.WatchClusterEventsRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceClient_WatchClusterEvents_Call) Return(serverStreamForClient *connect.ServerStreamForClient[workflow.WatchClusterEventsResponse], err error) *RunServiceClient_WatchClusterEvents_Call { - _c.Call.Return(serverStreamForClient, err) - return _c -} - -func (_c *RunServiceClient_WatchClusterEvents_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchClusterEventsRequest]) (*connect.ServerStreamForClient[workflow.WatchClusterEventsResponse], error)) *RunServiceClient_WatchClusterEvents_Call { - _c.Call.Return(run) - return _c -} - -// WatchGroups provides a mock function for the type RunServiceClient -func (_mock *RunServiceClient) WatchGroups(context1 context.Context, request *connect.Request[workflow.WatchGroupsRequest]) (*connect.ServerStreamForClient[workflow.WatchGroupsResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for WatchGroups") - } - - var r0 *connect.ServerStreamForClient[workflow.WatchGroupsResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchGroupsRequest]) (*connect.ServerStreamForClient[workflow.WatchGroupsResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchGroupsRequest]) *connect.ServerStreamForClient[workflow.WatchGroupsResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.ServerStreamForClient[workflow.WatchGroupsResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.WatchGroupsRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceClient_WatchGroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchGroups' -type RunServiceClient_WatchGroups_Call struct { - *mock.Call -} - -// WatchGroups is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.WatchGroupsRequest] -func (_e *RunServiceClient_Expecter) WatchGroups(context1 interface{}, request interface{}) *RunServiceClient_WatchGroups_Call { - return &RunServiceClient_WatchGroups_Call{Call: _e.mock.On("WatchGroups", context1, request)} -} - -func (_c *RunServiceClient_WatchGroups_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchGroupsRequest])) *RunServiceClient_WatchGroups_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.WatchGroupsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.WatchGroupsRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceClient_WatchGroups_Call) Return(serverStreamForClient *connect.ServerStreamForClient[workflow.WatchGroupsResponse], err error) *RunServiceClient_WatchGroups_Call { - _c.Call.Return(serverStreamForClient, err) - return _c -} - -func (_c *RunServiceClient_WatchGroups_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchGroupsRequest]) (*connect.ServerStreamForClient[workflow.WatchGroupsResponse], error)) *RunServiceClient_WatchGroups_Call { - _c.Call.Return(run) - return _c -} - -// WatchRunDetails provides a mock function for the type RunServiceClient -func (_mock *RunServiceClient) WatchRunDetails(context1 context.Context, request *connect.Request[workflow.WatchRunDetailsRequest]) (*connect.ServerStreamForClient[workflow.WatchRunDetailsResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for WatchRunDetails") - } - - var r0 *connect.ServerStreamForClient[workflow.WatchRunDetailsResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchRunDetailsRequest]) (*connect.ServerStreamForClient[workflow.WatchRunDetailsResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchRunDetailsRequest]) *connect.ServerStreamForClient[workflow.WatchRunDetailsResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.ServerStreamForClient[workflow.WatchRunDetailsResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.WatchRunDetailsRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceClient_WatchRunDetails_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchRunDetails' -type RunServiceClient_WatchRunDetails_Call struct { - *mock.Call -} - -// WatchRunDetails is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.WatchRunDetailsRequest] -func (_e *RunServiceClient_Expecter) WatchRunDetails(context1 interface{}, request interface{}) *RunServiceClient_WatchRunDetails_Call { - return &RunServiceClient_WatchRunDetails_Call{Call: _e.mock.On("WatchRunDetails", context1, request)} -} - -func (_c *RunServiceClient_WatchRunDetails_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchRunDetailsRequest])) *RunServiceClient_WatchRunDetails_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.WatchRunDetailsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.WatchRunDetailsRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceClient_WatchRunDetails_Call) Return(serverStreamForClient *connect.ServerStreamForClient[workflow.WatchRunDetailsResponse], err error) *RunServiceClient_WatchRunDetails_Call { - _c.Call.Return(serverStreamForClient, err) - return _c -} - -func (_c *RunServiceClient_WatchRunDetails_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchRunDetailsRequest]) (*connect.ServerStreamForClient[workflow.WatchRunDetailsResponse], error)) *RunServiceClient_WatchRunDetails_Call { - _c.Call.Return(run) - return _c -} - -// WatchRuns provides a mock function for the type RunServiceClient -func (_mock *RunServiceClient) WatchRuns(context1 context.Context, request *connect.Request[workflow.WatchRunsRequest]) (*connect.ServerStreamForClient[workflow.WatchRunsResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for WatchRuns") - } - - var r0 *connect.ServerStreamForClient[workflow.WatchRunsResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchRunsRequest]) (*connect.ServerStreamForClient[workflow.WatchRunsResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchRunsRequest]) *connect.ServerStreamForClient[workflow.WatchRunsResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.ServerStreamForClient[workflow.WatchRunsResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.WatchRunsRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceClient_WatchRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchRuns' -type RunServiceClient_WatchRuns_Call struct { - *mock.Call -} - -// WatchRuns is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.WatchRunsRequest] -func (_e *RunServiceClient_Expecter) WatchRuns(context1 interface{}, request interface{}) *RunServiceClient_WatchRuns_Call { - return &RunServiceClient_WatchRuns_Call{Call: _e.mock.On("WatchRuns", context1, request)} -} - -func (_c *RunServiceClient_WatchRuns_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchRunsRequest])) *RunServiceClient_WatchRuns_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.WatchRunsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.WatchRunsRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceClient_WatchRuns_Call) Return(serverStreamForClient *connect.ServerStreamForClient[workflow.WatchRunsResponse], err error) *RunServiceClient_WatchRuns_Call { - _c.Call.Return(serverStreamForClient, err) - return _c -} - -func (_c *RunServiceClient_WatchRuns_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchRunsRequest]) (*connect.ServerStreamForClient[workflow.WatchRunsResponse], error)) *RunServiceClient_WatchRuns_Call { - _c.Call.Return(run) - return _c -} - -// NewRunServiceHandler creates a new instance of RunServiceHandler. 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 NewRunServiceHandler(t interface { - mock.TestingT - Cleanup(func()) -}) *RunServiceHandler { - mock := &RunServiceHandler{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} - -// RunServiceHandler is an autogenerated mock type for the RunServiceHandler type -type RunServiceHandler struct { - mock.Mock -} - -type RunServiceHandler_Expecter struct { - mock *mock.Mock -} - -func (_m *RunServiceHandler) EXPECT() *RunServiceHandler_Expecter { - return &RunServiceHandler_Expecter{mock: &_m.Mock} -} - -// AbortAction provides a mock function for the type RunServiceHandler -func (_mock *RunServiceHandler) AbortAction(context1 context.Context, request *connect.Request[workflow.AbortActionRequest]) (*connect.Response[workflow.AbortActionResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for AbortAction") - } - - var r0 *connect.Response[workflow.AbortActionResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortActionRequest]) (*connect.Response[workflow.AbortActionResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortActionRequest]) *connect.Response[workflow.AbortActionResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.AbortActionResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.AbortActionRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceHandler_AbortAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortAction' -type RunServiceHandler_AbortAction_Call struct { - *mock.Call -} - -// AbortAction is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.AbortActionRequest] -func (_e *RunServiceHandler_Expecter) AbortAction(context1 interface{}, request interface{}) *RunServiceHandler_AbortAction_Call { - return &RunServiceHandler_AbortAction_Call{Call: _e.mock.On("AbortAction", context1, request)} -} - -func (_c *RunServiceHandler_AbortAction_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.AbortActionRequest])) *RunServiceHandler_AbortAction_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.AbortActionRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.AbortActionRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceHandler_AbortAction_Call) Return(response *connect.Response[workflow.AbortActionResponse], err error) *RunServiceHandler_AbortAction_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *RunServiceHandler_AbortAction_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.AbortActionRequest]) (*connect.Response[workflow.AbortActionResponse], error)) *RunServiceHandler_AbortAction_Call { - _c.Call.Return(run) - return _c -} - -// AbortRun provides a mock function for the type RunServiceHandler -func (_mock *RunServiceHandler) AbortRun(context1 context.Context, request *connect.Request[workflow.AbortRunRequest]) (*connect.Response[workflow.AbortRunResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for AbortRun") - } - - var r0 *connect.Response[workflow.AbortRunResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortRunRequest]) (*connect.Response[workflow.AbortRunResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortRunRequest]) *connect.Response[workflow.AbortRunResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.AbortRunResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.AbortRunRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceHandler_AbortRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortRun' -type RunServiceHandler_AbortRun_Call struct { - *mock.Call -} - -// AbortRun is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.AbortRunRequest] -func (_e *RunServiceHandler_Expecter) AbortRun(context1 interface{}, request interface{}) *RunServiceHandler_AbortRun_Call { - return &RunServiceHandler_AbortRun_Call{Call: _e.mock.On("AbortRun", context1, request)} -} - -func (_c *RunServiceHandler_AbortRun_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.AbortRunRequest])) *RunServiceHandler_AbortRun_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.AbortRunRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.AbortRunRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceHandler_AbortRun_Call) Return(response *connect.Response[workflow.AbortRunResponse], err error) *RunServiceHandler_AbortRun_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *RunServiceHandler_AbortRun_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.AbortRunRequest]) (*connect.Response[workflow.AbortRunResponse], error)) *RunServiceHandler_AbortRun_Call { - _c.Call.Return(run) - return _c -} - -// CreateRun provides a mock function for the type RunServiceHandler -func (_mock *RunServiceHandler) CreateRun(context1 context.Context, request *connect.Request[workflow.CreateRunRequest]) (*connect.Response[workflow.CreateRunResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for CreateRun") - } - - var r0 *connect.Response[workflow.CreateRunResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.CreateRunRequest]) (*connect.Response[workflow.CreateRunResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.CreateRunRequest]) *connect.Response[workflow.CreateRunResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.CreateRunResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.CreateRunRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceHandler_CreateRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRun' -type RunServiceHandler_CreateRun_Call struct { - *mock.Call -} - -// CreateRun is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.CreateRunRequest] -func (_e *RunServiceHandler_Expecter) CreateRun(context1 interface{}, request interface{}) *RunServiceHandler_CreateRun_Call { - return &RunServiceHandler_CreateRun_Call{Call: _e.mock.On("CreateRun", context1, request)} -} - -func (_c *RunServiceHandler_CreateRun_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.CreateRunRequest])) *RunServiceHandler_CreateRun_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.CreateRunRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.CreateRunRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceHandler_CreateRun_Call) Return(response *connect.Response[workflow.CreateRunResponse], err error) *RunServiceHandler_CreateRun_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *RunServiceHandler_CreateRun_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.CreateRunRequest]) (*connect.Response[workflow.CreateRunResponse], error)) *RunServiceHandler_CreateRun_Call { - _c.Call.Return(run) - return _c -} - -// GetActionData provides a mock function for the type RunServiceHandler -func (_mock *RunServiceHandler) GetActionData(context1 context.Context, request *connect.Request[workflow.GetActionDataRequest]) (*connect.Response[workflow.GetActionDataResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for GetActionData") - } - - var r0 *connect.Response[workflow.GetActionDataResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionDataRequest]) (*connect.Response[workflow.GetActionDataResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionDataRequest]) *connect.Response[workflow.GetActionDataResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.GetActionDataResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.GetActionDataRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceHandler_GetActionData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActionData' -type RunServiceHandler_GetActionData_Call struct { - *mock.Call -} - -// GetActionData is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.GetActionDataRequest] -func (_e *RunServiceHandler_Expecter) GetActionData(context1 interface{}, request interface{}) *RunServiceHandler_GetActionData_Call { - return &RunServiceHandler_GetActionData_Call{Call: _e.mock.On("GetActionData", context1, request)} -} - -func (_c *RunServiceHandler_GetActionData_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.GetActionDataRequest])) *RunServiceHandler_GetActionData_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.GetActionDataRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.GetActionDataRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceHandler_GetActionData_Call) Return(response *connect.Response[workflow.GetActionDataResponse], err error) *RunServiceHandler_GetActionData_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *RunServiceHandler_GetActionData_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.GetActionDataRequest]) (*connect.Response[workflow.GetActionDataResponse], error)) *RunServiceHandler_GetActionData_Call { - _c.Call.Return(run) - return _c -} - -// GetActionDataURIs provides a mock function for the type RunServiceHandler -func (_mock *RunServiceHandler) GetActionDataURIs(context1 context.Context, request *connect.Request[workflow.GetActionDataURIsRequest]) (*connect.Response[workflow.GetActionDataURIsResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for GetActionDataURIs") - } - - var r0 *connect.Response[workflow.GetActionDataURIsResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionDataURIsRequest]) (*connect.Response[workflow.GetActionDataURIsResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionDataURIsRequest]) *connect.Response[workflow.GetActionDataURIsResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.GetActionDataURIsResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.GetActionDataURIsRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceHandler_GetActionDataURIs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActionDataURIs' -type RunServiceHandler_GetActionDataURIs_Call struct { - *mock.Call -} - -// GetActionDataURIs is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.GetActionDataURIsRequest] -func (_e *RunServiceHandler_Expecter) GetActionDataURIs(context1 interface{}, request interface{}) *RunServiceHandler_GetActionDataURIs_Call { - return &RunServiceHandler_GetActionDataURIs_Call{Call: _e.mock.On("GetActionDataURIs", context1, request)} -} - -func (_c *RunServiceHandler_GetActionDataURIs_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.GetActionDataURIsRequest])) *RunServiceHandler_GetActionDataURIs_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.GetActionDataURIsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.GetActionDataURIsRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceHandler_GetActionDataURIs_Call) Return(response *connect.Response[workflow.GetActionDataURIsResponse], err error) *RunServiceHandler_GetActionDataURIs_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *RunServiceHandler_GetActionDataURIs_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.GetActionDataURIsRequest]) (*connect.Response[workflow.GetActionDataURIsResponse], error)) *RunServiceHandler_GetActionDataURIs_Call { - _c.Call.Return(run) - return _c -} - -// GetActionDetails provides a mock function for the type RunServiceHandler -func (_mock *RunServiceHandler) GetActionDetails(context1 context.Context, request *connect.Request[workflow.GetActionDetailsRequest]) (*connect.Response[workflow.GetActionDetailsResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for GetActionDetails") - } - - var r0 *connect.Response[workflow.GetActionDetailsResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionDetailsRequest]) (*connect.Response[workflow.GetActionDetailsResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionDetailsRequest]) *connect.Response[workflow.GetActionDetailsResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.GetActionDetailsResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.GetActionDetailsRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceHandler_GetActionDetails_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActionDetails' -type RunServiceHandler_GetActionDetails_Call struct { - *mock.Call -} - -// GetActionDetails is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.GetActionDetailsRequest] -func (_e *RunServiceHandler_Expecter) GetActionDetails(context1 interface{}, request interface{}) *RunServiceHandler_GetActionDetails_Call { - return &RunServiceHandler_GetActionDetails_Call{Call: _e.mock.On("GetActionDetails", context1, request)} -} - -func (_c *RunServiceHandler_GetActionDetails_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.GetActionDetailsRequest])) *RunServiceHandler_GetActionDetails_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.GetActionDetailsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.GetActionDetailsRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceHandler_GetActionDetails_Call) Return(response *connect.Response[workflow.GetActionDetailsResponse], err error) *RunServiceHandler_GetActionDetails_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *RunServiceHandler_GetActionDetails_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.GetActionDetailsRequest]) (*connect.Response[workflow.GetActionDetailsResponse], error)) *RunServiceHandler_GetActionDetails_Call { - _c.Call.Return(run) - return _c -} - -// GetActionLogContext provides a mock function for the type RunServiceHandler -func (_mock *RunServiceHandler) GetActionLogContext(context1 context.Context, request *connect.Request[workflow.GetActionLogContextRequest]) (*connect.Response[workflow.GetActionLogContextResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for GetActionLogContext") - } - - var r0 *connect.Response[workflow.GetActionLogContextResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionLogContextRequest]) (*connect.Response[workflow.GetActionLogContextResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionLogContextRequest]) *connect.Response[workflow.GetActionLogContextResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.GetActionLogContextResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.GetActionLogContextRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceHandler_GetActionLogContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActionLogContext' -type RunServiceHandler_GetActionLogContext_Call struct { - *mock.Call -} - -// GetActionLogContext is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.GetActionLogContextRequest] -func (_e *RunServiceHandler_Expecter) GetActionLogContext(context1 interface{}, request interface{}) *RunServiceHandler_GetActionLogContext_Call { - return &RunServiceHandler_GetActionLogContext_Call{Call: _e.mock.On("GetActionLogContext", context1, request)} -} - -func (_c *RunServiceHandler_GetActionLogContext_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.GetActionLogContextRequest])) *RunServiceHandler_GetActionLogContext_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.GetActionLogContextRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.GetActionLogContextRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceHandler_GetActionLogContext_Call) Return(response *connect.Response[workflow.GetActionLogContextResponse], err error) *RunServiceHandler_GetActionLogContext_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *RunServiceHandler_GetActionLogContext_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.GetActionLogContextRequest]) (*connect.Response[workflow.GetActionLogContextResponse], error)) *RunServiceHandler_GetActionLogContext_Call { - _c.Call.Return(run) - return _c -} - -// GetRunDetails provides a mock function for the type RunServiceHandler -func (_mock *RunServiceHandler) GetRunDetails(context1 context.Context, request *connect.Request[workflow.GetRunDetailsRequest]) (*connect.Response[workflow.GetRunDetailsResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for GetRunDetails") - } - - var r0 *connect.Response[workflow.GetRunDetailsResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetRunDetailsRequest]) (*connect.Response[workflow.GetRunDetailsResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetRunDetailsRequest]) *connect.Response[workflow.GetRunDetailsResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.GetRunDetailsResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.GetRunDetailsRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceHandler_GetRunDetails_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRunDetails' -type RunServiceHandler_GetRunDetails_Call struct { - *mock.Call -} - -// GetRunDetails is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.GetRunDetailsRequest] -func (_e *RunServiceHandler_Expecter) GetRunDetails(context1 interface{}, request interface{}) *RunServiceHandler_GetRunDetails_Call { - return &RunServiceHandler_GetRunDetails_Call{Call: _e.mock.On("GetRunDetails", context1, request)} -} - -func (_c *RunServiceHandler_GetRunDetails_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.GetRunDetailsRequest])) *RunServiceHandler_GetRunDetails_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.GetRunDetailsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.GetRunDetailsRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceHandler_GetRunDetails_Call) Return(response *connect.Response[workflow.GetRunDetailsResponse], err error) *RunServiceHandler_GetRunDetails_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *RunServiceHandler_GetRunDetails_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.GetRunDetailsRequest]) (*connect.Response[workflow.GetRunDetailsResponse], error)) *RunServiceHandler_GetRunDetails_Call { - _c.Call.Return(run) - return _c -} - -// ListActions provides a mock function for the type RunServiceHandler -func (_mock *RunServiceHandler) ListActions(context1 context.Context, request *connect.Request[workflow.ListActionsRequest]) (*connect.Response[workflow.ListActionsResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for ListActions") - } - - var r0 *connect.Response[workflow.ListActionsResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.ListActionsRequest]) (*connect.Response[workflow.ListActionsResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.ListActionsRequest]) *connect.Response[workflow.ListActionsResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.ListActionsResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.ListActionsRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceHandler_ListActions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListActions' -type RunServiceHandler_ListActions_Call struct { - *mock.Call -} - -// ListActions is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.ListActionsRequest] -func (_e *RunServiceHandler_Expecter) ListActions(context1 interface{}, request interface{}) *RunServiceHandler_ListActions_Call { - return &RunServiceHandler_ListActions_Call{Call: _e.mock.On("ListActions", context1, request)} -} - -func (_c *RunServiceHandler_ListActions_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.ListActionsRequest])) *RunServiceHandler_ListActions_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.ListActionsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.ListActionsRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceHandler_ListActions_Call) Return(response *connect.Response[workflow.ListActionsResponse], err error) *RunServiceHandler_ListActions_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *RunServiceHandler_ListActions_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.ListActionsRequest]) (*connect.Response[workflow.ListActionsResponse], error)) *RunServiceHandler_ListActions_Call { - _c.Call.Return(run) - return _c -} - -// ListRuns provides a mock function for the type RunServiceHandler -func (_mock *RunServiceHandler) ListRuns(context1 context.Context, request *connect.Request[workflow.ListRunsRequest]) (*connect.Response[workflow.ListRunsResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for ListRuns") - } - - var r0 *connect.Response[workflow.ListRunsResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.ListRunsRequest]) (*connect.Response[workflow.ListRunsResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.ListRunsRequest]) *connect.Response[workflow.ListRunsResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.ListRunsResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.ListRunsRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// RunServiceHandler_ListRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRuns' -type RunServiceHandler_ListRuns_Call struct { - *mock.Call -} - -// ListRuns is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.ListRunsRequest] -func (_e *RunServiceHandler_Expecter) ListRuns(context1 interface{}, request interface{}) *RunServiceHandler_ListRuns_Call { - return &RunServiceHandler_ListRuns_Call{Call: _e.mock.On("ListRuns", context1, request)} -} - -func (_c *RunServiceHandler_ListRuns_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.ListRunsRequest])) *RunServiceHandler_ListRuns_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.ListRunsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.ListRunsRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *RunServiceHandler_ListRuns_Call) Return(response *connect.Response[workflow.ListRunsResponse], err error) *RunServiceHandler_ListRuns_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *RunServiceHandler_ListRuns_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.ListRunsRequest]) (*connect.Response[workflow.ListRunsResponse], error)) *RunServiceHandler_ListRuns_Call { - _c.Call.Return(run) - return _c -} - -// WatchActionDetails provides a mock function for the type RunServiceHandler -func (_mock *RunServiceHandler) WatchActionDetails(context1 context.Context, request *connect.Request[workflow.WatchActionDetailsRequest], serverStream *connect.ServerStream[workflow.WatchActionDetailsResponse]) error { - ret := _mock.Called(context1, request, serverStream) - - if len(ret) == 0 { - panic("no return value specified for WatchActionDetails") - } - - var r0 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchActionDetailsRequest], *connect.ServerStream[workflow.WatchActionDetailsResponse]) error); ok { - r0 = returnFunc(context1, request, serverStream) - } else { - r0 = ret.Error(0) - } - return r0 -} - -// RunServiceHandler_WatchActionDetails_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchActionDetails' -type RunServiceHandler_WatchActionDetails_Call struct { - *mock.Call -} - -// WatchActionDetails is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.WatchActionDetailsRequest] -// - serverStream *connect.ServerStream[workflow.WatchActionDetailsResponse] -func (_e *RunServiceHandler_Expecter) WatchActionDetails(context1 interface{}, request interface{}, serverStream interface{}) *RunServiceHandler_WatchActionDetails_Call { - return &RunServiceHandler_WatchActionDetails_Call{Call: _e.mock.On("WatchActionDetails", context1, request, serverStream)} -} - -func (_c *RunServiceHandler_WatchActionDetails_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchActionDetailsRequest], serverStream *connect.ServerStream[workflow.WatchActionDetailsResponse])) *RunServiceHandler_WatchActionDetails_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.WatchActionDetailsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.WatchActionDetailsRequest]) - } - var arg2 *connect.ServerStream[workflow.WatchActionDetailsResponse] - if args[2] != nil { - arg2 = args[2].(*connect.ServerStream[workflow.WatchActionDetailsResponse]) - } - run( - arg0, - arg1, - arg2, - ) - }) - return _c -} - -func (_c *RunServiceHandler_WatchActionDetails_Call) Return(err error) *RunServiceHandler_WatchActionDetails_Call { - _c.Call.Return(err) - return _c -} - -func (_c *RunServiceHandler_WatchActionDetails_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchActionDetailsRequest], serverStream *connect.ServerStream[workflow.WatchActionDetailsResponse]) error) *RunServiceHandler_WatchActionDetails_Call { - _c.Call.Return(run) - return _c -} - -// WatchActions provides a mock function for the type RunServiceHandler -func (_mock *RunServiceHandler) WatchActions(context1 context.Context, request *connect.Request[workflow.WatchActionsRequest], serverStream *connect.ServerStream[workflow.WatchActionsResponse]) error { - ret := _mock.Called(context1, request, serverStream) - - if len(ret) == 0 { - panic("no return value specified for WatchActions") - } - - var r0 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchActionsRequest], *connect.ServerStream[workflow.WatchActionsResponse]) error); ok { - r0 = returnFunc(context1, request, serverStream) - } else { - r0 = ret.Error(0) - } - return r0 -} - -// RunServiceHandler_WatchActions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchActions' -type RunServiceHandler_WatchActions_Call struct { - *mock.Call -} - -// WatchActions is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.WatchActionsRequest] -// - serverStream *connect.ServerStream[workflow.WatchActionsResponse] -func (_e *RunServiceHandler_Expecter) WatchActions(context1 interface{}, request interface{}, serverStream interface{}) *RunServiceHandler_WatchActions_Call { - return &RunServiceHandler_WatchActions_Call{Call: _e.mock.On("WatchActions", context1, request, serverStream)} -} - -func (_c *RunServiceHandler_WatchActions_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchActionsRequest], serverStream *connect.ServerStream[workflow.WatchActionsResponse])) *RunServiceHandler_WatchActions_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.WatchActionsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.WatchActionsRequest]) - } - var arg2 *connect.ServerStream[workflow.WatchActionsResponse] - if args[2] != nil { - arg2 = args[2].(*connect.ServerStream[workflow.WatchActionsResponse]) - } - run( - arg0, - arg1, - arg2, - ) - }) - return _c -} - -func (_c *RunServiceHandler_WatchActions_Call) Return(err error) *RunServiceHandler_WatchActions_Call { - _c.Call.Return(err) - return _c -} - -func (_c *RunServiceHandler_WatchActions_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchActionsRequest], serverStream *connect.ServerStream[workflow.WatchActionsResponse]) error) *RunServiceHandler_WatchActions_Call { - _c.Call.Return(run) - return _c -} - -// WatchClusterEvents provides a mock function for the type RunServiceHandler -func (_mock *RunServiceHandler) WatchClusterEvents(context1 context.Context, request *connect.Request[workflow.WatchClusterEventsRequest], serverStream *connect.ServerStream[workflow.WatchClusterEventsResponse]) error { - ret := _mock.Called(context1, request, serverStream) - - if len(ret) == 0 { - panic("no return value specified for WatchClusterEvents") - } - - var r0 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchClusterEventsRequest], *connect.ServerStream[workflow.WatchClusterEventsResponse]) error); ok { - r0 = returnFunc(context1, request, serverStream) - } else { - r0 = ret.Error(0) - } - return r0 -} - -// RunServiceHandler_WatchClusterEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchClusterEvents' -type RunServiceHandler_WatchClusterEvents_Call struct { - *mock.Call -} - -// WatchClusterEvents is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.WatchClusterEventsRequest] -// - serverStream *connect.ServerStream[workflow.WatchClusterEventsResponse] -func (_e *RunServiceHandler_Expecter) WatchClusterEvents(context1 interface{}, request interface{}, serverStream interface{}) *RunServiceHandler_WatchClusterEvents_Call { - return &RunServiceHandler_WatchClusterEvents_Call{Call: _e.mock.On("WatchClusterEvents", context1, request, serverStream)} -} - -func (_c *RunServiceHandler_WatchClusterEvents_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchClusterEventsRequest], serverStream *connect.ServerStream[workflow.WatchClusterEventsResponse])) *RunServiceHandler_WatchClusterEvents_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.WatchClusterEventsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.WatchClusterEventsRequest]) - } - var arg2 *connect.ServerStream[workflow.WatchClusterEventsResponse] - if args[2] != nil { - arg2 = args[2].(*connect.ServerStream[workflow.WatchClusterEventsResponse]) - } - run( - arg0, - arg1, - arg2, - ) - }) - return _c -} - -func (_c *RunServiceHandler_WatchClusterEvents_Call) Return(err error) *RunServiceHandler_WatchClusterEvents_Call { - _c.Call.Return(err) - return _c -} - -func (_c *RunServiceHandler_WatchClusterEvents_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchClusterEventsRequest], serverStream *connect.ServerStream[workflow.WatchClusterEventsResponse]) error) *RunServiceHandler_WatchClusterEvents_Call { - _c.Call.Return(run) - return _c -} - -// WatchGroups provides a mock function for the type RunServiceHandler -func (_mock *RunServiceHandler) WatchGroups(context1 context.Context, request *connect.Request[workflow.WatchGroupsRequest], serverStream *connect.ServerStream[workflow.WatchGroupsResponse]) error { - ret := _mock.Called(context1, request, serverStream) - - if len(ret) == 0 { - panic("no return value specified for WatchGroups") - } - - var r0 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchGroupsRequest], *connect.ServerStream[workflow.WatchGroupsResponse]) error); ok { - r0 = returnFunc(context1, request, serverStream) - } else { - r0 = ret.Error(0) - } - return r0 -} - -// RunServiceHandler_WatchGroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchGroups' -type RunServiceHandler_WatchGroups_Call struct { - *mock.Call -} - -// WatchGroups is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.WatchGroupsRequest] -// - serverStream *connect.ServerStream[workflow.WatchGroupsResponse] -func (_e *RunServiceHandler_Expecter) WatchGroups(context1 interface{}, request interface{}, serverStream interface{}) *RunServiceHandler_WatchGroups_Call { - return &RunServiceHandler_WatchGroups_Call{Call: _e.mock.On("WatchGroups", context1, request, serverStream)} -} - -func (_c *RunServiceHandler_WatchGroups_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchGroupsRequest], serverStream *connect.ServerStream[workflow.WatchGroupsResponse])) *RunServiceHandler_WatchGroups_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.WatchGroupsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.WatchGroupsRequest]) - } - var arg2 *connect.ServerStream[workflow.WatchGroupsResponse] - if args[2] != nil { - arg2 = args[2].(*connect.ServerStream[workflow.WatchGroupsResponse]) - } - run( - arg0, - arg1, - arg2, - ) - }) - return _c -} - -func (_c *RunServiceHandler_WatchGroups_Call) Return(err error) *RunServiceHandler_WatchGroups_Call { - _c.Call.Return(err) - return _c -} - -func (_c *RunServiceHandler_WatchGroups_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchGroupsRequest], serverStream *connect.ServerStream[workflow.WatchGroupsResponse]) error) *RunServiceHandler_WatchGroups_Call { - _c.Call.Return(run) - return _c -} - -// WatchRunDetails provides a mock function for the type RunServiceHandler -func (_mock *RunServiceHandler) WatchRunDetails(context1 context.Context, request *connect.Request[workflow.WatchRunDetailsRequest], serverStream *connect.ServerStream[workflow.WatchRunDetailsResponse]) error { - ret := _mock.Called(context1, request, serverStream) - - if len(ret) == 0 { - panic("no return value specified for WatchRunDetails") - } - - var r0 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchRunDetailsRequest], *connect.ServerStream[workflow.WatchRunDetailsResponse]) error); ok { - r0 = returnFunc(context1, request, serverStream) - } else { - r0 = ret.Error(0) - } - return r0 -} - -// RunServiceHandler_WatchRunDetails_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchRunDetails' -type RunServiceHandler_WatchRunDetails_Call struct { - *mock.Call -} - -// WatchRunDetails is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.WatchRunDetailsRequest] -// - serverStream *connect.ServerStream[workflow.WatchRunDetailsResponse] -func (_e *RunServiceHandler_Expecter) WatchRunDetails(context1 interface{}, request interface{}, serverStream interface{}) *RunServiceHandler_WatchRunDetails_Call { - return &RunServiceHandler_WatchRunDetails_Call{Call: _e.mock.On("WatchRunDetails", context1, request, serverStream)} -} - -func (_c *RunServiceHandler_WatchRunDetails_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchRunDetailsRequest], serverStream *connect.ServerStream[workflow.WatchRunDetailsResponse])) *RunServiceHandler_WatchRunDetails_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.WatchRunDetailsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.WatchRunDetailsRequest]) - } - var arg2 *connect.ServerStream[workflow.WatchRunDetailsResponse] - if args[2] != nil { - arg2 = args[2].(*connect.ServerStream[workflow.WatchRunDetailsResponse]) - } - run( - arg0, - arg1, - arg2, - ) - }) - return _c -} - -func (_c *RunServiceHandler_WatchRunDetails_Call) Return(err error) *RunServiceHandler_WatchRunDetails_Call { - _c.Call.Return(err) - return _c -} - -func (_c *RunServiceHandler_WatchRunDetails_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchRunDetailsRequest], serverStream *connect.ServerStream[workflow.WatchRunDetailsResponse]) error) *RunServiceHandler_WatchRunDetails_Call { - _c.Call.Return(run) - return _c -} - -// WatchRuns provides a mock function for the type RunServiceHandler -func (_mock *RunServiceHandler) WatchRuns(context1 context.Context, request *connect.Request[workflow.WatchRunsRequest], serverStream *connect.ServerStream[workflow.WatchRunsResponse]) error { - ret := _mock.Called(context1, request, serverStream) - - if len(ret) == 0 { - panic("no return value specified for WatchRuns") - } - - var r0 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchRunsRequest], *connect.ServerStream[workflow.WatchRunsResponse]) error); ok { - r0 = returnFunc(context1, request, serverStream) - } else { - r0 = ret.Error(0) - } - return r0 -} - -// RunServiceHandler_WatchRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchRuns' -type RunServiceHandler_WatchRuns_Call struct { - *mock.Call -} - -// WatchRuns is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.WatchRunsRequest] -// - serverStream *connect.ServerStream[workflow.WatchRunsResponse] -func (_e *RunServiceHandler_Expecter) WatchRuns(context1 interface{}, request interface{}, serverStream interface{}) *RunServiceHandler_WatchRuns_Call { - return &RunServiceHandler_WatchRuns_Call{Call: _e.mock.On("WatchRuns", context1, request, serverStream)} -} - -func (_c *RunServiceHandler_WatchRuns_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchRunsRequest], serverStream *connect.ServerStream[workflow.WatchRunsResponse])) *RunServiceHandler_WatchRuns_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.WatchRunsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.WatchRunsRequest]) - } - var arg2 *connect.ServerStream[workflow.WatchRunsResponse] - if args[2] != nil { - arg2 = args[2].(*connect.ServerStream[workflow.WatchRunsResponse]) - } - run( - arg0, - arg1, - arg2, - ) - }) - return _c -} - -func (_c *RunServiceHandler_WatchRuns_Call) Return(err error) *RunServiceHandler_WatchRuns_Call { - _c.Call.Return(err) - return _c -} - -func (_c *RunServiceHandler_WatchRuns_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchRunsRequest], serverStream *connect.ServerStream[workflow.WatchRunsResponse]) error) *RunServiceHandler_WatchRuns_Call { - _c.Call.Return(run) - return _c -} - -// NewStateServiceClient creates a new instance of StateServiceClient. 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 NewStateServiceClient(t interface { - mock.TestingT - Cleanup(func()) -}) *StateServiceClient { - mock := &StateServiceClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} - -// StateServiceClient is an autogenerated mock type for the StateServiceClient type -type StateServiceClient struct { - mock.Mock -} - -type StateServiceClient_Expecter struct { - mock *mock.Mock -} - -func (_m *StateServiceClient) EXPECT() *StateServiceClient_Expecter { - return &StateServiceClient_Expecter{mock: &_m.Mock} -} - -// Get provides a mock function for the type StateServiceClient -func (_mock *StateServiceClient) Get(context1 context.Context, request *connect.Request[workflow.GetRequest]) (*connect.Response[workflow.GetResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *connect.Response[workflow.GetResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetRequest]) (*connect.Response[workflow.GetResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetRequest]) *connect.Response[workflow.GetResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.GetResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.GetRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// StateServiceClient_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type StateServiceClient_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.GetRequest] -func (_e *StateServiceClient_Expecter) Get(context1 interface{}, request interface{}) *StateServiceClient_Get_Call { - return &StateServiceClient_Get_Call{Call: _e.mock.On("Get", context1, request)} -} - -func (_c *StateServiceClient_Get_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.GetRequest])) *StateServiceClient_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.GetRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.GetRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *StateServiceClient_Get_Call) Return(response *connect.Response[workflow.GetResponse], err error) *StateServiceClient_Get_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *StateServiceClient_Get_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.GetRequest]) (*connect.Response[workflow.GetResponse], error)) *StateServiceClient_Get_Call { - _c.Call.Return(run) - return _c -} - -// Put provides a mock function for the type StateServiceClient -func (_mock *StateServiceClient) Put(context1 context.Context, request *connect.Request[workflow.PutRequest]) (*connect.Response[workflow.PutResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for Put") - } - - var r0 *connect.Response[workflow.PutResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.PutRequest]) (*connect.Response[workflow.PutResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.PutRequest]) *connect.Response[workflow.PutResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.PutResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.PutRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// StateServiceClient_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put' -type StateServiceClient_Put_Call struct { - *mock.Call -} - -// Put is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.PutRequest] -func (_e *StateServiceClient_Expecter) Put(context1 interface{}, request interface{}) *StateServiceClient_Put_Call { - return &StateServiceClient_Put_Call{Call: _e.mock.On("Put", context1, request)} -} - -func (_c *StateServiceClient_Put_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.PutRequest])) *StateServiceClient_Put_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.PutRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.PutRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *StateServiceClient_Put_Call) Return(response *connect.Response[workflow.PutResponse], err error) *StateServiceClient_Put_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *StateServiceClient_Put_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.PutRequest]) (*connect.Response[workflow.PutResponse], error)) *StateServiceClient_Put_Call { - _c.Call.Return(run) - return _c -} - -// Watch provides a mock function for the type StateServiceClient -func (_mock *StateServiceClient) Watch(context1 context.Context, request *connect.Request[workflow.WatchRequest]) (*connect.ServerStreamForClient[workflow.WatchResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for Watch") - } - - var r0 *connect.ServerStreamForClient[workflow.WatchResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchRequest]) (*connect.ServerStreamForClient[workflow.WatchResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchRequest]) *connect.ServerStreamForClient[workflow.WatchResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.ServerStreamForClient[workflow.WatchResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.WatchRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// StateServiceClient_Watch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Watch' -type StateServiceClient_Watch_Call struct { - *mock.Call -} - -// Watch is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.WatchRequest] -func (_e *StateServiceClient_Expecter) Watch(context1 interface{}, request interface{}) *StateServiceClient_Watch_Call { - return &StateServiceClient_Watch_Call{Call: _e.mock.On("Watch", context1, request)} -} - -func (_c *StateServiceClient_Watch_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchRequest])) *StateServiceClient_Watch_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.WatchRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.WatchRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *StateServiceClient_Watch_Call) Return(serverStreamForClient *connect.ServerStreamForClient[workflow.WatchResponse], err error) *StateServiceClient_Watch_Call { - _c.Call.Return(serverStreamForClient, err) - return _c -} - -func (_c *StateServiceClient_Watch_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchRequest]) (*connect.ServerStreamForClient[workflow.WatchResponse], error)) *StateServiceClient_Watch_Call { - _c.Call.Return(run) - return _c -} - -// NewStateServiceHandler creates a new instance of StateServiceHandler. 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 NewStateServiceHandler(t interface { - mock.TestingT - Cleanup(func()) -}) *StateServiceHandler { - mock := &StateServiceHandler{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} - -// StateServiceHandler is an autogenerated mock type for the StateServiceHandler type -type StateServiceHandler struct { - mock.Mock -} - -type StateServiceHandler_Expecter struct { - mock *mock.Mock -} - -func (_m *StateServiceHandler) EXPECT() *StateServiceHandler_Expecter { - return &StateServiceHandler_Expecter{mock: &_m.Mock} -} - -// Get provides a mock function for the type StateServiceHandler -func (_mock *StateServiceHandler) Get(context1 context.Context, request *connect.Request[workflow.GetRequest]) (*connect.Response[workflow.GetResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *connect.Response[workflow.GetResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetRequest]) (*connect.Response[workflow.GetResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetRequest]) *connect.Response[workflow.GetResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.GetResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.GetRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// StateServiceHandler_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type StateServiceHandler_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.GetRequest] -func (_e *StateServiceHandler_Expecter) Get(context1 interface{}, request interface{}) *StateServiceHandler_Get_Call { - return &StateServiceHandler_Get_Call{Call: _e.mock.On("Get", context1, request)} -} - -func (_c *StateServiceHandler_Get_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.GetRequest])) *StateServiceHandler_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.GetRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.GetRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *StateServiceHandler_Get_Call) Return(response *connect.Response[workflow.GetResponse], err error) *StateServiceHandler_Get_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *StateServiceHandler_Get_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.GetRequest]) (*connect.Response[workflow.GetResponse], error)) *StateServiceHandler_Get_Call { - _c.Call.Return(run) - return _c -} - -// Put provides a mock function for the type StateServiceHandler -func (_mock *StateServiceHandler) Put(context1 context.Context, request *connect.Request[workflow.PutRequest]) (*connect.Response[workflow.PutResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for Put") - } - - var r0 *connect.Response[workflow.PutResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.PutRequest]) (*connect.Response[workflow.PutResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.PutRequest]) *connect.Response[workflow.PutResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.PutResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.PutRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// StateServiceHandler_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put' -type StateServiceHandler_Put_Call struct { - *mock.Call -} - -// Put is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.PutRequest] -func (_e *StateServiceHandler_Expecter) Put(context1 interface{}, request interface{}) *StateServiceHandler_Put_Call { - return &StateServiceHandler_Put_Call{Call: _e.mock.On("Put", context1, request)} -} - -func (_c *StateServiceHandler_Put_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.PutRequest])) *StateServiceHandler_Put_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.PutRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.PutRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *StateServiceHandler_Put_Call) Return(response *connect.Response[workflow.PutResponse], err error) *StateServiceHandler_Put_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *StateServiceHandler_Put_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.PutRequest]) (*connect.Response[workflow.PutResponse], error)) *StateServiceHandler_Put_Call { - _c.Call.Return(run) - return _c -} - -// Watch provides a mock function for the type StateServiceHandler -func (_mock *StateServiceHandler) Watch(context1 context.Context, request *connect.Request[workflow.WatchRequest], serverStream *connect.ServerStream[workflow.WatchResponse]) error { - ret := _mock.Called(context1, request, serverStream) - - if len(ret) == 0 { - panic("no return value specified for Watch") - } - - var r0 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchRequest], *connect.ServerStream[workflow.WatchResponse]) error); ok { - r0 = returnFunc(context1, request, serverStream) - } else { - r0 = ret.Error(0) - } - return r0 -} - -// StateServiceHandler_Watch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Watch' -type StateServiceHandler_Watch_Call struct { - *mock.Call -} - -// Watch is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.WatchRequest] -// - serverStream *connect.ServerStream[workflow.WatchResponse] -func (_e *StateServiceHandler_Expecter) Watch(context1 interface{}, request interface{}, serverStream interface{}) *StateServiceHandler_Watch_Call { - return &StateServiceHandler_Watch_Call{Call: _e.mock.On("Watch", context1, request, serverStream)} -} - -func (_c *StateServiceHandler_Watch_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchRequest], serverStream *connect.ServerStream[workflow.WatchResponse])) *StateServiceHandler_Watch_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.WatchRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.WatchRequest]) - } - var arg2 *connect.ServerStream[workflow.WatchResponse] - if args[2] != nil { - arg2 = args[2].(*connect.ServerStream[workflow.WatchResponse]) - } - run( - arg0, - arg1, - arg2, - ) - }) - return _c -} - -func (_c *StateServiceHandler_Watch_Call) Return(err error) *StateServiceHandler_Watch_Call { - _c.Call.Return(err) - return _c -} - -func (_c *StateServiceHandler_Watch_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchRequest], serverStream *connect.ServerStream[workflow.WatchResponse]) error) *StateServiceHandler_Watch_Call { - _c.Call.Return(run) - return _c -} - -// NewTranslatorServiceClient creates a new instance of TranslatorServiceClient. 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 NewTranslatorServiceClient(t interface { - mock.TestingT - Cleanup(func()) -}) *TranslatorServiceClient { - mock := &TranslatorServiceClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} - -// TranslatorServiceClient is an autogenerated mock type for the TranslatorServiceClient type -type TranslatorServiceClient struct { - mock.Mock -} - -type TranslatorServiceClient_Expecter struct { - mock *mock.Mock -} - -func (_m *TranslatorServiceClient) EXPECT() *TranslatorServiceClient_Expecter { - return &TranslatorServiceClient_Expecter{mock: &_m.Mock} -} - -// JsonValuesToLiterals provides a mock function for the type TranslatorServiceClient -func (_mock *TranslatorServiceClient) JsonValuesToLiterals(context1 context.Context, request *connect.Request[workflow.JsonValuesToLiteralsRequest]) (*connect.Response[workflow.JsonValuesToLiteralsResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for JsonValuesToLiterals") - } - - var r0 *connect.Response[workflow.JsonValuesToLiteralsResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.JsonValuesToLiteralsRequest]) (*connect.Response[workflow.JsonValuesToLiteralsResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.JsonValuesToLiteralsRequest]) *connect.Response[workflow.JsonValuesToLiteralsResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.JsonValuesToLiteralsResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.JsonValuesToLiteralsRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// TranslatorServiceClient_JsonValuesToLiterals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'JsonValuesToLiterals' -type TranslatorServiceClient_JsonValuesToLiterals_Call struct { - *mock.Call -} - -// JsonValuesToLiterals is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.JsonValuesToLiteralsRequest] -func (_e *TranslatorServiceClient_Expecter) JsonValuesToLiterals(context1 interface{}, request interface{}) *TranslatorServiceClient_JsonValuesToLiterals_Call { - return &TranslatorServiceClient_JsonValuesToLiterals_Call{Call: _e.mock.On("JsonValuesToLiterals", context1, request)} -} - -func (_c *TranslatorServiceClient_JsonValuesToLiterals_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.JsonValuesToLiteralsRequest])) *TranslatorServiceClient_JsonValuesToLiterals_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.JsonValuesToLiteralsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.JsonValuesToLiteralsRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *TranslatorServiceClient_JsonValuesToLiterals_Call) Return(response *connect.Response[workflow.JsonValuesToLiteralsResponse], err error) *TranslatorServiceClient_JsonValuesToLiterals_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *TranslatorServiceClient_JsonValuesToLiterals_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.JsonValuesToLiteralsRequest]) (*connect.Response[workflow.JsonValuesToLiteralsResponse], error)) *TranslatorServiceClient_JsonValuesToLiterals_Call { - _c.Call.Return(run) - return _c -} - -// LaunchFormJsonToLiterals provides a mock function for the type TranslatorServiceClient -func (_mock *TranslatorServiceClient) LaunchFormJsonToLiterals(context1 context.Context, request *connect.Request[workflow.LaunchFormJsonToLiteralsRequest]) (*connect.Response[workflow.LaunchFormJsonToLiteralsResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for LaunchFormJsonToLiterals") - } - - var r0 *connect.Response[workflow.LaunchFormJsonToLiteralsResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.LaunchFormJsonToLiteralsRequest]) (*connect.Response[workflow.LaunchFormJsonToLiteralsResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.LaunchFormJsonToLiteralsRequest]) *connect.Response[workflow.LaunchFormJsonToLiteralsResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.LaunchFormJsonToLiteralsResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.LaunchFormJsonToLiteralsRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// TranslatorServiceClient_LaunchFormJsonToLiterals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LaunchFormJsonToLiterals' -type TranslatorServiceClient_LaunchFormJsonToLiterals_Call struct { - *mock.Call -} - -// LaunchFormJsonToLiterals is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.LaunchFormJsonToLiteralsRequest] -func (_e *TranslatorServiceClient_Expecter) LaunchFormJsonToLiterals(context1 interface{}, request interface{}) *TranslatorServiceClient_LaunchFormJsonToLiterals_Call { - return &TranslatorServiceClient_LaunchFormJsonToLiterals_Call{Call: _e.mock.On("LaunchFormJsonToLiterals", context1, request)} -} - -func (_c *TranslatorServiceClient_LaunchFormJsonToLiterals_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.LaunchFormJsonToLiteralsRequest])) *TranslatorServiceClient_LaunchFormJsonToLiterals_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.LaunchFormJsonToLiteralsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.LaunchFormJsonToLiteralsRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *TranslatorServiceClient_LaunchFormJsonToLiterals_Call) Return(response *connect.Response[workflow.LaunchFormJsonToLiteralsResponse], err error) *TranslatorServiceClient_LaunchFormJsonToLiterals_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *TranslatorServiceClient_LaunchFormJsonToLiterals_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.LaunchFormJsonToLiteralsRequest]) (*connect.Response[workflow.LaunchFormJsonToLiteralsResponse], error)) *TranslatorServiceClient_LaunchFormJsonToLiterals_Call { - _c.Call.Return(run) - return _c -} - -// LiteralsToLaunchFormJson provides a mock function for the type TranslatorServiceClient -func (_mock *TranslatorServiceClient) LiteralsToLaunchFormJson(context1 context.Context, request *connect.Request[workflow.LiteralsToLaunchFormJsonRequest]) (*connect.Response[workflow.LiteralsToLaunchFormJsonResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for LiteralsToLaunchFormJson") - } - - var r0 *connect.Response[workflow.LiteralsToLaunchFormJsonResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.LiteralsToLaunchFormJsonRequest]) (*connect.Response[workflow.LiteralsToLaunchFormJsonResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.LiteralsToLaunchFormJsonRequest]) *connect.Response[workflow.LiteralsToLaunchFormJsonResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.LiteralsToLaunchFormJsonResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.LiteralsToLaunchFormJsonRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// TranslatorServiceClient_LiteralsToLaunchFormJson_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LiteralsToLaunchFormJson' -type TranslatorServiceClient_LiteralsToLaunchFormJson_Call struct { - *mock.Call -} - -// LiteralsToLaunchFormJson is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.LiteralsToLaunchFormJsonRequest] -func (_e *TranslatorServiceClient_Expecter) LiteralsToLaunchFormJson(context1 interface{}, request interface{}) *TranslatorServiceClient_LiteralsToLaunchFormJson_Call { - return &TranslatorServiceClient_LiteralsToLaunchFormJson_Call{Call: _e.mock.On("LiteralsToLaunchFormJson", context1, request)} -} - -func (_c *TranslatorServiceClient_LiteralsToLaunchFormJson_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.LiteralsToLaunchFormJsonRequest])) *TranslatorServiceClient_LiteralsToLaunchFormJson_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.LiteralsToLaunchFormJsonRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.LiteralsToLaunchFormJsonRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *TranslatorServiceClient_LiteralsToLaunchFormJson_Call) Return(response *connect.Response[workflow.LiteralsToLaunchFormJsonResponse], err error) *TranslatorServiceClient_LiteralsToLaunchFormJson_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *TranslatorServiceClient_LiteralsToLaunchFormJson_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.LiteralsToLaunchFormJsonRequest]) (*connect.Response[workflow.LiteralsToLaunchFormJsonResponse], error)) *TranslatorServiceClient_LiteralsToLaunchFormJson_Call { - _c.Call.Return(run) - return _c -} - -// TaskSpecToLaunchFormJson provides a mock function for the type TranslatorServiceClient -func (_mock *TranslatorServiceClient) TaskSpecToLaunchFormJson(context1 context.Context, request *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest]) (*connect.Response[workflow.TaskSpecToLaunchFormJsonResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for TaskSpecToLaunchFormJson") - } - - var r0 *connect.Response[workflow.TaskSpecToLaunchFormJsonResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest]) (*connect.Response[workflow.TaskSpecToLaunchFormJsonResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest]) *connect.Response[workflow.TaskSpecToLaunchFormJsonResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.TaskSpecToLaunchFormJsonResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// TranslatorServiceClient_TaskSpecToLaunchFormJson_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TaskSpecToLaunchFormJson' -type TranslatorServiceClient_TaskSpecToLaunchFormJson_Call struct { - *mock.Call -} - -// TaskSpecToLaunchFormJson is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest] -func (_e *TranslatorServiceClient_Expecter) TaskSpecToLaunchFormJson(context1 interface{}, request interface{}) *TranslatorServiceClient_TaskSpecToLaunchFormJson_Call { - return &TranslatorServiceClient_TaskSpecToLaunchFormJson_Call{Call: _e.mock.On("TaskSpecToLaunchFormJson", context1, request)} -} - -func (_c *TranslatorServiceClient_TaskSpecToLaunchFormJson_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest])) *TranslatorServiceClient_TaskSpecToLaunchFormJson_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.TaskSpecToLaunchFormJsonRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *TranslatorServiceClient_TaskSpecToLaunchFormJson_Call) Return(response *connect.Response[workflow.TaskSpecToLaunchFormJsonResponse], err error) *TranslatorServiceClient_TaskSpecToLaunchFormJson_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *TranslatorServiceClient_TaskSpecToLaunchFormJson_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest]) (*connect.Response[workflow.TaskSpecToLaunchFormJsonResponse], error)) *TranslatorServiceClient_TaskSpecToLaunchFormJson_Call { - _c.Call.Return(run) - return _c -} - -// NewTranslatorServiceHandler creates a new instance of TranslatorServiceHandler. 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 NewTranslatorServiceHandler(t interface { - mock.TestingT - Cleanup(func()) -}) *TranslatorServiceHandler { - mock := &TranslatorServiceHandler{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} - -// TranslatorServiceHandler is an autogenerated mock type for the TranslatorServiceHandler type -type TranslatorServiceHandler struct { - mock.Mock -} - -type TranslatorServiceHandler_Expecter struct { - mock *mock.Mock -} - -func (_m *TranslatorServiceHandler) EXPECT() *TranslatorServiceHandler_Expecter { - return &TranslatorServiceHandler_Expecter{mock: &_m.Mock} -} - -// JsonValuesToLiterals provides a mock function for the type TranslatorServiceHandler -func (_mock *TranslatorServiceHandler) JsonValuesToLiterals(context1 context.Context, request *connect.Request[workflow.JsonValuesToLiteralsRequest]) (*connect.Response[workflow.JsonValuesToLiteralsResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for JsonValuesToLiterals") - } - - var r0 *connect.Response[workflow.JsonValuesToLiteralsResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.JsonValuesToLiteralsRequest]) (*connect.Response[workflow.JsonValuesToLiteralsResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.JsonValuesToLiteralsRequest]) *connect.Response[workflow.JsonValuesToLiteralsResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.JsonValuesToLiteralsResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.JsonValuesToLiteralsRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// TranslatorServiceHandler_JsonValuesToLiterals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'JsonValuesToLiterals' -type TranslatorServiceHandler_JsonValuesToLiterals_Call struct { - *mock.Call -} - -// JsonValuesToLiterals is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.JsonValuesToLiteralsRequest] -func (_e *TranslatorServiceHandler_Expecter) JsonValuesToLiterals(context1 interface{}, request interface{}) *TranslatorServiceHandler_JsonValuesToLiterals_Call { - return &TranslatorServiceHandler_JsonValuesToLiterals_Call{Call: _e.mock.On("JsonValuesToLiterals", context1, request)} -} - -func (_c *TranslatorServiceHandler_JsonValuesToLiterals_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.JsonValuesToLiteralsRequest])) *TranslatorServiceHandler_JsonValuesToLiterals_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.JsonValuesToLiteralsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.JsonValuesToLiteralsRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *TranslatorServiceHandler_JsonValuesToLiterals_Call) Return(response *connect.Response[workflow.JsonValuesToLiteralsResponse], err error) *TranslatorServiceHandler_JsonValuesToLiterals_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *TranslatorServiceHandler_JsonValuesToLiterals_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.JsonValuesToLiteralsRequest]) (*connect.Response[workflow.JsonValuesToLiteralsResponse], error)) *TranslatorServiceHandler_JsonValuesToLiterals_Call { - _c.Call.Return(run) - return _c -} - -// LaunchFormJsonToLiterals provides a mock function for the type TranslatorServiceHandler -func (_mock *TranslatorServiceHandler) LaunchFormJsonToLiterals(context1 context.Context, request *connect.Request[workflow.LaunchFormJsonToLiteralsRequest]) (*connect.Response[workflow.LaunchFormJsonToLiteralsResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for LaunchFormJsonToLiterals") - } - - var r0 *connect.Response[workflow.LaunchFormJsonToLiteralsResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.LaunchFormJsonToLiteralsRequest]) (*connect.Response[workflow.LaunchFormJsonToLiteralsResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.LaunchFormJsonToLiteralsRequest]) *connect.Response[workflow.LaunchFormJsonToLiteralsResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.LaunchFormJsonToLiteralsResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.LaunchFormJsonToLiteralsRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// TranslatorServiceHandler_LaunchFormJsonToLiterals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LaunchFormJsonToLiterals' -type TranslatorServiceHandler_LaunchFormJsonToLiterals_Call struct { - *mock.Call -} - -// LaunchFormJsonToLiterals is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.LaunchFormJsonToLiteralsRequest] -func (_e *TranslatorServiceHandler_Expecter) LaunchFormJsonToLiterals(context1 interface{}, request interface{}) *TranslatorServiceHandler_LaunchFormJsonToLiterals_Call { - return &TranslatorServiceHandler_LaunchFormJsonToLiterals_Call{Call: _e.mock.On("LaunchFormJsonToLiterals", context1, request)} -} - -func (_c *TranslatorServiceHandler_LaunchFormJsonToLiterals_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.LaunchFormJsonToLiteralsRequest])) *TranslatorServiceHandler_LaunchFormJsonToLiterals_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.LaunchFormJsonToLiteralsRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.LaunchFormJsonToLiteralsRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *TranslatorServiceHandler_LaunchFormJsonToLiterals_Call) Return(response *connect.Response[workflow.LaunchFormJsonToLiteralsResponse], err error) *TranslatorServiceHandler_LaunchFormJsonToLiterals_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *TranslatorServiceHandler_LaunchFormJsonToLiterals_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.LaunchFormJsonToLiteralsRequest]) (*connect.Response[workflow.LaunchFormJsonToLiteralsResponse], error)) *TranslatorServiceHandler_LaunchFormJsonToLiterals_Call { - _c.Call.Return(run) - return _c -} - -// LiteralsToLaunchFormJson provides a mock function for the type TranslatorServiceHandler -func (_mock *TranslatorServiceHandler) LiteralsToLaunchFormJson(context1 context.Context, request *connect.Request[workflow.LiteralsToLaunchFormJsonRequest]) (*connect.Response[workflow.LiteralsToLaunchFormJsonResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for LiteralsToLaunchFormJson") - } - - var r0 *connect.Response[workflow.LiteralsToLaunchFormJsonResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.LiteralsToLaunchFormJsonRequest]) (*connect.Response[workflow.LiteralsToLaunchFormJsonResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.LiteralsToLaunchFormJsonRequest]) *connect.Response[workflow.LiteralsToLaunchFormJsonResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.LiteralsToLaunchFormJsonResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.LiteralsToLaunchFormJsonRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// TranslatorServiceHandler_LiteralsToLaunchFormJson_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LiteralsToLaunchFormJson' -type TranslatorServiceHandler_LiteralsToLaunchFormJson_Call struct { - *mock.Call -} - -// LiteralsToLaunchFormJson is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.LiteralsToLaunchFormJsonRequest] -func (_e *TranslatorServiceHandler_Expecter) LiteralsToLaunchFormJson(context1 interface{}, request interface{}) *TranslatorServiceHandler_LiteralsToLaunchFormJson_Call { - return &TranslatorServiceHandler_LiteralsToLaunchFormJson_Call{Call: _e.mock.On("LiteralsToLaunchFormJson", context1, request)} -} - -func (_c *TranslatorServiceHandler_LiteralsToLaunchFormJson_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.LiteralsToLaunchFormJsonRequest])) *TranslatorServiceHandler_LiteralsToLaunchFormJson_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.LiteralsToLaunchFormJsonRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.LiteralsToLaunchFormJsonRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *TranslatorServiceHandler_LiteralsToLaunchFormJson_Call) Return(response *connect.Response[workflow.LiteralsToLaunchFormJsonResponse], err error) *TranslatorServiceHandler_LiteralsToLaunchFormJson_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *TranslatorServiceHandler_LiteralsToLaunchFormJson_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.LiteralsToLaunchFormJsonRequest]) (*connect.Response[workflow.LiteralsToLaunchFormJsonResponse], error)) *TranslatorServiceHandler_LiteralsToLaunchFormJson_Call { - _c.Call.Return(run) - return _c -} - -// TaskSpecToLaunchFormJson provides a mock function for the type TranslatorServiceHandler -func (_mock *TranslatorServiceHandler) TaskSpecToLaunchFormJson(context1 context.Context, request *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest]) (*connect.Response[workflow.TaskSpecToLaunchFormJsonResponse], error) { - ret := _mock.Called(context1, request) - - if len(ret) == 0 { - panic("no return value specified for TaskSpecToLaunchFormJson") - } - - var r0 *connect.Response[workflow.TaskSpecToLaunchFormJsonResponse] - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest]) (*connect.Response[workflow.TaskSpecToLaunchFormJsonResponse], error)); ok { - return returnFunc(context1, request) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest]) *connect.Response[workflow.TaskSpecToLaunchFormJsonResponse]); ok { - r0 = returnFunc(context1, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[workflow.TaskSpecToLaunchFormJsonResponse]) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest]) error); ok { - r1 = returnFunc(context1, request) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// TranslatorServiceHandler_TaskSpecToLaunchFormJson_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TaskSpecToLaunchFormJson' -type TranslatorServiceHandler_TaskSpecToLaunchFormJson_Call struct { - *mock.Call -} - -// TaskSpecToLaunchFormJson is a helper method to define mock.On call -// - context1 context.Context -// - request *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest] -func (_e *TranslatorServiceHandler_Expecter) TaskSpecToLaunchFormJson(context1 interface{}, request interface{}) *TranslatorServiceHandler_TaskSpecToLaunchFormJson_Call { - return &TranslatorServiceHandler_TaskSpecToLaunchFormJson_Call{Call: _e.mock.On("TaskSpecToLaunchFormJson", context1, request)} -} - -func (_c *TranslatorServiceHandler_TaskSpecToLaunchFormJson_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest])) *TranslatorServiceHandler_TaskSpecToLaunchFormJson_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest] - if args[1] != nil { - arg1 = args[1].(*connect.Request[workflow.TaskSpecToLaunchFormJsonRequest]) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *TranslatorServiceHandler_TaskSpecToLaunchFormJson_Call) Return(response *connect.Response[workflow.TaskSpecToLaunchFormJsonResponse], err error) *TranslatorServiceHandler_TaskSpecToLaunchFormJson_Call { - _c.Call.Return(response, err) - return _c -} - -func (_c *TranslatorServiceHandler_TaskSpecToLaunchFormJson_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest]) (*connect.Response[workflow.TaskSpecToLaunchFormJsonResponse], error)) *TranslatorServiceHandler_TaskSpecToLaunchFormJson_Call { - _c.Call.Return(run) - return _c -} From d02e56065b0ec1e2bd428acda4382040329d27e9 Mon Sep 17 00:00:00 2001 From: "M. Adil Fayyaz" <62440954+AdilFayyaz@users.noreply.github.com> Date: Thu, 16 Apr 2026 15:00:11 -0700 Subject: [PATCH 09/11] mocks Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com> --- gen/go/flyteidl2/connector/mocks/mocks.go | 2119 +++++++ .../workflow/workflowconnect/mocks/mocks.go | 4897 +++++++++++++++++ runs/repository/mocks/mocks.go | 7 +- 3 files changed, 7022 insertions(+), 1 deletion(-) create mode 100644 gen/go/flyteidl2/connector/mocks/mocks.go create mode 100644 gen/go/flyteidl2/workflow/workflowconnect/mocks/mocks.go diff --git a/gen/go/flyteidl2/connector/mocks/mocks.go b/gen/go/flyteidl2/connector/mocks/mocks.go new file mode 100644 index 0000000000..4f9110e52c --- /dev/null +++ b/gen/go/flyteidl2/connector/mocks/mocks.go @@ -0,0 +1,2119 @@ +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package mocks + +import ( + "context" + + "github.com/flyteorg/flyte/v2/gen/go/flyteidl2/connector" + mock "github.com/stretchr/testify/mock" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" +) + +// newIsGetTaskLogsResponse_Part creates a new instance of isGetTaskLogsResponse_Part. 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 newIsGetTaskLogsResponse_Part(t interface { + mock.TestingT + Cleanup(func()) +}) *isGetTaskLogsResponse_Part { + mock := &isGetTaskLogsResponse_Part{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// isGetTaskLogsResponse_Part is an autogenerated mock type for the isGetTaskLogsResponse_Part type +type isGetTaskLogsResponse_Part struct { + mock.Mock +} + +type isGetTaskLogsResponse_Part_Expecter struct { + mock *mock.Mock +} + +func (_m *isGetTaskLogsResponse_Part) EXPECT() *isGetTaskLogsResponse_Part_Expecter { + return &isGetTaskLogsResponse_Part_Expecter{mock: &_m.Mock} +} + +// isGetTaskLogsResponse_Part provides a mock function for the type isGetTaskLogsResponse_Part +func (_mock *isGetTaskLogsResponse_Part) isGetTaskLogsResponse_Part() { + _mock.Called() + return +} + +// isGetTaskLogsResponse_Part_isGetTaskLogsResponse_Part_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'isGetTaskLogsResponse_Part' +type isGetTaskLogsResponse_Part_isGetTaskLogsResponse_Part_Call struct { + *mock.Call +} + +// isGetTaskLogsResponse_Part is a helper method to define mock.On call +func (_e *isGetTaskLogsResponse_Part_Expecter) isGetTaskLogsResponse_Part() *isGetTaskLogsResponse_Part_isGetTaskLogsResponse_Part_Call { + return &isGetTaskLogsResponse_Part_isGetTaskLogsResponse_Part_Call{Call: _e.mock.On("isGetTaskLogsResponse_Part")} +} + +func (_c *isGetTaskLogsResponse_Part_isGetTaskLogsResponse_Part_Call) Run(run func()) *isGetTaskLogsResponse_Part_isGetTaskLogsResponse_Part_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *isGetTaskLogsResponse_Part_isGetTaskLogsResponse_Part_Call) Return() *isGetTaskLogsResponse_Part_isGetTaskLogsResponse_Part_Call { + _c.Call.Return() + return _c +} + +func (_c *isGetTaskLogsResponse_Part_isGetTaskLogsResponse_Part_Call) RunAndReturn(run func()) *isGetTaskLogsResponse_Part_isGetTaskLogsResponse_Part_Call { + _c.Run(run) + return _c +} + +// NewAsyncConnectorServiceClient creates a new instance of AsyncConnectorServiceClient. 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 NewAsyncConnectorServiceClient(t interface { + mock.TestingT + Cleanup(func()) +}) *AsyncConnectorServiceClient { + mock := &AsyncConnectorServiceClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// AsyncConnectorServiceClient is an autogenerated mock type for the AsyncConnectorServiceClient type +type AsyncConnectorServiceClient struct { + mock.Mock +} + +type AsyncConnectorServiceClient_Expecter struct { + mock *mock.Mock +} + +func (_m *AsyncConnectorServiceClient) EXPECT() *AsyncConnectorServiceClient_Expecter { + return &AsyncConnectorServiceClient_Expecter{mock: &_m.Mock} +} + +// CreateTask provides a mock function for the type AsyncConnectorServiceClient +func (_mock *AsyncConnectorServiceClient) CreateTask(ctx context.Context, in *connector.CreateTaskRequest, opts ...grpc.CallOption) (*connector.CreateTaskResponse, error) { + // grpc.CallOption + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _mock.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for CreateTask") + } + + var r0 *connector.CreateTaskResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.CreateTaskRequest, ...grpc.CallOption) (*connector.CreateTaskResponse, error)); ok { + return returnFunc(ctx, in, opts...) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.CreateTaskRequest, ...grpc.CallOption) *connector.CreateTaskResponse); ok { + r0 = returnFunc(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connector.CreateTaskResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.CreateTaskRequest, ...grpc.CallOption) error); ok { + r1 = returnFunc(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// AsyncConnectorServiceClient_CreateTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTask' +type AsyncConnectorServiceClient_CreateTask_Call struct { + *mock.Call +} + +// CreateTask is a helper method to define mock.On call +// - ctx context.Context +// - in *connector.CreateTaskRequest +// - opts ...grpc.CallOption +func (_e *AsyncConnectorServiceClient_Expecter) CreateTask(ctx interface{}, in interface{}, opts ...interface{}) *AsyncConnectorServiceClient_CreateTask_Call { + return &AsyncConnectorServiceClient_CreateTask_Call{Call: _e.mock.On("CreateTask", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *AsyncConnectorServiceClient_CreateTask_Call) Run(run func(ctx context.Context, in *connector.CreateTaskRequest, opts ...grpc.CallOption)) *AsyncConnectorServiceClient_CreateTask_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connector.CreateTaskRequest + if args[1] != nil { + arg1 = args[1].(*connector.CreateTaskRequest) + } + var arg2 []grpc.CallOption + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) + }) + return _c +} + +func (_c *AsyncConnectorServiceClient_CreateTask_Call) Return(createTaskResponse *connector.CreateTaskResponse, err error) *AsyncConnectorServiceClient_CreateTask_Call { + _c.Call.Return(createTaskResponse, err) + return _c +} + +func (_c *AsyncConnectorServiceClient_CreateTask_Call) RunAndReturn(run func(ctx context.Context, in *connector.CreateTaskRequest, opts ...grpc.CallOption) (*connector.CreateTaskResponse, error)) *AsyncConnectorServiceClient_CreateTask_Call { + _c.Call.Return(run) + return _c +} + +// DeleteTask provides a mock function for the type AsyncConnectorServiceClient +func (_mock *AsyncConnectorServiceClient) DeleteTask(ctx context.Context, in *connector.DeleteTaskRequest, opts ...grpc.CallOption) (*connector.DeleteTaskResponse, error) { + // grpc.CallOption + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _mock.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for DeleteTask") + } + + var r0 *connector.DeleteTaskResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.DeleteTaskRequest, ...grpc.CallOption) (*connector.DeleteTaskResponse, error)); ok { + return returnFunc(ctx, in, opts...) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.DeleteTaskRequest, ...grpc.CallOption) *connector.DeleteTaskResponse); ok { + r0 = returnFunc(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connector.DeleteTaskResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.DeleteTaskRequest, ...grpc.CallOption) error); ok { + r1 = returnFunc(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// AsyncConnectorServiceClient_DeleteTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteTask' +type AsyncConnectorServiceClient_DeleteTask_Call struct { + *mock.Call +} + +// DeleteTask is a helper method to define mock.On call +// - ctx context.Context +// - in *connector.DeleteTaskRequest +// - opts ...grpc.CallOption +func (_e *AsyncConnectorServiceClient_Expecter) DeleteTask(ctx interface{}, in interface{}, opts ...interface{}) *AsyncConnectorServiceClient_DeleteTask_Call { + return &AsyncConnectorServiceClient_DeleteTask_Call{Call: _e.mock.On("DeleteTask", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *AsyncConnectorServiceClient_DeleteTask_Call) Run(run func(ctx context.Context, in *connector.DeleteTaskRequest, opts ...grpc.CallOption)) *AsyncConnectorServiceClient_DeleteTask_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connector.DeleteTaskRequest + if args[1] != nil { + arg1 = args[1].(*connector.DeleteTaskRequest) + } + var arg2 []grpc.CallOption + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) + }) + return _c +} + +func (_c *AsyncConnectorServiceClient_DeleteTask_Call) Return(deleteTaskResponse *connector.DeleteTaskResponse, err error) *AsyncConnectorServiceClient_DeleteTask_Call { + _c.Call.Return(deleteTaskResponse, err) + return _c +} + +func (_c *AsyncConnectorServiceClient_DeleteTask_Call) RunAndReturn(run func(ctx context.Context, in *connector.DeleteTaskRequest, opts ...grpc.CallOption) (*connector.DeleteTaskResponse, error)) *AsyncConnectorServiceClient_DeleteTask_Call { + _c.Call.Return(run) + return _c +} + +// GetTask provides a mock function for the type AsyncConnectorServiceClient +func (_mock *AsyncConnectorServiceClient) GetTask(ctx context.Context, in *connector.GetTaskRequest, opts ...grpc.CallOption) (*connector.GetTaskResponse, error) { + // grpc.CallOption + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _mock.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for GetTask") + } + + var r0 *connector.GetTaskResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetTaskRequest, ...grpc.CallOption) (*connector.GetTaskResponse, error)); ok { + return returnFunc(ctx, in, opts...) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetTaskRequest, ...grpc.CallOption) *connector.GetTaskResponse); ok { + r0 = returnFunc(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connector.GetTaskResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.GetTaskRequest, ...grpc.CallOption) error); ok { + r1 = returnFunc(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// AsyncConnectorServiceClient_GetTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTask' +type AsyncConnectorServiceClient_GetTask_Call struct { + *mock.Call +} + +// GetTask is a helper method to define mock.On call +// - ctx context.Context +// - in *connector.GetTaskRequest +// - opts ...grpc.CallOption +func (_e *AsyncConnectorServiceClient_Expecter) GetTask(ctx interface{}, in interface{}, opts ...interface{}) *AsyncConnectorServiceClient_GetTask_Call { + return &AsyncConnectorServiceClient_GetTask_Call{Call: _e.mock.On("GetTask", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *AsyncConnectorServiceClient_GetTask_Call) Run(run func(ctx context.Context, in *connector.GetTaskRequest, opts ...grpc.CallOption)) *AsyncConnectorServiceClient_GetTask_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connector.GetTaskRequest + if args[1] != nil { + arg1 = args[1].(*connector.GetTaskRequest) + } + var arg2 []grpc.CallOption + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) + }) + return _c +} + +func (_c *AsyncConnectorServiceClient_GetTask_Call) Return(getTaskResponse *connector.GetTaskResponse, err error) *AsyncConnectorServiceClient_GetTask_Call { + _c.Call.Return(getTaskResponse, err) + return _c +} + +func (_c *AsyncConnectorServiceClient_GetTask_Call) RunAndReturn(run func(ctx context.Context, in *connector.GetTaskRequest, opts ...grpc.CallOption) (*connector.GetTaskResponse, error)) *AsyncConnectorServiceClient_GetTask_Call { + _c.Call.Return(run) + return _c +} + +// GetTaskLogs provides a mock function for the type AsyncConnectorServiceClient +func (_mock *AsyncConnectorServiceClient) GetTaskLogs(ctx context.Context, in *connector.GetTaskLogsRequest, opts ...grpc.CallOption) (connector.AsyncConnectorService_GetTaskLogsClient, error) { + // grpc.CallOption + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _mock.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for GetTaskLogs") + } + + var r0 connector.AsyncConnectorService_GetTaskLogsClient + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetTaskLogsRequest, ...grpc.CallOption) (connector.AsyncConnectorService_GetTaskLogsClient, error)); ok { + return returnFunc(ctx, in, opts...) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetTaskLogsRequest, ...grpc.CallOption) connector.AsyncConnectorService_GetTaskLogsClient); ok { + r0 = returnFunc(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(connector.AsyncConnectorService_GetTaskLogsClient) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.GetTaskLogsRequest, ...grpc.CallOption) error); ok { + r1 = returnFunc(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// AsyncConnectorServiceClient_GetTaskLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTaskLogs' +type AsyncConnectorServiceClient_GetTaskLogs_Call struct { + *mock.Call +} + +// GetTaskLogs is a helper method to define mock.On call +// - ctx context.Context +// - in *connector.GetTaskLogsRequest +// - opts ...grpc.CallOption +func (_e *AsyncConnectorServiceClient_Expecter) GetTaskLogs(ctx interface{}, in interface{}, opts ...interface{}) *AsyncConnectorServiceClient_GetTaskLogs_Call { + return &AsyncConnectorServiceClient_GetTaskLogs_Call{Call: _e.mock.On("GetTaskLogs", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *AsyncConnectorServiceClient_GetTaskLogs_Call) Run(run func(ctx context.Context, in *connector.GetTaskLogsRequest, opts ...grpc.CallOption)) *AsyncConnectorServiceClient_GetTaskLogs_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connector.GetTaskLogsRequest + if args[1] != nil { + arg1 = args[1].(*connector.GetTaskLogsRequest) + } + var arg2 []grpc.CallOption + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) + }) + return _c +} + +func (_c *AsyncConnectorServiceClient_GetTaskLogs_Call) Return(asyncConnectorService_GetTaskLogsClient connector.AsyncConnectorService_GetTaskLogsClient, err error) *AsyncConnectorServiceClient_GetTaskLogs_Call { + _c.Call.Return(asyncConnectorService_GetTaskLogsClient, err) + return _c +} + +func (_c *AsyncConnectorServiceClient_GetTaskLogs_Call) RunAndReturn(run func(ctx context.Context, in *connector.GetTaskLogsRequest, opts ...grpc.CallOption) (connector.AsyncConnectorService_GetTaskLogsClient, error)) *AsyncConnectorServiceClient_GetTaskLogs_Call { + _c.Call.Return(run) + return _c +} + +// GetTaskMetrics provides a mock function for the type AsyncConnectorServiceClient +func (_mock *AsyncConnectorServiceClient) GetTaskMetrics(ctx context.Context, in *connector.GetTaskMetricsRequest, opts ...grpc.CallOption) (*connector.GetTaskMetricsResponse, error) { + // grpc.CallOption + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _mock.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for GetTaskMetrics") + } + + var r0 *connector.GetTaskMetricsResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetTaskMetricsRequest, ...grpc.CallOption) (*connector.GetTaskMetricsResponse, error)); ok { + return returnFunc(ctx, in, opts...) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetTaskMetricsRequest, ...grpc.CallOption) *connector.GetTaskMetricsResponse); ok { + r0 = returnFunc(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connector.GetTaskMetricsResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.GetTaskMetricsRequest, ...grpc.CallOption) error); ok { + r1 = returnFunc(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// AsyncConnectorServiceClient_GetTaskMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTaskMetrics' +type AsyncConnectorServiceClient_GetTaskMetrics_Call struct { + *mock.Call +} + +// GetTaskMetrics is a helper method to define mock.On call +// - ctx context.Context +// - in *connector.GetTaskMetricsRequest +// - opts ...grpc.CallOption +func (_e *AsyncConnectorServiceClient_Expecter) GetTaskMetrics(ctx interface{}, in interface{}, opts ...interface{}) *AsyncConnectorServiceClient_GetTaskMetrics_Call { + return &AsyncConnectorServiceClient_GetTaskMetrics_Call{Call: _e.mock.On("GetTaskMetrics", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *AsyncConnectorServiceClient_GetTaskMetrics_Call) Run(run func(ctx context.Context, in *connector.GetTaskMetricsRequest, opts ...grpc.CallOption)) *AsyncConnectorServiceClient_GetTaskMetrics_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connector.GetTaskMetricsRequest + if args[1] != nil { + arg1 = args[1].(*connector.GetTaskMetricsRequest) + } + var arg2 []grpc.CallOption + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) + }) + return _c +} + +func (_c *AsyncConnectorServiceClient_GetTaskMetrics_Call) Return(getTaskMetricsResponse *connector.GetTaskMetricsResponse, err error) *AsyncConnectorServiceClient_GetTaskMetrics_Call { + _c.Call.Return(getTaskMetricsResponse, err) + return _c +} + +func (_c *AsyncConnectorServiceClient_GetTaskMetrics_Call) RunAndReturn(run func(ctx context.Context, in *connector.GetTaskMetricsRequest, opts ...grpc.CallOption) (*connector.GetTaskMetricsResponse, error)) *AsyncConnectorServiceClient_GetTaskMetrics_Call { + _c.Call.Return(run) + return _c +} + +// NewAsyncConnectorService_GetTaskLogsClient creates a new instance of AsyncConnectorService_GetTaskLogsClient. 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 NewAsyncConnectorService_GetTaskLogsClient(t interface { + mock.TestingT + Cleanup(func()) +}) *AsyncConnectorService_GetTaskLogsClient { + mock := &AsyncConnectorService_GetTaskLogsClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// AsyncConnectorService_GetTaskLogsClient is an autogenerated mock type for the AsyncConnectorService_GetTaskLogsClient type +type AsyncConnectorService_GetTaskLogsClient struct { + mock.Mock +} + +type AsyncConnectorService_GetTaskLogsClient_Expecter struct { + mock *mock.Mock +} + +func (_m *AsyncConnectorService_GetTaskLogsClient) EXPECT() *AsyncConnectorService_GetTaskLogsClient_Expecter { + return &AsyncConnectorService_GetTaskLogsClient_Expecter{mock: &_m.Mock} +} + +// CloseSend provides a mock function for the type AsyncConnectorService_GetTaskLogsClient +func (_mock *AsyncConnectorService_GetTaskLogsClient) CloseSend() error { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for CloseSend") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() + } else { + r0 = ret.Error(0) + } + return r0 +} + +// AsyncConnectorService_GetTaskLogsClient_CloseSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CloseSend' +type AsyncConnectorService_GetTaskLogsClient_CloseSend_Call struct { + *mock.Call +} + +// CloseSend is a helper method to define mock.On call +func (_e *AsyncConnectorService_GetTaskLogsClient_Expecter) CloseSend() *AsyncConnectorService_GetTaskLogsClient_CloseSend_Call { + return &AsyncConnectorService_GetTaskLogsClient_CloseSend_Call{Call: _e.mock.On("CloseSend")} +} + +func (_c *AsyncConnectorService_GetTaskLogsClient_CloseSend_Call) Run(run func()) *AsyncConnectorService_GetTaskLogsClient_CloseSend_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsClient_CloseSend_Call) Return(err error) *AsyncConnectorService_GetTaskLogsClient_CloseSend_Call { + _c.Call.Return(err) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsClient_CloseSend_Call) RunAndReturn(run func() error) *AsyncConnectorService_GetTaskLogsClient_CloseSend_Call { + _c.Call.Return(run) + return _c +} + +// Context provides a mock function for the type AsyncConnectorService_GetTaskLogsClient +func (_mock *AsyncConnectorService_GetTaskLogsClient) Context() context.Context { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for Context") + } + + var r0 context.Context + if returnFunc, ok := ret.Get(0).(func() context.Context); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(context.Context) + } + } + return r0 +} + +// AsyncConnectorService_GetTaskLogsClient_Context_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Context' +type AsyncConnectorService_GetTaskLogsClient_Context_Call struct { + *mock.Call +} + +// Context is a helper method to define mock.On call +func (_e *AsyncConnectorService_GetTaskLogsClient_Expecter) Context() *AsyncConnectorService_GetTaskLogsClient_Context_Call { + return &AsyncConnectorService_GetTaskLogsClient_Context_Call{Call: _e.mock.On("Context")} +} + +func (_c *AsyncConnectorService_GetTaskLogsClient_Context_Call) Run(run func()) *AsyncConnectorService_GetTaskLogsClient_Context_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsClient_Context_Call) Return(context1 context.Context) *AsyncConnectorService_GetTaskLogsClient_Context_Call { + _c.Call.Return(context1) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsClient_Context_Call) RunAndReturn(run func() context.Context) *AsyncConnectorService_GetTaskLogsClient_Context_Call { + _c.Call.Return(run) + return _c +} + +// Header provides a mock function for the type AsyncConnectorService_GetTaskLogsClient +func (_mock *AsyncConnectorService_GetTaskLogsClient) Header() (metadata.MD, error) { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for Header") + } + + var r0 metadata.MD + var r1 error + if returnFunc, ok := ret.Get(0).(func() (metadata.MD, error)); ok { + return returnFunc() + } + if returnFunc, ok := ret.Get(0).(func() metadata.MD); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(metadata.MD) + } + } + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// AsyncConnectorService_GetTaskLogsClient_Header_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Header' +type AsyncConnectorService_GetTaskLogsClient_Header_Call struct { + *mock.Call +} + +// Header is a helper method to define mock.On call +func (_e *AsyncConnectorService_GetTaskLogsClient_Expecter) Header() *AsyncConnectorService_GetTaskLogsClient_Header_Call { + return &AsyncConnectorService_GetTaskLogsClient_Header_Call{Call: _e.mock.On("Header")} +} + +func (_c *AsyncConnectorService_GetTaskLogsClient_Header_Call) Run(run func()) *AsyncConnectorService_GetTaskLogsClient_Header_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsClient_Header_Call) Return(mD metadata.MD, err error) *AsyncConnectorService_GetTaskLogsClient_Header_Call { + _c.Call.Return(mD, err) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsClient_Header_Call) RunAndReturn(run func() (metadata.MD, error)) *AsyncConnectorService_GetTaskLogsClient_Header_Call { + _c.Call.Return(run) + return _c +} + +// Recv provides a mock function for the type AsyncConnectorService_GetTaskLogsClient +func (_mock *AsyncConnectorService_GetTaskLogsClient) Recv() (*connector.GetTaskLogsResponse, error) { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for Recv") + } + + var r0 *connector.GetTaskLogsResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func() (*connector.GetTaskLogsResponse, error)); ok { + return returnFunc() + } + if returnFunc, ok := ret.Get(0).(func() *connector.GetTaskLogsResponse); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connector.GetTaskLogsResponse) + } + } + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// AsyncConnectorService_GetTaskLogsClient_Recv_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Recv' +type AsyncConnectorService_GetTaskLogsClient_Recv_Call struct { + *mock.Call +} + +// Recv is a helper method to define mock.On call +func (_e *AsyncConnectorService_GetTaskLogsClient_Expecter) Recv() *AsyncConnectorService_GetTaskLogsClient_Recv_Call { + return &AsyncConnectorService_GetTaskLogsClient_Recv_Call{Call: _e.mock.On("Recv")} +} + +func (_c *AsyncConnectorService_GetTaskLogsClient_Recv_Call) Run(run func()) *AsyncConnectorService_GetTaskLogsClient_Recv_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsClient_Recv_Call) Return(getTaskLogsResponse *connector.GetTaskLogsResponse, err error) *AsyncConnectorService_GetTaskLogsClient_Recv_Call { + _c.Call.Return(getTaskLogsResponse, err) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsClient_Recv_Call) RunAndReturn(run func() (*connector.GetTaskLogsResponse, error)) *AsyncConnectorService_GetTaskLogsClient_Recv_Call { + _c.Call.Return(run) + return _c +} + +// RecvMsg provides a mock function for the type AsyncConnectorService_GetTaskLogsClient +func (_mock *AsyncConnectorService_GetTaskLogsClient) RecvMsg(m any) error { + ret := _mock.Called(m) + + if len(ret) == 0 { + panic("no return value specified for RecvMsg") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(any) error); ok { + r0 = returnFunc(m) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// AsyncConnectorService_GetTaskLogsClient_RecvMsg_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecvMsg' +type AsyncConnectorService_GetTaskLogsClient_RecvMsg_Call struct { + *mock.Call +} + +// RecvMsg is a helper method to define mock.On call +// - m any +func (_e *AsyncConnectorService_GetTaskLogsClient_Expecter) RecvMsg(m interface{}) *AsyncConnectorService_GetTaskLogsClient_RecvMsg_Call { + return &AsyncConnectorService_GetTaskLogsClient_RecvMsg_Call{Call: _e.mock.On("RecvMsg", m)} +} + +func (_c *AsyncConnectorService_GetTaskLogsClient_RecvMsg_Call) Run(run func(m any)) *AsyncConnectorService_GetTaskLogsClient_RecvMsg_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 any + if args[0] != nil { + arg0 = args[0].(any) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsClient_RecvMsg_Call) Return(err error) *AsyncConnectorService_GetTaskLogsClient_RecvMsg_Call { + _c.Call.Return(err) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsClient_RecvMsg_Call) RunAndReturn(run func(m any) error) *AsyncConnectorService_GetTaskLogsClient_RecvMsg_Call { + _c.Call.Return(run) + return _c +} + +// SendMsg provides a mock function for the type AsyncConnectorService_GetTaskLogsClient +func (_mock *AsyncConnectorService_GetTaskLogsClient) SendMsg(m any) error { + ret := _mock.Called(m) + + if len(ret) == 0 { + panic("no return value specified for SendMsg") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(any) error); ok { + r0 = returnFunc(m) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// AsyncConnectorService_GetTaskLogsClient_SendMsg_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendMsg' +type AsyncConnectorService_GetTaskLogsClient_SendMsg_Call struct { + *mock.Call +} + +// SendMsg is a helper method to define mock.On call +// - m any +func (_e *AsyncConnectorService_GetTaskLogsClient_Expecter) SendMsg(m interface{}) *AsyncConnectorService_GetTaskLogsClient_SendMsg_Call { + return &AsyncConnectorService_GetTaskLogsClient_SendMsg_Call{Call: _e.mock.On("SendMsg", m)} +} + +func (_c *AsyncConnectorService_GetTaskLogsClient_SendMsg_Call) Run(run func(m any)) *AsyncConnectorService_GetTaskLogsClient_SendMsg_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 any + if args[0] != nil { + arg0 = args[0].(any) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsClient_SendMsg_Call) Return(err error) *AsyncConnectorService_GetTaskLogsClient_SendMsg_Call { + _c.Call.Return(err) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsClient_SendMsg_Call) RunAndReturn(run func(m any) error) *AsyncConnectorService_GetTaskLogsClient_SendMsg_Call { + _c.Call.Return(run) + return _c +} + +// Trailer provides a mock function for the type AsyncConnectorService_GetTaskLogsClient +func (_mock *AsyncConnectorService_GetTaskLogsClient) Trailer() metadata.MD { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for Trailer") + } + + var r0 metadata.MD + if returnFunc, ok := ret.Get(0).(func() metadata.MD); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(metadata.MD) + } + } + return r0 +} + +// AsyncConnectorService_GetTaskLogsClient_Trailer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Trailer' +type AsyncConnectorService_GetTaskLogsClient_Trailer_Call struct { + *mock.Call +} + +// Trailer is a helper method to define mock.On call +func (_e *AsyncConnectorService_GetTaskLogsClient_Expecter) Trailer() *AsyncConnectorService_GetTaskLogsClient_Trailer_Call { + return &AsyncConnectorService_GetTaskLogsClient_Trailer_Call{Call: _e.mock.On("Trailer")} +} + +func (_c *AsyncConnectorService_GetTaskLogsClient_Trailer_Call) Run(run func()) *AsyncConnectorService_GetTaskLogsClient_Trailer_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsClient_Trailer_Call) Return(mD metadata.MD) *AsyncConnectorService_GetTaskLogsClient_Trailer_Call { + _c.Call.Return(mD) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsClient_Trailer_Call) RunAndReturn(run func() metadata.MD) *AsyncConnectorService_GetTaskLogsClient_Trailer_Call { + _c.Call.Return(run) + return _c +} + +// NewAsyncConnectorServiceServer creates a new instance of AsyncConnectorServiceServer. 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 NewAsyncConnectorServiceServer(t interface { + mock.TestingT + Cleanup(func()) +}) *AsyncConnectorServiceServer { + mock := &AsyncConnectorServiceServer{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// AsyncConnectorServiceServer is an autogenerated mock type for the AsyncConnectorServiceServer type +type AsyncConnectorServiceServer struct { + mock.Mock +} + +type AsyncConnectorServiceServer_Expecter struct { + mock *mock.Mock +} + +func (_m *AsyncConnectorServiceServer) EXPECT() *AsyncConnectorServiceServer_Expecter { + return &AsyncConnectorServiceServer_Expecter{mock: &_m.Mock} +} + +// CreateTask provides a mock function for the type AsyncConnectorServiceServer +func (_mock *AsyncConnectorServiceServer) CreateTask(context1 context.Context, createTaskRequest *connector.CreateTaskRequest) (*connector.CreateTaskResponse, error) { + ret := _mock.Called(context1, createTaskRequest) + + if len(ret) == 0 { + panic("no return value specified for CreateTask") + } + + var r0 *connector.CreateTaskResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.CreateTaskRequest) (*connector.CreateTaskResponse, error)); ok { + return returnFunc(context1, createTaskRequest) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.CreateTaskRequest) *connector.CreateTaskResponse); ok { + r0 = returnFunc(context1, createTaskRequest) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connector.CreateTaskResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.CreateTaskRequest) error); ok { + r1 = returnFunc(context1, createTaskRequest) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// AsyncConnectorServiceServer_CreateTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTask' +type AsyncConnectorServiceServer_CreateTask_Call struct { + *mock.Call +} + +// CreateTask is a helper method to define mock.On call +// - context1 context.Context +// - createTaskRequest *connector.CreateTaskRequest +func (_e *AsyncConnectorServiceServer_Expecter) CreateTask(context1 interface{}, createTaskRequest interface{}) *AsyncConnectorServiceServer_CreateTask_Call { + return &AsyncConnectorServiceServer_CreateTask_Call{Call: _e.mock.On("CreateTask", context1, createTaskRequest)} +} + +func (_c *AsyncConnectorServiceServer_CreateTask_Call) Run(run func(context1 context.Context, createTaskRequest *connector.CreateTaskRequest)) *AsyncConnectorServiceServer_CreateTask_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connector.CreateTaskRequest + if args[1] != nil { + arg1 = args[1].(*connector.CreateTaskRequest) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *AsyncConnectorServiceServer_CreateTask_Call) Return(createTaskResponse *connector.CreateTaskResponse, err error) *AsyncConnectorServiceServer_CreateTask_Call { + _c.Call.Return(createTaskResponse, err) + return _c +} + +func (_c *AsyncConnectorServiceServer_CreateTask_Call) RunAndReturn(run func(context1 context.Context, createTaskRequest *connector.CreateTaskRequest) (*connector.CreateTaskResponse, error)) *AsyncConnectorServiceServer_CreateTask_Call { + _c.Call.Return(run) + return _c +} + +// DeleteTask provides a mock function for the type AsyncConnectorServiceServer +func (_mock *AsyncConnectorServiceServer) DeleteTask(context1 context.Context, deleteTaskRequest *connector.DeleteTaskRequest) (*connector.DeleteTaskResponse, error) { + ret := _mock.Called(context1, deleteTaskRequest) + + if len(ret) == 0 { + panic("no return value specified for DeleteTask") + } + + var r0 *connector.DeleteTaskResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.DeleteTaskRequest) (*connector.DeleteTaskResponse, error)); ok { + return returnFunc(context1, deleteTaskRequest) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.DeleteTaskRequest) *connector.DeleteTaskResponse); ok { + r0 = returnFunc(context1, deleteTaskRequest) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connector.DeleteTaskResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.DeleteTaskRequest) error); ok { + r1 = returnFunc(context1, deleteTaskRequest) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// AsyncConnectorServiceServer_DeleteTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteTask' +type AsyncConnectorServiceServer_DeleteTask_Call struct { + *mock.Call +} + +// DeleteTask is a helper method to define mock.On call +// - context1 context.Context +// - deleteTaskRequest *connector.DeleteTaskRequest +func (_e *AsyncConnectorServiceServer_Expecter) DeleteTask(context1 interface{}, deleteTaskRequest interface{}) *AsyncConnectorServiceServer_DeleteTask_Call { + return &AsyncConnectorServiceServer_DeleteTask_Call{Call: _e.mock.On("DeleteTask", context1, deleteTaskRequest)} +} + +func (_c *AsyncConnectorServiceServer_DeleteTask_Call) Run(run func(context1 context.Context, deleteTaskRequest *connector.DeleteTaskRequest)) *AsyncConnectorServiceServer_DeleteTask_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connector.DeleteTaskRequest + if args[1] != nil { + arg1 = args[1].(*connector.DeleteTaskRequest) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *AsyncConnectorServiceServer_DeleteTask_Call) Return(deleteTaskResponse *connector.DeleteTaskResponse, err error) *AsyncConnectorServiceServer_DeleteTask_Call { + _c.Call.Return(deleteTaskResponse, err) + return _c +} + +func (_c *AsyncConnectorServiceServer_DeleteTask_Call) RunAndReturn(run func(context1 context.Context, deleteTaskRequest *connector.DeleteTaskRequest) (*connector.DeleteTaskResponse, error)) *AsyncConnectorServiceServer_DeleteTask_Call { + _c.Call.Return(run) + return _c +} + +// GetTask provides a mock function for the type AsyncConnectorServiceServer +func (_mock *AsyncConnectorServiceServer) GetTask(context1 context.Context, getTaskRequest *connector.GetTaskRequest) (*connector.GetTaskResponse, error) { + ret := _mock.Called(context1, getTaskRequest) + + if len(ret) == 0 { + panic("no return value specified for GetTask") + } + + var r0 *connector.GetTaskResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetTaskRequest) (*connector.GetTaskResponse, error)); ok { + return returnFunc(context1, getTaskRequest) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetTaskRequest) *connector.GetTaskResponse); ok { + r0 = returnFunc(context1, getTaskRequest) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connector.GetTaskResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.GetTaskRequest) error); ok { + r1 = returnFunc(context1, getTaskRequest) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// AsyncConnectorServiceServer_GetTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTask' +type AsyncConnectorServiceServer_GetTask_Call struct { + *mock.Call +} + +// GetTask is a helper method to define mock.On call +// - context1 context.Context +// - getTaskRequest *connector.GetTaskRequest +func (_e *AsyncConnectorServiceServer_Expecter) GetTask(context1 interface{}, getTaskRequest interface{}) *AsyncConnectorServiceServer_GetTask_Call { + return &AsyncConnectorServiceServer_GetTask_Call{Call: _e.mock.On("GetTask", context1, getTaskRequest)} +} + +func (_c *AsyncConnectorServiceServer_GetTask_Call) Run(run func(context1 context.Context, getTaskRequest *connector.GetTaskRequest)) *AsyncConnectorServiceServer_GetTask_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connector.GetTaskRequest + if args[1] != nil { + arg1 = args[1].(*connector.GetTaskRequest) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *AsyncConnectorServiceServer_GetTask_Call) Return(getTaskResponse *connector.GetTaskResponse, err error) *AsyncConnectorServiceServer_GetTask_Call { + _c.Call.Return(getTaskResponse, err) + return _c +} + +func (_c *AsyncConnectorServiceServer_GetTask_Call) RunAndReturn(run func(context1 context.Context, getTaskRequest *connector.GetTaskRequest) (*connector.GetTaskResponse, error)) *AsyncConnectorServiceServer_GetTask_Call { + _c.Call.Return(run) + return _c +} + +// GetTaskLogs provides a mock function for the type AsyncConnectorServiceServer +func (_mock *AsyncConnectorServiceServer) GetTaskLogs(getTaskLogsRequest *connector.GetTaskLogsRequest, asyncConnectorService_GetTaskLogsServer connector.AsyncConnectorService_GetTaskLogsServer) error { + ret := _mock.Called(getTaskLogsRequest, asyncConnectorService_GetTaskLogsServer) + + if len(ret) == 0 { + panic("no return value specified for GetTaskLogs") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(*connector.GetTaskLogsRequest, connector.AsyncConnectorService_GetTaskLogsServer) error); ok { + r0 = returnFunc(getTaskLogsRequest, asyncConnectorService_GetTaskLogsServer) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// AsyncConnectorServiceServer_GetTaskLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTaskLogs' +type AsyncConnectorServiceServer_GetTaskLogs_Call struct { + *mock.Call +} + +// GetTaskLogs is a helper method to define mock.On call +// - getTaskLogsRequest *connector.GetTaskLogsRequest +// - asyncConnectorService_GetTaskLogsServer connector.AsyncConnectorService_GetTaskLogsServer +func (_e *AsyncConnectorServiceServer_Expecter) GetTaskLogs(getTaskLogsRequest interface{}, asyncConnectorService_GetTaskLogsServer interface{}) *AsyncConnectorServiceServer_GetTaskLogs_Call { + return &AsyncConnectorServiceServer_GetTaskLogs_Call{Call: _e.mock.On("GetTaskLogs", getTaskLogsRequest, asyncConnectorService_GetTaskLogsServer)} +} + +func (_c *AsyncConnectorServiceServer_GetTaskLogs_Call) Run(run func(getTaskLogsRequest *connector.GetTaskLogsRequest, asyncConnectorService_GetTaskLogsServer connector.AsyncConnectorService_GetTaskLogsServer)) *AsyncConnectorServiceServer_GetTaskLogs_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 *connector.GetTaskLogsRequest + if args[0] != nil { + arg0 = args[0].(*connector.GetTaskLogsRequest) + } + var arg1 connector.AsyncConnectorService_GetTaskLogsServer + if args[1] != nil { + arg1 = args[1].(connector.AsyncConnectorService_GetTaskLogsServer) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *AsyncConnectorServiceServer_GetTaskLogs_Call) Return(err error) *AsyncConnectorServiceServer_GetTaskLogs_Call { + _c.Call.Return(err) + return _c +} + +func (_c *AsyncConnectorServiceServer_GetTaskLogs_Call) RunAndReturn(run func(getTaskLogsRequest *connector.GetTaskLogsRequest, asyncConnectorService_GetTaskLogsServer connector.AsyncConnectorService_GetTaskLogsServer) error) *AsyncConnectorServiceServer_GetTaskLogs_Call { + _c.Call.Return(run) + return _c +} + +// GetTaskMetrics provides a mock function for the type AsyncConnectorServiceServer +func (_mock *AsyncConnectorServiceServer) GetTaskMetrics(context1 context.Context, getTaskMetricsRequest *connector.GetTaskMetricsRequest) (*connector.GetTaskMetricsResponse, error) { + ret := _mock.Called(context1, getTaskMetricsRequest) + + if len(ret) == 0 { + panic("no return value specified for GetTaskMetrics") + } + + var r0 *connector.GetTaskMetricsResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetTaskMetricsRequest) (*connector.GetTaskMetricsResponse, error)); ok { + return returnFunc(context1, getTaskMetricsRequest) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetTaskMetricsRequest) *connector.GetTaskMetricsResponse); ok { + r0 = returnFunc(context1, getTaskMetricsRequest) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connector.GetTaskMetricsResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.GetTaskMetricsRequest) error); ok { + r1 = returnFunc(context1, getTaskMetricsRequest) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// AsyncConnectorServiceServer_GetTaskMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTaskMetrics' +type AsyncConnectorServiceServer_GetTaskMetrics_Call struct { + *mock.Call +} + +// GetTaskMetrics is a helper method to define mock.On call +// - context1 context.Context +// - getTaskMetricsRequest *connector.GetTaskMetricsRequest +func (_e *AsyncConnectorServiceServer_Expecter) GetTaskMetrics(context1 interface{}, getTaskMetricsRequest interface{}) *AsyncConnectorServiceServer_GetTaskMetrics_Call { + return &AsyncConnectorServiceServer_GetTaskMetrics_Call{Call: _e.mock.On("GetTaskMetrics", context1, getTaskMetricsRequest)} +} + +func (_c *AsyncConnectorServiceServer_GetTaskMetrics_Call) Run(run func(context1 context.Context, getTaskMetricsRequest *connector.GetTaskMetricsRequest)) *AsyncConnectorServiceServer_GetTaskMetrics_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connector.GetTaskMetricsRequest + if args[1] != nil { + arg1 = args[1].(*connector.GetTaskMetricsRequest) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *AsyncConnectorServiceServer_GetTaskMetrics_Call) Return(getTaskMetricsResponse *connector.GetTaskMetricsResponse, err error) *AsyncConnectorServiceServer_GetTaskMetrics_Call { + _c.Call.Return(getTaskMetricsResponse, err) + return _c +} + +func (_c *AsyncConnectorServiceServer_GetTaskMetrics_Call) RunAndReturn(run func(context1 context.Context, getTaskMetricsRequest *connector.GetTaskMetricsRequest) (*connector.GetTaskMetricsResponse, error)) *AsyncConnectorServiceServer_GetTaskMetrics_Call { + _c.Call.Return(run) + return _c +} + +// NewUnsafeAsyncConnectorServiceServer creates a new instance of UnsafeAsyncConnectorServiceServer. 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 NewUnsafeAsyncConnectorServiceServer(t interface { + mock.TestingT + Cleanup(func()) +}) *UnsafeAsyncConnectorServiceServer { + mock := &UnsafeAsyncConnectorServiceServer{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// UnsafeAsyncConnectorServiceServer is an autogenerated mock type for the UnsafeAsyncConnectorServiceServer type +type UnsafeAsyncConnectorServiceServer struct { + mock.Mock +} + +type UnsafeAsyncConnectorServiceServer_Expecter struct { + mock *mock.Mock +} + +func (_m *UnsafeAsyncConnectorServiceServer) EXPECT() *UnsafeAsyncConnectorServiceServer_Expecter { + return &UnsafeAsyncConnectorServiceServer_Expecter{mock: &_m.Mock} +} + +// mustEmbedUnimplementedAsyncConnectorServiceServer provides a mock function for the type UnsafeAsyncConnectorServiceServer +func (_mock *UnsafeAsyncConnectorServiceServer) mustEmbedUnimplementedAsyncConnectorServiceServer() { + _mock.Called() + return +} + +// UnsafeAsyncConnectorServiceServer_mustEmbedUnimplementedAsyncConnectorServiceServer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'mustEmbedUnimplementedAsyncConnectorServiceServer' +type UnsafeAsyncConnectorServiceServer_mustEmbedUnimplementedAsyncConnectorServiceServer_Call struct { + *mock.Call +} + +// mustEmbedUnimplementedAsyncConnectorServiceServer is a helper method to define mock.On call +func (_e *UnsafeAsyncConnectorServiceServer_Expecter) mustEmbedUnimplementedAsyncConnectorServiceServer() *UnsafeAsyncConnectorServiceServer_mustEmbedUnimplementedAsyncConnectorServiceServer_Call { + return &UnsafeAsyncConnectorServiceServer_mustEmbedUnimplementedAsyncConnectorServiceServer_Call{Call: _e.mock.On("mustEmbedUnimplementedAsyncConnectorServiceServer")} +} + +func (_c *UnsafeAsyncConnectorServiceServer_mustEmbedUnimplementedAsyncConnectorServiceServer_Call) Run(run func()) *UnsafeAsyncConnectorServiceServer_mustEmbedUnimplementedAsyncConnectorServiceServer_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *UnsafeAsyncConnectorServiceServer_mustEmbedUnimplementedAsyncConnectorServiceServer_Call) Return() *UnsafeAsyncConnectorServiceServer_mustEmbedUnimplementedAsyncConnectorServiceServer_Call { + _c.Call.Return() + return _c +} + +func (_c *UnsafeAsyncConnectorServiceServer_mustEmbedUnimplementedAsyncConnectorServiceServer_Call) RunAndReturn(run func()) *UnsafeAsyncConnectorServiceServer_mustEmbedUnimplementedAsyncConnectorServiceServer_Call { + _c.Run(run) + return _c +} + +// NewAsyncConnectorService_GetTaskLogsServer creates a new instance of AsyncConnectorService_GetTaskLogsServer. 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 NewAsyncConnectorService_GetTaskLogsServer(t interface { + mock.TestingT + Cleanup(func()) +}) *AsyncConnectorService_GetTaskLogsServer { + mock := &AsyncConnectorService_GetTaskLogsServer{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// AsyncConnectorService_GetTaskLogsServer is an autogenerated mock type for the AsyncConnectorService_GetTaskLogsServer type +type AsyncConnectorService_GetTaskLogsServer struct { + mock.Mock +} + +type AsyncConnectorService_GetTaskLogsServer_Expecter struct { + mock *mock.Mock +} + +func (_m *AsyncConnectorService_GetTaskLogsServer) EXPECT() *AsyncConnectorService_GetTaskLogsServer_Expecter { + return &AsyncConnectorService_GetTaskLogsServer_Expecter{mock: &_m.Mock} +} + +// Context provides a mock function for the type AsyncConnectorService_GetTaskLogsServer +func (_mock *AsyncConnectorService_GetTaskLogsServer) Context() context.Context { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for Context") + } + + var r0 context.Context + if returnFunc, ok := ret.Get(0).(func() context.Context); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(context.Context) + } + } + return r0 +} + +// AsyncConnectorService_GetTaskLogsServer_Context_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Context' +type AsyncConnectorService_GetTaskLogsServer_Context_Call struct { + *mock.Call +} + +// Context is a helper method to define mock.On call +func (_e *AsyncConnectorService_GetTaskLogsServer_Expecter) Context() *AsyncConnectorService_GetTaskLogsServer_Context_Call { + return &AsyncConnectorService_GetTaskLogsServer_Context_Call{Call: _e.mock.On("Context")} +} + +func (_c *AsyncConnectorService_GetTaskLogsServer_Context_Call) Run(run func()) *AsyncConnectorService_GetTaskLogsServer_Context_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsServer_Context_Call) Return(context1 context.Context) *AsyncConnectorService_GetTaskLogsServer_Context_Call { + _c.Call.Return(context1) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsServer_Context_Call) RunAndReturn(run func() context.Context) *AsyncConnectorService_GetTaskLogsServer_Context_Call { + _c.Call.Return(run) + return _c +} + +// RecvMsg provides a mock function for the type AsyncConnectorService_GetTaskLogsServer +func (_mock *AsyncConnectorService_GetTaskLogsServer) RecvMsg(m any) error { + ret := _mock.Called(m) + + if len(ret) == 0 { + panic("no return value specified for RecvMsg") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(any) error); ok { + r0 = returnFunc(m) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// AsyncConnectorService_GetTaskLogsServer_RecvMsg_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecvMsg' +type AsyncConnectorService_GetTaskLogsServer_RecvMsg_Call struct { + *mock.Call +} + +// RecvMsg is a helper method to define mock.On call +// - m any +func (_e *AsyncConnectorService_GetTaskLogsServer_Expecter) RecvMsg(m interface{}) *AsyncConnectorService_GetTaskLogsServer_RecvMsg_Call { + return &AsyncConnectorService_GetTaskLogsServer_RecvMsg_Call{Call: _e.mock.On("RecvMsg", m)} +} + +func (_c *AsyncConnectorService_GetTaskLogsServer_RecvMsg_Call) Run(run func(m any)) *AsyncConnectorService_GetTaskLogsServer_RecvMsg_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 any + if args[0] != nil { + arg0 = args[0].(any) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsServer_RecvMsg_Call) Return(err error) *AsyncConnectorService_GetTaskLogsServer_RecvMsg_Call { + _c.Call.Return(err) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsServer_RecvMsg_Call) RunAndReturn(run func(m any) error) *AsyncConnectorService_GetTaskLogsServer_RecvMsg_Call { + _c.Call.Return(run) + return _c +} + +// Send provides a mock function for the type AsyncConnectorService_GetTaskLogsServer +func (_mock *AsyncConnectorService_GetTaskLogsServer) Send(getTaskLogsResponse *connector.GetTaskLogsResponse) error { + ret := _mock.Called(getTaskLogsResponse) + + if len(ret) == 0 { + panic("no return value specified for Send") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(*connector.GetTaskLogsResponse) error); ok { + r0 = returnFunc(getTaskLogsResponse) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// AsyncConnectorService_GetTaskLogsServer_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send' +type AsyncConnectorService_GetTaskLogsServer_Send_Call struct { + *mock.Call +} + +// Send is a helper method to define mock.On call +// - getTaskLogsResponse *connector.GetTaskLogsResponse +func (_e *AsyncConnectorService_GetTaskLogsServer_Expecter) Send(getTaskLogsResponse interface{}) *AsyncConnectorService_GetTaskLogsServer_Send_Call { + return &AsyncConnectorService_GetTaskLogsServer_Send_Call{Call: _e.mock.On("Send", getTaskLogsResponse)} +} + +func (_c *AsyncConnectorService_GetTaskLogsServer_Send_Call) Run(run func(getTaskLogsResponse *connector.GetTaskLogsResponse)) *AsyncConnectorService_GetTaskLogsServer_Send_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 *connector.GetTaskLogsResponse + if args[0] != nil { + arg0 = args[0].(*connector.GetTaskLogsResponse) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsServer_Send_Call) Return(err error) *AsyncConnectorService_GetTaskLogsServer_Send_Call { + _c.Call.Return(err) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsServer_Send_Call) RunAndReturn(run func(getTaskLogsResponse *connector.GetTaskLogsResponse) error) *AsyncConnectorService_GetTaskLogsServer_Send_Call { + _c.Call.Return(run) + return _c +} + +// SendHeader provides a mock function for the type AsyncConnectorService_GetTaskLogsServer +func (_mock *AsyncConnectorService_GetTaskLogsServer) SendHeader(mD metadata.MD) error { + ret := _mock.Called(mD) + + if len(ret) == 0 { + panic("no return value specified for SendHeader") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(metadata.MD) error); ok { + r0 = returnFunc(mD) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// AsyncConnectorService_GetTaskLogsServer_SendHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendHeader' +type AsyncConnectorService_GetTaskLogsServer_SendHeader_Call struct { + *mock.Call +} + +// SendHeader is a helper method to define mock.On call +// - mD metadata.MD +func (_e *AsyncConnectorService_GetTaskLogsServer_Expecter) SendHeader(mD interface{}) *AsyncConnectorService_GetTaskLogsServer_SendHeader_Call { + return &AsyncConnectorService_GetTaskLogsServer_SendHeader_Call{Call: _e.mock.On("SendHeader", mD)} +} + +func (_c *AsyncConnectorService_GetTaskLogsServer_SendHeader_Call) Run(run func(mD metadata.MD)) *AsyncConnectorService_GetTaskLogsServer_SendHeader_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 metadata.MD + if args[0] != nil { + arg0 = args[0].(metadata.MD) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsServer_SendHeader_Call) Return(err error) *AsyncConnectorService_GetTaskLogsServer_SendHeader_Call { + _c.Call.Return(err) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsServer_SendHeader_Call) RunAndReturn(run func(mD metadata.MD) error) *AsyncConnectorService_GetTaskLogsServer_SendHeader_Call { + _c.Call.Return(run) + return _c +} + +// SendMsg provides a mock function for the type AsyncConnectorService_GetTaskLogsServer +func (_mock *AsyncConnectorService_GetTaskLogsServer) SendMsg(m any) error { + ret := _mock.Called(m) + + if len(ret) == 0 { + panic("no return value specified for SendMsg") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(any) error); ok { + r0 = returnFunc(m) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// AsyncConnectorService_GetTaskLogsServer_SendMsg_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendMsg' +type AsyncConnectorService_GetTaskLogsServer_SendMsg_Call struct { + *mock.Call +} + +// SendMsg is a helper method to define mock.On call +// - m any +func (_e *AsyncConnectorService_GetTaskLogsServer_Expecter) SendMsg(m interface{}) *AsyncConnectorService_GetTaskLogsServer_SendMsg_Call { + return &AsyncConnectorService_GetTaskLogsServer_SendMsg_Call{Call: _e.mock.On("SendMsg", m)} +} + +func (_c *AsyncConnectorService_GetTaskLogsServer_SendMsg_Call) Run(run func(m any)) *AsyncConnectorService_GetTaskLogsServer_SendMsg_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 any + if args[0] != nil { + arg0 = args[0].(any) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsServer_SendMsg_Call) Return(err error) *AsyncConnectorService_GetTaskLogsServer_SendMsg_Call { + _c.Call.Return(err) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsServer_SendMsg_Call) RunAndReturn(run func(m any) error) *AsyncConnectorService_GetTaskLogsServer_SendMsg_Call { + _c.Call.Return(run) + return _c +} + +// SetHeader provides a mock function for the type AsyncConnectorService_GetTaskLogsServer +func (_mock *AsyncConnectorService_GetTaskLogsServer) SetHeader(mD metadata.MD) error { + ret := _mock.Called(mD) + + if len(ret) == 0 { + panic("no return value specified for SetHeader") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(metadata.MD) error); ok { + r0 = returnFunc(mD) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// AsyncConnectorService_GetTaskLogsServer_SetHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHeader' +type AsyncConnectorService_GetTaskLogsServer_SetHeader_Call struct { + *mock.Call +} + +// SetHeader is a helper method to define mock.On call +// - mD metadata.MD +func (_e *AsyncConnectorService_GetTaskLogsServer_Expecter) SetHeader(mD interface{}) *AsyncConnectorService_GetTaskLogsServer_SetHeader_Call { + return &AsyncConnectorService_GetTaskLogsServer_SetHeader_Call{Call: _e.mock.On("SetHeader", mD)} +} + +func (_c *AsyncConnectorService_GetTaskLogsServer_SetHeader_Call) Run(run func(mD metadata.MD)) *AsyncConnectorService_GetTaskLogsServer_SetHeader_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 metadata.MD + if args[0] != nil { + arg0 = args[0].(metadata.MD) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsServer_SetHeader_Call) Return(err error) *AsyncConnectorService_GetTaskLogsServer_SetHeader_Call { + _c.Call.Return(err) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsServer_SetHeader_Call) RunAndReturn(run func(mD metadata.MD) error) *AsyncConnectorService_GetTaskLogsServer_SetHeader_Call { + _c.Call.Return(run) + return _c +} + +// SetTrailer provides a mock function for the type AsyncConnectorService_GetTaskLogsServer +func (_mock *AsyncConnectorService_GetTaskLogsServer) SetTrailer(mD metadata.MD) { + _mock.Called(mD) + return +} + +// AsyncConnectorService_GetTaskLogsServer_SetTrailer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetTrailer' +type AsyncConnectorService_GetTaskLogsServer_SetTrailer_Call struct { + *mock.Call +} + +// SetTrailer is a helper method to define mock.On call +// - mD metadata.MD +func (_e *AsyncConnectorService_GetTaskLogsServer_Expecter) SetTrailer(mD interface{}) *AsyncConnectorService_GetTaskLogsServer_SetTrailer_Call { + return &AsyncConnectorService_GetTaskLogsServer_SetTrailer_Call{Call: _e.mock.On("SetTrailer", mD)} +} + +func (_c *AsyncConnectorService_GetTaskLogsServer_SetTrailer_Call) Run(run func(mD metadata.MD)) *AsyncConnectorService_GetTaskLogsServer_SetTrailer_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 metadata.MD + if args[0] != nil { + arg0 = args[0].(metadata.MD) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsServer_SetTrailer_Call) Return() *AsyncConnectorService_GetTaskLogsServer_SetTrailer_Call { + _c.Call.Return() + return _c +} + +func (_c *AsyncConnectorService_GetTaskLogsServer_SetTrailer_Call) RunAndReturn(run func(mD metadata.MD)) *AsyncConnectorService_GetTaskLogsServer_SetTrailer_Call { + _c.Run(run) + return _c +} + +// NewConnectorMetadataServiceClient creates a new instance of ConnectorMetadataServiceClient. 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 NewConnectorMetadataServiceClient(t interface { + mock.TestingT + Cleanup(func()) +}) *ConnectorMetadataServiceClient { + mock := &ConnectorMetadataServiceClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// ConnectorMetadataServiceClient is an autogenerated mock type for the ConnectorMetadataServiceClient type +type ConnectorMetadataServiceClient struct { + mock.Mock +} + +type ConnectorMetadataServiceClient_Expecter struct { + mock *mock.Mock +} + +func (_m *ConnectorMetadataServiceClient) EXPECT() *ConnectorMetadataServiceClient_Expecter { + return &ConnectorMetadataServiceClient_Expecter{mock: &_m.Mock} +} + +// GetConnector provides a mock function for the type ConnectorMetadataServiceClient +func (_mock *ConnectorMetadataServiceClient) GetConnector(ctx context.Context, in *connector.GetConnectorRequest, opts ...grpc.CallOption) (*connector.GetConnectorResponse, error) { + // grpc.CallOption + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _mock.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for GetConnector") + } + + var r0 *connector.GetConnectorResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetConnectorRequest, ...grpc.CallOption) (*connector.GetConnectorResponse, error)); ok { + return returnFunc(ctx, in, opts...) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetConnectorRequest, ...grpc.CallOption) *connector.GetConnectorResponse); ok { + r0 = returnFunc(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connector.GetConnectorResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.GetConnectorRequest, ...grpc.CallOption) error); ok { + r1 = returnFunc(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// ConnectorMetadataServiceClient_GetConnector_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConnector' +type ConnectorMetadataServiceClient_GetConnector_Call struct { + *mock.Call +} + +// GetConnector is a helper method to define mock.On call +// - ctx context.Context +// - in *connector.GetConnectorRequest +// - opts ...grpc.CallOption +func (_e *ConnectorMetadataServiceClient_Expecter) GetConnector(ctx interface{}, in interface{}, opts ...interface{}) *ConnectorMetadataServiceClient_GetConnector_Call { + return &ConnectorMetadataServiceClient_GetConnector_Call{Call: _e.mock.On("GetConnector", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *ConnectorMetadataServiceClient_GetConnector_Call) Run(run func(ctx context.Context, in *connector.GetConnectorRequest, opts ...grpc.CallOption)) *ConnectorMetadataServiceClient_GetConnector_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connector.GetConnectorRequest + if args[1] != nil { + arg1 = args[1].(*connector.GetConnectorRequest) + } + var arg2 []grpc.CallOption + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) + }) + return _c +} + +func (_c *ConnectorMetadataServiceClient_GetConnector_Call) Return(getConnectorResponse *connector.GetConnectorResponse, err error) *ConnectorMetadataServiceClient_GetConnector_Call { + _c.Call.Return(getConnectorResponse, err) + return _c +} + +func (_c *ConnectorMetadataServiceClient_GetConnector_Call) RunAndReturn(run func(ctx context.Context, in *connector.GetConnectorRequest, opts ...grpc.CallOption) (*connector.GetConnectorResponse, error)) *ConnectorMetadataServiceClient_GetConnector_Call { + _c.Call.Return(run) + return _c +} + +// ListConnectors provides a mock function for the type ConnectorMetadataServiceClient +func (_mock *ConnectorMetadataServiceClient) ListConnectors(ctx context.Context, in *connector.ListConnectorsRequest, opts ...grpc.CallOption) (*connector.ListConnectorsResponse, error) { + // grpc.CallOption + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _mock.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for ListConnectors") + } + + var r0 *connector.ListConnectorsResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.ListConnectorsRequest, ...grpc.CallOption) (*connector.ListConnectorsResponse, error)); ok { + return returnFunc(ctx, in, opts...) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.ListConnectorsRequest, ...grpc.CallOption) *connector.ListConnectorsResponse); ok { + r0 = returnFunc(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connector.ListConnectorsResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.ListConnectorsRequest, ...grpc.CallOption) error); ok { + r1 = returnFunc(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// ConnectorMetadataServiceClient_ListConnectors_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListConnectors' +type ConnectorMetadataServiceClient_ListConnectors_Call struct { + *mock.Call +} + +// ListConnectors is a helper method to define mock.On call +// - ctx context.Context +// - in *connector.ListConnectorsRequest +// - opts ...grpc.CallOption +func (_e *ConnectorMetadataServiceClient_Expecter) ListConnectors(ctx interface{}, in interface{}, opts ...interface{}) *ConnectorMetadataServiceClient_ListConnectors_Call { + return &ConnectorMetadataServiceClient_ListConnectors_Call{Call: _e.mock.On("ListConnectors", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *ConnectorMetadataServiceClient_ListConnectors_Call) Run(run func(ctx context.Context, in *connector.ListConnectorsRequest, opts ...grpc.CallOption)) *ConnectorMetadataServiceClient_ListConnectors_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connector.ListConnectorsRequest + if args[1] != nil { + arg1 = args[1].(*connector.ListConnectorsRequest) + } + var arg2 []grpc.CallOption + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) + }) + return _c +} + +func (_c *ConnectorMetadataServiceClient_ListConnectors_Call) Return(listConnectorsResponse *connector.ListConnectorsResponse, err error) *ConnectorMetadataServiceClient_ListConnectors_Call { + _c.Call.Return(listConnectorsResponse, err) + return _c +} + +func (_c *ConnectorMetadataServiceClient_ListConnectors_Call) RunAndReturn(run func(ctx context.Context, in *connector.ListConnectorsRequest, opts ...grpc.CallOption) (*connector.ListConnectorsResponse, error)) *ConnectorMetadataServiceClient_ListConnectors_Call { + _c.Call.Return(run) + return _c +} + +// NewConnectorMetadataServiceServer creates a new instance of ConnectorMetadataServiceServer. 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 NewConnectorMetadataServiceServer(t interface { + mock.TestingT + Cleanup(func()) +}) *ConnectorMetadataServiceServer { + mock := &ConnectorMetadataServiceServer{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// ConnectorMetadataServiceServer is an autogenerated mock type for the ConnectorMetadataServiceServer type +type ConnectorMetadataServiceServer struct { + mock.Mock +} + +type ConnectorMetadataServiceServer_Expecter struct { + mock *mock.Mock +} + +func (_m *ConnectorMetadataServiceServer) EXPECT() *ConnectorMetadataServiceServer_Expecter { + return &ConnectorMetadataServiceServer_Expecter{mock: &_m.Mock} +} + +// GetConnector provides a mock function for the type ConnectorMetadataServiceServer +func (_mock *ConnectorMetadataServiceServer) GetConnector(context1 context.Context, getConnectorRequest *connector.GetConnectorRequest) (*connector.GetConnectorResponse, error) { + ret := _mock.Called(context1, getConnectorRequest) + + if len(ret) == 0 { + panic("no return value specified for GetConnector") + } + + var r0 *connector.GetConnectorResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetConnectorRequest) (*connector.GetConnectorResponse, error)); ok { + return returnFunc(context1, getConnectorRequest) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.GetConnectorRequest) *connector.GetConnectorResponse); ok { + r0 = returnFunc(context1, getConnectorRequest) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connector.GetConnectorResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.GetConnectorRequest) error); ok { + r1 = returnFunc(context1, getConnectorRequest) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// ConnectorMetadataServiceServer_GetConnector_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConnector' +type ConnectorMetadataServiceServer_GetConnector_Call struct { + *mock.Call +} + +// GetConnector is a helper method to define mock.On call +// - context1 context.Context +// - getConnectorRequest *connector.GetConnectorRequest +func (_e *ConnectorMetadataServiceServer_Expecter) GetConnector(context1 interface{}, getConnectorRequest interface{}) *ConnectorMetadataServiceServer_GetConnector_Call { + return &ConnectorMetadataServiceServer_GetConnector_Call{Call: _e.mock.On("GetConnector", context1, getConnectorRequest)} +} + +func (_c *ConnectorMetadataServiceServer_GetConnector_Call) Run(run func(context1 context.Context, getConnectorRequest *connector.GetConnectorRequest)) *ConnectorMetadataServiceServer_GetConnector_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connector.GetConnectorRequest + if args[1] != nil { + arg1 = args[1].(*connector.GetConnectorRequest) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *ConnectorMetadataServiceServer_GetConnector_Call) Return(getConnectorResponse *connector.GetConnectorResponse, err error) *ConnectorMetadataServiceServer_GetConnector_Call { + _c.Call.Return(getConnectorResponse, err) + return _c +} + +func (_c *ConnectorMetadataServiceServer_GetConnector_Call) RunAndReturn(run func(context1 context.Context, getConnectorRequest *connector.GetConnectorRequest) (*connector.GetConnectorResponse, error)) *ConnectorMetadataServiceServer_GetConnector_Call { + _c.Call.Return(run) + return _c +} + +// ListConnectors provides a mock function for the type ConnectorMetadataServiceServer +func (_mock *ConnectorMetadataServiceServer) ListConnectors(context1 context.Context, listConnectorsRequest *connector.ListConnectorsRequest) (*connector.ListConnectorsResponse, error) { + ret := _mock.Called(context1, listConnectorsRequest) + + if len(ret) == 0 { + panic("no return value specified for ListConnectors") + } + + var r0 *connector.ListConnectorsResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.ListConnectorsRequest) (*connector.ListConnectorsResponse, error)); ok { + return returnFunc(context1, listConnectorsRequest) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connector.ListConnectorsRequest) *connector.ListConnectorsResponse); ok { + r0 = returnFunc(context1, listConnectorsRequest) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connector.ListConnectorsResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connector.ListConnectorsRequest) error); ok { + r1 = returnFunc(context1, listConnectorsRequest) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// ConnectorMetadataServiceServer_ListConnectors_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListConnectors' +type ConnectorMetadataServiceServer_ListConnectors_Call struct { + *mock.Call +} + +// ListConnectors is a helper method to define mock.On call +// - context1 context.Context +// - listConnectorsRequest *connector.ListConnectorsRequest +func (_e *ConnectorMetadataServiceServer_Expecter) ListConnectors(context1 interface{}, listConnectorsRequest interface{}) *ConnectorMetadataServiceServer_ListConnectors_Call { + return &ConnectorMetadataServiceServer_ListConnectors_Call{Call: _e.mock.On("ListConnectors", context1, listConnectorsRequest)} +} + +func (_c *ConnectorMetadataServiceServer_ListConnectors_Call) Run(run func(context1 context.Context, listConnectorsRequest *connector.ListConnectorsRequest)) *ConnectorMetadataServiceServer_ListConnectors_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connector.ListConnectorsRequest + if args[1] != nil { + arg1 = args[1].(*connector.ListConnectorsRequest) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *ConnectorMetadataServiceServer_ListConnectors_Call) Return(listConnectorsResponse *connector.ListConnectorsResponse, err error) *ConnectorMetadataServiceServer_ListConnectors_Call { + _c.Call.Return(listConnectorsResponse, err) + return _c +} + +func (_c *ConnectorMetadataServiceServer_ListConnectors_Call) RunAndReturn(run func(context1 context.Context, listConnectorsRequest *connector.ListConnectorsRequest) (*connector.ListConnectorsResponse, error)) *ConnectorMetadataServiceServer_ListConnectors_Call { + _c.Call.Return(run) + return _c +} + +// NewUnsafeConnectorMetadataServiceServer creates a new instance of UnsafeConnectorMetadataServiceServer. 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 NewUnsafeConnectorMetadataServiceServer(t interface { + mock.TestingT + Cleanup(func()) +}) *UnsafeConnectorMetadataServiceServer { + mock := &UnsafeConnectorMetadataServiceServer{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// UnsafeConnectorMetadataServiceServer is an autogenerated mock type for the UnsafeConnectorMetadataServiceServer type +type UnsafeConnectorMetadataServiceServer struct { + mock.Mock +} + +type UnsafeConnectorMetadataServiceServer_Expecter struct { + mock *mock.Mock +} + +func (_m *UnsafeConnectorMetadataServiceServer) EXPECT() *UnsafeConnectorMetadataServiceServer_Expecter { + return &UnsafeConnectorMetadataServiceServer_Expecter{mock: &_m.Mock} +} + +// mustEmbedUnimplementedConnectorMetadataServiceServer provides a mock function for the type UnsafeConnectorMetadataServiceServer +func (_mock *UnsafeConnectorMetadataServiceServer) mustEmbedUnimplementedConnectorMetadataServiceServer() { + _mock.Called() + return +} + +// UnsafeConnectorMetadataServiceServer_mustEmbedUnimplementedConnectorMetadataServiceServer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'mustEmbedUnimplementedConnectorMetadataServiceServer' +type UnsafeConnectorMetadataServiceServer_mustEmbedUnimplementedConnectorMetadataServiceServer_Call struct { + *mock.Call +} + +// mustEmbedUnimplementedConnectorMetadataServiceServer is a helper method to define mock.On call +func (_e *UnsafeConnectorMetadataServiceServer_Expecter) mustEmbedUnimplementedConnectorMetadataServiceServer() *UnsafeConnectorMetadataServiceServer_mustEmbedUnimplementedConnectorMetadataServiceServer_Call { + return &UnsafeConnectorMetadataServiceServer_mustEmbedUnimplementedConnectorMetadataServiceServer_Call{Call: _e.mock.On("mustEmbedUnimplementedConnectorMetadataServiceServer")} +} + +func (_c *UnsafeConnectorMetadataServiceServer_mustEmbedUnimplementedConnectorMetadataServiceServer_Call) Run(run func()) *UnsafeConnectorMetadataServiceServer_mustEmbedUnimplementedConnectorMetadataServiceServer_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *UnsafeConnectorMetadataServiceServer_mustEmbedUnimplementedConnectorMetadataServiceServer_Call) Return() *UnsafeConnectorMetadataServiceServer_mustEmbedUnimplementedConnectorMetadataServiceServer_Call { + _c.Call.Return() + return _c +} + +func (_c *UnsafeConnectorMetadataServiceServer_mustEmbedUnimplementedConnectorMetadataServiceServer_Call) RunAndReturn(run func()) *UnsafeConnectorMetadataServiceServer_mustEmbedUnimplementedConnectorMetadataServiceServer_Call { + _c.Run(run) + return _c +} diff --git a/gen/go/flyteidl2/workflow/workflowconnect/mocks/mocks.go b/gen/go/flyteidl2/workflow/workflowconnect/mocks/mocks.go new file mode 100644 index 0000000000..7422492823 --- /dev/null +++ b/gen/go/flyteidl2/workflow/workflowconnect/mocks/mocks.go @@ -0,0 +1,4897 @@ +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package mocks + +import ( + "context" + + "connectrpc.com/connect" + "github.com/flyteorg/flyte/v2/gen/go/flyteidl2/workflow" + mock "github.com/stretchr/testify/mock" +) + +// NewEventsProxyServiceClient creates a new instance of EventsProxyServiceClient. 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 NewEventsProxyServiceClient(t interface { + mock.TestingT + Cleanup(func()) +}) *EventsProxyServiceClient { + mock := &EventsProxyServiceClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// EventsProxyServiceClient is an autogenerated mock type for the EventsProxyServiceClient type +type EventsProxyServiceClient struct { + mock.Mock +} + +type EventsProxyServiceClient_Expecter struct { + mock *mock.Mock +} + +func (_m *EventsProxyServiceClient) EXPECT() *EventsProxyServiceClient_Expecter { + return &EventsProxyServiceClient_Expecter{mock: &_m.Mock} +} + +// Record provides a mock function for the type EventsProxyServiceClient +func (_mock *EventsProxyServiceClient) Record(context1 context.Context, request *connect.Request[workflow.RecordRequest]) (*connect.Response[workflow.RecordResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for Record") + } + + var r0 *connect.Response[workflow.RecordResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.RecordRequest]) (*connect.Response[workflow.RecordResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.RecordRequest]) *connect.Response[workflow.RecordResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.RecordResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.RecordRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// EventsProxyServiceClient_Record_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Record' +type EventsProxyServiceClient_Record_Call struct { + *mock.Call +} + +// Record is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.RecordRequest] +func (_e *EventsProxyServiceClient_Expecter) Record(context1 interface{}, request interface{}) *EventsProxyServiceClient_Record_Call { + return &EventsProxyServiceClient_Record_Call{Call: _e.mock.On("Record", context1, request)} +} + +func (_c *EventsProxyServiceClient_Record_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.RecordRequest])) *EventsProxyServiceClient_Record_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.RecordRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.RecordRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *EventsProxyServiceClient_Record_Call) Return(response *connect.Response[workflow.RecordResponse], err error) *EventsProxyServiceClient_Record_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *EventsProxyServiceClient_Record_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.RecordRequest]) (*connect.Response[workflow.RecordResponse], error)) *EventsProxyServiceClient_Record_Call { + _c.Call.Return(run) + return _c +} + +// NewEventsProxyServiceHandler creates a new instance of EventsProxyServiceHandler. 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 NewEventsProxyServiceHandler(t interface { + mock.TestingT + Cleanup(func()) +}) *EventsProxyServiceHandler { + mock := &EventsProxyServiceHandler{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// EventsProxyServiceHandler is an autogenerated mock type for the EventsProxyServiceHandler type +type EventsProxyServiceHandler struct { + mock.Mock +} + +type EventsProxyServiceHandler_Expecter struct { + mock *mock.Mock +} + +func (_m *EventsProxyServiceHandler) EXPECT() *EventsProxyServiceHandler_Expecter { + return &EventsProxyServiceHandler_Expecter{mock: &_m.Mock} +} + +// Record provides a mock function for the type EventsProxyServiceHandler +func (_mock *EventsProxyServiceHandler) Record(context1 context.Context, request *connect.Request[workflow.RecordRequest]) (*connect.Response[workflow.RecordResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for Record") + } + + var r0 *connect.Response[workflow.RecordResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.RecordRequest]) (*connect.Response[workflow.RecordResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.RecordRequest]) *connect.Response[workflow.RecordResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.RecordResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.RecordRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// EventsProxyServiceHandler_Record_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Record' +type EventsProxyServiceHandler_Record_Call struct { + *mock.Call +} + +// Record is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.RecordRequest] +func (_e *EventsProxyServiceHandler_Expecter) Record(context1 interface{}, request interface{}) *EventsProxyServiceHandler_Record_Call { + return &EventsProxyServiceHandler_Record_Call{Call: _e.mock.On("Record", context1, request)} +} + +func (_c *EventsProxyServiceHandler_Record_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.RecordRequest])) *EventsProxyServiceHandler_Record_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.RecordRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.RecordRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *EventsProxyServiceHandler_Record_Call) Return(response *connect.Response[workflow.RecordResponse], err error) *EventsProxyServiceHandler_Record_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *EventsProxyServiceHandler_Record_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.RecordRequest]) (*connect.Response[workflow.RecordResponse], error)) *EventsProxyServiceHandler_Record_Call { + _c.Call.Return(run) + return _c +} + +// NewInternalRunServiceClient creates a new instance of InternalRunServiceClient. 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 NewInternalRunServiceClient(t interface { + mock.TestingT + Cleanup(func()) +}) *InternalRunServiceClient { + mock := &InternalRunServiceClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// InternalRunServiceClient is an autogenerated mock type for the InternalRunServiceClient type +type InternalRunServiceClient struct { + mock.Mock +} + +type InternalRunServiceClient_Expecter struct { + mock *mock.Mock +} + +func (_m *InternalRunServiceClient) EXPECT() *InternalRunServiceClient_Expecter { + return &InternalRunServiceClient_Expecter{mock: &_m.Mock} +} + +// RecordAction provides a mock function for the type InternalRunServiceClient +func (_mock *InternalRunServiceClient) RecordAction(context1 context.Context, request *connect.Request[workflow.RecordActionRequest]) (*connect.Response[workflow.RecordActionResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for RecordAction") + } + + var r0 *connect.Response[workflow.RecordActionResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.RecordActionRequest]) (*connect.Response[workflow.RecordActionResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.RecordActionRequest]) *connect.Response[workflow.RecordActionResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.RecordActionResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.RecordActionRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// InternalRunServiceClient_RecordAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecordAction' +type InternalRunServiceClient_RecordAction_Call struct { + *mock.Call +} + +// RecordAction is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.RecordActionRequest] +func (_e *InternalRunServiceClient_Expecter) RecordAction(context1 interface{}, request interface{}) *InternalRunServiceClient_RecordAction_Call { + return &InternalRunServiceClient_RecordAction_Call{Call: _e.mock.On("RecordAction", context1, request)} +} + +func (_c *InternalRunServiceClient_RecordAction_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.RecordActionRequest])) *InternalRunServiceClient_RecordAction_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.RecordActionRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.RecordActionRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *InternalRunServiceClient_RecordAction_Call) Return(response *connect.Response[workflow.RecordActionResponse], err error) *InternalRunServiceClient_RecordAction_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *InternalRunServiceClient_RecordAction_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.RecordActionRequest]) (*connect.Response[workflow.RecordActionResponse], error)) *InternalRunServiceClient_RecordAction_Call { + _c.Call.Return(run) + return _c +} + +// RecordActionEventStream provides a mock function for the type InternalRunServiceClient +func (_mock *InternalRunServiceClient) RecordActionEventStream(context1 context.Context) *connect.BidiStreamForClient[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse] { + ret := _mock.Called(context1) + + if len(ret) == 0 { + panic("no return value specified for RecordActionEventStream") + } + + var r0 *connect.BidiStreamForClient[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse] + if returnFunc, ok := ret.Get(0).(func(context.Context) *connect.BidiStreamForClient[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse]); ok { + r0 = returnFunc(context1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.BidiStreamForClient[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse]) + } + } + return r0 +} + +// InternalRunServiceClient_RecordActionEventStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecordActionEventStream' +type InternalRunServiceClient_RecordActionEventStream_Call struct { + *mock.Call +} + +// RecordActionEventStream is a helper method to define mock.On call +// - context1 context.Context +func (_e *InternalRunServiceClient_Expecter) RecordActionEventStream(context1 interface{}) *InternalRunServiceClient_RecordActionEventStream_Call { + return &InternalRunServiceClient_RecordActionEventStream_Call{Call: _e.mock.On("RecordActionEventStream", context1)} +} + +func (_c *InternalRunServiceClient_RecordActionEventStream_Call) Run(run func(context1 context.Context)) *InternalRunServiceClient_RecordActionEventStream_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *InternalRunServiceClient_RecordActionEventStream_Call) Return(bidiStreamForClient *connect.BidiStreamForClient[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse]) *InternalRunServiceClient_RecordActionEventStream_Call { + _c.Call.Return(bidiStreamForClient) + return _c +} + +func (_c *InternalRunServiceClient_RecordActionEventStream_Call) RunAndReturn(run func(context1 context.Context) *connect.BidiStreamForClient[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse]) *InternalRunServiceClient_RecordActionEventStream_Call { + _c.Call.Return(run) + return _c +} + +// RecordActionEvents provides a mock function for the type InternalRunServiceClient +func (_mock *InternalRunServiceClient) RecordActionEvents(context1 context.Context, request *connect.Request[workflow.RecordActionEventsRequest]) (*connect.Response[workflow.RecordActionEventsResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for RecordActionEvents") + } + + var r0 *connect.Response[workflow.RecordActionEventsResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.RecordActionEventsRequest]) (*connect.Response[workflow.RecordActionEventsResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.RecordActionEventsRequest]) *connect.Response[workflow.RecordActionEventsResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.RecordActionEventsResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.RecordActionEventsRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// InternalRunServiceClient_RecordActionEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecordActionEvents' +type InternalRunServiceClient_RecordActionEvents_Call struct { + *mock.Call +} + +// RecordActionEvents is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.RecordActionEventsRequest] +func (_e *InternalRunServiceClient_Expecter) RecordActionEvents(context1 interface{}, request interface{}) *InternalRunServiceClient_RecordActionEvents_Call { + return &InternalRunServiceClient_RecordActionEvents_Call{Call: _e.mock.On("RecordActionEvents", context1, request)} +} + +func (_c *InternalRunServiceClient_RecordActionEvents_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.RecordActionEventsRequest])) *InternalRunServiceClient_RecordActionEvents_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.RecordActionEventsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.RecordActionEventsRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *InternalRunServiceClient_RecordActionEvents_Call) Return(response *connect.Response[workflow.RecordActionEventsResponse], err error) *InternalRunServiceClient_RecordActionEvents_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *InternalRunServiceClient_RecordActionEvents_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.RecordActionEventsRequest]) (*connect.Response[workflow.RecordActionEventsResponse], error)) *InternalRunServiceClient_RecordActionEvents_Call { + _c.Call.Return(run) + return _c +} + +// RecordActionStream provides a mock function for the type InternalRunServiceClient +func (_mock *InternalRunServiceClient) RecordActionStream(context1 context.Context) *connect.BidiStreamForClient[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse] { + ret := _mock.Called(context1) + + if len(ret) == 0 { + panic("no return value specified for RecordActionStream") + } + + var r0 *connect.BidiStreamForClient[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse] + if returnFunc, ok := ret.Get(0).(func(context.Context) *connect.BidiStreamForClient[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse]); ok { + r0 = returnFunc(context1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.BidiStreamForClient[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse]) + } + } + return r0 +} + +// InternalRunServiceClient_RecordActionStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecordActionStream' +type InternalRunServiceClient_RecordActionStream_Call struct { + *mock.Call +} + +// RecordActionStream is a helper method to define mock.On call +// - context1 context.Context +func (_e *InternalRunServiceClient_Expecter) RecordActionStream(context1 interface{}) *InternalRunServiceClient_RecordActionStream_Call { + return &InternalRunServiceClient_RecordActionStream_Call{Call: _e.mock.On("RecordActionStream", context1)} +} + +func (_c *InternalRunServiceClient_RecordActionStream_Call) Run(run func(context1 context.Context)) *InternalRunServiceClient_RecordActionStream_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *InternalRunServiceClient_RecordActionStream_Call) Return(bidiStreamForClient *connect.BidiStreamForClient[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse]) *InternalRunServiceClient_RecordActionStream_Call { + _c.Call.Return(bidiStreamForClient) + return _c +} + +func (_c *InternalRunServiceClient_RecordActionStream_Call) RunAndReturn(run func(context1 context.Context) *connect.BidiStreamForClient[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse]) *InternalRunServiceClient_RecordActionStream_Call { + _c.Call.Return(run) + return _c +} + +// UpdateActionStatus provides a mock function for the type InternalRunServiceClient +func (_mock *InternalRunServiceClient) UpdateActionStatus(context1 context.Context, request *connect.Request[workflow.UpdateActionStatusRequest]) (*connect.Response[workflow.UpdateActionStatusResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for UpdateActionStatus") + } + + var r0 *connect.Response[workflow.UpdateActionStatusResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.UpdateActionStatusRequest]) (*connect.Response[workflow.UpdateActionStatusResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.UpdateActionStatusRequest]) *connect.Response[workflow.UpdateActionStatusResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.UpdateActionStatusResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.UpdateActionStatusRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// InternalRunServiceClient_UpdateActionStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateActionStatus' +type InternalRunServiceClient_UpdateActionStatus_Call struct { + *mock.Call +} + +// UpdateActionStatus is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.UpdateActionStatusRequest] +func (_e *InternalRunServiceClient_Expecter) UpdateActionStatus(context1 interface{}, request interface{}) *InternalRunServiceClient_UpdateActionStatus_Call { + return &InternalRunServiceClient_UpdateActionStatus_Call{Call: _e.mock.On("UpdateActionStatus", context1, request)} +} + +func (_c *InternalRunServiceClient_UpdateActionStatus_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.UpdateActionStatusRequest])) *InternalRunServiceClient_UpdateActionStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.UpdateActionStatusRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.UpdateActionStatusRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *InternalRunServiceClient_UpdateActionStatus_Call) Return(response *connect.Response[workflow.UpdateActionStatusResponse], err error) *InternalRunServiceClient_UpdateActionStatus_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *InternalRunServiceClient_UpdateActionStatus_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.UpdateActionStatusRequest]) (*connect.Response[workflow.UpdateActionStatusResponse], error)) *InternalRunServiceClient_UpdateActionStatus_Call { + _c.Call.Return(run) + return _c +} + +// UpdateActionStatusStream provides a mock function for the type InternalRunServiceClient +func (_mock *InternalRunServiceClient) UpdateActionStatusStream(context1 context.Context) *connect.BidiStreamForClient[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse] { + ret := _mock.Called(context1) + + if len(ret) == 0 { + panic("no return value specified for UpdateActionStatusStream") + } + + var r0 *connect.BidiStreamForClient[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse] + if returnFunc, ok := ret.Get(0).(func(context.Context) *connect.BidiStreamForClient[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse]); ok { + r0 = returnFunc(context1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.BidiStreamForClient[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse]) + } + } + return r0 +} + +// InternalRunServiceClient_UpdateActionStatusStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateActionStatusStream' +type InternalRunServiceClient_UpdateActionStatusStream_Call struct { + *mock.Call +} + +// UpdateActionStatusStream is a helper method to define mock.On call +// - context1 context.Context +func (_e *InternalRunServiceClient_Expecter) UpdateActionStatusStream(context1 interface{}) *InternalRunServiceClient_UpdateActionStatusStream_Call { + return &InternalRunServiceClient_UpdateActionStatusStream_Call{Call: _e.mock.On("UpdateActionStatusStream", context1)} +} + +func (_c *InternalRunServiceClient_UpdateActionStatusStream_Call) Run(run func(context1 context.Context)) *InternalRunServiceClient_UpdateActionStatusStream_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *InternalRunServiceClient_UpdateActionStatusStream_Call) Return(bidiStreamForClient *connect.BidiStreamForClient[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse]) *InternalRunServiceClient_UpdateActionStatusStream_Call { + _c.Call.Return(bidiStreamForClient) + return _c +} + +func (_c *InternalRunServiceClient_UpdateActionStatusStream_Call) RunAndReturn(run func(context1 context.Context) *connect.BidiStreamForClient[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse]) *InternalRunServiceClient_UpdateActionStatusStream_Call { + _c.Call.Return(run) + return _c +} + +// NewInternalRunServiceHandler creates a new instance of InternalRunServiceHandler. 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 NewInternalRunServiceHandler(t interface { + mock.TestingT + Cleanup(func()) +}) *InternalRunServiceHandler { + mock := &InternalRunServiceHandler{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// InternalRunServiceHandler is an autogenerated mock type for the InternalRunServiceHandler type +type InternalRunServiceHandler struct { + mock.Mock +} + +type InternalRunServiceHandler_Expecter struct { + mock *mock.Mock +} + +func (_m *InternalRunServiceHandler) EXPECT() *InternalRunServiceHandler_Expecter { + return &InternalRunServiceHandler_Expecter{mock: &_m.Mock} +} + +// RecordAction provides a mock function for the type InternalRunServiceHandler +func (_mock *InternalRunServiceHandler) RecordAction(context1 context.Context, request *connect.Request[workflow.RecordActionRequest]) (*connect.Response[workflow.RecordActionResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for RecordAction") + } + + var r0 *connect.Response[workflow.RecordActionResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.RecordActionRequest]) (*connect.Response[workflow.RecordActionResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.RecordActionRequest]) *connect.Response[workflow.RecordActionResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.RecordActionResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.RecordActionRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// InternalRunServiceHandler_RecordAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecordAction' +type InternalRunServiceHandler_RecordAction_Call struct { + *mock.Call +} + +// RecordAction is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.RecordActionRequest] +func (_e *InternalRunServiceHandler_Expecter) RecordAction(context1 interface{}, request interface{}) *InternalRunServiceHandler_RecordAction_Call { + return &InternalRunServiceHandler_RecordAction_Call{Call: _e.mock.On("RecordAction", context1, request)} +} + +func (_c *InternalRunServiceHandler_RecordAction_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.RecordActionRequest])) *InternalRunServiceHandler_RecordAction_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.RecordActionRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.RecordActionRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *InternalRunServiceHandler_RecordAction_Call) Return(response *connect.Response[workflow.RecordActionResponse], err error) *InternalRunServiceHandler_RecordAction_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *InternalRunServiceHandler_RecordAction_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.RecordActionRequest]) (*connect.Response[workflow.RecordActionResponse], error)) *InternalRunServiceHandler_RecordAction_Call { + _c.Call.Return(run) + return _c +} + +// RecordActionEventStream provides a mock function for the type InternalRunServiceHandler +func (_mock *InternalRunServiceHandler) RecordActionEventStream(context1 context.Context, bidiStream *connect.BidiStream[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse]) error { + ret := _mock.Called(context1, bidiStream) + + if len(ret) == 0 { + panic("no return value specified for RecordActionEventStream") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.BidiStream[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse]) error); ok { + r0 = returnFunc(context1, bidiStream) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// InternalRunServiceHandler_RecordActionEventStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecordActionEventStream' +type InternalRunServiceHandler_RecordActionEventStream_Call struct { + *mock.Call +} + +// RecordActionEventStream is a helper method to define mock.On call +// - context1 context.Context +// - bidiStream *connect.BidiStream[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse] +func (_e *InternalRunServiceHandler_Expecter) RecordActionEventStream(context1 interface{}, bidiStream interface{}) *InternalRunServiceHandler_RecordActionEventStream_Call { + return &InternalRunServiceHandler_RecordActionEventStream_Call{Call: _e.mock.On("RecordActionEventStream", context1, bidiStream)} +} + +func (_c *InternalRunServiceHandler_RecordActionEventStream_Call) Run(run func(context1 context.Context, bidiStream *connect.BidiStream[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse])) *InternalRunServiceHandler_RecordActionEventStream_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.BidiStream[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse] + if args[1] != nil { + arg1 = args[1].(*connect.BidiStream[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *InternalRunServiceHandler_RecordActionEventStream_Call) Return(err error) *InternalRunServiceHandler_RecordActionEventStream_Call { + _c.Call.Return(err) + return _c +} + +func (_c *InternalRunServiceHandler_RecordActionEventStream_Call) RunAndReturn(run func(context1 context.Context, bidiStream *connect.BidiStream[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse]) error) *InternalRunServiceHandler_RecordActionEventStream_Call { + _c.Call.Return(run) + return _c +} + +// RecordActionEvents provides a mock function for the type InternalRunServiceHandler +func (_mock *InternalRunServiceHandler) RecordActionEvents(context1 context.Context, request *connect.Request[workflow.RecordActionEventsRequest]) (*connect.Response[workflow.RecordActionEventsResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for RecordActionEvents") + } + + var r0 *connect.Response[workflow.RecordActionEventsResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.RecordActionEventsRequest]) (*connect.Response[workflow.RecordActionEventsResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.RecordActionEventsRequest]) *connect.Response[workflow.RecordActionEventsResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.RecordActionEventsResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.RecordActionEventsRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// InternalRunServiceHandler_RecordActionEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecordActionEvents' +type InternalRunServiceHandler_RecordActionEvents_Call struct { + *mock.Call +} + +// RecordActionEvents is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.RecordActionEventsRequest] +func (_e *InternalRunServiceHandler_Expecter) RecordActionEvents(context1 interface{}, request interface{}) *InternalRunServiceHandler_RecordActionEvents_Call { + return &InternalRunServiceHandler_RecordActionEvents_Call{Call: _e.mock.On("RecordActionEvents", context1, request)} +} + +func (_c *InternalRunServiceHandler_RecordActionEvents_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.RecordActionEventsRequest])) *InternalRunServiceHandler_RecordActionEvents_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.RecordActionEventsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.RecordActionEventsRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *InternalRunServiceHandler_RecordActionEvents_Call) Return(response *connect.Response[workflow.RecordActionEventsResponse], err error) *InternalRunServiceHandler_RecordActionEvents_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *InternalRunServiceHandler_RecordActionEvents_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.RecordActionEventsRequest]) (*connect.Response[workflow.RecordActionEventsResponse], error)) *InternalRunServiceHandler_RecordActionEvents_Call { + _c.Call.Return(run) + return _c +} + +// RecordActionStream provides a mock function for the type InternalRunServiceHandler +func (_mock *InternalRunServiceHandler) RecordActionStream(context1 context.Context, bidiStream *connect.BidiStream[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse]) error { + ret := _mock.Called(context1, bidiStream) + + if len(ret) == 0 { + panic("no return value specified for RecordActionStream") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.BidiStream[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse]) error); ok { + r0 = returnFunc(context1, bidiStream) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// InternalRunServiceHandler_RecordActionStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecordActionStream' +type InternalRunServiceHandler_RecordActionStream_Call struct { + *mock.Call +} + +// RecordActionStream is a helper method to define mock.On call +// - context1 context.Context +// - bidiStream *connect.BidiStream[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse] +func (_e *InternalRunServiceHandler_Expecter) RecordActionStream(context1 interface{}, bidiStream interface{}) *InternalRunServiceHandler_RecordActionStream_Call { + return &InternalRunServiceHandler_RecordActionStream_Call{Call: _e.mock.On("RecordActionStream", context1, bidiStream)} +} + +func (_c *InternalRunServiceHandler_RecordActionStream_Call) Run(run func(context1 context.Context, bidiStream *connect.BidiStream[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse])) *InternalRunServiceHandler_RecordActionStream_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.BidiStream[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse] + if args[1] != nil { + arg1 = args[1].(*connect.BidiStream[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *InternalRunServiceHandler_RecordActionStream_Call) Return(err error) *InternalRunServiceHandler_RecordActionStream_Call { + _c.Call.Return(err) + return _c +} + +func (_c *InternalRunServiceHandler_RecordActionStream_Call) RunAndReturn(run func(context1 context.Context, bidiStream *connect.BidiStream[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse]) error) *InternalRunServiceHandler_RecordActionStream_Call { + _c.Call.Return(run) + return _c +} + +// UpdateActionStatus provides a mock function for the type InternalRunServiceHandler +func (_mock *InternalRunServiceHandler) UpdateActionStatus(context1 context.Context, request *connect.Request[workflow.UpdateActionStatusRequest]) (*connect.Response[workflow.UpdateActionStatusResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for UpdateActionStatus") + } + + var r0 *connect.Response[workflow.UpdateActionStatusResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.UpdateActionStatusRequest]) (*connect.Response[workflow.UpdateActionStatusResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.UpdateActionStatusRequest]) *connect.Response[workflow.UpdateActionStatusResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.UpdateActionStatusResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.UpdateActionStatusRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// InternalRunServiceHandler_UpdateActionStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateActionStatus' +type InternalRunServiceHandler_UpdateActionStatus_Call struct { + *mock.Call +} + +// UpdateActionStatus is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.UpdateActionStatusRequest] +func (_e *InternalRunServiceHandler_Expecter) UpdateActionStatus(context1 interface{}, request interface{}) *InternalRunServiceHandler_UpdateActionStatus_Call { + return &InternalRunServiceHandler_UpdateActionStatus_Call{Call: _e.mock.On("UpdateActionStatus", context1, request)} +} + +func (_c *InternalRunServiceHandler_UpdateActionStatus_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.UpdateActionStatusRequest])) *InternalRunServiceHandler_UpdateActionStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.UpdateActionStatusRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.UpdateActionStatusRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *InternalRunServiceHandler_UpdateActionStatus_Call) Return(response *connect.Response[workflow.UpdateActionStatusResponse], err error) *InternalRunServiceHandler_UpdateActionStatus_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *InternalRunServiceHandler_UpdateActionStatus_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.UpdateActionStatusRequest]) (*connect.Response[workflow.UpdateActionStatusResponse], error)) *InternalRunServiceHandler_UpdateActionStatus_Call { + _c.Call.Return(run) + return _c +} + +// UpdateActionStatusStream provides a mock function for the type InternalRunServiceHandler +func (_mock *InternalRunServiceHandler) UpdateActionStatusStream(context1 context.Context, bidiStream *connect.BidiStream[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse]) error { + ret := _mock.Called(context1, bidiStream) + + if len(ret) == 0 { + panic("no return value specified for UpdateActionStatusStream") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.BidiStream[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse]) error); ok { + r0 = returnFunc(context1, bidiStream) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// InternalRunServiceHandler_UpdateActionStatusStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateActionStatusStream' +type InternalRunServiceHandler_UpdateActionStatusStream_Call struct { + *mock.Call +} + +// UpdateActionStatusStream is a helper method to define mock.On call +// - context1 context.Context +// - bidiStream *connect.BidiStream[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse] +func (_e *InternalRunServiceHandler_Expecter) UpdateActionStatusStream(context1 interface{}, bidiStream interface{}) *InternalRunServiceHandler_UpdateActionStatusStream_Call { + return &InternalRunServiceHandler_UpdateActionStatusStream_Call{Call: _e.mock.On("UpdateActionStatusStream", context1, bidiStream)} +} + +func (_c *InternalRunServiceHandler_UpdateActionStatusStream_Call) Run(run func(context1 context.Context, bidiStream *connect.BidiStream[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse])) *InternalRunServiceHandler_UpdateActionStatusStream_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.BidiStream[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse] + if args[1] != nil { + arg1 = args[1].(*connect.BidiStream[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *InternalRunServiceHandler_UpdateActionStatusStream_Call) Return(err error) *InternalRunServiceHandler_UpdateActionStatusStream_Call { + _c.Call.Return(err) + return _c +} + +func (_c *InternalRunServiceHandler_UpdateActionStatusStream_Call) RunAndReturn(run func(context1 context.Context, bidiStream *connect.BidiStream[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse]) error) *InternalRunServiceHandler_UpdateActionStatusStream_Call { + _c.Call.Return(run) + return _c +} + +// NewQueueServiceClient creates a new instance of QueueServiceClient. 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 NewQueueServiceClient(t interface { + mock.TestingT + Cleanup(func()) +}) *QueueServiceClient { + mock := &QueueServiceClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// QueueServiceClient is an autogenerated mock type for the QueueServiceClient type +type QueueServiceClient struct { + mock.Mock +} + +type QueueServiceClient_Expecter struct { + mock *mock.Mock +} + +func (_m *QueueServiceClient) EXPECT() *QueueServiceClient_Expecter { + return &QueueServiceClient_Expecter{mock: &_m.Mock} +} + +// AbortQueuedAction provides a mock function for the type QueueServiceClient +func (_mock *QueueServiceClient) AbortQueuedAction(context1 context.Context, request *connect.Request[workflow.AbortQueuedActionRequest]) (*connect.Response[workflow.AbortQueuedActionResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for AbortQueuedAction") + } + + var r0 *connect.Response[workflow.AbortQueuedActionResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortQueuedActionRequest]) (*connect.Response[workflow.AbortQueuedActionResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortQueuedActionRequest]) *connect.Response[workflow.AbortQueuedActionResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.AbortQueuedActionResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.AbortQueuedActionRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// QueueServiceClient_AbortQueuedAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortQueuedAction' +type QueueServiceClient_AbortQueuedAction_Call struct { + *mock.Call +} + +// AbortQueuedAction is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.AbortQueuedActionRequest] +func (_e *QueueServiceClient_Expecter) AbortQueuedAction(context1 interface{}, request interface{}) *QueueServiceClient_AbortQueuedAction_Call { + return &QueueServiceClient_AbortQueuedAction_Call{Call: _e.mock.On("AbortQueuedAction", context1, request)} +} + +func (_c *QueueServiceClient_AbortQueuedAction_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.AbortQueuedActionRequest])) *QueueServiceClient_AbortQueuedAction_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.AbortQueuedActionRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.AbortQueuedActionRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *QueueServiceClient_AbortQueuedAction_Call) Return(response *connect.Response[workflow.AbortQueuedActionResponse], err error) *QueueServiceClient_AbortQueuedAction_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *QueueServiceClient_AbortQueuedAction_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.AbortQueuedActionRequest]) (*connect.Response[workflow.AbortQueuedActionResponse], error)) *QueueServiceClient_AbortQueuedAction_Call { + _c.Call.Return(run) + return _c +} + +// AbortQueuedRun provides a mock function for the type QueueServiceClient +func (_mock *QueueServiceClient) AbortQueuedRun(context1 context.Context, request *connect.Request[workflow.AbortQueuedRunRequest]) (*connect.Response[workflow.AbortQueuedRunResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for AbortQueuedRun") + } + + var r0 *connect.Response[workflow.AbortQueuedRunResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortQueuedRunRequest]) (*connect.Response[workflow.AbortQueuedRunResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortQueuedRunRequest]) *connect.Response[workflow.AbortQueuedRunResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.AbortQueuedRunResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.AbortQueuedRunRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// QueueServiceClient_AbortQueuedRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortQueuedRun' +type QueueServiceClient_AbortQueuedRun_Call struct { + *mock.Call +} + +// AbortQueuedRun is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.AbortQueuedRunRequest] +func (_e *QueueServiceClient_Expecter) AbortQueuedRun(context1 interface{}, request interface{}) *QueueServiceClient_AbortQueuedRun_Call { + return &QueueServiceClient_AbortQueuedRun_Call{Call: _e.mock.On("AbortQueuedRun", context1, request)} +} + +func (_c *QueueServiceClient_AbortQueuedRun_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.AbortQueuedRunRequest])) *QueueServiceClient_AbortQueuedRun_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.AbortQueuedRunRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.AbortQueuedRunRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *QueueServiceClient_AbortQueuedRun_Call) Return(response *connect.Response[workflow.AbortQueuedRunResponse], err error) *QueueServiceClient_AbortQueuedRun_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *QueueServiceClient_AbortQueuedRun_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.AbortQueuedRunRequest]) (*connect.Response[workflow.AbortQueuedRunResponse], error)) *QueueServiceClient_AbortQueuedRun_Call { + _c.Call.Return(run) + return _c +} + +// EnqueueAction provides a mock function for the type QueueServiceClient +func (_mock *QueueServiceClient) EnqueueAction(context1 context.Context, request *connect.Request[workflow.EnqueueActionRequest]) (*connect.Response[workflow.EnqueueActionResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for EnqueueAction") + } + + var r0 *connect.Response[workflow.EnqueueActionResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.EnqueueActionRequest]) (*connect.Response[workflow.EnqueueActionResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.EnqueueActionRequest]) *connect.Response[workflow.EnqueueActionResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.EnqueueActionResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.EnqueueActionRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// QueueServiceClient_EnqueueAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnqueueAction' +type QueueServiceClient_EnqueueAction_Call struct { + *mock.Call +} + +// EnqueueAction is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.EnqueueActionRequest] +func (_e *QueueServiceClient_Expecter) EnqueueAction(context1 interface{}, request interface{}) *QueueServiceClient_EnqueueAction_Call { + return &QueueServiceClient_EnqueueAction_Call{Call: _e.mock.On("EnqueueAction", context1, request)} +} + +func (_c *QueueServiceClient_EnqueueAction_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.EnqueueActionRequest])) *QueueServiceClient_EnqueueAction_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.EnqueueActionRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.EnqueueActionRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *QueueServiceClient_EnqueueAction_Call) Return(response *connect.Response[workflow.EnqueueActionResponse], err error) *QueueServiceClient_EnqueueAction_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *QueueServiceClient_EnqueueAction_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.EnqueueActionRequest]) (*connect.Response[workflow.EnqueueActionResponse], error)) *QueueServiceClient_EnqueueAction_Call { + _c.Call.Return(run) + return _c +} + +// NewQueueServiceHandler creates a new instance of QueueServiceHandler. 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 NewQueueServiceHandler(t interface { + mock.TestingT + Cleanup(func()) +}) *QueueServiceHandler { + mock := &QueueServiceHandler{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// QueueServiceHandler is an autogenerated mock type for the QueueServiceHandler type +type QueueServiceHandler struct { + mock.Mock +} + +type QueueServiceHandler_Expecter struct { + mock *mock.Mock +} + +func (_m *QueueServiceHandler) EXPECT() *QueueServiceHandler_Expecter { + return &QueueServiceHandler_Expecter{mock: &_m.Mock} +} + +// AbortQueuedAction provides a mock function for the type QueueServiceHandler +func (_mock *QueueServiceHandler) AbortQueuedAction(context1 context.Context, request *connect.Request[workflow.AbortQueuedActionRequest]) (*connect.Response[workflow.AbortQueuedActionResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for AbortQueuedAction") + } + + var r0 *connect.Response[workflow.AbortQueuedActionResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortQueuedActionRequest]) (*connect.Response[workflow.AbortQueuedActionResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortQueuedActionRequest]) *connect.Response[workflow.AbortQueuedActionResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.AbortQueuedActionResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.AbortQueuedActionRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// QueueServiceHandler_AbortQueuedAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortQueuedAction' +type QueueServiceHandler_AbortQueuedAction_Call struct { + *mock.Call +} + +// AbortQueuedAction is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.AbortQueuedActionRequest] +func (_e *QueueServiceHandler_Expecter) AbortQueuedAction(context1 interface{}, request interface{}) *QueueServiceHandler_AbortQueuedAction_Call { + return &QueueServiceHandler_AbortQueuedAction_Call{Call: _e.mock.On("AbortQueuedAction", context1, request)} +} + +func (_c *QueueServiceHandler_AbortQueuedAction_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.AbortQueuedActionRequest])) *QueueServiceHandler_AbortQueuedAction_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.AbortQueuedActionRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.AbortQueuedActionRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *QueueServiceHandler_AbortQueuedAction_Call) Return(response *connect.Response[workflow.AbortQueuedActionResponse], err error) *QueueServiceHandler_AbortQueuedAction_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *QueueServiceHandler_AbortQueuedAction_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.AbortQueuedActionRequest]) (*connect.Response[workflow.AbortQueuedActionResponse], error)) *QueueServiceHandler_AbortQueuedAction_Call { + _c.Call.Return(run) + return _c +} + +// AbortQueuedRun provides a mock function for the type QueueServiceHandler +func (_mock *QueueServiceHandler) AbortQueuedRun(context1 context.Context, request *connect.Request[workflow.AbortQueuedRunRequest]) (*connect.Response[workflow.AbortQueuedRunResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for AbortQueuedRun") + } + + var r0 *connect.Response[workflow.AbortQueuedRunResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortQueuedRunRequest]) (*connect.Response[workflow.AbortQueuedRunResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortQueuedRunRequest]) *connect.Response[workflow.AbortQueuedRunResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.AbortQueuedRunResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.AbortQueuedRunRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// QueueServiceHandler_AbortQueuedRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortQueuedRun' +type QueueServiceHandler_AbortQueuedRun_Call struct { + *mock.Call +} + +// AbortQueuedRun is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.AbortQueuedRunRequest] +func (_e *QueueServiceHandler_Expecter) AbortQueuedRun(context1 interface{}, request interface{}) *QueueServiceHandler_AbortQueuedRun_Call { + return &QueueServiceHandler_AbortQueuedRun_Call{Call: _e.mock.On("AbortQueuedRun", context1, request)} +} + +func (_c *QueueServiceHandler_AbortQueuedRun_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.AbortQueuedRunRequest])) *QueueServiceHandler_AbortQueuedRun_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.AbortQueuedRunRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.AbortQueuedRunRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *QueueServiceHandler_AbortQueuedRun_Call) Return(response *connect.Response[workflow.AbortQueuedRunResponse], err error) *QueueServiceHandler_AbortQueuedRun_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *QueueServiceHandler_AbortQueuedRun_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.AbortQueuedRunRequest]) (*connect.Response[workflow.AbortQueuedRunResponse], error)) *QueueServiceHandler_AbortQueuedRun_Call { + _c.Call.Return(run) + return _c +} + +// EnqueueAction provides a mock function for the type QueueServiceHandler +func (_mock *QueueServiceHandler) EnqueueAction(context1 context.Context, request *connect.Request[workflow.EnqueueActionRequest]) (*connect.Response[workflow.EnqueueActionResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for EnqueueAction") + } + + var r0 *connect.Response[workflow.EnqueueActionResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.EnqueueActionRequest]) (*connect.Response[workflow.EnqueueActionResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.EnqueueActionRequest]) *connect.Response[workflow.EnqueueActionResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.EnqueueActionResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.EnqueueActionRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// QueueServiceHandler_EnqueueAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnqueueAction' +type QueueServiceHandler_EnqueueAction_Call struct { + *mock.Call +} + +// EnqueueAction is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.EnqueueActionRequest] +func (_e *QueueServiceHandler_Expecter) EnqueueAction(context1 interface{}, request interface{}) *QueueServiceHandler_EnqueueAction_Call { + return &QueueServiceHandler_EnqueueAction_Call{Call: _e.mock.On("EnqueueAction", context1, request)} +} + +func (_c *QueueServiceHandler_EnqueueAction_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.EnqueueActionRequest])) *QueueServiceHandler_EnqueueAction_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.EnqueueActionRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.EnqueueActionRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *QueueServiceHandler_EnqueueAction_Call) Return(response *connect.Response[workflow.EnqueueActionResponse], err error) *QueueServiceHandler_EnqueueAction_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *QueueServiceHandler_EnqueueAction_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.EnqueueActionRequest]) (*connect.Response[workflow.EnqueueActionResponse], error)) *QueueServiceHandler_EnqueueAction_Call { + _c.Call.Return(run) + return _c +} + +// NewRunLogsServiceClient creates a new instance of RunLogsServiceClient. 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 NewRunLogsServiceClient(t interface { + mock.TestingT + Cleanup(func()) +}) *RunLogsServiceClient { + mock := &RunLogsServiceClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// RunLogsServiceClient is an autogenerated mock type for the RunLogsServiceClient type +type RunLogsServiceClient struct { + mock.Mock +} + +type RunLogsServiceClient_Expecter struct { + mock *mock.Mock +} + +func (_m *RunLogsServiceClient) EXPECT() *RunLogsServiceClient_Expecter { + return &RunLogsServiceClient_Expecter{mock: &_m.Mock} +} + +// TailLogs provides a mock function for the type RunLogsServiceClient +func (_mock *RunLogsServiceClient) TailLogs(context1 context.Context, request *connect.Request[workflow.TailLogsRequest]) (*connect.ServerStreamForClient[workflow.TailLogsResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for TailLogs") + } + + var r0 *connect.ServerStreamForClient[workflow.TailLogsResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.TailLogsRequest]) (*connect.ServerStreamForClient[workflow.TailLogsResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.TailLogsRequest]) *connect.ServerStreamForClient[workflow.TailLogsResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.ServerStreamForClient[workflow.TailLogsResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.TailLogsRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunLogsServiceClient_TailLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TailLogs' +type RunLogsServiceClient_TailLogs_Call struct { + *mock.Call +} + +// TailLogs is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.TailLogsRequest] +func (_e *RunLogsServiceClient_Expecter) TailLogs(context1 interface{}, request interface{}) *RunLogsServiceClient_TailLogs_Call { + return &RunLogsServiceClient_TailLogs_Call{Call: _e.mock.On("TailLogs", context1, request)} +} + +func (_c *RunLogsServiceClient_TailLogs_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.TailLogsRequest])) *RunLogsServiceClient_TailLogs_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.TailLogsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.TailLogsRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunLogsServiceClient_TailLogs_Call) Return(serverStreamForClient *connect.ServerStreamForClient[workflow.TailLogsResponse], err error) *RunLogsServiceClient_TailLogs_Call { + _c.Call.Return(serverStreamForClient, err) + return _c +} + +func (_c *RunLogsServiceClient_TailLogs_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.TailLogsRequest]) (*connect.ServerStreamForClient[workflow.TailLogsResponse], error)) *RunLogsServiceClient_TailLogs_Call { + _c.Call.Return(run) + return _c +} + +// NewRunLogsServiceHandler creates a new instance of RunLogsServiceHandler. 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 NewRunLogsServiceHandler(t interface { + mock.TestingT + Cleanup(func()) +}) *RunLogsServiceHandler { + mock := &RunLogsServiceHandler{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// RunLogsServiceHandler is an autogenerated mock type for the RunLogsServiceHandler type +type RunLogsServiceHandler struct { + mock.Mock +} + +type RunLogsServiceHandler_Expecter struct { + mock *mock.Mock +} + +func (_m *RunLogsServiceHandler) EXPECT() *RunLogsServiceHandler_Expecter { + return &RunLogsServiceHandler_Expecter{mock: &_m.Mock} +} + +// TailLogs provides a mock function for the type RunLogsServiceHandler +func (_mock *RunLogsServiceHandler) TailLogs(context1 context.Context, request *connect.Request[workflow.TailLogsRequest], serverStream *connect.ServerStream[workflow.TailLogsResponse]) error { + ret := _mock.Called(context1, request, serverStream) + + if len(ret) == 0 { + panic("no return value specified for TailLogs") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.TailLogsRequest], *connect.ServerStream[workflow.TailLogsResponse]) error); ok { + r0 = returnFunc(context1, request, serverStream) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// RunLogsServiceHandler_TailLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TailLogs' +type RunLogsServiceHandler_TailLogs_Call struct { + *mock.Call +} + +// TailLogs is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.TailLogsRequest] +// - serverStream *connect.ServerStream[workflow.TailLogsResponse] +func (_e *RunLogsServiceHandler_Expecter) TailLogs(context1 interface{}, request interface{}, serverStream interface{}) *RunLogsServiceHandler_TailLogs_Call { + return &RunLogsServiceHandler_TailLogs_Call{Call: _e.mock.On("TailLogs", context1, request, serverStream)} +} + +func (_c *RunLogsServiceHandler_TailLogs_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.TailLogsRequest], serverStream *connect.ServerStream[workflow.TailLogsResponse])) *RunLogsServiceHandler_TailLogs_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.TailLogsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.TailLogsRequest]) + } + var arg2 *connect.ServerStream[workflow.TailLogsResponse] + if args[2] != nil { + arg2 = args[2].(*connect.ServerStream[workflow.TailLogsResponse]) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *RunLogsServiceHandler_TailLogs_Call) Return(err error) *RunLogsServiceHandler_TailLogs_Call { + _c.Call.Return(err) + return _c +} + +func (_c *RunLogsServiceHandler_TailLogs_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.TailLogsRequest], serverStream *connect.ServerStream[workflow.TailLogsResponse]) error) *RunLogsServiceHandler_TailLogs_Call { + _c.Call.Return(run) + return _c +} + +// NewRunServiceClient creates a new instance of RunServiceClient. 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 NewRunServiceClient(t interface { + mock.TestingT + Cleanup(func()) +}) *RunServiceClient { + mock := &RunServiceClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// RunServiceClient is an autogenerated mock type for the RunServiceClient type +type RunServiceClient struct { + mock.Mock +} + +type RunServiceClient_Expecter struct { + mock *mock.Mock +} + +func (_m *RunServiceClient) EXPECT() *RunServiceClient_Expecter { + return &RunServiceClient_Expecter{mock: &_m.Mock} +} + +// AbortAction provides a mock function for the type RunServiceClient +func (_mock *RunServiceClient) AbortAction(context1 context.Context, request *connect.Request[workflow.AbortActionRequest]) (*connect.Response[workflow.AbortActionResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for AbortAction") + } + + var r0 *connect.Response[workflow.AbortActionResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortActionRequest]) (*connect.Response[workflow.AbortActionResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortActionRequest]) *connect.Response[workflow.AbortActionResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.AbortActionResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.AbortActionRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceClient_AbortAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortAction' +type RunServiceClient_AbortAction_Call struct { + *mock.Call +} + +// AbortAction is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.AbortActionRequest] +func (_e *RunServiceClient_Expecter) AbortAction(context1 interface{}, request interface{}) *RunServiceClient_AbortAction_Call { + return &RunServiceClient_AbortAction_Call{Call: _e.mock.On("AbortAction", context1, request)} +} + +func (_c *RunServiceClient_AbortAction_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.AbortActionRequest])) *RunServiceClient_AbortAction_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.AbortActionRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.AbortActionRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceClient_AbortAction_Call) Return(response *connect.Response[workflow.AbortActionResponse], err error) *RunServiceClient_AbortAction_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *RunServiceClient_AbortAction_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.AbortActionRequest]) (*connect.Response[workflow.AbortActionResponse], error)) *RunServiceClient_AbortAction_Call { + _c.Call.Return(run) + return _c +} + +// AbortRun provides a mock function for the type RunServiceClient +func (_mock *RunServiceClient) AbortRun(context1 context.Context, request *connect.Request[workflow.AbortRunRequest]) (*connect.Response[workflow.AbortRunResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for AbortRun") + } + + var r0 *connect.Response[workflow.AbortRunResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortRunRequest]) (*connect.Response[workflow.AbortRunResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortRunRequest]) *connect.Response[workflow.AbortRunResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.AbortRunResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.AbortRunRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceClient_AbortRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortRun' +type RunServiceClient_AbortRun_Call struct { + *mock.Call +} + +// AbortRun is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.AbortRunRequest] +func (_e *RunServiceClient_Expecter) AbortRun(context1 interface{}, request interface{}) *RunServiceClient_AbortRun_Call { + return &RunServiceClient_AbortRun_Call{Call: _e.mock.On("AbortRun", context1, request)} +} + +func (_c *RunServiceClient_AbortRun_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.AbortRunRequest])) *RunServiceClient_AbortRun_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.AbortRunRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.AbortRunRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceClient_AbortRun_Call) Return(response *connect.Response[workflow.AbortRunResponse], err error) *RunServiceClient_AbortRun_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *RunServiceClient_AbortRun_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.AbortRunRequest]) (*connect.Response[workflow.AbortRunResponse], error)) *RunServiceClient_AbortRun_Call { + _c.Call.Return(run) + return _c +} + +// CreateRun provides a mock function for the type RunServiceClient +func (_mock *RunServiceClient) CreateRun(context1 context.Context, request *connect.Request[workflow.CreateRunRequest]) (*connect.Response[workflow.CreateRunResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for CreateRun") + } + + var r0 *connect.Response[workflow.CreateRunResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.CreateRunRequest]) (*connect.Response[workflow.CreateRunResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.CreateRunRequest]) *connect.Response[workflow.CreateRunResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.CreateRunResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.CreateRunRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceClient_CreateRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRun' +type RunServiceClient_CreateRun_Call struct { + *mock.Call +} + +// CreateRun is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.CreateRunRequest] +func (_e *RunServiceClient_Expecter) CreateRun(context1 interface{}, request interface{}) *RunServiceClient_CreateRun_Call { + return &RunServiceClient_CreateRun_Call{Call: _e.mock.On("CreateRun", context1, request)} +} + +func (_c *RunServiceClient_CreateRun_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.CreateRunRequest])) *RunServiceClient_CreateRun_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.CreateRunRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.CreateRunRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceClient_CreateRun_Call) Return(response *connect.Response[workflow.CreateRunResponse], err error) *RunServiceClient_CreateRun_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *RunServiceClient_CreateRun_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.CreateRunRequest]) (*connect.Response[workflow.CreateRunResponse], error)) *RunServiceClient_CreateRun_Call { + _c.Call.Return(run) + return _c +} + +// GetActionData provides a mock function for the type RunServiceClient +func (_mock *RunServiceClient) GetActionData(context1 context.Context, request *connect.Request[workflow.GetActionDataRequest]) (*connect.Response[workflow.GetActionDataResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for GetActionData") + } + + var r0 *connect.Response[workflow.GetActionDataResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionDataRequest]) (*connect.Response[workflow.GetActionDataResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionDataRequest]) *connect.Response[workflow.GetActionDataResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.GetActionDataResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.GetActionDataRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceClient_GetActionData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActionData' +type RunServiceClient_GetActionData_Call struct { + *mock.Call +} + +// GetActionData is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.GetActionDataRequest] +func (_e *RunServiceClient_Expecter) GetActionData(context1 interface{}, request interface{}) *RunServiceClient_GetActionData_Call { + return &RunServiceClient_GetActionData_Call{Call: _e.mock.On("GetActionData", context1, request)} +} + +func (_c *RunServiceClient_GetActionData_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.GetActionDataRequest])) *RunServiceClient_GetActionData_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.GetActionDataRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.GetActionDataRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceClient_GetActionData_Call) Return(response *connect.Response[workflow.GetActionDataResponse], err error) *RunServiceClient_GetActionData_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *RunServiceClient_GetActionData_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.GetActionDataRequest]) (*connect.Response[workflow.GetActionDataResponse], error)) *RunServiceClient_GetActionData_Call { + _c.Call.Return(run) + return _c +} + +// GetActionDataURIs provides a mock function for the type RunServiceClient +func (_mock *RunServiceClient) GetActionDataURIs(context1 context.Context, request *connect.Request[workflow.GetActionDataURIsRequest]) (*connect.Response[workflow.GetActionDataURIsResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for GetActionDataURIs") + } + + var r0 *connect.Response[workflow.GetActionDataURIsResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionDataURIsRequest]) (*connect.Response[workflow.GetActionDataURIsResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionDataURIsRequest]) *connect.Response[workflow.GetActionDataURIsResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.GetActionDataURIsResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.GetActionDataURIsRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceClient_GetActionDataURIs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActionDataURIs' +type RunServiceClient_GetActionDataURIs_Call struct { + *mock.Call +} + +// GetActionDataURIs is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.GetActionDataURIsRequest] +func (_e *RunServiceClient_Expecter) GetActionDataURIs(context1 interface{}, request interface{}) *RunServiceClient_GetActionDataURIs_Call { + return &RunServiceClient_GetActionDataURIs_Call{Call: _e.mock.On("GetActionDataURIs", context1, request)} +} + +func (_c *RunServiceClient_GetActionDataURIs_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.GetActionDataURIsRequest])) *RunServiceClient_GetActionDataURIs_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.GetActionDataURIsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.GetActionDataURIsRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceClient_GetActionDataURIs_Call) Return(response *connect.Response[workflow.GetActionDataURIsResponse], err error) *RunServiceClient_GetActionDataURIs_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *RunServiceClient_GetActionDataURIs_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.GetActionDataURIsRequest]) (*connect.Response[workflow.GetActionDataURIsResponse], error)) *RunServiceClient_GetActionDataURIs_Call { + _c.Call.Return(run) + return _c +} + +// GetActionDetails provides a mock function for the type RunServiceClient +func (_mock *RunServiceClient) GetActionDetails(context1 context.Context, request *connect.Request[workflow.GetActionDetailsRequest]) (*connect.Response[workflow.GetActionDetailsResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for GetActionDetails") + } + + var r0 *connect.Response[workflow.GetActionDetailsResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionDetailsRequest]) (*connect.Response[workflow.GetActionDetailsResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionDetailsRequest]) *connect.Response[workflow.GetActionDetailsResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.GetActionDetailsResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.GetActionDetailsRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceClient_GetActionDetails_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActionDetails' +type RunServiceClient_GetActionDetails_Call struct { + *mock.Call +} + +// GetActionDetails is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.GetActionDetailsRequest] +func (_e *RunServiceClient_Expecter) GetActionDetails(context1 interface{}, request interface{}) *RunServiceClient_GetActionDetails_Call { + return &RunServiceClient_GetActionDetails_Call{Call: _e.mock.On("GetActionDetails", context1, request)} +} + +func (_c *RunServiceClient_GetActionDetails_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.GetActionDetailsRequest])) *RunServiceClient_GetActionDetails_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.GetActionDetailsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.GetActionDetailsRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceClient_GetActionDetails_Call) Return(response *connect.Response[workflow.GetActionDetailsResponse], err error) *RunServiceClient_GetActionDetails_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *RunServiceClient_GetActionDetails_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.GetActionDetailsRequest]) (*connect.Response[workflow.GetActionDetailsResponse], error)) *RunServiceClient_GetActionDetails_Call { + _c.Call.Return(run) + return _c +} + +// GetActionLogContext provides a mock function for the type RunServiceClient +func (_mock *RunServiceClient) GetActionLogContext(context1 context.Context, request *connect.Request[workflow.GetActionLogContextRequest]) (*connect.Response[workflow.GetActionLogContextResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for GetActionLogContext") + } + + var r0 *connect.Response[workflow.GetActionLogContextResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionLogContextRequest]) (*connect.Response[workflow.GetActionLogContextResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionLogContextRequest]) *connect.Response[workflow.GetActionLogContextResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.GetActionLogContextResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.GetActionLogContextRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceClient_GetActionLogContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActionLogContext' +type RunServiceClient_GetActionLogContext_Call struct { + *mock.Call +} + +// GetActionLogContext is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.GetActionLogContextRequest] +func (_e *RunServiceClient_Expecter) GetActionLogContext(context1 interface{}, request interface{}) *RunServiceClient_GetActionLogContext_Call { + return &RunServiceClient_GetActionLogContext_Call{Call: _e.mock.On("GetActionLogContext", context1, request)} +} + +func (_c *RunServiceClient_GetActionLogContext_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.GetActionLogContextRequest])) *RunServiceClient_GetActionLogContext_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.GetActionLogContextRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.GetActionLogContextRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceClient_GetActionLogContext_Call) Return(response *connect.Response[workflow.GetActionLogContextResponse], err error) *RunServiceClient_GetActionLogContext_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *RunServiceClient_GetActionLogContext_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.GetActionLogContextRequest]) (*connect.Response[workflow.GetActionLogContextResponse], error)) *RunServiceClient_GetActionLogContext_Call { + _c.Call.Return(run) + return _c +} + +// GetRunDetails provides a mock function for the type RunServiceClient +func (_mock *RunServiceClient) GetRunDetails(context1 context.Context, request *connect.Request[workflow.GetRunDetailsRequest]) (*connect.Response[workflow.GetRunDetailsResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for GetRunDetails") + } + + var r0 *connect.Response[workflow.GetRunDetailsResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetRunDetailsRequest]) (*connect.Response[workflow.GetRunDetailsResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetRunDetailsRequest]) *connect.Response[workflow.GetRunDetailsResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.GetRunDetailsResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.GetRunDetailsRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceClient_GetRunDetails_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRunDetails' +type RunServiceClient_GetRunDetails_Call struct { + *mock.Call +} + +// GetRunDetails is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.GetRunDetailsRequest] +func (_e *RunServiceClient_Expecter) GetRunDetails(context1 interface{}, request interface{}) *RunServiceClient_GetRunDetails_Call { + return &RunServiceClient_GetRunDetails_Call{Call: _e.mock.On("GetRunDetails", context1, request)} +} + +func (_c *RunServiceClient_GetRunDetails_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.GetRunDetailsRequest])) *RunServiceClient_GetRunDetails_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.GetRunDetailsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.GetRunDetailsRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceClient_GetRunDetails_Call) Return(response *connect.Response[workflow.GetRunDetailsResponse], err error) *RunServiceClient_GetRunDetails_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *RunServiceClient_GetRunDetails_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.GetRunDetailsRequest]) (*connect.Response[workflow.GetRunDetailsResponse], error)) *RunServiceClient_GetRunDetails_Call { + _c.Call.Return(run) + return _c +} + +// ListActions provides a mock function for the type RunServiceClient +func (_mock *RunServiceClient) ListActions(context1 context.Context, request *connect.Request[workflow.ListActionsRequest]) (*connect.Response[workflow.ListActionsResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for ListActions") + } + + var r0 *connect.Response[workflow.ListActionsResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.ListActionsRequest]) (*connect.Response[workflow.ListActionsResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.ListActionsRequest]) *connect.Response[workflow.ListActionsResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.ListActionsResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.ListActionsRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceClient_ListActions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListActions' +type RunServiceClient_ListActions_Call struct { + *mock.Call +} + +// ListActions is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.ListActionsRequest] +func (_e *RunServiceClient_Expecter) ListActions(context1 interface{}, request interface{}) *RunServiceClient_ListActions_Call { + return &RunServiceClient_ListActions_Call{Call: _e.mock.On("ListActions", context1, request)} +} + +func (_c *RunServiceClient_ListActions_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.ListActionsRequest])) *RunServiceClient_ListActions_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.ListActionsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.ListActionsRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceClient_ListActions_Call) Return(response *connect.Response[workflow.ListActionsResponse], err error) *RunServiceClient_ListActions_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *RunServiceClient_ListActions_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.ListActionsRequest]) (*connect.Response[workflow.ListActionsResponse], error)) *RunServiceClient_ListActions_Call { + _c.Call.Return(run) + return _c +} + +// ListRuns provides a mock function for the type RunServiceClient +func (_mock *RunServiceClient) ListRuns(context1 context.Context, request *connect.Request[workflow.ListRunsRequest]) (*connect.Response[workflow.ListRunsResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for ListRuns") + } + + var r0 *connect.Response[workflow.ListRunsResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.ListRunsRequest]) (*connect.Response[workflow.ListRunsResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.ListRunsRequest]) *connect.Response[workflow.ListRunsResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.ListRunsResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.ListRunsRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceClient_ListRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRuns' +type RunServiceClient_ListRuns_Call struct { + *mock.Call +} + +// ListRuns is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.ListRunsRequest] +func (_e *RunServiceClient_Expecter) ListRuns(context1 interface{}, request interface{}) *RunServiceClient_ListRuns_Call { + return &RunServiceClient_ListRuns_Call{Call: _e.mock.On("ListRuns", context1, request)} +} + +func (_c *RunServiceClient_ListRuns_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.ListRunsRequest])) *RunServiceClient_ListRuns_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.ListRunsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.ListRunsRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceClient_ListRuns_Call) Return(response *connect.Response[workflow.ListRunsResponse], err error) *RunServiceClient_ListRuns_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *RunServiceClient_ListRuns_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.ListRunsRequest]) (*connect.Response[workflow.ListRunsResponse], error)) *RunServiceClient_ListRuns_Call { + _c.Call.Return(run) + return _c +} + +// WatchActionDetails provides a mock function for the type RunServiceClient +func (_mock *RunServiceClient) WatchActionDetails(context1 context.Context, request *connect.Request[workflow.WatchActionDetailsRequest]) (*connect.ServerStreamForClient[workflow.WatchActionDetailsResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for WatchActionDetails") + } + + var r0 *connect.ServerStreamForClient[workflow.WatchActionDetailsResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchActionDetailsRequest]) (*connect.ServerStreamForClient[workflow.WatchActionDetailsResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchActionDetailsRequest]) *connect.ServerStreamForClient[workflow.WatchActionDetailsResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.ServerStreamForClient[workflow.WatchActionDetailsResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.WatchActionDetailsRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceClient_WatchActionDetails_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchActionDetails' +type RunServiceClient_WatchActionDetails_Call struct { + *mock.Call +} + +// WatchActionDetails is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.WatchActionDetailsRequest] +func (_e *RunServiceClient_Expecter) WatchActionDetails(context1 interface{}, request interface{}) *RunServiceClient_WatchActionDetails_Call { + return &RunServiceClient_WatchActionDetails_Call{Call: _e.mock.On("WatchActionDetails", context1, request)} +} + +func (_c *RunServiceClient_WatchActionDetails_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchActionDetailsRequest])) *RunServiceClient_WatchActionDetails_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.WatchActionDetailsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.WatchActionDetailsRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceClient_WatchActionDetails_Call) Return(serverStreamForClient *connect.ServerStreamForClient[workflow.WatchActionDetailsResponse], err error) *RunServiceClient_WatchActionDetails_Call { + _c.Call.Return(serverStreamForClient, err) + return _c +} + +func (_c *RunServiceClient_WatchActionDetails_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchActionDetailsRequest]) (*connect.ServerStreamForClient[workflow.WatchActionDetailsResponse], error)) *RunServiceClient_WatchActionDetails_Call { + _c.Call.Return(run) + return _c +} + +// WatchActions provides a mock function for the type RunServiceClient +func (_mock *RunServiceClient) WatchActions(context1 context.Context, request *connect.Request[workflow.WatchActionsRequest]) (*connect.ServerStreamForClient[workflow.WatchActionsResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for WatchActions") + } + + var r0 *connect.ServerStreamForClient[workflow.WatchActionsResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchActionsRequest]) (*connect.ServerStreamForClient[workflow.WatchActionsResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchActionsRequest]) *connect.ServerStreamForClient[workflow.WatchActionsResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.ServerStreamForClient[workflow.WatchActionsResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.WatchActionsRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceClient_WatchActions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchActions' +type RunServiceClient_WatchActions_Call struct { + *mock.Call +} + +// WatchActions is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.WatchActionsRequest] +func (_e *RunServiceClient_Expecter) WatchActions(context1 interface{}, request interface{}) *RunServiceClient_WatchActions_Call { + return &RunServiceClient_WatchActions_Call{Call: _e.mock.On("WatchActions", context1, request)} +} + +func (_c *RunServiceClient_WatchActions_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchActionsRequest])) *RunServiceClient_WatchActions_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.WatchActionsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.WatchActionsRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceClient_WatchActions_Call) Return(serverStreamForClient *connect.ServerStreamForClient[workflow.WatchActionsResponse], err error) *RunServiceClient_WatchActions_Call { + _c.Call.Return(serverStreamForClient, err) + return _c +} + +func (_c *RunServiceClient_WatchActions_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchActionsRequest]) (*connect.ServerStreamForClient[workflow.WatchActionsResponse], error)) *RunServiceClient_WatchActions_Call { + _c.Call.Return(run) + return _c +} + +// WatchClusterEvents provides a mock function for the type RunServiceClient +func (_mock *RunServiceClient) WatchClusterEvents(context1 context.Context, request *connect.Request[workflow.WatchClusterEventsRequest]) (*connect.ServerStreamForClient[workflow.WatchClusterEventsResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for WatchClusterEvents") + } + + var r0 *connect.ServerStreamForClient[workflow.WatchClusterEventsResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchClusterEventsRequest]) (*connect.ServerStreamForClient[workflow.WatchClusterEventsResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchClusterEventsRequest]) *connect.ServerStreamForClient[workflow.WatchClusterEventsResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.ServerStreamForClient[workflow.WatchClusterEventsResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.WatchClusterEventsRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceClient_WatchClusterEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchClusterEvents' +type RunServiceClient_WatchClusterEvents_Call struct { + *mock.Call +} + +// WatchClusterEvents is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.WatchClusterEventsRequest] +func (_e *RunServiceClient_Expecter) WatchClusterEvents(context1 interface{}, request interface{}) *RunServiceClient_WatchClusterEvents_Call { + return &RunServiceClient_WatchClusterEvents_Call{Call: _e.mock.On("WatchClusterEvents", context1, request)} +} + +func (_c *RunServiceClient_WatchClusterEvents_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchClusterEventsRequest])) *RunServiceClient_WatchClusterEvents_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.WatchClusterEventsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.WatchClusterEventsRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceClient_WatchClusterEvents_Call) Return(serverStreamForClient *connect.ServerStreamForClient[workflow.WatchClusterEventsResponse], err error) *RunServiceClient_WatchClusterEvents_Call { + _c.Call.Return(serverStreamForClient, err) + return _c +} + +func (_c *RunServiceClient_WatchClusterEvents_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchClusterEventsRequest]) (*connect.ServerStreamForClient[workflow.WatchClusterEventsResponse], error)) *RunServiceClient_WatchClusterEvents_Call { + _c.Call.Return(run) + return _c +} + +// WatchGroups provides a mock function for the type RunServiceClient +func (_mock *RunServiceClient) WatchGroups(context1 context.Context, request *connect.Request[workflow.WatchGroupsRequest]) (*connect.ServerStreamForClient[workflow.WatchGroupsResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for WatchGroups") + } + + var r0 *connect.ServerStreamForClient[workflow.WatchGroupsResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchGroupsRequest]) (*connect.ServerStreamForClient[workflow.WatchGroupsResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchGroupsRequest]) *connect.ServerStreamForClient[workflow.WatchGroupsResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.ServerStreamForClient[workflow.WatchGroupsResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.WatchGroupsRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceClient_WatchGroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchGroups' +type RunServiceClient_WatchGroups_Call struct { + *mock.Call +} + +// WatchGroups is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.WatchGroupsRequest] +func (_e *RunServiceClient_Expecter) WatchGroups(context1 interface{}, request interface{}) *RunServiceClient_WatchGroups_Call { + return &RunServiceClient_WatchGroups_Call{Call: _e.mock.On("WatchGroups", context1, request)} +} + +func (_c *RunServiceClient_WatchGroups_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchGroupsRequest])) *RunServiceClient_WatchGroups_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.WatchGroupsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.WatchGroupsRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceClient_WatchGroups_Call) Return(serverStreamForClient *connect.ServerStreamForClient[workflow.WatchGroupsResponse], err error) *RunServiceClient_WatchGroups_Call { + _c.Call.Return(serverStreamForClient, err) + return _c +} + +func (_c *RunServiceClient_WatchGroups_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchGroupsRequest]) (*connect.ServerStreamForClient[workflow.WatchGroupsResponse], error)) *RunServiceClient_WatchGroups_Call { + _c.Call.Return(run) + return _c +} + +// WatchRunDetails provides a mock function for the type RunServiceClient +func (_mock *RunServiceClient) WatchRunDetails(context1 context.Context, request *connect.Request[workflow.WatchRunDetailsRequest]) (*connect.ServerStreamForClient[workflow.WatchRunDetailsResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for WatchRunDetails") + } + + var r0 *connect.ServerStreamForClient[workflow.WatchRunDetailsResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchRunDetailsRequest]) (*connect.ServerStreamForClient[workflow.WatchRunDetailsResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchRunDetailsRequest]) *connect.ServerStreamForClient[workflow.WatchRunDetailsResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.ServerStreamForClient[workflow.WatchRunDetailsResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.WatchRunDetailsRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceClient_WatchRunDetails_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchRunDetails' +type RunServiceClient_WatchRunDetails_Call struct { + *mock.Call +} + +// WatchRunDetails is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.WatchRunDetailsRequest] +func (_e *RunServiceClient_Expecter) WatchRunDetails(context1 interface{}, request interface{}) *RunServiceClient_WatchRunDetails_Call { + return &RunServiceClient_WatchRunDetails_Call{Call: _e.mock.On("WatchRunDetails", context1, request)} +} + +func (_c *RunServiceClient_WatchRunDetails_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchRunDetailsRequest])) *RunServiceClient_WatchRunDetails_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.WatchRunDetailsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.WatchRunDetailsRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceClient_WatchRunDetails_Call) Return(serverStreamForClient *connect.ServerStreamForClient[workflow.WatchRunDetailsResponse], err error) *RunServiceClient_WatchRunDetails_Call { + _c.Call.Return(serverStreamForClient, err) + return _c +} + +func (_c *RunServiceClient_WatchRunDetails_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchRunDetailsRequest]) (*connect.ServerStreamForClient[workflow.WatchRunDetailsResponse], error)) *RunServiceClient_WatchRunDetails_Call { + _c.Call.Return(run) + return _c +} + +// WatchRuns provides a mock function for the type RunServiceClient +func (_mock *RunServiceClient) WatchRuns(context1 context.Context, request *connect.Request[workflow.WatchRunsRequest]) (*connect.ServerStreamForClient[workflow.WatchRunsResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for WatchRuns") + } + + var r0 *connect.ServerStreamForClient[workflow.WatchRunsResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchRunsRequest]) (*connect.ServerStreamForClient[workflow.WatchRunsResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchRunsRequest]) *connect.ServerStreamForClient[workflow.WatchRunsResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.ServerStreamForClient[workflow.WatchRunsResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.WatchRunsRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceClient_WatchRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchRuns' +type RunServiceClient_WatchRuns_Call struct { + *mock.Call +} + +// WatchRuns is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.WatchRunsRequest] +func (_e *RunServiceClient_Expecter) WatchRuns(context1 interface{}, request interface{}) *RunServiceClient_WatchRuns_Call { + return &RunServiceClient_WatchRuns_Call{Call: _e.mock.On("WatchRuns", context1, request)} +} + +func (_c *RunServiceClient_WatchRuns_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchRunsRequest])) *RunServiceClient_WatchRuns_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.WatchRunsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.WatchRunsRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceClient_WatchRuns_Call) Return(serverStreamForClient *connect.ServerStreamForClient[workflow.WatchRunsResponse], err error) *RunServiceClient_WatchRuns_Call { + _c.Call.Return(serverStreamForClient, err) + return _c +} + +func (_c *RunServiceClient_WatchRuns_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchRunsRequest]) (*connect.ServerStreamForClient[workflow.WatchRunsResponse], error)) *RunServiceClient_WatchRuns_Call { + _c.Call.Return(run) + return _c +} + +// NewRunServiceHandler creates a new instance of RunServiceHandler. 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 NewRunServiceHandler(t interface { + mock.TestingT + Cleanup(func()) +}) *RunServiceHandler { + mock := &RunServiceHandler{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// RunServiceHandler is an autogenerated mock type for the RunServiceHandler type +type RunServiceHandler struct { + mock.Mock +} + +type RunServiceHandler_Expecter struct { + mock *mock.Mock +} + +func (_m *RunServiceHandler) EXPECT() *RunServiceHandler_Expecter { + return &RunServiceHandler_Expecter{mock: &_m.Mock} +} + +// AbortAction provides a mock function for the type RunServiceHandler +func (_mock *RunServiceHandler) AbortAction(context1 context.Context, request *connect.Request[workflow.AbortActionRequest]) (*connect.Response[workflow.AbortActionResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for AbortAction") + } + + var r0 *connect.Response[workflow.AbortActionResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortActionRequest]) (*connect.Response[workflow.AbortActionResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortActionRequest]) *connect.Response[workflow.AbortActionResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.AbortActionResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.AbortActionRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceHandler_AbortAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortAction' +type RunServiceHandler_AbortAction_Call struct { + *mock.Call +} + +// AbortAction is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.AbortActionRequest] +func (_e *RunServiceHandler_Expecter) AbortAction(context1 interface{}, request interface{}) *RunServiceHandler_AbortAction_Call { + return &RunServiceHandler_AbortAction_Call{Call: _e.mock.On("AbortAction", context1, request)} +} + +func (_c *RunServiceHandler_AbortAction_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.AbortActionRequest])) *RunServiceHandler_AbortAction_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.AbortActionRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.AbortActionRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceHandler_AbortAction_Call) Return(response *connect.Response[workflow.AbortActionResponse], err error) *RunServiceHandler_AbortAction_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *RunServiceHandler_AbortAction_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.AbortActionRequest]) (*connect.Response[workflow.AbortActionResponse], error)) *RunServiceHandler_AbortAction_Call { + _c.Call.Return(run) + return _c +} + +// AbortRun provides a mock function for the type RunServiceHandler +func (_mock *RunServiceHandler) AbortRun(context1 context.Context, request *connect.Request[workflow.AbortRunRequest]) (*connect.Response[workflow.AbortRunResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for AbortRun") + } + + var r0 *connect.Response[workflow.AbortRunResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortRunRequest]) (*connect.Response[workflow.AbortRunResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.AbortRunRequest]) *connect.Response[workflow.AbortRunResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.AbortRunResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.AbortRunRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceHandler_AbortRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortRun' +type RunServiceHandler_AbortRun_Call struct { + *mock.Call +} + +// AbortRun is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.AbortRunRequest] +func (_e *RunServiceHandler_Expecter) AbortRun(context1 interface{}, request interface{}) *RunServiceHandler_AbortRun_Call { + return &RunServiceHandler_AbortRun_Call{Call: _e.mock.On("AbortRun", context1, request)} +} + +func (_c *RunServiceHandler_AbortRun_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.AbortRunRequest])) *RunServiceHandler_AbortRun_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.AbortRunRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.AbortRunRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceHandler_AbortRun_Call) Return(response *connect.Response[workflow.AbortRunResponse], err error) *RunServiceHandler_AbortRun_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *RunServiceHandler_AbortRun_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.AbortRunRequest]) (*connect.Response[workflow.AbortRunResponse], error)) *RunServiceHandler_AbortRun_Call { + _c.Call.Return(run) + return _c +} + +// CreateRun provides a mock function for the type RunServiceHandler +func (_mock *RunServiceHandler) CreateRun(context1 context.Context, request *connect.Request[workflow.CreateRunRequest]) (*connect.Response[workflow.CreateRunResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for CreateRun") + } + + var r0 *connect.Response[workflow.CreateRunResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.CreateRunRequest]) (*connect.Response[workflow.CreateRunResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.CreateRunRequest]) *connect.Response[workflow.CreateRunResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.CreateRunResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.CreateRunRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceHandler_CreateRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRun' +type RunServiceHandler_CreateRun_Call struct { + *mock.Call +} + +// CreateRun is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.CreateRunRequest] +func (_e *RunServiceHandler_Expecter) CreateRun(context1 interface{}, request interface{}) *RunServiceHandler_CreateRun_Call { + return &RunServiceHandler_CreateRun_Call{Call: _e.mock.On("CreateRun", context1, request)} +} + +func (_c *RunServiceHandler_CreateRun_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.CreateRunRequest])) *RunServiceHandler_CreateRun_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.CreateRunRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.CreateRunRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceHandler_CreateRun_Call) Return(response *connect.Response[workflow.CreateRunResponse], err error) *RunServiceHandler_CreateRun_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *RunServiceHandler_CreateRun_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.CreateRunRequest]) (*connect.Response[workflow.CreateRunResponse], error)) *RunServiceHandler_CreateRun_Call { + _c.Call.Return(run) + return _c +} + +// GetActionData provides a mock function for the type RunServiceHandler +func (_mock *RunServiceHandler) GetActionData(context1 context.Context, request *connect.Request[workflow.GetActionDataRequest]) (*connect.Response[workflow.GetActionDataResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for GetActionData") + } + + var r0 *connect.Response[workflow.GetActionDataResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionDataRequest]) (*connect.Response[workflow.GetActionDataResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionDataRequest]) *connect.Response[workflow.GetActionDataResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.GetActionDataResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.GetActionDataRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceHandler_GetActionData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActionData' +type RunServiceHandler_GetActionData_Call struct { + *mock.Call +} + +// GetActionData is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.GetActionDataRequest] +func (_e *RunServiceHandler_Expecter) GetActionData(context1 interface{}, request interface{}) *RunServiceHandler_GetActionData_Call { + return &RunServiceHandler_GetActionData_Call{Call: _e.mock.On("GetActionData", context1, request)} +} + +func (_c *RunServiceHandler_GetActionData_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.GetActionDataRequest])) *RunServiceHandler_GetActionData_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.GetActionDataRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.GetActionDataRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceHandler_GetActionData_Call) Return(response *connect.Response[workflow.GetActionDataResponse], err error) *RunServiceHandler_GetActionData_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *RunServiceHandler_GetActionData_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.GetActionDataRequest]) (*connect.Response[workflow.GetActionDataResponse], error)) *RunServiceHandler_GetActionData_Call { + _c.Call.Return(run) + return _c +} + +// GetActionDataURIs provides a mock function for the type RunServiceHandler +func (_mock *RunServiceHandler) GetActionDataURIs(context1 context.Context, request *connect.Request[workflow.GetActionDataURIsRequest]) (*connect.Response[workflow.GetActionDataURIsResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for GetActionDataURIs") + } + + var r0 *connect.Response[workflow.GetActionDataURIsResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionDataURIsRequest]) (*connect.Response[workflow.GetActionDataURIsResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionDataURIsRequest]) *connect.Response[workflow.GetActionDataURIsResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.GetActionDataURIsResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.GetActionDataURIsRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceHandler_GetActionDataURIs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActionDataURIs' +type RunServiceHandler_GetActionDataURIs_Call struct { + *mock.Call +} + +// GetActionDataURIs is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.GetActionDataURIsRequest] +func (_e *RunServiceHandler_Expecter) GetActionDataURIs(context1 interface{}, request interface{}) *RunServiceHandler_GetActionDataURIs_Call { + return &RunServiceHandler_GetActionDataURIs_Call{Call: _e.mock.On("GetActionDataURIs", context1, request)} +} + +func (_c *RunServiceHandler_GetActionDataURIs_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.GetActionDataURIsRequest])) *RunServiceHandler_GetActionDataURIs_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.GetActionDataURIsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.GetActionDataURIsRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceHandler_GetActionDataURIs_Call) Return(response *connect.Response[workflow.GetActionDataURIsResponse], err error) *RunServiceHandler_GetActionDataURIs_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *RunServiceHandler_GetActionDataURIs_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.GetActionDataURIsRequest]) (*connect.Response[workflow.GetActionDataURIsResponse], error)) *RunServiceHandler_GetActionDataURIs_Call { + _c.Call.Return(run) + return _c +} + +// GetActionDetails provides a mock function for the type RunServiceHandler +func (_mock *RunServiceHandler) GetActionDetails(context1 context.Context, request *connect.Request[workflow.GetActionDetailsRequest]) (*connect.Response[workflow.GetActionDetailsResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for GetActionDetails") + } + + var r0 *connect.Response[workflow.GetActionDetailsResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionDetailsRequest]) (*connect.Response[workflow.GetActionDetailsResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionDetailsRequest]) *connect.Response[workflow.GetActionDetailsResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.GetActionDetailsResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.GetActionDetailsRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceHandler_GetActionDetails_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActionDetails' +type RunServiceHandler_GetActionDetails_Call struct { + *mock.Call +} + +// GetActionDetails is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.GetActionDetailsRequest] +func (_e *RunServiceHandler_Expecter) GetActionDetails(context1 interface{}, request interface{}) *RunServiceHandler_GetActionDetails_Call { + return &RunServiceHandler_GetActionDetails_Call{Call: _e.mock.On("GetActionDetails", context1, request)} +} + +func (_c *RunServiceHandler_GetActionDetails_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.GetActionDetailsRequest])) *RunServiceHandler_GetActionDetails_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.GetActionDetailsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.GetActionDetailsRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceHandler_GetActionDetails_Call) Return(response *connect.Response[workflow.GetActionDetailsResponse], err error) *RunServiceHandler_GetActionDetails_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *RunServiceHandler_GetActionDetails_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.GetActionDetailsRequest]) (*connect.Response[workflow.GetActionDetailsResponse], error)) *RunServiceHandler_GetActionDetails_Call { + _c.Call.Return(run) + return _c +} + +// GetActionLogContext provides a mock function for the type RunServiceHandler +func (_mock *RunServiceHandler) GetActionLogContext(context1 context.Context, request *connect.Request[workflow.GetActionLogContextRequest]) (*connect.Response[workflow.GetActionLogContextResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for GetActionLogContext") + } + + var r0 *connect.Response[workflow.GetActionLogContextResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionLogContextRequest]) (*connect.Response[workflow.GetActionLogContextResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetActionLogContextRequest]) *connect.Response[workflow.GetActionLogContextResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.GetActionLogContextResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.GetActionLogContextRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceHandler_GetActionLogContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActionLogContext' +type RunServiceHandler_GetActionLogContext_Call struct { + *mock.Call +} + +// GetActionLogContext is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.GetActionLogContextRequest] +func (_e *RunServiceHandler_Expecter) GetActionLogContext(context1 interface{}, request interface{}) *RunServiceHandler_GetActionLogContext_Call { + return &RunServiceHandler_GetActionLogContext_Call{Call: _e.mock.On("GetActionLogContext", context1, request)} +} + +func (_c *RunServiceHandler_GetActionLogContext_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.GetActionLogContextRequest])) *RunServiceHandler_GetActionLogContext_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.GetActionLogContextRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.GetActionLogContextRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceHandler_GetActionLogContext_Call) Return(response *connect.Response[workflow.GetActionLogContextResponse], err error) *RunServiceHandler_GetActionLogContext_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *RunServiceHandler_GetActionLogContext_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.GetActionLogContextRequest]) (*connect.Response[workflow.GetActionLogContextResponse], error)) *RunServiceHandler_GetActionLogContext_Call { + _c.Call.Return(run) + return _c +} + +// GetRunDetails provides a mock function for the type RunServiceHandler +func (_mock *RunServiceHandler) GetRunDetails(context1 context.Context, request *connect.Request[workflow.GetRunDetailsRequest]) (*connect.Response[workflow.GetRunDetailsResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for GetRunDetails") + } + + var r0 *connect.Response[workflow.GetRunDetailsResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetRunDetailsRequest]) (*connect.Response[workflow.GetRunDetailsResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetRunDetailsRequest]) *connect.Response[workflow.GetRunDetailsResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.GetRunDetailsResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.GetRunDetailsRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceHandler_GetRunDetails_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRunDetails' +type RunServiceHandler_GetRunDetails_Call struct { + *mock.Call +} + +// GetRunDetails is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.GetRunDetailsRequest] +func (_e *RunServiceHandler_Expecter) GetRunDetails(context1 interface{}, request interface{}) *RunServiceHandler_GetRunDetails_Call { + return &RunServiceHandler_GetRunDetails_Call{Call: _e.mock.On("GetRunDetails", context1, request)} +} + +func (_c *RunServiceHandler_GetRunDetails_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.GetRunDetailsRequest])) *RunServiceHandler_GetRunDetails_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.GetRunDetailsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.GetRunDetailsRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceHandler_GetRunDetails_Call) Return(response *connect.Response[workflow.GetRunDetailsResponse], err error) *RunServiceHandler_GetRunDetails_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *RunServiceHandler_GetRunDetails_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.GetRunDetailsRequest]) (*connect.Response[workflow.GetRunDetailsResponse], error)) *RunServiceHandler_GetRunDetails_Call { + _c.Call.Return(run) + return _c +} + +// ListActions provides a mock function for the type RunServiceHandler +func (_mock *RunServiceHandler) ListActions(context1 context.Context, request *connect.Request[workflow.ListActionsRequest]) (*connect.Response[workflow.ListActionsResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for ListActions") + } + + var r0 *connect.Response[workflow.ListActionsResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.ListActionsRequest]) (*connect.Response[workflow.ListActionsResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.ListActionsRequest]) *connect.Response[workflow.ListActionsResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.ListActionsResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.ListActionsRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceHandler_ListActions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListActions' +type RunServiceHandler_ListActions_Call struct { + *mock.Call +} + +// ListActions is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.ListActionsRequest] +func (_e *RunServiceHandler_Expecter) ListActions(context1 interface{}, request interface{}) *RunServiceHandler_ListActions_Call { + return &RunServiceHandler_ListActions_Call{Call: _e.mock.On("ListActions", context1, request)} +} + +func (_c *RunServiceHandler_ListActions_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.ListActionsRequest])) *RunServiceHandler_ListActions_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.ListActionsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.ListActionsRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceHandler_ListActions_Call) Return(response *connect.Response[workflow.ListActionsResponse], err error) *RunServiceHandler_ListActions_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *RunServiceHandler_ListActions_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.ListActionsRequest]) (*connect.Response[workflow.ListActionsResponse], error)) *RunServiceHandler_ListActions_Call { + _c.Call.Return(run) + return _c +} + +// ListRuns provides a mock function for the type RunServiceHandler +func (_mock *RunServiceHandler) ListRuns(context1 context.Context, request *connect.Request[workflow.ListRunsRequest]) (*connect.Response[workflow.ListRunsResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for ListRuns") + } + + var r0 *connect.Response[workflow.ListRunsResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.ListRunsRequest]) (*connect.Response[workflow.ListRunsResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.ListRunsRequest]) *connect.Response[workflow.ListRunsResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.ListRunsResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.ListRunsRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// RunServiceHandler_ListRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRuns' +type RunServiceHandler_ListRuns_Call struct { + *mock.Call +} + +// ListRuns is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.ListRunsRequest] +func (_e *RunServiceHandler_Expecter) ListRuns(context1 interface{}, request interface{}) *RunServiceHandler_ListRuns_Call { + return &RunServiceHandler_ListRuns_Call{Call: _e.mock.On("ListRuns", context1, request)} +} + +func (_c *RunServiceHandler_ListRuns_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.ListRunsRequest])) *RunServiceHandler_ListRuns_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.ListRunsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.ListRunsRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *RunServiceHandler_ListRuns_Call) Return(response *connect.Response[workflow.ListRunsResponse], err error) *RunServiceHandler_ListRuns_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *RunServiceHandler_ListRuns_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.ListRunsRequest]) (*connect.Response[workflow.ListRunsResponse], error)) *RunServiceHandler_ListRuns_Call { + _c.Call.Return(run) + return _c +} + +// WatchActionDetails provides a mock function for the type RunServiceHandler +func (_mock *RunServiceHandler) WatchActionDetails(context1 context.Context, request *connect.Request[workflow.WatchActionDetailsRequest], serverStream *connect.ServerStream[workflow.WatchActionDetailsResponse]) error { + ret := _mock.Called(context1, request, serverStream) + + if len(ret) == 0 { + panic("no return value specified for WatchActionDetails") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchActionDetailsRequest], *connect.ServerStream[workflow.WatchActionDetailsResponse]) error); ok { + r0 = returnFunc(context1, request, serverStream) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// RunServiceHandler_WatchActionDetails_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchActionDetails' +type RunServiceHandler_WatchActionDetails_Call struct { + *mock.Call +} + +// WatchActionDetails is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.WatchActionDetailsRequest] +// - serverStream *connect.ServerStream[workflow.WatchActionDetailsResponse] +func (_e *RunServiceHandler_Expecter) WatchActionDetails(context1 interface{}, request interface{}, serverStream interface{}) *RunServiceHandler_WatchActionDetails_Call { + return &RunServiceHandler_WatchActionDetails_Call{Call: _e.mock.On("WatchActionDetails", context1, request, serverStream)} +} + +func (_c *RunServiceHandler_WatchActionDetails_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchActionDetailsRequest], serverStream *connect.ServerStream[workflow.WatchActionDetailsResponse])) *RunServiceHandler_WatchActionDetails_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.WatchActionDetailsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.WatchActionDetailsRequest]) + } + var arg2 *connect.ServerStream[workflow.WatchActionDetailsResponse] + if args[2] != nil { + arg2 = args[2].(*connect.ServerStream[workflow.WatchActionDetailsResponse]) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *RunServiceHandler_WatchActionDetails_Call) Return(err error) *RunServiceHandler_WatchActionDetails_Call { + _c.Call.Return(err) + return _c +} + +func (_c *RunServiceHandler_WatchActionDetails_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchActionDetailsRequest], serverStream *connect.ServerStream[workflow.WatchActionDetailsResponse]) error) *RunServiceHandler_WatchActionDetails_Call { + _c.Call.Return(run) + return _c +} + +// WatchActions provides a mock function for the type RunServiceHandler +func (_mock *RunServiceHandler) WatchActions(context1 context.Context, request *connect.Request[workflow.WatchActionsRequest], serverStream *connect.ServerStream[workflow.WatchActionsResponse]) error { + ret := _mock.Called(context1, request, serverStream) + + if len(ret) == 0 { + panic("no return value specified for WatchActions") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchActionsRequest], *connect.ServerStream[workflow.WatchActionsResponse]) error); ok { + r0 = returnFunc(context1, request, serverStream) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// RunServiceHandler_WatchActions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchActions' +type RunServiceHandler_WatchActions_Call struct { + *mock.Call +} + +// WatchActions is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.WatchActionsRequest] +// - serverStream *connect.ServerStream[workflow.WatchActionsResponse] +func (_e *RunServiceHandler_Expecter) WatchActions(context1 interface{}, request interface{}, serverStream interface{}) *RunServiceHandler_WatchActions_Call { + return &RunServiceHandler_WatchActions_Call{Call: _e.mock.On("WatchActions", context1, request, serverStream)} +} + +func (_c *RunServiceHandler_WatchActions_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchActionsRequest], serverStream *connect.ServerStream[workflow.WatchActionsResponse])) *RunServiceHandler_WatchActions_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.WatchActionsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.WatchActionsRequest]) + } + var arg2 *connect.ServerStream[workflow.WatchActionsResponse] + if args[2] != nil { + arg2 = args[2].(*connect.ServerStream[workflow.WatchActionsResponse]) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *RunServiceHandler_WatchActions_Call) Return(err error) *RunServiceHandler_WatchActions_Call { + _c.Call.Return(err) + return _c +} + +func (_c *RunServiceHandler_WatchActions_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchActionsRequest], serverStream *connect.ServerStream[workflow.WatchActionsResponse]) error) *RunServiceHandler_WatchActions_Call { + _c.Call.Return(run) + return _c +} + +// WatchClusterEvents provides a mock function for the type RunServiceHandler +func (_mock *RunServiceHandler) WatchClusterEvents(context1 context.Context, request *connect.Request[workflow.WatchClusterEventsRequest], serverStream *connect.ServerStream[workflow.WatchClusterEventsResponse]) error { + ret := _mock.Called(context1, request, serverStream) + + if len(ret) == 0 { + panic("no return value specified for WatchClusterEvents") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchClusterEventsRequest], *connect.ServerStream[workflow.WatchClusterEventsResponse]) error); ok { + r0 = returnFunc(context1, request, serverStream) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// RunServiceHandler_WatchClusterEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchClusterEvents' +type RunServiceHandler_WatchClusterEvents_Call struct { + *mock.Call +} + +// WatchClusterEvents is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.WatchClusterEventsRequest] +// - serverStream *connect.ServerStream[workflow.WatchClusterEventsResponse] +func (_e *RunServiceHandler_Expecter) WatchClusterEvents(context1 interface{}, request interface{}, serverStream interface{}) *RunServiceHandler_WatchClusterEvents_Call { + return &RunServiceHandler_WatchClusterEvents_Call{Call: _e.mock.On("WatchClusterEvents", context1, request, serverStream)} +} + +func (_c *RunServiceHandler_WatchClusterEvents_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchClusterEventsRequest], serverStream *connect.ServerStream[workflow.WatchClusterEventsResponse])) *RunServiceHandler_WatchClusterEvents_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.WatchClusterEventsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.WatchClusterEventsRequest]) + } + var arg2 *connect.ServerStream[workflow.WatchClusterEventsResponse] + if args[2] != nil { + arg2 = args[2].(*connect.ServerStream[workflow.WatchClusterEventsResponse]) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *RunServiceHandler_WatchClusterEvents_Call) Return(err error) *RunServiceHandler_WatchClusterEvents_Call { + _c.Call.Return(err) + return _c +} + +func (_c *RunServiceHandler_WatchClusterEvents_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchClusterEventsRequest], serverStream *connect.ServerStream[workflow.WatchClusterEventsResponse]) error) *RunServiceHandler_WatchClusterEvents_Call { + _c.Call.Return(run) + return _c +} + +// WatchGroups provides a mock function for the type RunServiceHandler +func (_mock *RunServiceHandler) WatchGroups(context1 context.Context, request *connect.Request[workflow.WatchGroupsRequest], serverStream *connect.ServerStream[workflow.WatchGroupsResponse]) error { + ret := _mock.Called(context1, request, serverStream) + + if len(ret) == 0 { + panic("no return value specified for WatchGroups") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchGroupsRequest], *connect.ServerStream[workflow.WatchGroupsResponse]) error); ok { + r0 = returnFunc(context1, request, serverStream) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// RunServiceHandler_WatchGroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchGroups' +type RunServiceHandler_WatchGroups_Call struct { + *mock.Call +} + +// WatchGroups is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.WatchGroupsRequest] +// - serverStream *connect.ServerStream[workflow.WatchGroupsResponse] +func (_e *RunServiceHandler_Expecter) WatchGroups(context1 interface{}, request interface{}, serverStream interface{}) *RunServiceHandler_WatchGroups_Call { + return &RunServiceHandler_WatchGroups_Call{Call: _e.mock.On("WatchGroups", context1, request, serverStream)} +} + +func (_c *RunServiceHandler_WatchGroups_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchGroupsRequest], serverStream *connect.ServerStream[workflow.WatchGroupsResponse])) *RunServiceHandler_WatchGroups_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.WatchGroupsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.WatchGroupsRequest]) + } + var arg2 *connect.ServerStream[workflow.WatchGroupsResponse] + if args[2] != nil { + arg2 = args[2].(*connect.ServerStream[workflow.WatchGroupsResponse]) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *RunServiceHandler_WatchGroups_Call) Return(err error) *RunServiceHandler_WatchGroups_Call { + _c.Call.Return(err) + return _c +} + +func (_c *RunServiceHandler_WatchGroups_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchGroupsRequest], serverStream *connect.ServerStream[workflow.WatchGroupsResponse]) error) *RunServiceHandler_WatchGroups_Call { + _c.Call.Return(run) + return _c +} + +// WatchRunDetails provides a mock function for the type RunServiceHandler +func (_mock *RunServiceHandler) WatchRunDetails(context1 context.Context, request *connect.Request[workflow.WatchRunDetailsRequest], serverStream *connect.ServerStream[workflow.WatchRunDetailsResponse]) error { + ret := _mock.Called(context1, request, serverStream) + + if len(ret) == 0 { + panic("no return value specified for WatchRunDetails") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchRunDetailsRequest], *connect.ServerStream[workflow.WatchRunDetailsResponse]) error); ok { + r0 = returnFunc(context1, request, serverStream) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// RunServiceHandler_WatchRunDetails_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchRunDetails' +type RunServiceHandler_WatchRunDetails_Call struct { + *mock.Call +} + +// WatchRunDetails is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.WatchRunDetailsRequest] +// - serverStream *connect.ServerStream[workflow.WatchRunDetailsResponse] +func (_e *RunServiceHandler_Expecter) WatchRunDetails(context1 interface{}, request interface{}, serverStream interface{}) *RunServiceHandler_WatchRunDetails_Call { + return &RunServiceHandler_WatchRunDetails_Call{Call: _e.mock.On("WatchRunDetails", context1, request, serverStream)} +} + +func (_c *RunServiceHandler_WatchRunDetails_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchRunDetailsRequest], serverStream *connect.ServerStream[workflow.WatchRunDetailsResponse])) *RunServiceHandler_WatchRunDetails_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.WatchRunDetailsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.WatchRunDetailsRequest]) + } + var arg2 *connect.ServerStream[workflow.WatchRunDetailsResponse] + if args[2] != nil { + arg2 = args[2].(*connect.ServerStream[workflow.WatchRunDetailsResponse]) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *RunServiceHandler_WatchRunDetails_Call) Return(err error) *RunServiceHandler_WatchRunDetails_Call { + _c.Call.Return(err) + return _c +} + +func (_c *RunServiceHandler_WatchRunDetails_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchRunDetailsRequest], serverStream *connect.ServerStream[workflow.WatchRunDetailsResponse]) error) *RunServiceHandler_WatchRunDetails_Call { + _c.Call.Return(run) + return _c +} + +// WatchRuns provides a mock function for the type RunServiceHandler +func (_mock *RunServiceHandler) WatchRuns(context1 context.Context, request *connect.Request[workflow.WatchRunsRequest], serverStream *connect.ServerStream[workflow.WatchRunsResponse]) error { + ret := _mock.Called(context1, request, serverStream) + + if len(ret) == 0 { + panic("no return value specified for WatchRuns") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchRunsRequest], *connect.ServerStream[workflow.WatchRunsResponse]) error); ok { + r0 = returnFunc(context1, request, serverStream) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// RunServiceHandler_WatchRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchRuns' +type RunServiceHandler_WatchRuns_Call struct { + *mock.Call +} + +// WatchRuns is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.WatchRunsRequest] +// - serverStream *connect.ServerStream[workflow.WatchRunsResponse] +func (_e *RunServiceHandler_Expecter) WatchRuns(context1 interface{}, request interface{}, serverStream interface{}) *RunServiceHandler_WatchRuns_Call { + return &RunServiceHandler_WatchRuns_Call{Call: _e.mock.On("WatchRuns", context1, request, serverStream)} +} + +func (_c *RunServiceHandler_WatchRuns_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchRunsRequest], serverStream *connect.ServerStream[workflow.WatchRunsResponse])) *RunServiceHandler_WatchRuns_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.WatchRunsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.WatchRunsRequest]) + } + var arg2 *connect.ServerStream[workflow.WatchRunsResponse] + if args[2] != nil { + arg2 = args[2].(*connect.ServerStream[workflow.WatchRunsResponse]) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *RunServiceHandler_WatchRuns_Call) Return(err error) *RunServiceHandler_WatchRuns_Call { + _c.Call.Return(err) + return _c +} + +func (_c *RunServiceHandler_WatchRuns_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchRunsRequest], serverStream *connect.ServerStream[workflow.WatchRunsResponse]) error) *RunServiceHandler_WatchRuns_Call { + _c.Call.Return(run) + return _c +} + +// NewStateServiceClient creates a new instance of StateServiceClient. 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 NewStateServiceClient(t interface { + mock.TestingT + Cleanup(func()) +}) *StateServiceClient { + mock := &StateServiceClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// StateServiceClient is an autogenerated mock type for the StateServiceClient type +type StateServiceClient struct { + mock.Mock +} + +type StateServiceClient_Expecter struct { + mock *mock.Mock +} + +func (_m *StateServiceClient) EXPECT() *StateServiceClient_Expecter { + return &StateServiceClient_Expecter{mock: &_m.Mock} +} + +// Get provides a mock function for the type StateServiceClient +func (_mock *StateServiceClient) Get(context1 context.Context, request *connect.Request[workflow.GetRequest]) (*connect.Response[workflow.GetResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for Get") + } + + var r0 *connect.Response[workflow.GetResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetRequest]) (*connect.Response[workflow.GetResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetRequest]) *connect.Response[workflow.GetResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.GetResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.GetRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// StateServiceClient_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type StateServiceClient_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.GetRequest] +func (_e *StateServiceClient_Expecter) Get(context1 interface{}, request interface{}) *StateServiceClient_Get_Call { + return &StateServiceClient_Get_Call{Call: _e.mock.On("Get", context1, request)} +} + +func (_c *StateServiceClient_Get_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.GetRequest])) *StateServiceClient_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.GetRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.GetRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *StateServiceClient_Get_Call) Return(response *connect.Response[workflow.GetResponse], err error) *StateServiceClient_Get_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *StateServiceClient_Get_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.GetRequest]) (*connect.Response[workflow.GetResponse], error)) *StateServiceClient_Get_Call { + _c.Call.Return(run) + return _c +} + +// Put provides a mock function for the type StateServiceClient +func (_mock *StateServiceClient) Put(context1 context.Context, request *connect.Request[workflow.PutRequest]) (*connect.Response[workflow.PutResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for Put") + } + + var r0 *connect.Response[workflow.PutResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.PutRequest]) (*connect.Response[workflow.PutResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.PutRequest]) *connect.Response[workflow.PutResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.PutResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.PutRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// StateServiceClient_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put' +type StateServiceClient_Put_Call struct { + *mock.Call +} + +// Put is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.PutRequest] +func (_e *StateServiceClient_Expecter) Put(context1 interface{}, request interface{}) *StateServiceClient_Put_Call { + return &StateServiceClient_Put_Call{Call: _e.mock.On("Put", context1, request)} +} + +func (_c *StateServiceClient_Put_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.PutRequest])) *StateServiceClient_Put_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.PutRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.PutRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *StateServiceClient_Put_Call) Return(response *connect.Response[workflow.PutResponse], err error) *StateServiceClient_Put_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *StateServiceClient_Put_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.PutRequest]) (*connect.Response[workflow.PutResponse], error)) *StateServiceClient_Put_Call { + _c.Call.Return(run) + return _c +} + +// Watch provides a mock function for the type StateServiceClient +func (_mock *StateServiceClient) Watch(context1 context.Context, request *connect.Request[workflow.WatchRequest]) (*connect.ServerStreamForClient[workflow.WatchResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for Watch") + } + + var r0 *connect.ServerStreamForClient[workflow.WatchResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchRequest]) (*connect.ServerStreamForClient[workflow.WatchResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchRequest]) *connect.ServerStreamForClient[workflow.WatchResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.ServerStreamForClient[workflow.WatchResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.WatchRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// StateServiceClient_Watch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Watch' +type StateServiceClient_Watch_Call struct { + *mock.Call +} + +// Watch is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.WatchRequest] +func (_e *StateServiceClient_Expecter) Watch(context1 interface{}, request interface{}) *StateServiceClient_Watch_Call { + return &StateServiceClient_Watch_Call{Call: _e.mock.On("Watch", context1, request)} +} + +func (_c *StateServiceClient_Watch_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchRequest])) *StateServiceClient_Watch_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.WatchRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.WatchRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *StateServiceClient_Watch_Call) Return(serverStreamForClient *connect.ServerStreamForClient[workflow.WatchResponse], err error) *StateServiceClient_Watch_Call { + _c.Call.Return(serverStreamForClient, err) + return _c +} + +func (_c *StateServiceClient_Watch_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchRequest]) (*connect.ServerStreamForClient[workflow.WatchResponse], error)) *StateServiceClient_Watch_Call { + _c.Call.Return(run) + return _c +} + +// NewStateServiceHandler creates a new instance of StateServiceHandler. 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 NewStateServiceHandler(t interface { + mock.TestingT + Cleanup(func()) +}) *StateServiceHandler { + mock := &StateServiceHandler{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// StateServiceHandler is an autogenerated mock type for the StateServiceHandler type +type StateServiceHandler struct { + mock.Mock +} + +type StateServiceHandler_Expecter struct { + mock *mock.Mock +} + +func (_m *StateServiceHandler) EXPECT() *StateServiceHandler_Expecter { + return &StateServiceHandler_Expecter{mock: &_m.Mock} +} + +// Get provides a mock function for the type StateServiceHandler +func (_mock *StateServiceHandler) Get(context1 context.Context, request *connect.Request[workflow.GetRequest]) (*connect.Response[workflow.GetResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for Get") + } + + var r0 *connect.Response[workflow.GetResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetRequest]) (*connect.Response[workflow.GetResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.GetRequest]) *connect.Response[workflow.GetResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.GetResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.GetRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// StateServiceHandler_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type StateServiceHandler_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.GetRequest] +func (_e *StateServiceHandler_Expecter) Get(context1 interface{}, request interface{}) *StateServiceHandler_Get_Call { + return &StateServiceHandler_Get_Call{Call: _e.mock.On("Get", context1, request)} +} + +func (_c *StateServiceHandler_Get_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.GetRequest])) *StateServiceHandler_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.GetRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.GetRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *StateServiceHandler_Get_Call) Return(response *connect.Response[workflow.GetResponse], err error) *StateServiceHandler_Get_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *StateServiceHandler_Get_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.GetRequest]) (*connect.Response[workflow.GetResponse], error)) *StateServiceHandler_Get_Call { + _c.Call.Return(run) + return _c +} + +// Put provides a mock function for the type StateServiceHandler +func (_mock *StateServiceHandler) Put(context1 context.Context, request *connect.Request[workflow.PutRequest]) (*connect.Response[workflow.PutResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for Put") + } + + var r0 *connect.Response[workflow.PutResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.PutRequest]) (*connect.Response[workflow.PutResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.PutRequest]) *connect.Response[workflow.PutResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.PutResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.PutRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// StateServiceHandler_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put' +type StateServiceHandler_Put_Call struct { + *mock.Call +} + +// Put is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.PutRequest] +func (_e *StateServiceHandler_Expecter) Put(context1 interface{}, request interface{}) *StateServiceHandler_Put_Call { + return &StateServiceHandler_Put_Call{Call: _e.mock.On("Put", context1, request)} +} + +func (_c *StateServiceHandler_Put_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.PutRequest])) *StateServiceHandler_Put_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.PutRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.PutRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *StateServiceHandler_Put_Call) Return(response *connect.Response[workflow.PutResponse], err error) *StateServiceHandler_Put_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *StateServiceHandler_Put_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.PutRequest]) (*connect.Response[workflow.PutResponse], error)) *StateServiceHandler_Put_Call { + _c.Call.Return(run) + return _c +} + +// Watch provides a mock function for the type StateServiceHandler +func (_mock *StateServiceHandler) Watch(context1 context.Context, request *connect.Request[workflow.WatchRequest], serverStream *connect.ServerStream[workflow.WatchResponse]) error { + ret := _mock.Called(context1, request, serverStream) + + if len(ret) == 0 { + panic("no return value specified for Watch") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.WatchRequest], *connect.ServerStream[workflow.WatchResponse]) error); ok { + r0 = returnFunc(context1, request, serverStream) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// StateServiceHandler_Watch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Watch' +type StateServiceHandler_Watch_Call struct { + *mock.Call +} + +// Watch is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.WatchRequest] +// - serverStream *connect.ServerStream[workflow.WatchResponse] +func (_e *StateServiceHandler_Expecter) Watch(context1 interface{}, request interface{}, serverStream interface{}) *StateServiceHandler_Watch_Call { + return &StateServiceHandler_Watch_Call{Call: _e.mock.On("Watch", context1, request, serverStream)} +} + +func (_c *StateServiceHandler_Watch_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.WatchRequest], serverStream *connect.ServerStream[workflow.WatchResponse])) *StateServiceHandler_Watch_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.WatchRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.WatchRequest]) + } + var arg2 *connect.ServerStream[workflow.WatchResponse] + if args[2] != nil { + arg2 = args[2].(*connect.ServerStream[workflow.WatchResponse]) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *StateServiceHandler_Watch_Call) Return(err error) *StateServiceHandler_Watch_Call { + _c.Call.Return(err) + return _c +} + +func (_c *StateServiceHandler_Watch_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.WatchRequest], serverStream *connect.ServerStream[workflow.WatchResponse]) error) *StateServiceHandler_Watch_Call { + _c.Call.Return(run) + return _c +} + +// NewTranslatorServiceClient creates a new instance of TranslatorServiceClient. 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 NewTranslatorServiceClient(t interface { + mock.TestingT + Cleanup(func()) +}) *TranslatorServiceClient { + mock := &TranslatorServiceClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// TranslatorServiceClient is an autogenerated mock type for the TranslatorServiceClient type +type TranslatorServiceClient struct { + mock.Mock +} + +type TranslatorServiceClient_Expecter struct { + mock *mock.Mock +} + +func (_m *TranslatorServiceClient) EXPECT() *TranslatorServiceClient_Expecter { + return &TranslatorServiceClient_Expecter{mock: &_m.Mock} +} + +// JsonValuesToLiterals provides a mock function for the type TranslatorServiceClient +func (_mock *TranslatorServiceClient) JsonValuesToLiterals(context1 context.Context, request *connect.Request[workflow.JsonValuesToLiteralsRequest]) (*connect.Response[workflow.JsonValuesToLiteralsResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for JsonValuesToLiterals") + } + + var r0 *connect.Response[workflow.JsonValuesToLiteralsResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.JsonValuesToLiteralsRequest]) (*connect.Response[workflow.JsonValuesToLiteralsResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.JsonValuesToLiteralsRequest]) *connect.Response[workflow.JsonValuesToLiteralsResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.JsonValuesToLiteralsResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.JsonValuesToLiteralsRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// TranslatorServiceClient_JsonValuesToLiterals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'JsonValuesToLiterals' +type TranslatorServiceClient_JsonValuesToLiterals_Call struct { + *mock.Call +} + +// JsonValuesToLiterals is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.JsonValuesToLiteralsRequest] +func (_e *TranslatorServiceClient_Expecter) JsonValuesToLiterals(context1 interface{}, request interface{}) *TranslatorServiceClient_JsonValuesToLiterals_Call { + return &TranslatorServiceClient_JsonValuesToLiterals_Call{Call: _e.mock.On("JsonValuesToLiterals", context1, request)} +} + +func (_c *TranslatorServiceClient_JsonValuesToLiterals_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.JsonValuesToLiteralsRequest])) *TranslatorServiceClient_JsonValuesToLiterals_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.JsonValuesToLiteralsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.JsonValuesToLiteralsRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *TranslatorServiceClient_JsonValuesToLiterals_Call) Return(response *connect.Response[workflow.JsonValuesToLiteralsResponse], err error) *TranslatorServiceClient_JsonValuesToLiterals_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *TranslatorServiceClient_JsonValuesToLiterals_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.JsonValuesToLiteralsRequest]) (*connect.Response[workflow.JsonValuesToLiteralsResponse], error)) *TranslatorServiceClient_JsonValuesToLiterals_Call { + _c.Call.Return(run) + return _c +} + +// LaunchFormJsonToLiterals provides a mock function for the type TranslatorServiceClient +func (_mock *TranslatorServiceClient) LaunchFormJsonToLiterals(context1 context.Context, request *connect.Request[workflow.LaunchFormJsonToLiteralsRequest]) (*connect.Response[workflow.LaunchFormJsonToLiteralsResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for LaunchFormJsonToLiterals") + } + + var r0 *connect.Response[workflow.LaunchFormJsonToLiteralsResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.LaunchFormJsonToLiteralsRequest]) (*connect.Response[workflow.LaunchFormJsonToLiteralsResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.LaunchFormJsonToLiteralsRequest]) *connect.Response[workflow.LaunchFormJsonToLiteralsResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.LaunchFormJsonToLiteralsResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.LaunchFormJsonToLiteralsRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// TranslatorServiceClient_LaunchFormJsonToLiterals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LaunchFormJsonToLiterals' +type TranslatorServiceClient_LaunchFormJsonToLiterals_Call struct { + *mock.Call +} + +// LaunchFormJsonToLiterals is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.LaunchFormJsonToLiteralsRequest] +func (_e *TranslatorServiceClient_Expecter) LaunchFormJsonToLiterals(context1 interface{}, request interface{}) *TranslatorServiceClient_LaunchFormJsonToLiterals_Call { + return &TranslatorServiceClient_LaunchFormJsonToLiterals_Call{Call: _e.mock.On("LaunchFormJsonToLiterals", context1, request)} +} + +func (_c *TranslatorServiceClient_LaunchFormJsonToLiterals_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.LaunchFormJsonToLiteralsRequest])) *TranslatorServiceClient_LaunchFormJsonToLiterals_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.LaunchFormJsonToLiteralsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.LaunchFormJsonToLiteralsRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *TranslatorServiceClient_LaunchFormJsonToLiterals_Call) Return(response *connect.Response[workflow.LaunchFormJsonToLiteralsResponse], err error) *TranslatorServiceClient_LaunchFormJsonToLiterals_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *TranslatorServiceClient_LaunchFormJsonToLiterals_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.LaunchFormJsonToLiteralsRequest]) (*connect.Response[workflow.LaunchFormJsonToLiteralsResponse], error)) *TranslatorServiceClient_LaunchFormJsonToLiterals_Call { + _c.Call.Return(run) + return _c +} + +// LiteralsToLaunchFormJson provides a mock function for the type TranslatorServiceClient +func (_mock *TranslatorServiceClient) LiteralsToLaunchFormJson(context1 context.Context, request *connect.Request[workflow.LiteralsToLaunchFormJsonRequest]) (*connect.Response[workflow.LiteralsToLaunchFormJsonResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for LiteralsToLaunchFormJson") + } + + var r0 *connect.Response[workflow.LiteralsToLaunchFormJsonResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.LiteralsToLaunchFormJsonRequest]) (*connect.Response[workflow.LiteralsToLaunchFormJsonResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.LiteralsToLaunchFormJsonRequest]) *connect.Response[workflow.LiteralsToLaunchFormJsonResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.LiteralsToLaunchFormJsonResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.LiteralsToLaunchFormJsonRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// TranslatorServiceClient_LiteralsToLaunchFormJson_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LiteralsToLaunchFormJson' +type TranslatorServiceClient_LiteralsToLaunchFormJson_Call struct { + *mock.Call +} + +// LiteralsToLaunchFormJson is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.LiteralsToLaunchFormJsonRequest] +func (_e *TranslatorServiceClient_Expecter) LiteralsToLaunchFormJson(context1 interface{}, request interface{}) *TranslatorServiceClient_LiteralsToLaunchFormJson_Call { + return &TranslatorServiceClient_LiteralsToLaunchFormJson_Call{Call: _e.mock.On("LiteralsToLaunchFormJson", context1, request)} +} + +func (_c *TranslatorServiceClient_LiteralsToLaunchFormJson_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.LiteralsToLaunchFormJsonRequest])) *TranslatorServiceClient_LiteralsToLaunchFormJson_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.LiteralsToLaunchFormJsonRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.LiteralsToLaunchFormJsonRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *TranslatorServiceClient_LiteralsToLaunchFormJson_Call) Return(response *connect.Response[workflow.LiteralsToLaunchFormJsonResponse], err error) *TranslatorServiceClient_LiteralsToLaunchFormJson_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *TranslatorServiceClient_LiteralsToLaunchFormJson_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.LiteralsToLaunchFormJsonRequest]) (*connect.Response[workflow.LiteralsToLaunchFormJsonResponse], error)) *TranslatorServiceClient_LiteralsToLaunchFormJson_Call { + _c.Call.Return(run) + return _c +} + +// TaskSpecToLaunchFormJson provides a mock function for the type TranslatorServiceClient +func (_mock *TranslatorServiceClient) TaskSpecToLaunchFormJson(context1 context.Context, request *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest]) (*connect.Response[workflow.TaskSpecToLaunchFormJsonResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for TaskSpecToLaunchFormJson") + } + + var r0 *connect.Response[workflow.TaskSpecToLaunchFormJsonResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest]) (*connect.Response[workflow.TaskSpecToLaunchFormJsonResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest]) *connect.Response[workflow.TaskSpecToLaunchFormJsonResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.TaskSpecToLaunchFormJsonResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// TranslatorServiceClient_TaskSpecToLaunchFormJson_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TaskSpecToLaunchFormJson' +type TranslatorServiceClient_TaskSpecToLaunchFormJson_Call struct { + *mock.Call +} + +// TaskSpecToLaunchFormJson is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest] +func (_e *TranslatorServiceClient_Expecter) TaskSpecToLaunchFormJson(context1 interface{}, request interface{}) *TranslatorServiceClient_TaskSpecToLaunchFormJson_Call { + return &TranslatorServiceClient_TaskSpecToLaunchFormJson_Call{Call: _e.mock.On("TaskSpecToLaunchFormJson", context1, request)} +} + +func (_c *TranslatorServiceClient_TaskSpecToLaunchFormJson_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest])) *TranslatorServiceClient_TaskSpecToLaunchFormJson_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.TaskSpecToLaunchFormJsonRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *TranslatorServiceClient_TaskSpecToLaunchFormJson_Call) Return(response *connect.Response[workflow.TaskSpecToLaunchFormJsonResponse], err error) *TranslatorServiceClient_TaskSpecToLaunchFormJson_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *TranslatorServiceClient_TaskSpecToLaunchFormJson_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest]) (*connect.Response[workflow.TaskSpecToLaunchFormJsonResponse], error)) *TranslatorServiceClient_TaskSpecToLaunchFormJson_Call { + _c.Call.Return(run) + return _c +} + +// NewTranslatorServiceHandler creates a new instance of TranslatorServiceHandler. 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 NewTranslatorServiceHandler(t interface { + mock.TestingT + Cleanup(func()) +}) *TranslatorServiceHandler { + mock := &TranslatorServiceHandler{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// TranslatorServiceHandler is an autogenerated mock type for the TranslatorServiceHandler type +type TranslatorServiceHandler struct { + mock.Mock +} + +type TranslatorServiceHandler_Expecter struct { + mock *mock.Mock +} + +func (_m *TranslatorServiceHandler) EXPECT() *TranslatorServiceHandler_Expecter { + return &TranslatorServiceHandler_Expecter{mock: &_m.Mock} +} + +// JsonValuesToLiterals provides a mock function for the type TranslatorServiceHandler +func (_mock *TranslatorServiceHandler) JsonValuesToLiterals(context1 context.Context, request *connect.Request[workflow.JsonValuesToLiteralsRequest]) (*connect.Response[workflow.JsonValuesToLiteralsResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for JsonValuesToLiterals") + } + + var r0 *connect.Response[workflow.JsonValuesToLiteralsResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.JsonValuesToLiteralsRequest]) (*connect.Response[workflow.JsonValuesToLiteralsResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.JsonValuesToLiteralsRequest]) *connect.Response[workflow.JsonValuesToLiteralsResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.JsonValuesToLiteralsResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.JsonValuesToLiteralsRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// TranslatorServiceHandler_JsonValuesToLiterals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'JsonValuesToLiterals' +type TranslatorServiceHandler_JsonValuesToLiterals_Call struct { + *mock.Call +} + +// JsonValuesToLiterals is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.JsonValuesToLiteralsRequest] +func (_e *TranslatorServiceHandler_Expecter) JsonValuesToLiterals(context1 interface{}, request interface{}) *TranslatorServiceHandler_JsonValuesToLiterals_Call { + return &TranslatorServiceHandler_JsonValuesToLiterals_Call{Call: _e.mock.On("JsonValuesToLiterals", context1, request)} +} + +func (_c *TranslatorServiceHandler_JsonValuesToLiterals_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.JsonValuesToLiteralsRequest])) *TranslatorServiceHandler_JsonValuesToLiterals_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.JsonValuesToLiteralsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.JsonValuesToLiteralsRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *TranslatorServiceHandler_JsonValuesToLiterals_Call) Return(response *connect.Response[workflow.JsonValuesToLiteralsResponse], err error) *TranslatorServiceHandler_JsonValuesToLiterals_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *TranslatorServiceHandler_JsonValuesToLiterals_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.JsonValuesToLiteralsRequest]) (*connect.Response[workflow.JsonValuesToLiteralsResponse], error)) *TranslatorServiceHandler_JsonValuesToLiterals_Call { + _c.Call.Return(run) + return _c +} + +// LaunchFormJsonToLiterals provides a mock function for the type TranslatorServiceHandler +func (_mock *TranslatorServiceHandler) LaunchFormJsonToLiterals(context1 context.Context, request *connect.Request[workflow.LaunchFormJsonToLiteralsRequest]) (*connect.Response[workflow.LaunchFormJsonToLiteralsResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for LaunchFormJsonToLiterals") + } + + var r0 *connect.Response[workflow.LaunchFormJsonToLiteralsResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.LaunchFormJsonToLiteralsRequest]) (*connect.Response[workflow.LaunchFormJsonToLiteralsResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.LaunchFormJsonToLiteralsRequest]) *connect.Response[workflow.LaunchFormJsonToLiteralsResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.LaunchFormJsonToLiteralsResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.LaunchFormJsonToLiteralsRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// TranslatorServiceHandler_LaunchFormJsonToLiterals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LaunchFormJsonToLiterals' +type TranslatorServiceHandler_LaunchFormJsonToLiterals_Call struct { + *mock.Call +} + +// LaunchFormJsonToLiterals is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.LaunchFormJsonToLiteralsRequest] +func (_e *TranslatorServiceHandler_Expecter) LaunchFormJsonToLiterals(context1 interface{}, request interface{}) *TranslatorServiceHandler_LaunchFormJsonToLiterals_Call { + return &TranslatorServiceHandler_LaunchFormJsonToLiterals_Call{Call: _e.mock.On("LaunchFormJsonToLiterals", context1, request)} +} + +func (_c *TranslatorServiceHandler_LaunchFormJsonToLiterals_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.LaunchFormJsonToLiteralsRequest])) *TranslatorServiceHandler_LaunchFormJsonToLiterals_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.LaunchFormJsonToLiteralsRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.LaunchFormJsonToLiteralsRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *TranslatorServiceHandler_LaunchFormJsonToLiterals_Call) Return(response *connect.Response[workflow.LaunchFormJsonToLiteralsResponse], err error) *TranslatorServiceHandler_LaunchFormJsonToLiterals_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *TranslatorServiceHandler_LaunchFormJsonToLiterals_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.LaunchFormJsonToLiteralsRequest]) (*connect.Response[workflow.LaunchFormJsonToLiteralsResponse], error)) *TranslatorServiceHandler_LaunchFormJsonToLiterals_Call { + _c.Call.Return(run) + return _c +} + +// LiteralsToLaunchFormJson provides a mock function for the type TranslatorServiceHandler +func (_mock *TranslatorServiceHandler) LiteralsToLaunchFormJson(context1 context.Context, request *connect.Request[workflow.LiteralsToLaunchFormJsonRequest]) (*connect.Response[workflow.LiteralsToLaunchFormJsonResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for LiteralsToLaunchFormJson") + } + + var r0 *connect.Response[workflow.LiteralsToLaunchFormJsonResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.LiteralsToLaunchFormJsonRequest]) (*connect.Response[workflow.LiteralsToLaunchFormJsonResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.LiteralsToLaunchFormJsonRequest]) *connect.Response[workflow.LiteralsToLaunchFormJsonResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.LiteralsToLaunchFormJsonResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.LiteralsToLaunchFormJsonRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// TranslatorServiceHandler_LiteralsToLaunchFormJson_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LiteralsToLaunchFormJson' +type TranslatorServiceHandler_LiteralsToLaunchFormJson_Call struct { + *mock.Call +} + +// LiteralsToLaunchFormJson is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.LiteralsToLaunchFormJsonRequest] +func (_e *TranslatorServiceHandler_Expecter) LiteralsToLaunchFormJson(context1 interface{}, request interface{}) *TranslatorServiceHandler_LiteralsToLaunchFormJson_Call { + return &TranslatorServiceHandler_LiteralsToLaunchFormJson_Call{Call: _e.mock.On("LiteralsToLaunchFormJson", context1, request)} +} + +func (_c *TranslatorServiceHandler_LiteralsToLaunchFormJson_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.LiteralsToLaunchFormJsonRequest])) *TranslatorServiceHandler_LiteralsToLaunchFormJson_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.LiteralsToLaunchFormJsonRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.LiteralsToLaunchFormJsonRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *TranslatorServiceHandler_LiteralsToLaunchFormJson_Call) Return(response *connect.Response[workflow.LiteralsToLaunchFormJsonResponse], err error) *TranslatorServiceHandler_LiteralsToLaunchFormJson_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *TranslatorServiceHandler_LiteralsToLaunchFormJson_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.LiteralsToLaunchFormJsonRequest]) (*connect.Response[workflow.LiteralsToLaunchFormJsonResponse], error)) *TranslatorServiceHandler_LiteralsToLaunchFormJson_Call { + _c.Call.Return(run) + return _c +} + +// TaskSpecToLaunchFormJson provides a mock function for the type TranslatorServiceHandler +func (_mock *TranslatorServiceHandler) TaskSpecToLaunchFormJson(context1 context.Context, request *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest]) (*connect.Response[workflow.TaskSpecToLaunchFormJsonResponse], error) { + ret := _mock.Called(context1, request) + + if len(ret) == 0 { + panic("no return value specified for TaskSpecToLaunchFormJson") + } + + var r0 *connect.Response[workflow.TaskSpecToLaunchFormJsonResponse] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest]) (*connect.Response[workflow.TaskSpecToLaunchFormJsonResponse], error)); ok { + return returnFunc(context1, request) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest]) *connect.Response[workflow.TaskSpecToLaunchFormJsonResponse]); ok { + r0 = returnFunc(context1, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*connect.Response[workflow.TaskSpecToLaunchFormJsonResponse]) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest]) error); ok { + r1 = returnFunc(context1, request) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// TranslatorServiceHandler_TaskSpecToLaunchFormJson_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TaskSpecToLaunchFormJson' +type TranslatorServiceHandler_TaskSpecToLaunchFormJson_Call struct { + *mock.Call +} + +// TaskSpecToLaunchFormJson is a helper method to define mock.On call +// - context1 context.Context +// - request *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest] +func (_e *TranslatorServiceHandler_Expecter) TaskSpecToLaunchFormJson(context1 interface{}, request interface{}) *TranslatorServiceHandler_TaskSpecToLaunchFormJson_Call { + return &TranslatorServiceHandler_TaskSpecToLaunchFormJson_Call{Call: _e.mock.On("TaskSpecToLaunchFormJson", context1, request)} +} + +func (_c *TranslatorServiceHandler_TaskSpecToLaunchFormJson_Call) Run(run func(context1 context.Context, request *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest])) *TranslatorServiceHandler_TaskSpecToLaunchFormJson_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest] + if args[1] != nil { + arg1 = args[1].(*connect.Request[workflow.TaskSpecToLaunchFormJsonRequest]) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *TranslatorServiceHandler_TaskSpecToLaunchFormJson_Call) Return(response *connect.Response[workflow.TaskSpecToLaunchFormJsonResponse], err error) *TranslatorServiceHandler_TaskSpecToLaunchFormJson_Call { + _c.Call.Return(response, err) + return _c +} + +func (_c *TranslatorServiceHandler_TaskSpecToLaunchFormJson_Call) RunAndReturn(run func(context1 context.Context, request *connect.Request[workflow.TaskSpecToLaunchFormJsonRequest]) (*connect.Response[workflow.TaskSpecToLaunchFormJsonResponse], error)) *TranslatorServiceHandler_TaskSpecToLaunchFormJson_Call { + _c.Call.Return(run) + return _c +} diff --git a/runs/repository/mocks/mocks.go b/runs/repository/mocks/mocks.go index a941637f86..06bc646609 100644 --- a/runs/repository/mocks/mocks.go +++ b/runs/repository/mocks/mocks.go @@ -161,7 +161,12 @@ func (_c *ActionRepo_AbortRun_Call) Run(run func(ctx context.Context, runID *com if args[3] != nil { arg3 = args[3].(*common.EnrichedIdentity) } - run(arg0, arg1, arg2, arg3) + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } From 64f85c1022e7c76bbe91abdb597b6a909bae42cf Mon Sep 17 00:00:00 2001 From: "M. Adil Fayyaz" <62440954+AdilFayyaz@users.noreply.github.com> Date: Thu, 16 Apr 2026 15:30:51 -0700 Subject: [PATCH 10/11] fix Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com> --- docker/demo-bundled/manifests/complete.yaml | 180 -------------------- docker/demo-bundled/manifests/dev.yaml | 180 -------------------- 2 files changed, 360 deletions(-) diff --git a/docker/demo-bundled/manifests/complete.yaml b/docker/demo-bundled/manifests/complete.yaml index 9fb613920e..a452dabf7c 100644 --- a/docker/demo-bundled/manifests/complete.yaml +++ b/docker/demo-bundled/manifests/complete.yaml @@ -301,20 +301,6 @@ metadata: name: flyte-binary namespace: flyte --- -apiVersion: v1 -automountServiceAccountToken: true -kind: ServiceAccount -metadata: - labels: - app.kubernetes.io/instance: flyte-demo - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: minio - helm.sh/chart: minio-12.6.7 - name: flyte-demo-minio - namespace: flyte -secrets: -- name: flyte-demo-minio ---- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -644,21 +630,6 @@ stringData: type: Opaque --- apiVersion: v1 -data: - root-password: cjF2aUFDVDlUYg== - root-user: YWRtaW4= -kind: Secret -metadata: - labels: - app.kubernetes.io/instance: flyte-demo - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: minio - helm.sh/chart: minio-12.6.7 - name: flyte-demo-minio - namespace: flyte -type: Opaque ---- -apiVersion: v1 data: access-key: cnVzdGZz secret-key: cnVzdGZzc3RvcmFnZQ== @@ -777,31 +748,6 @@ spec: --- apiVersion: v1 kind: Service -metadata: - labels: - app.kubernetes.io/instance: flyte-demo - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: minio - helm.sh/chart: minio-12.6.7 - name: flyte-demo-minio - namespace: flyte -spec: - ports: - - name: minio-api - nodePort: null - port: 9000 - targetPort: minio-api - - name: minio-console - nodePort: null - port: 9001 - targetPort: minio-console - selector: - app.kubernetes.io/instance: flyte-demo - app.kubernetes.io/name: minio - type: ClusterIP ---- -apiVersion: v1 -kind: Service metadata: labels: app.kubernetes.io/name: embedded-postgresql @@ -859,23 +805,6 @@ spec: --- apiVersion: v1 kind: PersistentVolumeClaim -metadata: - labels: - app.kubernetes.io/instance: flyte-demo - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: minio - helm.sh/chart: minio-12.6.7 - name: flyte-demo-minio - namespace: flyte -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 8Gi ---- -apiVersion: v1 -kind: PersistentVolumeClaim metadata: labels: app.kubernetes.io/instance: flyte-demo @@ -1108,115 +1037,6 @@ spec: --- apiVersion: apps/v1 kind: Deployment -metadata: - labels: - app.kubernetes.io/instance: flyte-demo - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: minio - helm.sh/chart: minio-12.6.7 - name: flyte-demo-minio - namespace: flyte -spec: - selector: - matchLabels: - app.kubernetes.io/instance: flyte-demo - app.kubernetes.io/name: minio - strategy: - type: Recreate - template: - metadata: - annotations: - checksum/credentials-secret: 43f71db202ade73034d075432e7cf0c825dfe9c3d78a690ec0bb4efc71df68fc - labels: - app.kubernetes.io/instance: flyte-demo - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: minio - helm.sh/chart: minio-12.6.7 - spec: - affinity: - nodeAffinity: null - podAffinity: null - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - podAffinityTerm: - labelSelector: - matchLabels: - app.kubernetes.io/instance: flyte-demo - app.kubernetes.io/name: minio - topologyKey: kubernetes.io/hostname - weight: 1 - containers: - - env: - - name: BITNAMI_DEBUG - value: "false" - - name: MINIO_SCHEME - value: http - - name: MINIO_FORCE_NEW_KEYS - value: "no" - - name: MINIO_ROOT_USER - valueFrom: - secretKeyRef: - key: root-user - name: flyte-demo-minio - - name: MINIO_ROOT_PASSWORD - valueFrom: - secretKeyRef: - key: root-password - name: flyte-demo-minio - - name: MINIO_BROWSER - value: "on" - - name: MINIO_PROMETHEUS_AUTH_TYPE - value: public - - name: MINIO_CONSOLE_PORT_NUMBER - value: "9001" - envFrom: null - image: docker.io/bitnami/minio:2023.7.11-debian-11-r0 - imagePullPolicy: IfNotPresent - livenessProbe: - failureThreshold: 5 - httpGet: - path: /minio/health/live - port: minio-api - scheme: HTTP - initialDelaySeconds: 5 - periodSeconds: 5 - successThreshold: 1 - timeoutSeconds: 5 - name: minio - ports: - - containerPort: 9000 - name: minio-api - protocol: TCP - - containerPort: 9001 - name: minio-console - protocol: TCP - readinessProbe: - failureThreshold: 5 - initialDelaySeconds: 5 - periodSeconds: 5 - successThreshold: 1 - tcpSocket: - port: minio-api - timeoutSeconds: 1 - resources: - limits: {} - requests: {} - securityContext: - runAsNonRoot: true - runAsUser: 1001 - volumeMounts: - - mountPath: /data - name: data - securityContext: - fsGroup: 1001 - serviceAccountName: flyte-demo-minio - volumes: - - name: data - persistentVolumeClaim: - claimName: flyte-demo-minio ---- -apiVersion: apps/v1 -kind: Deployment metadata: labels: app.kubernetes.io/instance: flyte-demo diff --git a/docker/demo-bundled/manifests/dev.yaml b/docker/demo-bundled/manifests/dev.yaml index 361ed12003..55e645545f 100644 --- a/docker/demo-bundled/manifests/dev.yaml +++ b/docker/demo-bundled/manifests/dev.yaml @@ -291,20 +291,6 @@ spec: status: {} --- apiVersion: v1 -automountServiceAccountToken: true -kind: ServiceAccount -metadata: - labels: - app.kubernetes.io/instance: flyte-demo - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: minio - helm.sh/chart: minio-12.6.7 - name: flyte-demo-minio - namespace: flyte -secrets: -- name: flyte-demo-minio ---- -apiVersion: v1 data: config.yml: |- health: @@ -356,21 +342,6 @@ metadata: type: Opaque --- apiVersion: v1 -data: - root-password: UE5CVFV3NFlWaA== - root-user: YWRtaW4= -kind: Secret -metadata: - labels: - app.kubernetes.io/instance: flyte-demo - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: minio - helm.sh/chart: minio-12.6.7 - name: flyte-demo-minio - namespace: flyte -type: Opaque ---- -apiVersion: v1 data: access-key: cnVzdGZz secret-key: cnVzdGZzc3RvcmFnZQ== @@ -489,31 +460,6 @@ spec: --- apiVersion: v1 kind: Service -metadata: - labels: - app.kubernetes.io/instance: flyte-demo - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: minio - helm.sh/chart: minio-12.6.7 - name: flyte-demo-minio - namespace: flyte -spec: - ports: - - name: minio-api - nodePort: null - port: 9000 - targetPort: minio-api - - name: minio-console - nodePort: null - port: 9001 - targetPort: minio-console - selector: - app.kubernetes.io/instance: flyte-demo - app.kubernetes.io/name: minio - type: ClusterIP ---- -apiVersion: v1 -kind: Service metadata: labels: app.kubernetes.io/name: embedded-postgresql @@ -571,23 +517,6 @@ spec: --- apiVersion: v1 kind: PersistentVolumeClaim -metadata: - labels: - app.kubernetes.io/instance: flyte-demo - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: minio - helm.sh/chart: minio-12.6.7 - name: flyte-demo-minio - namespace: flyte -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 8Gi ---- -apiVersion: v1 -kind: PersistentVolumeClaim metadata: labels: app.kubernetes.io/instance: flyte-demo @@ -722,115 +651,6 @@ spec: --- apiVersion: apps/v1 kind: Deployment -metadata: - labels: - app.kubernetes.io/instance: flyte-demo - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: minio - helm.sh/chart: minio-12.6.7 - name: flyte-demo-minio - namespace: flyte -spec: - selector: - matchLabels: - app.kubernetes.io/instance: flyte-demo - app.kubernetes.io/name: minio - strategy: - type: Recreate - template: - metadata: - annotations: - checksum/credentials-secret: 461ff2fb69f8a3fe29a90caf76a71cb0e0c5fb57b7e11b74b88c8e9efb4624df - labels: - app.kubernetes.io/instance: flyte-demo - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: minio - helm.sh/chart: minio-12.6.7 - spec: - affinity: - nodeAffinity: null - podAffinity: null - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - podAffinityTerm: - labelSelector: - matchLabels: - app.kubernetes.io/instance: flyte-demo - app.kubernetes.io/name: minio - topologyKey: kubernetes.io/hostname - weight: 1 - containers: - - env: - - name: BITNAMI_DEBUG - value: "false" - - name: MINIO_SCHEME - value: http - - name: MINIO_FORCE_NEW_KEYS - value: "no" - - name: MINIO_ROOT_USER - valueFrom: - secretKeyRef: - key: root-user - name: flyte-demo-minio - - name: MINIO_ROOT_PASSWORD - valueFrom: - secretKeyRef: - key: root-password - name: flyte-demo-minio - - name: MINIO_BROWSER - value: "on" - - name: MINIO_PROMETHEUS_AUTH_TYPE - value: public - - name: MINIO_CONSOLE_PORT_NUMBER - value: "9001" - envFrom: null - image: docker.io/bitnami/minio:2023.7.11-debian-11-r0 - imagePullPolicy: IfNotPresent - livenessProbe: - failureThreshold: 5 - httpGet: - path: /minio/health/live - port: minio-api - scheme: HTTP - initialDelaySeconds: 5 - periodSeconds: 5 - successThreshold: 1 - timeoutSeconds: 5 - name: minio - ports: - - containerPort: 9000 - name: minio-api - protocol: TCP - - containerPort: 9001 - name: minio-console - protocol: TCP - readinessProbe: - failureThreshold: 5 - initialDelaySeconds: 5 - periodSeconds: 5 - successThreshold: 1 - tcpSocket: - port: minio-api - timeoutSeconds: 1 - resources: - limits: {} - requests: {} - securityContext: - runAsNonRoot: true - runAsUser: 1001 - volumeMounts: - - mountPath: /data - name: data - securityContext: - fsGroup: 1001 - serviceAccountName: flyte-demo-minio - volumes: - - name: data - persistentVolumeClaim: - claimName: flyte-demo-minio ---- -apiVersion: apps/v1 -kind: Deployment metadata: labels: app.kubernetes.io/instance: flyte-demo From f994d11229ba496e294a3dc5692d2ec603d19d26 Mon Sep 17 00:00:00 2001 From: "M. Adil Fayyaz" <62440954+AdilFayyaz@users.noreply.github.com> Date: Thu, 16 Apr 2026 17:45:07 -0700 Subject: [PATCH 11/11] fix: use controller Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com> --- actions/k8s/client.go | 2 +- .../pkg/controller/taskaction_controller.go | 13 +++ .../controller/taskaction_controller_test.go | 94 +++++++++++++++++++ .../go/tasks/pluginmachinery/core/phase.go | 6 ++ runs/repository/impl/action.go | 42 --------- runs/repository/impl/action_test.go | 36 +++++++ 6 files changed, 150 insertions(+), 43 deletions(-) diff --git a/actions/k8s/client.go b/actions/k8s/client.go index 3c1c8157a0..9db00c5ef7 100644 --- a/actions/k8s/client.go +++ b/actions/k8s/client.go @@ -553,7 +553,7 @@ func (c *ActionsClient) notifySubscribers(ctx context.Context, update *ActionUpd // notifyRunService forwards a watch event to the internal run service. // On ADDED events it calls RecordAction to create the DB record. -// On all events it calls UpdateActionStatus (when phase is meaningful) and RecordActionEvents. +// On all events it calls UpdateActionStatus (when phase is meaningful) to update the actions table. func (c *ActionsClient) notifyRunService(ctx context.Context, taskAction *executorv1.TaskAction, update *ActionUpdate, eventType watch.EventType) { if c.runClient == nil { return diff --git a/executor/pkg/controller/taskaction_controller.go b/executor/pkg/controller/taskaction_controller.go index 8c59c3f4c9..d30cbd2f79 100644 --- a/executor/pkg/controller/taskaction_controller.go +++ b/executor/pkg/controller/taskaction_controller.go @@ -363,6 +363,19 @@ func (r *TaskActionReconciler) handleAbortAndFinalize(ctx context.Context, taskA } } + abortTime := time.Now() + abortPhaseInfo := pluginsCore.PhaseInfoAborted(abortTime, pluginsCore.DefaultPhaseVersion, "aborted") + actionEvent := r.buildActionEvent(ctx, taskAction, abortPhaseInfo) + // buildActionEvent derives UpdatedTime from PhaseHistory, which doesn't include the + // abort transition. Override it so mergeEvents uses the actual abort time as end_time. + actionEvent.UpdatedTime = timestamppb.New(abortTime) + if _, err := r.eventsClient.Record(ctx, connect.NewRequest(&workflow.RecordRequest{ + Events: []*workflow.ActionEvent{actionEvent}, + })); err != nil { + logger.Error(err, "failed to emit abort event, will retry") + return ctrl.Result{RequeueAfter: TaskActionDefaultRequeueDuration}, nil + } + return r.removeFinalizer(ctx, taskAction) } diff --git a/executor/pkg/controller/taskaction_controller_test.go b/executor/pkg/controller/taskaction_controller_test.go index 5365872179..f30026cbd9 100644 --- a/executor/pkg/controller/taskaction_controller_test.go +++ b/executor/pkg/controller/taskaction_controller_test.go @@ -18,6 +18,7 @@ package controller import ( "context" + "sync" "time" "connectrpc.com/connect" @@ -34,6 +35,7 @@ import ( flyteorgv1 "github.com/flyteorg/flyte/v2/executor/api/v1" pluginsCore "github.com/flyteorg/flyte/v2/flyteplugins/go/tasks/pluginmachinery/core" k8sPlugin "github.com/flyteorg/flyte/v2/flyteplugins/go/tasks/pluginmachinery/k8s" + "github.com/flyteorg/flyte/v2/gen/go/flyteidl2/common" "github.com/flyteorg/flyte/v2/gen/go/flyteidl2/core" "github.com/flyteorg/flyte/v2/gen/go/flyteidl2/workflow" ) @@ -45,6 +47,27 @@ func (f *fakeEventsClient) Record(_ context.Context, _ *connect.Request[workflow return connect.NewResponse(&workflow.RecordResponse{}), nil } +// recordingEventsClient captures all recorded ActionEvents for assertion in tests. +type recordingEventsClient struct { + mu sync.Mutex + events []*workflow.ActionEvent +} + +func (r *recordingEventsClient) Record(_ context.Context, req *connect.Request[workflow.RecordRequest]) (*connect.Response[workflow.RecordResponse], error) { + r.mu.Lock() + defer r.mu.Unlock() + r.events = append(r.events, req.Msg.GetEvents()...) + return connect.NewResponse(&workflow.RecordResponse{}), nil +} + +func (r *recordingEventsClient) RecordedEvents() []*workflow.ActionEvent { + r.mu.Lock() + defer r.mu.Unlock() + out := make([]*workflow.ActionEvent, len(r.events)) + copy(out, r.events) + return out +} + // buildTaskTemplateBytes creates a minimal protobuf-serialized TaskTemplate // with a container spec that the pod plugin can use to build a Pod. func buildTaskTemplateBytes(taskType, image string) []byte { @@ -285,6 +308,77 @@ var _ = Describe("TaskAction Controller", func() { }) }) + Context("When a TaskAction is deleted (abort flow)", func() { + const abortResourceName = "abort-test-resource" + + ctx := context.Background() + + typeNamespacedName := types.NamespacedName{ + Name: abortResourceName, + Namespace: "default", + } + + BeforeEach(func() { + resource := &flyteorgv1.TaskAction{ + ObjectMeta: metav1.ObjectMeta{ + Name: abortResourceName, + Namespace: "default", + Finalizers: []string{taskActionFinalizer}, + }, + Spec: flyteorgv1.TaskActionSpec{ + RunName: "abort-run", + Project: "abort-project", + Domain: "abort-domain", + ActionName: "abort-action", + InputURI: "/tmp/input", + RunOutputBase: "/tmp/output", + TaskType: "python-task", + TaskTemplate: buildTaskTemplateBytes("python-task", "python:3.11"), + }, + } + Expect(k8sClient.Create(ctx, resource)).To(Succeed()) + Expect(k8sClient.Delete(ctx, resource)).To(Succeed()) + }) + + AfterEach(func() { + resource := &flyteorgv1.TaskAction{} + err := k8sClient.Get(ctx, typeNamespacedName, resource) + if err == nil { + resource.Finalizers = nil + Expect(k8sClient.Update(ctx, resource)).To(Succeed()) + } + }) + + It("should emit an ACTION_PHASE_ABORTED event before removing the finalizer", func() { + recorder := &recordingEventsClient{} + reconciler := &TaskActionReconciler{ + Client: k8sClient, + Scheme: k8sClient.Scheme(), + Recorder: record.NewFakeRecorder(10), + PluginRegistry: pluginRegistry, + DataStore: dataStore, + eventsClient: recorder, + } + + result, err := reconciler.Reconcile(ctx, reconcile.Request{NamespacedName: typeNamespacedName}) + Expect(err).NotTo(HaveOccurred()) + Expect(result.RequeueAfter).To(BeZero()) + + // Finalizer should have been removed — object is gone. + deleted := &flyteorgv1.TaskAction{} + Expect(k8sClient.Get(ctx, typeNamespacedName, deleted)).NotTo(Succeed()) + + // An ABORTED event must have been emitted. + recorded := recorder.RecordedEvents() + Expect(recorded).NotTo(BeEmpty()) + phases := make([]interface{}, len(recorded)) + for i, e := range recorded { + phases[i] = e.GetPhase() + } + Expect(phases).To(ContainElement(common.ActionPhase_ACTION_PHASE_ABORTED)) + }) + }) + Context("toClusterEvents", func() { It("should include both phase reason and additional reasons", func() { phaseOccurredAt := time.Date(2026, 4, 2, 10, 0, 0, 0, time.UTC) diff --git a/flyteplugins/go/tasks/pluginmachinery/core/phase.go b/flyteplugins/go/tasks/pluginmachinery/core/phase.go index 7ede39b4c2..de3f48cdbd 100644 --- a/flyteplugins/go/tasks/pluginmachinery/core/phase.go +++ b/flyteplugins/go/tasks/pluginmachinery/core/phase.go @@ -274,6 +274,12 @@ func PhaseInfoSuccess(info *TaskInfo) PhaseInfo { return phaseInfo(PhaseSuccess, DefaultPhaseVersion, nil, info, false) } +func PhaseInfoAborted(t time.Time, version uint32, reason string) PhaseInfo { + pi := phaseInfo(PhaseAborted, version, nil, &TaskInfo{OccurredAt: &t}, false) + pi.reason = reason + return pi +} + func PhaseInfoSystemFailure(code, reason string, info *TaskInfo) PhaseInfo { return phaseInfoFailed(PhasePermanentFailure, &core.ExecutionError{Code: code, Message: reason, Kind: core.ExecutionError_SYSTEM}, info, false) } diff --git a/runs/repository/impl/action.go b/runs/repository/impl/action.go index 235272388c..869aaac779 100644 --- a/runs/repository/impl/action.go +++ b/runs/repository/impl/action.go @@ -15,8 +15,6 @@ import ( "github.com/jmoiron/sqlx" "github.com/lib/pq" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/types/known/timestamppb" "github.com/flyteorg/flyte/v2/flytestdlib/database" "github.com/flyteorg/flyte/v2/flytestdlib/logger" @@ -443,15 +441,6 @@ func (r *actionRepo) UpdateActionPhase( return err } if rowsAffected > 0 { - // Insert an abort event so WatchActionDetails phaseTransitions include ABORTED. - // This must happen before notifyActionUpdate so the event is visible when the - // subscriber re-fetches action events in response to the notification. - if phase == common.ActionPhase_ACTION_PHASE_ABORTED { - if err := r.insertAbortEvent(ctx, actionID, attempts, "", now); err != nil { - logger.Warnf(ctx, "UpdateActionPhase: failed to insert abort event for %s: %v", actionID.Name, err) - } - } - // Notify subscribers of the action update r.notifyActionUpdate(ctx, actionID) } @@ -490,37 +479,6 @@ func (r *actionRepo) AbortAction(ctx context.Context, actionID *common.ActionIde return nil } -// insertAbortEvent writes a single ABORTED phase-transition event into action_events so that -// WatchActionDetails returns a phaseTransitions entry with phase = ABORTED for the action. -// Failures are non-fatal — the caller should log and continue. -func (r *actionRepo) insertAbortEvent(ctx context.Context, actionID *common.ActionIdentifier, attempts uint32, reason string, now time.Time) error { - // Build the minimal ActionEvent proto that mergeEvents will pick up. - event := &workflow.ActionEvent{ - Id: actionID, - Phase: common.ActionPhase_ACTION_PHASE_ABORTED, - Attempt: attempts, - UpdatedTime: timestamppb.New(now), - } - info, err := proto.Marshal(event) - if err != nil { - return fmt.Errorf("marshal abort event: %w", err) - } - - _, err = r.db.ExecContext(ctx, - `INSERT INTO action_events (project, domain, run_name, name, attempt, phase, version, info, error_kind, created_at, updated_at) - VALUES ($1, $2, $3, $4, $5, $6, 0, $7, NULL, $8, $8) - ON CONFLICT DO NOTHING`, - actionID.Run.Project, actionID.Run.Domain, actionID.Run.Name, actionID.Name, - attempts, int32(common.ActionPhase_ACTION_PHASE_ABORTED), info, now, - ) - if err != nil { - return err - } - // Notify after the event is written so WatchActionDetails sees it when it re-fetches. - r.notifyActionUpdate(ctx, actionID) - return nil -} - // ListPendingAborts returns all actions that have abort_requested_at set (i.e. awaiting pod termination). func (r *actionRepo) ListPendingAborts(ctx context.Context) ([]*models.Action, error) { var actions []*models.Action diff --git a/runs/repository/impl/action_test.go b/runs/repository/impl/action_test.go index 5fc6a491bd..019ba8d8c0 100644 --- a/runs/repository/impl/action_test.go +++ b/runs/repository/impl/action_test.go @@ -663,3 +663,39 @@ func TestInsertEvents_WithLogContext(t *testing.T) { require.NoError(t, err) assert.Equal(t, "my-pod", deserialized.GetLogContext().GetPrimaryPodName()) } + +// TestUpdateActionPhase_AbortedDoesNotInsertEvent verifies that transitioning an +// action to ABORTED updates the phase column but does NOT insert a synthetic row +// into action_events. The abort event is now emitted by the controller via +// RecordActionEvents before the TaskAction finalizer is removed. +func TestUpdateActionPhase_AbortedDoesNotInsertEvent(t *testing.T) { + db := setupActionDB(t) + actionRepo, err := NewActionRepo(db, testDbConfig) + require.NoError(t, err) + ctx := context.Background() + + actionID := &common.ActionIdentifier{ + Run: &common.RunIdentifier{Project: "p", Domain: "d", Name: "run-abort"}, + Name: "abort-action", + } + _, err = actionRepo.CreateAction(ctx, models.NewActionModel(actionID), false) + require.NoError(t, err) + + endTime := time.Now() + err = actionRepo.UpdateActionPhase(ctx, actionID, common.ActionPhase_ACTION_PHASE_ABORTED, 1, core.CatalogCacheStatus_CACHE_DISABLED, &endTime) + require.NoError(t, err) + + // Phase column must be updated. + action, err := actionRepo.GetAction(ctx, actionID) + require.NoError(t, err) + assert.Equal(t, int32(common.ActionPhase_ACTION_PHASE_ABORTED), action.Phase) + + // No synthetic event row should have been inserted — the controller now emits the event. + var count int + err = db.QueryRowContext(ctx, + `SELECT COUNT(*) FROM action_events WHERE project=$1 AND domain=$2 AND run_name=$3 AND name=$4`, + actionID.Run.Project, actionID.Run.Domain, actionID.Run.Name, actionID.Name, + ).Scan(&count) + require.NoError(t, err) + assert.Equal(t, 0, count, "UpdateActionPhase(ABORTED) must not insert a synthetic action_events row") +}