TelephonyVoicemailOptionsModify   F
last analyzed

Complexity

Total Complexity 81

Size/Duplication

Total Lines 648
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 142
dl 0
loc 648
rs 2
c 0
b 0
f 0
wmc 81

41 Methods

Rating   Name   Duplication   Size   Complexity  
A getRedirection5Email() 0 3 1
A setRedirection5Email() 0 8 3
A getNumber() 0 3 1
A setRedirection4Email() 0 8 3
A __construct() 0 23 1
A setRedirection3() 0 8 3
A setRedirection5() 0 8 3
A getSession() 0 3 1
A setRedirection3Email() 0 8 3
A getForcePassword() 0 3 1
A setFromEmail() 0 8 3
A setAudioformat() 0 8 3
A getFromName() 0 3 1
A setRedirection1() 0 8 3
A getRedirection3Email() 0 3 1
A setAnnounceMessage() 0 8 3
A setNumber() 0 8 3
A setRedirection4() 0 8 3
A getRedirection1() 0 3 1
A getAnnounceMessage() 0 3 1
A getCountry() 0 3 1
A setRedirection2() 0 8 3
A getAudioformat() 0 3 1
A getRedirection4Email() 0 3 1
A setForcePassword() 0 8 3
A getKeepMessage() 0 3 1
A getRedirection2Email() 0 3 1
A getRedirection4() 0 3 1
A setRedirection1Email() 0 8 3
A setRedirection2Email() 0 8 3
A getRedirection5() 0 3 1
A setCountry() 0 8 3
A setFromName() 0 8 3
A getRedirection2() 0 3 1
A getFromEmail() 0 3 1
A setSession() 0 8 3
A getRedirection1Email() 0 3 1
A setKeepMessage() 0 8 3
A getRedirection3() 0 3 1
A getDoNotRecord() 0 3 1
A setDoNotRecord() 0 8 3

How to fix   Complexity   

Complex Class

Complex classes like TelephonyVoicemailOptionsModify often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.

Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.

While breaking up the class, it is a good idea to analyze how other classes use TelephonyVoicemailOptionsModify, and based on these observations, apply Extract Interface, too.

1
<?php
2
3
namespace Ovh\StructType;
4
5
use \WsdlToPhp\PackageBase\AbstractStructBase;
6
7
/**
8
 * This class stands for telephonyVoicemailOptionsModify StructType
9
 * @subpackage Structs
10
 * @author WsdlToPhp <[email protected]>
11
 */
12
class TelephonyVoicemailOptionsModify extends AbstractStructBase
13
{
14
    /**
15
     * The session
16
     * Meta information extracted from the WSDL
17
     * - nillable: true
18
     * @var string
19
     */
20
    public $session;
21
    /**
22
     * The number
23
     * Meta information extracted from the WSDL
24
     * - nillable: true
25
     * @var string
26
     */
27
    public $number;
28
    /**
29
     * The country
30
     * Meta information extracted from the WSDL
31
     * - nillable: true
32
     * @var string
33
     */
34
    public $country;
35
    /**
36
     * The redirection1
37
     * Meta information extracted from the WSDL
38
     * - nillable: true
39
     * @var string
40
     */
41
    public $redirection1;
42
    /**
43
     * The redirection1Email
44
     * Meta information extracted from the WSDL
45
     * - nillable: true
46
     * @var string
47
     */
48
    public $redirection1Email;
49
    /**
50
     * The redirection2
51
     * Meta information extracted from the WSDL
52
     * - nillable: true
53
     * @var string
54
     */
55
    public $redirection2;
56
    /**
57
     * The redirection2Email
58
     * Meta information extracted from the WSDL
59
     * - nillable: true
60
     * @var string
61
     */
62
    public $redirection2Email;
63
    /**
64
     * The redirection3
65
     * Meta information extracted from the WSDL
66
     * - nillable: true
67
     * @var string
68
     */
69
    public $redirection3;
70
    /**
71
     * The redirection3Email
72
     * Meta information extracted from the WSDL
73
     * - nillable: true
74
     * @var string
75
     */
76
    public $redirection3Email;
77
    /**
78
     * The redirection4
79
     * Meta information extracted from the WSDL
80
     * - nillable: true
81
     * @var string
82
     */
83
    public $redirection4;
84
    /**
85
     * The redirection4Email
86
     * Meta information extracted from the WSDL
87
     * - nillable: true
88
     * @var string
89
     */
90
    public $redirection4Email;
91
    /**
92
     * The redirection5
93
     * Meta information extracted from the WSDL
94
     * - nillable: true
95
     * @var string
96
     */
97
    public $redirection5;
98
    /**
99
     * The redirection5Email
100
     * Meta information extracted from the WSDL
101
     * - nillable: true
102
     * @var string
103
     */
104
    public $redirection5Email;
105
    /**
106
     * The announceMessage
107
     * Meta information extracted from the WSDL
108
     * - nillable: true
109
     * @var string
110
     */
111
    public $announceMessage;
112
    /**
113
     * The keepMessage
114
     * Meta information extracted from the WSDL
115
     * - nillable: true
116
     * @var bool
117
     */
118
    public $keepMessage;
119
    /**
120
     * The audioformat
121
     * Meta information extracted from the WSDL
122
     * - nillable: true
123
     * @var string
124
     */
125
    public $audioformat;
126
    /**
127
     * The fromEmail
128
     * Meta information extracted from the WSDL
129
     * - nillable: true
130
     * @var string
131
     */
132
    public $fromEmail;
133
    /**
134
     * The fromName
135
     * Meta information extracted from the WSDL
136
     * - nillable: true
137
     * @var string
138
     */
139
    public $fromName;
140
    /**
141
     * The doNotRecord
142
     * Meta information extracted from the WSDL
143
     * - nillable: true
144
     * @var bool
145
     */
146
    public $doNotRecord;
147
    /**
148
     * The forcePassword
149
     * Meta information extracted from the WSDL
150
     * - nillable: true
151
     * @var bool
152
     */
153
    public $forcePassword;
154
    /**
155
     * Constructor method for telephonyVoicemailOptionsModify
156
     * @uses TelephonyVoicemailOptionsModify::setSession()
157
     * @uses TelephonyVoicemailOptionsModify::setNumber()
158
     * @uses TelephonyVoicemailOptionsModify::setCountry()
159
     * @uses TelephonyVoicemailOptionsModify::setRedirection1()
160
     * @uses TelephonyVoicemailOptionsModify::setRedirection1Email()
161
     * @uses TelephonyVoicemailOptionsModify::setRedirection2()
162
     * @uses TelephonyVoicemailOptionsModify::setRedirection2Email()
163
     * @uses TelephonyVoicemailOptionsModify::setRedirection3()
164
     * @uses TelephonyVoicemailOptionsModify::setRedirection3Email()
165
     * @uses TelephonyVoicemailOptionsModify::setRedirection4()
166
     * @uses TelephonyVoicemailOptionsModify::setRedirection4Email()
167
     * @uses TelephonyVoicemailOptionsModify::setRedirection5()
168
     * @uses TelephonyVoicemailOptionsModify::setRedirection5Email()
169
     * @uses TelephonyVoicemailOptionsModify::setAnnounceMessage()
170
     * @uses TelephonyVoicemailOptionsModify::setKeepMessage()
171
     * @uses TelephonyVoicemailOptionsModify::setAudioformat()
172
     * @uses TelephonyVoicemailOptionsModify::setFromEmail()
173
     * @uses TelephonyVoicemailOptionsModify::setFromName()
174
     * @uses TelephonyVoicemailOptionsModify::setDoNotRecord()
175
     * @uses TelephonyVoicemailOptionsModify::setForcePassword()
176
     * @param string $session
177
     * @param string $number
178
     * @param string $country
179
     * @param string $redirection1
180
     * @param string $redirection1Email
181
     * @param string $redirection2
182
     * @param string $redirection2Email
183
     * @param string $redirection3
184
     * @param string $redirection3Email
185
     * @param string $redirection4
186
     * @param string $redirection4Email
187
     * @param string $redirection5
188
     * @param string $redirection5Email
189
     * @param string $announceMessage
190
     * @param bool $keepMessage
191
     * @param string $audioformat
192
     * @param string $fromEmail
193
     * @param string $fromName
194
     * @param bool $doNotRecord
195
     * @param bool $forcePassword
196
     */
197
    public function __construct($session = null, $number = null, $country = null, $redirection1 = null, $redirection1Email = null, $redirection2 = null, $redirection2Email = null, $redirection3 = null, $redirection3Email = null, $redirection4 = null, $redirection4Email = null, $redirection5 = null, $redirection5Email = null, $announceMessage = null, $keepMessage = null, $audioformat = null, $fromEmail = null, $fromName = null, $doNotRecord = null, $forcePassword = null)
198
    {
199
        $this
200
            ->setSession($session)
201
            ->setNumber($number)
202
            ->setCountry($country)
203
            ->setRedirection1($redirection1)
204
            ->setRedirection1Email($redirection1Email)
205
            ->setRedirection2($redirection2)
206
            ->setRedirection2Email($redirection2Email)
207
            ->setRedirection3($redirection3)
208
            ->setRedirection3Email($redirection3Email)
209
            ->setRedirection4($redirection4)
210
            ->setRedirection4Email($redirection4Email)
211
            ->setRedirection5($redirection5)
212
            ->setRedirection5Email($redirection5Email)
213
            ->setAnnounceMessage($announceMessage)
214
            ->setKeepMessage($keepMessage)
215
            ->setAudioformat($audioformat)
216
            ->setFromEmail($fromEmail)
217
            ->setFromName($fromName)
218
            ->setDoNotRecord($doNotRecord)
219
            ->setForcePassword($forcePassword);
220
    }
221
    /**
222
     * Get session value
223
     * @return string|null
224
     */
225
    public function getSession()
226
    {
227
        return $this->session;
228
    }
229
    /**
230
     * Set session value
231
     * @param string $session
232
     * @return \Ovh\StructType\TelephonyVoicemailOptionsModify
233
     */
234
    public function setSession($session = null)
235
    {
236
        // validation for constraint: string
237
        if (!is_null($session) && !is_string($session)) {
0 ignored issues
show
introduced by
The condition is_string($session) is always true.
Loading history...
238
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($session, true), gettype($session)), __LINE__);
239
        }
240
        $this->session = $session;
241
        return $this;
242
    }
243
    /**
244
     * Get number value
245
     * @return string|null
246
     */
247
    public function getNumber()
248
    {
249
        return $this->number;
250
    }
251
    /**
252
     * Set number value
253
     * @param string $number
254
     * @return \Ovh\StructType\TelephonyVoicemailOptionsModify
255
     */
256
    public function setNumber($number = null)
257
    {
258
        // validation for constraint: string
259
        if (!is_null($number) && !is_string($number)) {
0 ignored issues
show
introduced by
The condition is_string($number) is always true.
Loading history...
260
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($number, true), gettype($number)), __LINE__);
261
        }
262
        $this->number = $number;
263
        return $this;
264
    }
265
    /**
266
     * Get country value
267
     * @return string|null
268
     */
269
    public function getCountry()
270
    {
271
        return $this->country;
272
    }
273
    /**
274
     * Set country value
275
     * @param string $country
276
     * @return \Ovh\StructType\TelephonyVoicemailOptionsModify
277
     */
278
    public function setCountry($country = null)
279
    {
280
        // validation for constraint: string
281
        if (!is_null($country) && !is_string($country)) {
0 ignored issues
show
introduced by
The condition is_string($country) is always true.
Loading history...
282
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($country, true), gettype($country)), __LINE__);
283
        }
284
        $this->country = $country;
285
        return $this;
286
    }
287
    /**
288
     * Get redirection1 value
289
     * @return string|null
290
     */
291
    public function getRedirection1()
292
    {
293
        return $this->redirection1;
294
    }
295
    /**
296
     * Set redirection1 value
297
     * @param string $redirection1
298
     * @return \Ovh\StructType\TelephonyVoicemailOptionsModify
299
     */
300
    public function setRedirection1($redirection1 = null)
301
    {
302
        // validation for constraint: string
303
        if (!is_null($redirection1) && !is_string($redirection1)) {
0 ignored issues
show
introduced by
The condition is_string($redirection1) is always true.
Loading history...
304
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($redirection1, true), gettype($redirection1)), __LINE__);
305
        }
306
        $this->redirection1 = $redirection1;
307
        return $this;
308
    }
309
    /**
310
     * Get redirection1Email value
311
     * @return string|null
312
     */
313
    public function getRedirection1Email()
314
    {
315
        return $this->redirection1Email;
316
    }
317
    /**
318
     * Set redirection1Email value
319
     * @param string $redirection1Email
320
     * @return \Ovh\StructType\TelephonyVoicemailOptionsModify
321
     */
322
    public function setRedirection1Email($redirection1Email = null)
323
    {
324
        // validation for constraint: string
325
        if (!is_null($redirection1Email) && !is_string($redirection1Email)) {
0 ignored issues
show
introduced by
The condition is_string($redirection1Email) is always true.
Loading history...
326
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($redirection1Email, true), gettype($redirection1Email)), __LINE__);
327
        }
328
        $this->redirection1Email = $redirection1Email;
329
        return $this;
330
    }
331
    /**
332
     * Get redirection2 value
333
     * @return string|null
334
     */
335
    public function getRedirection2()
336
    {
337
        return $this->redirection2;
338
    }
339
    /**
340
     * Set redirection2 value
341
     * @param string $redirection2
342
     * @return \Ovh\StructType\TelephonyVoicemailOptionsModify
343
     */
344
    public function setRedirection2($redirection2 = null)
345
    {
346
        // validation for constraint: string
347
        if (!is_null($redirection2) && !is_string($redirection2)) {
0 ignored issues
show
introduced by
The condition is_string($redirection2) is always true.
Loading history...
348
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($redirection2, true), gettype($redirection2)), __LINE__);
349
        }
350
        $this->redirection2 = $redirection2;
351
        return $this;
352
    }
353
    /**
354
     * Get redirection2Email value
355
     * @return string|null
356
     */
357
    public function getRedirection2Email()
358
    {
359
        return $this->redirection2Email;
360
    }
361
    /**
362
     * Set redirection2Email value
363
     * @param string $redirection2Email
364
     * @return \Ovh\StructType\TelephonyVoicemailOptionsModify
365
     */
366
    public function setRedirection2Email($redirection2Email = null)
367
    {
368
        // validation for constraint: string
369
        if (!is_null($redirection2Email) && !is_string($redirection2Email)) {
0 ignored issues
show
introduced by
The condition is_string($redirection2Email) is always true.
Loading history...
370
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($redirection2Email, true), gettype($redirection2Email)), __LINE__);
371
        }
372
        $this->redirection2Email = $redirection2Email;
373
        return $this;
374
    }
375
    /**
376
     * Get redirection3 value
377
     * @return string|null
378
     */
379
    public function getRedirection3()
380
    {
381
        return $this->redirection3;
382
    }
383
    /**
384
     * Set redirection3 value
385
     * @param string $redirection3
386
     * @return \Ovh\StructType\TelephonyVoicemailOptionsModify
387
     */
388
    public function setRedirection3($redirection3 = null)
389
    {
390
        // validation for constraint: string
391
        if (!is_null($redirection3) && !is_string($redirection3)) {
0 ignored issues
show
introduced by
The condition is_string($redirection3) is always true.
Loading history...
392
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($redirection3, true), gettype($redirection3)), __LINE__);
393
        }
394
        $this->redirection3 = $redirection3;
395
        return $this;
396
    }
397
    /**
398
     * Get redirection3Email value
399
     * @return string|null
400
     */
401
    public function getRedirection3Email()
402
    {
403
        return $this->redirection3Email;
404
    }
405
    /**
406
     * Set redirection3Email value
407
     * @param string $redirection3Email
408
     * @return \Ovh\StructType\TelephonyVoicemailOptionsModify
409
     */
410
    public function setRedirection3Email($redirection3Email = null)
411
    {
412
        // validation for constraint: string
413
        if (!is_null($redirection3Email) && !is_string($redirection3Email)) {
0 ignored issues
show
introduced by
The condition is_string($redirection3Email) is always true.
Loading history...
414
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($redirection3Email, true), gettype($redirection3Email)), __LINE__);
415
        }
416
        $this->redirection3Email = $redirection3Email;
417
        return $this;
418
    }
419
    /**
420
     * Get redirection4 value
421
     * @return string|null
422
     */
423
    public function getRedirection4()
424
    {
425
        return $this->redirection4;
426
    }
427
    /**
428
     * Set redirection4 value
429
     * @param string $redirection4
430
     * @return \Ovh\StructType\TelephonyVoicemailOptionsModify
431
     */
432
    public function setRedirection4($redirection4 = null)
433
    {
434
        // validation for constraint: string
435
        if (!is_null($redirection4) && !is_string($redirection4)) {
0 ignored issues
show
introduced by
The condition is_string($redirection4) is always true.
Loading history...
436
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($redirection4, true), gettype($redirection4)), __LINE__);
437
        }
438
        $this->redirection4 = $redirection4;
439
        return $this;
440
    }
441
    /**
442
     * Get redirection4Email value
443
     * @return string|null
444
     */
445
    public function getRedirection4Email()
446
    {
447
        return $this->redirection4Email;
448
    }
449
    /**
450
     * Set redirection4Email value
451
     * @param string $redirection4Email
452
     * @return \Ovh\StructType\TelephonyVoicemailOptionsModify
453
     */
454
    public function setRedirection4Email($redirection4Email = null)
455
    {
456
        // validation for constraint: string
457
        if (!is_null($redirection4Email) && !is_string($redirection4Email)) {
0 ignored issues
show
introduced by
The condition is_string($redirection4Email) is always true.
Loading history...
458
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($redirection4Email, true), gettype($redirection4Email)), __LINE__);
459
        }
460
        $this->redirection4Email = $redirection4Email;
461
        return $this;
462
    }
463
    /**
464
     * Get redirection5 value
465
     * @return string|null
466
     */
467
    public function getRedirection5()
468
    {
469
        return $this->redirection5;
470
    }
471
    /**
472
     * Set redirection5 value
473
     * @param string $redirection5
474
     * @return \Ovh\StructType\TelephonyVoicemailOptionsModify
475
     */
476
    public function setRedirection5($redirection5 = null)
477
    {
478
        // validation for constraint: string
479
        if (!is_null($redirection5) && !is_string($redirection5)) {
0 ignored issues
show
introduced by
The condition is_string($redirection5) is always true.
Loading history...
480
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($redirection5, true), gettype($redirection5)), __LINE__);
481
        }
482
        $this->redirection5 = $redirection5;
483
        return $this;
484
    }
485
    /**
486
     * Get redirection5Email value
487
     * @return string|null
488
     */
489
    public function getRedirection5Email()
490
    {
491
        return $this->redirection5Email;
492
    }
493
    /**
494
     * Set redirection5Email value
495
     * @param string $redirection5Email
496
     * @return \Ovh\StructType\TelephonyVoicemailOptionsModify
497
     */
498
    public function setRedirection5Email($redirection5Email = null)
499
    {
500
        // validation for constraint: string
501
        if (!is_null($redirection5Email) && !is_string($redirection5Email)) {
0 ignored issues
show
introduced by
The condition is_string($redirection5Email) is always true.
Loading history...
502
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($redirection5Email, true), gettype($redirection5Email)), __LINE__);
503
        }
504
        $this->redirection5Email = $redirection5Email;
505
        return $this;
506
    }
507
    /**
508
     * Get announceMessage value
509
     * @return string|null
510
     */
511
    public function getAnnounceMessage()
512
    {
513
        return $this->announceMessage;
514
    }
515
    /**
516
     * Set announceMessage value
517
     * @param string $announceMessage
518
     * @return \Ovh\StructType\TelephonyVoicemailOptionsModify
519
     */
520
    public function setAnnounceMessage($announceMessage = null)
521
    {
522
        // validation for constraint: string
523
        if (!is_null($announceMessage) && !is_string($announceMessage)) {
0 ignored issues
show
introduced by
The condition is_string($announceMessage) is always true.
Loading history...
524
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($announceMessage, true), gettype($announceMessage)), __LINE__);
525
        }
526
        $this->announceMessage = $announceMessage;
527
        return $this;
528
    }
529
    /**
530
     * Get keepMessage value
531
     * @return bool|null
532
     */
533
    public function getKeepMessage()
534
    {
535
        return $this->keepMessage;
536
    }
537
    /**
538
     * Set keepMessage value
539
     * @param bool $keepMessage
540
     * @return \Ovh\StructType\TelephonyVoicemailOptionsModify
541
     */
542
    public function setKeepMessage($keepMessage = null)
543
    {
544
        // validation for constraint: boolean
545
        if (!is_null($keepMessage) && !is_bool($keepMessage)) {
0 ignored issues
show
introduced by
The condition is_bool($keepMessage) is always true.
Loading history...
546
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($keepMessage, true), gettype($keepMessage)), __LINE__);
547
        }
548
        $this->keepMessage = $keepMessage;
549
        return $this;
550
    }
551
    /**
552
     * Get audioformat value
553
     * @return string|null
554
     */
555
    public function getAudioformat()
556
    {
557
        return $this->audioformat;
558
    }
559
    /**
560
     * Set audioformat value
561
     * @param string $audioformat
562
     * @return \Ovh\StructType\TelephonyVoicemailOptionsModify
563
     */
564
    public function setAudioformat($audioformat = null)
565
    {
566
        // validation for constraint: string
567
        if (!is_null($audioformat) && !is_string($audioformat)) {
0 ignored issues
show
introduced by
The condition is_string($audioformat) is always true.
Loading history...
568
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($audioformat, true), gettype($audioformat)), __LINE__);
569
        }
570
        $this->audioformat = $audioformat;
571
        return $this;
572
    }
573
    /**
574
     * Get fromEmail value
575
     * @return string|null
576
     */
577
    public function getFromEmail()
578
    {
579
        return $this->fromEmail;
580
    }
581
    /**
582
     * Set fromEmail value
583
     * @param string $fromEmail
584
     * @return \Ovh\StructType\TelephonyVoicemailOptionsModify
585
     */
586
    public function setFromEmail($fromEmail = null)
587
    {
588
        // validation for constraint: string
589
        if (!is_null($fromEmail) && !is_string($fromEmail)) {
0 ignored issues
show
introduced by
The condition is_string($fromEmail) is always true.
Loading history...
590
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($fromEmail, true), gettype($fromEmail)), __LINE__);
591
        }
592
        $this->fromEmail = $fromEmail;
593
        return $this;
594
    }
595
    /**
596
     * Get fromName value
597
     * @return string|null
598
     */
599
    public function getFromName()
600
    {
601
        return $this->fromName;
602
    }
603
    /**
604
     * Set fromName value
605
     * @param string $fromName
606
     * @return \Ovh\StructType\TelephonyVoicemailOptionsModify
607
     */
608
    public function setFromName($fromName = null)
609
    {
610
        // validation for constraint: string
611
        if (!is_null($fromName) && !is_string($fromName)) {
0 ignored issues
show
introduced by
The condition is_string($fromName) is always true.
Loading history...
612
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($fromName, true), gettype($fromName)), __LINE__);
613
        }
614
        $this->fromName = $fromName;
615
        return $this;
616
    }
617
    /**
618
     * Get doNotRecord value
619
     * @return bool|null
620
     */
621
    public function getDoNotRecord()
622
    {
623
        return $this->doNotRecord;
624
    }
625
    /**
626
     * Set doNotRecord value
627
     * @param bool $doNotRecord
628
     * @return \Ovh\StructType\TelephonyVoicemailOptionsModify
629
     */
630
    public function setDoNotRecord($doNotRecord = null)
631
    {
632
        // validation for constraint: boolean
633
        if (!is_null($doNotRecord) && !is_bool($doNotRecord)) {
0 ignored issues
show
introduced by
The condition is_bool($doNotRecord) is always true.
Loading history...
634
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($doNotRecord, true), gettype($doNotRecord)), __LINE__);
635
        }
636
        $this->doNotRecord = $doNotRecord;
637
        return $this;
638
    }
639
    /**
640
     * Get forcePassword value
641
     * @return bool|null
642
     */
643
    public function getForcePassword()
644
    {
645
        return $this->forcePassword;
646
    }
647
    /**
648
     * Set forcePassword value
649
     * @param bool $forcePassword
650
     * @return \Ovh\StructType\TelephonyVoicemailOptionsModify
651
     */
652
    public function setForcePassword($forcePassword = null)
653
    {
654
        // validation for constraint: boolean
655
        if (!is_null($forcePassword) && !is_bool($forcePassword)) {
0 ignored issues
show
introduced by
The condition is_bool($forcePassword) is always true.
Loading history...
656
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($forcePassword, true), gettype($forcePassword)), __LINE__);
657
        }
658
        $this->forcePassword = $forcePassword;
659
        return $this;
660
    }
661
}
662