-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add updateWithStart method into WorkflowClientCallsInterceptor
- Loading branch information
Showing
3 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of Temporal package. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Temporal\Interceptor\WorkflowClient; | ||
|
||
/** | ||
* @psalm-immutable | ||
*/ | ||
class UpdateWithStartInput | ||
{ | ||
/** | ||
* @no-named-arguments | ||
* @internal Don't use the constructor. Use {@see self::with()} instead. | ||
*/ | ||
public function __construct( | ||
public readonly StartInput $workflowStartInput, | ||
public readonly UpdateInput $updateInput, | ||
) {} | ||
|
||
public function with( | ||
StartInput $workflowStartInput = null, | ||
UpdateInput $updateInput = null, | ||
): self { | ||
return new self( | ||
$workflowStartInput ?? $this->workflowStartInput, | ||
$updateInput ?? $this->updateInput, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters