-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathApprovalRuleKeySetMessagePayloadModel.php
More file actions
129 lines (112 loc) · 2.77 KB
/
Copy pathApprovalRuleKeySetMessagePayloadModel.php
File metadata and controls
129 lines (112 loc) · 2.77 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<?php
declare(strict_types=1);
/**
* This file has been auto generated
* Do not change it.
*/
namespace Commercetools\Api\Models\Message;
use Commercetools\Base\DateTimeImmutableCollection;
use Commercetools\Base\JsonObject;
use Commercetools\Base\JsonObjectModel;
use Commercetools\Base\MapperFactory;
use stdClass;
/**
* @internal
*/
final class ApprovalRuleKeySetMessagePayloadModel extends JsonObjectModel implements ApprovalRuleKeySetMessagePayload
{
public const DISCRIMINATOR_VALUE = 'ApprovalRuleKeySet';
/**
*
* @var ?string
*/
protected $type;
/**
*
* @var ?string
*/
protected $key;
/**
*
* @var ?string
*/
protected $oldKey;
/**
* @psalm-suppress MissingParamType
*/
public function __construct(
?string $key = null,
?string $oldKey = null,
?string $type = null
) {
$this->key = $key;
$this->oldKey = $oldKey;
$this->type = $type ?? self::DISCRIMINATOR_VALUE;
}
/**
*
* @return null|string
*/
public function getType()
{
if (is_null($this->type)) {
/** @psalm-var ?string $data */
$data = $this->raw(self::FIELD_TYPE);
if (is_null($data)) {
return null;
}
$this->type = (string) $data;
}
return $this->type;
}
/**
* <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()
{
if (is_null($this->key)) {
/** @psalm-var ?string $data */
$data = $this->raw(self::FIELD_KEY);
if (is_null($data)) {
return null;
}
$this->key = (string) $data;
}
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()
{
if (is_null($this->oldKey)) {
/** @psalm-var ?string $data */
$data = $this->raw(self::FIELD_OLD_KEY);
if (is_null($data)) {
return null;
}
$this->oldKey = (string) $data;
}
return $this->oldKey;
}
/**
* @param ?string $key
*/
public function setKey(?string $key): void
{
$this->key = $key;
}
/**
* @param ?string $oldKey
*/
public function setOldKey(?string $oldKey): void
{
$this->oldKey = $oldKey;
}
}