-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathApprovalRuleKeySetMessagePayloadBuilder.php
More file actions
92 lines (74 loc) · 1.84 KB
/
Copy pathApprovalRuleKeySetMessagePayloadBuilder.php
File metadata and controls
92 lines (74 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?php
declare(strict_types=1);
/**
* This file has been auto generated
* Do not change it.
*/
namespace Commercetools\Api\Models\Message;
use Commercetools\Base\Builder;
use Commercetools\Base\DateTimeImmutableCollection;
use Commercetools\Base\JsonObject;
use Commercetools\Base\JsonObjectModel;
use Commercetools\Base\MapperFactory;
use stdClass;
/**
* @implements Builder<ApprovalRuleKeySetMessagePayload>
*/
final class ApprovalRuleKeySetMessagePayloadBuilder implements Builder
{
/**
* @var ?string
*/
private $key;
/**
* @var ?string
*/
private $oldKey;
/**
* <p><code>key</code> value of the <a href="ctp:api:type:ApprovalRule">ApprovalRule</a> after the <a href="ctp:api:type:ApprovalRuleSetKeyAction">Set Key</a> update action.</p>
*
* @return null|string
*/
public function getKey()
{
return $this->key;
}
/**
* <p><code>key</code> value of the <a href="ctp:api:type:ApprovalRule">ApprovalRule</a> before the <a href="ctp:api:type:ApprovalRuleSetKeyAction">Set Key</a> update action.</p>
*
* @return null|string
*/
public function getOldKey()
{
return $this->oldKey;
}
/**
* @param ?string $key
* @return $this
*/
public function withKey(?string $key)
{
$this->key = $key;
return $this;
}
/**
* @param ?string $oldKey
* @return $this
*/
public function withOldKey(?string $oldKey)
{
$this->oldKey = $oldKey;
return $this;
}
public function build(): ApprovalRuleKeySetMessagePayload
{
return new ApprovalRuleKeySetMessagePayloadModel(
$this->key,
$this->oldKey
);
}
public static function of(): ApprovalRuleKeySetMessagePayloadBuilder
{
return new self();
}
}