1: <?php declare(strict_types=1);
2:
3: namespace Salient\Sync;
4:
5: use Salient\Contract\Core\DateFormatterInterface;
6: use Salient\Contract\Sync\SyncEntityInterface;
7: use Salient\Contract\Sync\SyncStoreInterface;
8: use Salient\Core\Builder;
9: use Closure;
10:
11: /**
12: * @method $this recurseRules(bool|null $value = true) Apply path-based rules to nested instances of the entity? (default: true)
13: * @method $this dateFormatter(DateFormatterInterface|null $value) Date formatter applied to the instance
14: * @method $this dynamicProperties(bool|null $value = true) Include dynamic properties when the entity is serialized? (default: true)
15: * @method $this sortByKey(bool|null $value = true) Sort serialized entities by key? (default: false)
16: * @method $this maxDepth(int|null $value) Maximum depth of nested values (default: 99)
17: * @method $this detectRecursion(bool|null $value = true) Detect recursion when nested entities are serialized? (default: true)
18: * @method $this forSyncStore(bool|null $value = true) Serialize entities for an entity store? (default: false)
19: * @method $this canonicalId(bool|null $value = true) Include canonical identifiers when sync entities are serialized? (default: false)
20: * @method $this remove(array<array<(array{string,...}&array<(Closure(mixed, SyncStoreInterface|null, SyncSerializeRules<TEntity>): mixed)|string|null>)|string>|(array{string,...}&array<(Closure(mixed, SyncStoreInterface|null, SyncSerializeRules<TEntity>): mixed)|string|null>)|string> $value) Values to remove
21: * @method $this replace(array<array<(array{string,...}&array<(Closure(mixed, SyncStoreInterface|null, SyncSerializeRules<TEntity>): mixed)|string|null>)|string>|(array{string,...}&array<(Closure(mixed, SyncStoreInterface|null, SyncSerializeRules<TEntity>): mixed)|string|null>)|string> $value) Values to replace
22: *
23: * @template TEntity of SyncEntityInterface
24: *
25: * @extends Builder<SyncSerializeRules<TEntity>>
26: *
27: * @generated
28: */
29: final class SyncSerializeRulesBuilder extends Builder
30: {
31: /**
32: * @internal
33: */
34: protected static function getService(): string
35: {
36: return SyncSerializeRules::class;
37: }
38:
39: /**
40: * Entity to which the instance applies (required)
41: *
42: * @template T of SyncEntityInterface
43: *
44: * @param class-string<T> $value
45: * @return static<T>
46: */
47: public function entity(string $value)
48: {
49: /** @var static<T> */
50: return $this->withValueB(__FUNCTION__, $value);
51: }
52:
53: /**
54: * Inherit rules from another instance
55: *
56: * @template T of SyncEntityInterface
57: *
58: * @param SyncSerializeRules<T>|null $value
59: * @return static<T>
60: */
61: public function inherit(?SyncSerializeRules $value)
62: {
63: /** @var static<T> */
64: return $this->withValueB(__FUNCTION__, $value);
65: }
66: }
67: