setTemplateDescription()   A
last analyzed

Complexity

Conditions 3
Paths 2

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 4
nc 2
nop 1
dl 0
loc 9
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace StructType;
6
7
use InvalidArgumentException;
8
use WsdlToPhp\PackageBase\AbstractStructBase;
9
10
/**
11
 * This class stands for RightsManagementLicenseDataType StructType
12
 * @package Ews
13
 * @subpackage Structs
14
 * @author WsdlToPhp <[email protected]>
15
 */
16
class EwsRightsManagementLicenseDataType extends AbstractStructBase
17
{
18
    /**
19
     * The RightsManagedMessageDecryptionStatus
20
     * Meta information extracted from the WSDL
21
     * - minOccurs: 0
22
     * @var int|null
23
     */
24
    protected ?int $RightsManagedMessageDecryptionStatus = null;
25
    /**
26
     * The RmsTemplateId
27
     * Meta information extracted from the WSDL
28
     * - minOccurs: 0
29
     * @var string|null
30
     */
31
    protected ?string $RmsTemplateId = null;
32
    /**
33
     * The TemplateName
34
     * Meta information extracted from the WSDL
35
     * - minOccurs: 0
36
     * @var string|null
37
     */
38
    protected ?string $TemplateName = null;
39
    /**
40
     * The TemplateDescription
41
     * Meta information extracted from the WSDL
42
     * - minOccurs: 0
43
     * @var string|null
44
     */
45
    protected ?string $TemplateDescription = null;
46
    /**
47
     * The EditAllowed
48
     * Meta information extracted from the WSDL
49
     * - minOccurs: 0
50
     * @var bool|null
51
     */
52
    protected ?bool $EditAllowed = null;
53
    /**
54
     * The ReplyAllowed
55
     * Meta information extracted from the WSDL
56
     * - minOccurs: 0
57
     * @var bool|null
58
     */
59
    protected ?bool $ReplyAllowed = null;
60
    /**
61
     * The ReplyAllAllowed
62
     * Meta information extracted from the WSDL
63
     * - minOccurs: 0
64
     * @var bool|null
65
     */
66
    protected ?bool $ReplyAllAllowed = null;
67
    /**
68
     * The ForwardAllowed
69
     * Meta information extracted from the WSDL
70
     * - minOccurs: 0
71
     * @var bool|null
72
     */
73
    protected ?bool $ForwardAllowed = null;
74
    /**
75
     * The ModifyRecipientsAllowed
76
     * Meta information extracted from the WSDL
77
     * - minOccurs: 0
78
     * @var bool|null
79
     */
80
    protected ?bool $ModifyRecipientsAllowed = null;
81
    /**
82
     * The ExtractAllowed
83
     * Meta information extracted from the WSDL
84
     * - minOccurs: 0
85
     * @var bool|null
86
     */
87
    protected ?bool $ExtractAllowed = null;
88
    /**
89
     * The PrintAllowed
90
     * Meta information extracted from the WSDL
91
     * - minOccurs: 0
92
     * @var bool|null
93
     */
94
    protected ?bool $PrintAllowed = null;
95
    /**
96
     * The ExportAllowed
97
     * Meta information extracted from the WSDL
98
     * - minOccurs: 0
99
     * @var bool|null
100
     */
101
    protected ?bool $ExportAllowed = null;
102
    /**
103
     * The ProgrammaticAccessAllowed
104
     * Meta information extracted from the WSDL
105
     * - minOccurs: 0
106
     * @var bool|null
107
     */
108
    protected ?bool $ProgrammaticAccessAllowed = null;
109
    /**
110
     * The IsOwner
111
     * Meta information extracted from the WSDL
112
     * - minOccurs: 0
113
     * @var bool|null
114
     */
115
    protected ?bool $IsOwner = null;
116
    /**
117
     * The ContentOwner
118
     * Meta information extracted from the WSDL
119
     * - minOccurs: 0
120
     * @var string|null
121
     */
122
    protected ?string $ContentOwner = null;
123
    /**
124
     * The ContentExpiryDate
125
     * Meta information extracted from the WSDL
126
     * - minOccurs: 0
127
     * @var string|null
128
     */
129
    protected ?string $ContentExpiryDate = null;
130
    /**
131
     * Constructor method for RightsManagementLicenseDataType
132
     * @uses EwsRightsManagementLicenseDataType::setRightsManagedMessageDecryptionStatus()
133
     * @uses EwsRightsManagementLicenseDataType::setRmsTemplateId()
134
     * @uses EwsRightsManagementLicenseDataType::setTemplateName()
135
     * @uses EwsRightsManagementLicenseDataType::setTemplateDescription()
136
     * @uses EwsRightsManagementLicenseDataType::setEditAllowed()
137
     * @uses EwsRightsManagementLicenseDataType::setReplyAllowed()
138
     * @uses EwsRightsManagementLicenseDataType::setReplyAllAllowed()
139
     * @uses EwsRightsManagementLicenseDataType::setForwardAllowed()
140
     * @uses EwsRightsManagementLicenseDataType::setModifyRecipientsAllowed()
141
     * @uses EwsRightsManagementLicenseDataType::setExtractAllowed()
142
     * @uses EwsRightsManagementLicenseDataType::setPrintAllowed()
143
     * @uses EwsRightsManagementLicenseDataType::setExportAllowed()
144
     * @uses EwsRightsManagementLicenseDataType::setProgrammaticAccessAllowed()
145
     * @uses EwsRightsManagementLicenseDataType::setIsOwner()
146
     * @uses EwsRightsManagementLicenseDataType::setContentOwner()
147
     * @uses EwsRightsManagementLicenseDataType::setContentExpiryDate()
148
     * @param int $rightsManagedMessageDecryptionStatus
149
     * @param string $rmsTemplateId
150
     * @param string $templateName
151
     * @param string $templateDescription
152
     * @param bool $editAllowed
153
     * @param bool $replyAllowed
154
     * @param bool $replyAllAllowed
155
     * @param bool $forwardAllowed
156
     * @param bool $modifyRecipientsAllowed
157
     * @param bool $extractAllowed
158
     * @param bool $printAllowed
159
     * @param bool $exportAllowed
160
     * @param bool $programmaticAccessAllowed
161
     * @param bool $isOwner
162
     * @param string $contentOwner
163
     * @param string $contentExpiryDate
164
     */
165
    public function __construct(?int $rightsManagedMessageDecryptionStatus = null, ?string $rmsTemplateId = null, ?string $templateName = null, ?string $templateDescription = null, ?bool $editAllowed = null, ?bool $replyAllowed = null, ?bool $replyAllAllowed = null, ?bool $forwardAllowed = null, ?bool $modifyRecipientsAllowed = null, ?bool $extractAllowed = null, ?bool $printAllowed = null, ?bool $exportAllowed = null, ?bool $programmaticAccessAllowed = null, ?bool $isOwner = null, ?string $contentOwner = null, ?string $contentExpiryDate = null)
166
    {
167
        $this
168
            ->setRightsManagedMessageDecryptionStatus($rightsManagedMessageDecryptionStatus)
169
            ->setRmsTemplateId($rmsTemplateId)
170
            ->setTemplateName($templateName)
171
            ->setTemplateDescription($templateDescription)
172
            ->setEditAllowed($editAllowed)
173
            ->setReplyAllowed($replyAllowed)
174
            ->setReplyAllAllowed($replyAllAllowed)
175
            ->setForwardAllowed($forwardAllowed)
176
            ->setModifyRecipientsAllowed($modifyRecipientsAllowed)
177
            ->setExtractAllowed($extractAllowed)
178
            ->setPrintAllowed($printAllowed)
179
            ->setExportAllowed($exportAllowed)
180
            ->setProgrammaticAccessAllowed($programmaticAccessAllowed)
181
            ->setIsOwner($isOwner)
182
            ->setContentOwner($contentOwner)
183
            ->setContentExpiryDate($contentExpiryDate);
184
    }
185
    /**
186
     * Get RightsManagedMessageDecryptionStatus value
187
     * @return int|null
188
     */
189
    public function getRightsManagedMessageDecryptionStatus(): ?int
190
    {
191
        return $this->RightsManagedMessageDecryptionStatus;
192
    }
193
    /**
194
     * Set RightsManagedMessageDecryptionStatus value
195
     * @param int $rightsManagedMessageDecryptionStatus
196
     * @return \StructType\EwsRightsManagementLicenseDataType
197
     */
198
    public function setRightsManagedMessageDecryptionStatus(?int $rightsManagedMessageDecryptionStatus = null): self
199
    {
200
        // validation for constraint: int
201
        if (!is_null($rightsManagedMessageDecryptionStatus) && !(is_int($rightsManagedMessageDecryptionStatus) || ctype_digit($rightsManagedMessageDecryptionStatus))) {
0 ignored issues
show
introduced by
The condition is_int($rightsManagedMessageDecryptionStatus) is always true.
Loading history...
202
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($rightsManagedMessageDecryptionStatus, true), gettype($rightsManagedMessageDecryptionStatus)), __LINE__);
203
        }
204
        $this->RightsManagedMessageDecryptionStatus = $rightsManagedMessageDecryptionStatus;
205
        
206
        return $this;
207
    }
208
    /**
209
     * Get RmsTemplateId value
210
     * @return string|null
211
     */
212
    public function getRmsTemplateId(): ?string
213
    {
214
        return $this->RmsTemplateId;
215
    }
216
    /**
217
     * Set RmsTemplateId value
218
     * @param string $rmsTemplateId
219
     * @return \StructType\EwsRightsManagementLicenseDataType
220
     */
221
    public function setRmsTemplateId(?string $rmsTemplateId = null): self
222
    {
223
        // validation for constraint: string
224
        if (!is_null($rmsTemplateId) && !is_string($rmsTemplateId)) {
0 ignored issues
show
introduced by
The condition is_string($rmsTemplateId) is always true.
Loading history...
225
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($rmsTemplateId, true), gettype($rmsTemplateId)), __LINE__);
226
        }
227
        $this->RmsTemplateId = $rmsTemplateId;
228
        
229
        return $this;
230
    }
231
    /**
232
     * Get TemplateName value
233
     * @return string|null
234
     */
235
    public function getTemplateName(): ?string
236
    {
237
        return $this->TemplateName;
238
    }
239
    /**
240
     * Set TemplateName value
241
     * @param string $templateName
242
     * @return \StructType\EwsRightsManagementLicenseDataType
243
     */
244
    public function setTemplateName(?string $templateName = null): self
245
    {
246
        // validation for constraint: string
247
        if (!is_null($templateName) && !is_string($templateName)) {
0 ignored issues
show
introduced by
The condition is_string($templateName) is always true.
Loading history...
248
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($templateName, true), gettype($templateName)), __LINE__);
249
        }
250
        $this->TemplateName = $templateName;
251
        
252
        return $this;
253
    }
254
    /**
255
     * Get TemplateDescription value
256
     * @return string|null
257
     */
258
    public function getTemplateDescription(): ?string
259
    {
260
        return $this->TemplateDescription;
261
    }
262
    /**
263
     * Set TemplateDescription value
264
     * @param string $templateDescription
265
     * @return \StructType\EwsRightsManagementLicenseDataType
266
     */
267
    public function setTemplateDescription(?string $templateDescription = null): self
268
    {
269
        // validation for constraint: string
270
        if (!is_null($templateDescription) && !is_string($templateDescription)) {
0 ignored issues
show
introduced by
The condition is_string($templateDescription) is always true.
Loading history...
271
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($templateDescription, true), gettype($templateDescription)), __LINE__);
272
        }
273
        $this->TemplateDescription = $templateDescription;
274
        
275
        return $this;
276
    }
277
    /**
278
     * Get EditAllowed value
279
     * @return bool|null
280
     */
281
    public function getEditAllowed(): ?bool
282
    {
283
        return $this->EditAllowed;
284
    }
285
    /**
286
     * Set EditAllowed value
287
     * @param bool $editAllowed
288
     * @return \StructType\EwsRightsManagementLicenseDataType
289
     */
290
    public function setEditAllowed(?bool $editAllowed = null): self
291
    {
292
        // validation for constraint: boolean
293
        if (!is_null($editAllowed) && !is_bool($editAllowed)) {
0 ignored issues
show
introduced by
The condition is_bool($editAllowed) is always true.
Loading history...
294
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($editAllowed, true), gettype($editAllowed)), __LINE__);
295
        }
296
        $this->EditAllowed = $editAllowed;
297
        
298
        return $this;
299
    }
300
    /**
301
     * Get ReplyAllowed value
302
     * @return bool|null
303
     */
304
    public function getReplyAllowed(): ?bool
305
    {
306
        return $this->ReplyAllowed;
307
    }
308
    /**
309
     * Set ReplyAllowed value
310
     * @param bool $replyAllowed
311
     * @return \StructType\EwsRightsManagementLicenseDataType
312
     */
313
    public function setReplyAllowed(?bool $replyAllowed = null): self
314
    {
315
        // validation for constraint: boolean
316
        if (!is_null($replyAllowed) && !is_bool($replyAllowed)) {
0 ignored issues
show
introduced by
The condition is_bool($replyAllowed) is always true.
Loading history...
317
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($replyAllowed, true), gettype($replyAllowed)), __LINE__);
318
        }
319
        $this->ReplyAllowed = $replyAllowed;
320
        
321
        return $this;
322
    }
323
    /**
324
     * Get ReplyAllAllowed value
325
     * @return bool|null
326
     */
327
    public function getReplyAllAllowed(): ?bool
328
    {
329
        return $this->ReplyAllAllowed;
330
    }
331
    /**
332
     * Set ReplyAllAllowed value
333
     * @param bool $replyAllAllowed
334
     * @return \StructType\EwsRightsManagementLicenseDataType
335
     */
336
    public function setReplyAllAllowed(?bool $replyAllAllowed = null): self
337
    {
338
        // validation for constraint: boolean
339
        if (!is_null($replyAllAllowed) && !is_bool($replyAllAllowed)) {
0 ignored issues
show
introduced by
The condition is_bool($replyAllAllowed) is always true.
Loading history...
340
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($replyAllAllowed, true), gettype($replyAllAllowed)), __LINE__);
341
        }
342
        $this->ReplyAllAllowed = $replyAllAllowed;
343
        
344
        return $this;
345
    }
346
    /**
347
     * Get ForwardAllowed value
348
     * @return bool|null
349
     */
350
    public function getForwardAllowed(): ?bool
351
    {
352
        return $this->ForwardAllowed;
353
    }
354
    /**
355
     * Set ForwardAllowed value
356
     * @param bool $forwardAllowed
357
     * @return \StructType\EwsRightsManagementLicenseDataType
358
     */
359
    public function setForwardAllowed(?bool $forwardAllowed = null): self
360
    {
361
        // validation for constraint: boolean
362
        if (!is_null($forwardAllowed) && !is_bool($forwardAllowed)) {
0 ignored issues
show
introduced by
The condition is_bool($forwardAllowed) is always true.
Loading history...
363
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($forwardAllowed, true), gettype($forwardAllowed)), __LINE__);
364
        }
365
        $this->ForwardAllowed = $forwardAllowed;
366
        
367
        return $this;
368
    }
369
    /**
370
     * Get ModifyRecipientsAllowed value
371
     * @return bool|null
372
     */
373
    public function getModifyRecipientsAllowed(): ?bool
374
    {
375
        return $this->ModifyRecipientsAllowed;
376
    }
377
    /**
378
     * Set ModifyRecipientsAllowed value
379
     * @param bool $modifyRecipientsAllowed
380
     * @return \StructType\EwsRightsManagementLicenseDataType
381
     */
382
    public function setModifyRecipientsAllowed(?bool $modifyRecipientsAllowed = null): self
383
    {
384
        // validation for constraint: boolean
385
        if (!is_null($modifyRecipientsAllowed) && !is_bool($modifyRecipientsAllowed)) {
0 ignored issues
show
introduced by
The condition is_bool($modifyRecipientsAllowed) is always true.
Loading history...
386
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($modifyRecipientsAllowed, true), gettype($modifyRecipientsAllowed)), __LINE__);
387
        }
388
        $this->ModifyRecipientsAllowed = $modifyRecipientsAllowed;
389
        
390
        return $this;
391
    }
392
    /**
393
     * Get ExtractAllowed value
394
     * @return bool|null
395
     */
396
    public function getExtractAllowed(): ?bool
397
    {
398
        return $this->ExtractAllowed;
399
    }
400
    /**
401
     * Set ExtractAllowed value
402
     * @param bool $extractAllowed
403
     * @return \StructType\EwsRightsManagementLicenseDataType
404
     */
405
    public function setExtractAllowed(?bool $extractAllowed = null): self
406
    {
407
        // validation for constraint: boolean
408
        if (!is_null($extractAllowed) && !is_bool($extractAllowed)) {
0 ignored issues
show
introduced by
The condition is_bool($extractAllowed) is always true.
Loading history...
409
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($extractAllowed, true), gettype($extractAllowed)), __LINE__);
410
        }
411
        $this->ExtractAllowed = $extractAllowed;
412
        
413
        return $this;
414
    }
415
    /**
416
     * Get PrintAllowed value
417
     * @return bool|null
418
     */
419
    public function getPrintAllowed(): ?bool
420
    {
421
        return $this->PrintAllowed;
422
    }
423
    /**
424
     * Set PrintAllowed value
425
     * @param bool $printAllowed
426
     * @return \StructType\EwsRightsManagementLicenseDataType
427
     */
428
    public function setPrintAllowed(?bool $printAllowed = null): self
429
    {
430
        // validation for constraint: boolean
431
        if (!is_null($printAllowed) && !is_bool($printAllowed)) {
0 ignored issues
show
introduced by
The condition is_bool($printAllowed) is always true.
Loading history...
432
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($printAllowed, true), gettype($printAllowed)), __LINE__);
433
        }
434
        $this->PrintAllowed = $printAllowed;
435
        
436
        return $this;
437
    }
438
    /**
439
     * Get ExportAllowed value
440
     * @return bool|null
441
     */
442
    public function getExportAllowed(): ?bool
443
    {
444
        return $this->ExportAllowed;
445
    }
446
    /**
447
     * Set ExportAllowed value
448
     * @param bool $exportAllowed
449
     * @return \StructType\EwsRightsManagementLicenseDataType
450
     */
451
    public function setExportAllowed(?bool $exportAllowed = null): self
452
    {
453
        // validation for constraint: boolean
454
        if (!is_null($exportAllowed) && !is_bool($exportAllowed)) {
0 ignored issues
show
introduced by
The condition is_bool($exportAllowed) is always true.
Loading history...
455
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($exportAllowed, true), gettype($exportAllowed)), __LINE__);
456
        }
457
        $this->ExportAllowed = $exportAllowed;
458
        
459
        return $this;
460
    }
461
    /**
462
     * Get ProgrammaticAccessAllowed value
463
     * @return bool|null
464
     */
465
    public function getProgrammaticAccessAllowed(): ?bool
466
    {
467
        return $this->ProgrammaticAccessAllowed;
468
    }
469
    /**
470
     * Set ProgrammaticAccessAllowed value
471
     * @param bool $programmaticAccessAllowed
472
     * @return \StructType\EwsRightsManagementLicenseDataType
473
     */
474
    public function setProgrammaticAccessAllowed(?bool $programmaticAccessAllowed = null): self
475
    {
476
        // validation for constraint: boolean
477
        if (!is_null($programmaticAccessAllowed) && !is_bool($programmaticAccessAllowed)) {
0 ignored issues
show
introduced by
The condition is_bool($programmaticAccessAllowed) is always true.
Loading history...
478
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($programmaticAccessAllowed, true), gettype($programmaticAccessAllowed)), __LINE__);
479
        }
480
        $this->ProgrammaticAccessAllowed = $programmaticAccessAllowed;
481
        
482
        return $this;
483
    }
484
    /**
485
     * Get IsOwner value
486
     * @return bool|null
487
     */
488
    public function getIsOwner(): ?bool
489
    {
490
        return $this->IsOwner;
491
    }
492
    /**
493
     * Set IsOwner value
494
     * @param bool $isOwner
495
     * @return \StructType\EwsRightsManagementLicenseDataType
496
     */
497
    public function setIsOwner(?bool $isOwner = null): self
498
    {
499
        // validation for constraint: boolean
500
        if (!is_null($isOwner) && !is_bool($isOwner)) {
0 ignored issues
show
introduced by
The condition is_bool($isOwner) is always true.
Loading history...
501
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($isOwner, true), gettype($isOwner)), __LINE__);
502
        }
503
        $this->IsOwner = $isOwner;
504
        
505
        return $this;
506
    }
507
    /**
508
     * Get ContentOwner value
509
     * @return string|null
510
     */
511
    public function getContentOwner(): ?string
512
    {
513
        return $this->ContentOwner;
514
    }
515
    /**
516
     * Set ContentOwner value
517
     * @param string $contentOwner
518
     * @return \StructType\EwsRightsManagementLicenseDataType
519
     */
520
    public function setContentOwner(?string $contentOwner = null): self
521
    {
522
        // validation for constraint: string
523
        if (!is_null($contentOwner) && !is_string($contentOwner)) {
0 ignored issues
show
introduced by
The condition is_string($contentOwner) is always true.
Loading history...
524
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($contentOwner, true), gettype($contentOwner)), __LINE__);
525
        }
526
        $this->ContentOwner = $contentOwner;
527
        
528
        return $this;
529
    }
530
    /**
531
     * Get ContentExpiryDate value
532
     * @return string|null
533
     */
534
    public function getContentExpiryDate(): ?string
535
    {
536
        return $this->ContentExpiryDate;
537
    }
538
    /**
539
     * Set ContentExpiryDate value
540
     * @param string $contentExpiryDate
541
     * @return \StructType\EwsRightsManagementLicenseDataType
542
     */
543
    public function setContentExpiryDate(?string $contentExpiryDate = null): self
544
    {
545
        // validation for constraint: string
546
        if (!is_null($contentExpiryDate) && !is_string($contentExpiryDate)) {
0 ignored issues
show
introduced by
The condition is_string($contentExpiryDate) is always true.
Loading history...
547
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($contentExpiryDate, true), gettype($contentExpiryDate)), __LINE__);
548
        }
549
        $this->ContentExpiryDate = $contentExpiryDate;
550
        
551
        return $this;
552
    }
553
}
554