-
Notifications
You must be signed in to change notification settings - Fork 13
/
TokenDetailResponse.php
315 lines (273 loc) · 7.32 KB
/
TokenDetailResponse.php
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
<?php
/**
* TokenDetailResponse
*
* PHP version 7.4
*
* @category Class
* @package Walmart
* @author Jesse Evers
* @link https://highsidelabs.co
* @email jesse@highsidelabs.co
*/
/**
* Authentication & Authorization Management
*
* This class is auto-generated by the OpenAPI generator v6.6.0 (https://openapi-generator.tech).
* Do not edit the class manually.
*/
namespace Walmart\Models\MP\US\Authentication;
use Walmart\Models\BaseModel;
/**
* TokenDetailResponse Class Doc Comment
*
* @category Class
* @package Walmart
* @author Jesse Evers
* @link https://highsidelabs.co
* @email jesse@highsidelabs.co
*/
class TokenDetailResponse extends BaseModel
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static string $openAPIModelName = 'TokenDetailResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static array $openAPITypes = [
'scopes' => '\Walmart\Models\MP\US\Authentication\Scopes',
'expireAt' => 'string',
'issuedAt' => 'string',
'isValid' => 'bool',
'isChannelMatch' => 'bool'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static array $openAPIFormats = [
'scopes' => null,
'expireAt' => null,
'issuedAt' => null,
'isValid' => null,
'isChannelMatch' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'scopes' => false,
'expireAt' => false,
'issuedAt' => false,
'isValid' => false,
'isChannelMatch' => false
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static array $attributeMap = [
'scopes' => 'scopes',
'expireAt' => 'expire_at',
'issuedAt' => 'issued_at',
'isValid' => 'is_valid',
'isChannelMatch' => 'is_channel_match'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static array $setters = [
'scopes' => 'setScopes',
'expireAt' => 'setExpireAt',
'issuedAt' => 'setIssuedAt',
'isValid' => 'setIsValid',
'isChannelMatch' => 'setIsChannelMatch'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static array $getters = [
'scopes' => 'getScopes',
'expireAt' => 'getExpireAt',
'issuedAt' => 'getIssuedAt',
'isValid' => 'getIsValid',
'isChannelMatch' => 'getIsChannelMatch'
];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->setIfExists('scopes', $data ?? [], null);
$this->setIfExists('expireAt', $data ?? [], '1560973098000');
$this->setIfExists('issuedAt', $data ?? [], '1560973098000');
$this->setIfExists('isValid', $data ?? [], true);
$this->setIfExists('isChannelMatch', $data ?? [], true);
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['scopes'] === null) {
$invalidProperties[] = "'scopes' can't be null";
}
if ($this->container['expireAt'] === null) {
$invalidProperties[] = "'expireAt' can't be null";
}
if ($this->container['issuedAt'] === null) {
$invalidProperties[] = "'issuedAt' can't be null";
}
if ($this->container['isValid'] === null) {
$invalidProperties[] = "'isValid' can't be null";
}
if ($this->container['isChannelMatch'] === null) {
$invalidProperties[] = "'isChannelMatch' can't be null";
}
return $invalidProperties;
}
/**
* Gets scopes
*
* @return \Walmart\Models\MP\US\Authentication\Scopes
*/
public function getScopes()
{
return $this->container['scopes'];
}
/**
* Sets scopes
*
* @param \Walmart\Models\MP\US\Authentication\Scopes $scopes scopes
*
* @return self
*/
public function setScopes($scopes)
{
if (is_null($scopes)) {
throw new \InvalidArgumentException('non-nullable scopes cannot be null');
}
$this->container['scopes'] = $scopes;
return $this;
}
/**
* Gets expireAt
*
* @return string
*/
public function getExpireAt()
{
return $this->container['expireAt'];
}
/**
* Sets expireAt
*
* @param string $expireAt The timestamp when the token expires
*
* @return self
*/
public function setExpireAt($expireAt)
{
if (is_null($expireAt)) {
throw new \InvalidArgumentException('non-nullable expireAt cannot be null');
}
$this->container['expireAt'] = $expireAt;
return $this;
}
/**
* Gets issuedAt
*
* @return string
*/
public function getIssuedAt()
{
return $this->container['issuedAt'];
}
/**
* Sets issuedAt
*
* @param string $issuedAt The timestamp when the token is issued
*
* @return self
*/
public function setIssuedAt($issuedAt)
{
if (is_null($issuedAt)) {
throw new \InvalidArgumentException('non-nullable issuedAt cannot be null');
}
$this->container['issuedAt'] = $issuedAt;
return $this;
}
/**
* Gets isValid
*
* @return bool
*/
public function getIsValid()
{
return $this->container['isValid'];
}
/**
* Sets isValid
*
* @param bool $isValid Whether the token is valid; boolean value of true or false
*
* @return self
*/
public function setIsValid($isValid)
{
if (is_null($isValid)) {
throw new \InvalidArgumentException('non-nullable isValid cannot be null');
}
$this->container['isValid'] = $isValid;
return $this;
}
/**
* Gets isChannelMatch
*
* @return bool
*/
public function getIsChannelMatch()
{
return $this->container['isChannelMatch'];
}
/**
* Sets isChannelMatch
*
* @param bool $isChannelMatch Whether the keys Seller used are correctly associated
*
* @return self
*/
public function setIsChannelMatch($isChannelMatch)
{
if (is_null($isChannelMatch)) {
throw new \InvalidArgumentException('non-nullable isChannelMatch cannot be null');
}
$this->container['isChannelMatch'] = $isChannelMatch;
return $this;
}
}