EwsCDRDataType   F
last analyzed

Complexity

Total Complexity 104

Size/Duplication

Total Lines 868
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 179
dl 0
loc 868
rs 2
c 0
b 0
f 0
wmc 104

51 Methods

Rating   Name   Duplication   Size   Complexity  
A setUMServerName() 0 9 3
A setCallIdentity() 0 9 3
A getDialPlanGuid() 0 3 1
A getCalledPhoneNumber() 0 3 1
A setReasonForCall() 0 9 3
A getDropCallReason() 0 3 1
A getCallerLegacyExchangeDN() 0 3 1
A setGatewayGuid() 0 13 5
A setCalledPhoneNumber() 0 9 3
A getTransferredNumber() 0 3 1
A getDialedString() 0 3 1
A setCreationTime() 0 9 3
A setCalleeLegacyExchangeDN() 0 9 3
A __construct() 0 28 1
A getUMServerName() 0 3 1
A getAudioQualityMetrics() 0 3 1
A setAutoAttendantName() 0 9 3
A setOfferResult() 0 9 3
A setCallerLegacyExchangeDN() 0 9 3
A getCallerPhoneNumber() 0 3 1
A setIPGatewayAddress() 0 9 3
A getReasonForCall() 0 3 1
A setCallerPhoneNumber() 0 9 3
A getIPGatewayAddress() 0 3 1
A getCalleeLegacyExchangeDN() 0 3 1
A getCallerMailboxAlias() 0 3 1
A getParentCallIdentity() 0 3 1
A setDropCallReason() 0 9 3
A setCallType() 0 9 3
A getAutoAttendantName() 0 3 1
A getCallStartTime() 0 3 1
A getCreationTime() 0 3 1
A setCallerMailboxAlias() 0 9 3
A setTransferredNumber() 0 9 3
A getDialPlanName() 0 3 1
A setCallDuration() 0 9 4
A getOfferResult() 0 3 1
A setParentCallIdentity() 0 9 3
A setCalleeMailboxAlias() 0 9 3
A setCallStartTime() 0 9 3
A getIPGatewayName() 0 3 1
A getCallIdentity() 0 3 1
A setDialPlanGuid() 0 13 5
A setAudioQualityMetrics() 0 5 1
A getCallDuration() 0 3 1
A setDialedString() 0 9 3
A setIPGatewayName() 0 9 3
A getCalleeMailboxAlias() 0 3 1
A getCallType() 0 3 1
A getGatewayGuid() 0 3 1
A setDialPlanName() 0 9 3

How to fix   Complexity   

Complex Class

Complex classes like EwsCDRDataType 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 EwsCDRDataType, and based on these observations, apply Extract Interface, too.

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 CDRDataType StructType
12
 * @package Ews
13
 * @subpackage Structs
14
 * @author WsdlToPhp <[email protected]>
15
 */
16
class EwsCDRDataType extends AbstractStructBase
17
{
18
    /**
19
     * The CallStartTime
20
     * Meta information extracted from the WSDL
21
     * - maxOccurs: 1
22
     * - minOccurs: 1
23
     * @var string
24
     */
25
    protected string $CallStartTime;
26
    /**
27
     * The CallDuration
28
     * Meta information extracted from the WSDL
29
     * - maxOccurs: 1
30
     * - minOccurs: 1
31
     * @var int
32
     */
33
    protected int $CallDuration;
34
    /**
35
     * The GatewayGuid
36
     * Meta information extracted from the WSDL
37
     * - documentation: The regular expression captures the standard representation of a GUID
38
     * - base: xs:string
39
     * - maxOccurs: 1
40
     * - minOccurs: 1
41
     * - pattern: [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}
42
     * @var string
43
     */
44
    protected string $GatewayGuid;
45
    /**
46
     * The CreationTime
47
     * Meta information extracted from the WSDL
48
     * - maxOccurs: 1
49
     * - minOccurs: 1
50
     * @var string
51
     */
52
    protected string $CreationTime;
53
    /**
54
     * The CallType
55
     * Meta information extracted from the WSDL
56
     * - maxOccurs: 1
57
     * - minOccurs: 0
58
     * @var string|null
59
     */
60
    protected ?string $CallType = null;
61
    /**
62
     * The CallIdentity
63
     * Meta information extracted from the WSDL
64
     * - maxOccurs: 1
65
     * - minOccurs: 0
66
     * @var string|null
67
     */
68
    protected ?string $CallIdentity = null;
69
    /**
70
     * The ParentCallIdentity
71
     * Meta information extracted from the WSDL
72
     * - maxOccurs: 1
73
     * - minOccurs: 0
74
     * @var string|null
75
     */
76
    protected ?string $ParentCallIdentity = null;
77
    /**
78
     * The UMServerName
79
     * Meta information extracted from the WSDL
80
     * - maxOccurs: 1
81
     * - minOccurs: 0
82
     * @var string|null
83
     */
84
    protected ?string $UMServerName = null;
85
    /**
86
     * The DialPlanGuid
87
     * Meta information extracted from the WSDL
88
     * - documentation: The regular expression captures the standard representation of a GUID
89
     * - base: xs:string
90
     * - maxOccurs: 1
91
     * - minOccurs: 0
92
     * - pattern: [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}
93
     * @var string|null
94
     */
95
    protected ?string $DialPlanGuid = null;
96
    /**
97
     * The DialPlanName
98
     * Meta information extracted from the WSDL
99
     * - maxOccurs: 1
100
     * - minOccurs: 0
101
     * @var string|null
102
     */
103
    protected ?string $DialPlanName = null;
104
    /**
105
     * The IPGatewayAddress
106
     * Meta information extracted from the WSDL
107
     * - maxOccurs: 1
108
     * - minOccurs: 0
109
     * @var string|null
110
     */
111
    protected ?string $IPGatewayAddress = null;
112
    /**
113
     * The IPGatewayName
114
     * Meta information extracted from the WSDL
115
     * - maxOccurs: 1
116
     * - minOccurs: 0
117
     * @var string|null
118
     */
119
    protected ?string $IPGatewayName = null;
120
    /**
121
     * The CalledPhoneNumber
122
     * Meta information extracted from the WSDL
123
     * - maxOccurs: 1
124
     * - minOccurs: 0
125
     * @var string|null
126
     */
127
    protected ?string $CalledPhoneNumber = null;
128
    /**
129
     * The CallerPhoneNumber
130
     * Meta information extracted from the WSDL
131
     * - maxOccurs: 1
132
     * - minOccurs: 0
133
     * @var string|null
134
     */
135
    protected ?string $CallerPhoneNumber = null;
136
    /**
137
     * The OfferResult
138
     * Meta information extracted from the WSDL
139
     * - maxOccurs: 1
140
     * - minOccurs: 0
141
     * @var string|null
142
     */
143
    protected ?string $OfferResult = null;
144
    /**
145
     * The DropCallReason
146
     * Meta information extracted from the WSDL
147
     * - maxOccurs: 1
148
     * - minOccurs: 0
149
     * @var string|null
150
     */
151
    protected ?string $DropCallReason = null;
152
    /**
153
     * The ReasonForCall
154
     * Meta information extracted from the WSDL
155
     * - maxOccurs: 1
156
     * - minOccurs: 0
157
     * @var string|null
158
     */
159
    protected ?string $ReasonForCall = null;
160
    /**
161
     * The TransferredNumber
162
     * Meta information extracted from the WSDL
163
     * - maxOccurs: 1
164
     * - minOccurs: 0
165
     * @var string|null
166
     */
167
    protected ?string $TransferredNumber = null;
168
    /**
169
     * The DialedString
170
     * Meta information extracted from the WSDL
171
     * - maxOccurs: 1
172
     * - minOccurs: 0
173
     * @var string|null
174
     */
175
    protected ?string $DialedString = null;
176
    /**
177
     * The CallerMailboxAlias
178
     * Meta information extracted from the WSDL
179
     * - maxOccurs: 1
180
     * - minOccurs: 0
181
     * @var string|null
182
     */
183
    protected ?string $CallerMailboxAlias = null;
184
    /**
185
     * The CalleeMailboxAlias
186
     * Meta information extracted from the WSDL
187
     * - maxOccurs: 1
188
     * - minOccurs: 0
189
     * @var string|null
190
     */
191
    protected ?string $CalleeMailboxAlias = null;
192
    /**
193
     * The CallerLegacyExchangeDN
194
     * Meta information extracted from the WSDL
195
     * - maxOccurs: 1
196
     * - minOccurs: 0
197
     * @var string|null
198
     */
199
    protected ?string $CallerLegacyExchangeDN = null;
200
    /**
201
     * The CalleeLegacyExchangeDN
202
     * Meta information extracted from the WSDL
203
     * - maxOccurs: 1
204
     * - minOccurs: 0
205
     * @var string|null
206
     */
207
    protected ?string $CalleeLegacyExchangeDN = null;
208
    /**
209
     * The AutoAttendantName
210
     * Meta information extracted from the WSDL
211
     * - maxOccurs: 1
212
     * - minOccurs: 0
213
     * @var string|null
214
     */
215
    protected ?string $AutoAttendantName = null;
216
    /**
217
     * The AudioQualityMetrics
218
     * Meta information extracted from the WSDL
219
     * - maxOccurs: 1
220
     * - minOccurs: 0
221
     * @var \StructType\EwsAudioQualityType|null
222
     */
223
    protected ?\StructType\EwsAudioQualityType $AudioQualityMetrics = null;
224
    /**
225
     * Constructor method for CDRDataType
226
     * @uses EwsCDRDataType::setCallStartTime()
227
     * @uses EwsCDRDataType::setCallDuration()
228
     * @uses EwsCDRDataType::setGatewayGuid()
229
     * @uses EwsCDRDataType::setCreationTime()
230
     * @uses EwsCDRDataType::setCallType()
231
     * @uses EwsCDRDataType::setCallIdentity()
232
     * @uses EwsCDRDataType::setParentCallIdentity()
233
     * @uses EwsCDRDataType::setUMServerName()
234
     * @uses EwsCDRDataType::setDialPlanGuid()
235
     * @uses EwsCDRDataType::setDialPlanName()
236
     * @uses EwsCDRDataType::setIPGatewayAddress()
237
     * @uses EwsCDRDataType::setIPGatewayName()
238
     * @uses EwsCDRDataType::setCalledPhoneNumber()
239
     * @uses EwsCDRDataType::setCallerPhoneNumber()
240
     * @uses EwsCDRDataType::setOfferResult()
241
     * @uses EwsCDRDataType::setDropCallReason()
242
     * @uses EwsCDRDataType::setReasonForCall()
243
     * @uses EwsCDRDataType::setTransferredNumber()
244
     * @uses EwsCDRDataType::setDialedString()
245
     * @uses EwsCDRDataType::setCallerMailboxAlias()
246
     * @uses EwsCDRDataType::setCalleeMailboxAlias()
247
     * @uses EwsCDRDataType::setCallerLegacyExchangeDN()
248
     * @uses EwsCDRDataType::setCalleeLegacyExchangeDN()
249
     * @uses EwsCDRDataType::setAutoAttendantName()
250
     * @uses EwsCDRDataType::setAudioQualityMetrics()
251
     * @param string $callStartTime
252
     * @param int $callDuration
253
     * @param string $gatewayGuid
254
     * @param string $creationTime
255
     * @param string $callType
256
     * @param string $callIdentity
257
     * @param string $parentCallIdentity
258
     * @param string $uMServerName
259
     * @param string $dialPlanGuid
260
     * @param string $dialPlanName
261
     * @param string $iPGatewayAddress
262
     * @param string $iPGatewayName
263
     * @param string $calledPhoneNumber
264
     * @param string $callerPhoneNumber
265
     * @param string $offerResult
266
     * @param string $dropCallReason
267
     * @param string $reasonForCall
268
     * @param string $transferredNumber
269
     * @param string $dialedString
270
     * @param string $callerMailboxAlias
271
     * @param string $calleeMailboxAlias
272
     * @param string $callerLegacyExchangeDN
273
     * @param string $calleeLegacyExchangeDN
274
     * @param string $autoAttendantName
275
     * @param \StructType\EwsAudioQualityType $audioQualityMetrics
276
     */
277
    public function __construct(string $callStartTime, int $callDuration, string $gatewayGuid, string $creationTime, ?string $callType = null, ?string $callIdentity = null, ?string $parentCallIdentity = null, ?string $uMServerName = null, ?string $dialPlanGuid = null, ?string $dialPlanName = null, ?string $iPGatewayAddress = null, ?string $iPGatewayName = null, ?string $calledPhoneNumber = null, ?string $callerPhoneNumber = null, ?string $offerResult = null, ?string $dropCallReason = null, ?string $reasonForCall = null, ?string $transferredNumber = null, ?string $dialedString = null, ?string $callerMailboxAlias = null, ?string $calleeMailboxAlias = null, ?string $callerLegacyExchangeDN = null, ?string $calleeLegacyExchangeDN = null, ?string $autoAttendantName = null, ?\StructType\EwsAudioQualityType $audioQualityMetrics = null)
278
    {
279
        $this
280
            ->setCallStartTime($callStartTime)
281
            ->setCallDuration($callDuration)
282
            ->setGatewayGuid($gatewayGuid)
283
            ->setCreationTime($creationTime)
284
            ->setCallType($callType)
285
            ->setCallIdentity($callIdentity)
286
            ->setParentCallIdentity($parentCallIdentity)
287
            ->setUMServerName($uMServerName)
288
            ->setDialPlanGuid($dialPlanGuid)
289
            ->setDialPlanName($dialPlanName)
290
            ->setIPGatewayAddress($iPGatewayAddress)
291
            ->setIPGatewayName($iPGatewayName)
292
            ->setCalledPhoneNumber($calledPhoneNumber)
293
            ->setCallerPhoneNumber($callerPhoneNumber)
294
            ->setOfferResult($offerResult)
295
            ->setDropCallReason($dropCallReason)
296
            ->setReasonForCall($reasonForCall)
297
            ->setTransferredNumber($transferredNumber)
298
            ->setDialedString($dialedString)
299
            ->setCallerMailboxAlias($callerMailboxAlias)
300
            ->setCalleeMailboxAlias($calleeMailboxAlias)
301
            ->setCallerLegacyExchangeDN($callerLegacyExchangeDN)
302
            ->setCalleeLegacyExchangeDN($calleeLegacyExchangeDN)
303
            ->setAutoAttendantName($autoAttendantName)
304
            ->setAudioQualityMetrics($audioQualityMetrics);
305
    }
306
    /**
307
     * Get CallStartTime value
308
     * @return string
309
     */
310
    public function getCallStartTime(): string
311
    {
312
        return $this->CallStartTime;
313
    }
314
    /**
315
     * Set CallStartTime value
316
     * @param string $callStartTime
317
     * @return \StructType\EwsCDRDataType
318
     */
319
    public function setCallStartTime(string $callStartTime): self
320
    {
321
        // validation for constraint: string
322
        if (!is_null($callStartTime) && !is_string($callStartTime)) {
0 ignored issues
show
introduced by
The condition is_string($callStartTime) is always true.
Loading history...
introduced by
The condition is_null($callStartTime) is always false.
Loading history...
323
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($callStartTime, true), gettype($callStartTime)), __LINE__);
324
        }
325
        $this->CallStartTime = $callStartTime;
326
        
327
        return $this;
328
    }
329
    /**
330
     * Get CallDuration value
331
     * @return int
332
     */
333
    public function getCallDuration(): int
334
    {
335
        return $this->CallDuration;
336
    }
337
    /**
338
     * Set CallDuration value
339
     * @param int $callDuration
340
     * @return \StructType\EwsCDRDataType
341
     */
342
    public function setCallDuration(int $callDuration): self
343
    {
344
        // validation for constraint: int
345
        if (!is_null($callDuration) && !(is_int($callDuration) || ctype_digit($callDuration))) {
0 ignored issues
show
introduced by
The condition is_int($callDuration) is always true.
Loading history...
introduced by
The condition is_null($callDuration) is always false.
Loading history...
346
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($callDuration, true), gettype($callDuration)), __LINE__);
347
        }
348
        $this->CallDuration = $callDuration;
349
        
350
        return $this;
351
    }
352
    /**
353
     * Get GatewayGuid value
354
     * @return string
355
     */
356
    public function getGatewayGuid(): string
357
    {
358
        return $this->GatewayGuid;
359
    }
360
    /**
361
     * Set GatewayGuid value
362
     * @param string $gatewayGuid
363
     * @return \StructType\EwsCDRDataType
364
     */
365
    public function setGatewayGuid(string $gatewayGuid): self
366
    {
367
        // validation for constraint: string
368
        if (!is_null($gatewayGuid) && !is_string($gatewayGuid)) {
0 ignored issues
show
introduced by
The condition is_string($gatewayGuid) is always true.
Loading history...
introduced by
The condition is_null($gatewayGuid) is always false.
Loading history...
369
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($gatewayGuid, true), gettype($gatewayGuid)), __LINE__);
370
        }
371
        // validation for constraint: pattern([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12})
372
        if (!is_null($gatewayGuid) && !preg_match('/[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}/', $gatewayGuid)) {
0 ignored issues
show
introduced by
The condition is_null($gatewayGuid) is always false.
Loading history...
373
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression /[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}/', var_export($gatewayGuid, true)), __LINE__);
374
        }
375
        $this->GatewayGuid = $gatewayGuid;
376
        
377
        return $this;
378
    }
379
    /**
380
     * Get CreationTime value
381
     * @return string
382
     */
383
    public function getCreationTime(): string
384
    {
385
        return $this->CreationTime;
386
    }
387
    /**
388
     * Set CreationTime value
389
     * @param string $creationTime
390
     * @return \StructType\EwsCDRDataType
391
     */
392
    public function setCreationTime(string $creationTime): self
393
    {
394
        // validation for constraint: string
395
        if (!is_null($creationTime) && !is_string($creationTime)) {
0 ignored issues
show
introduced by
The condition is_string($creationTime) is always true.
Loading history...
introduced by
The condition is_null($creationTime) is always false.
Loading history...
396
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($creationTime, true), gettype($creationTime)), __LINE__);
397
        }
398
        $this->CreationTime = $creationTime;
399
        
400
        return $this;
401
    }
402
    /**
403
     * Get CallType value
404
     * @return string|null
405
     */
406
    public function getCallType(): ?string
407
    {
408
        return $this->CallType;
409
    }
410
    /**
411
     * Set CallType value
412
     * @param string $callType
413
     * @return \StructType\EwsCDRDataType
414
     */
415
    public function setCallType(?string $callType = null): self
416
    {
417
        // validation for constraint: string
418
        if (!is_null($callType) && !is_string($callType)) {
0 ignored issues
show
introduced by
The condition is_string($callType) is always true.
Loading history...
419
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($callType, true), gettype($callType)), __LINE__);
420
        }
421
        $this->CallType = $callType;
422
        
423
        return $this;
424
    }
425
    /**
426
     * Get CallIdentity value
427
     * @return string|null
428
     */
429
    public function getCallIdentity(): ?string
430
    {
431
        return $this->CallIdentity;
432
    }
433
    /**
434
     * Set CallIdentity value
435
     * @param string $callIdentity
436
     * @return \StructType\EwsCDRDataType
437
     */
438
    public function setCallIdentity(?string $callIdentity = null): self
439
    {
440
        // validation for constraint: string
441
        if (!is_null($callIdentity) && !is_string($callIdentity)) {
0 ignored issues
show
introduced by
The condition is_string($callIdentity) is always true.
Loading history...
442
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($callIdentity, true), gettype($callIdentity)), __LINE__);
443
        }
444
        $this->CallIdentity = $callIdentity;
445
        
446
        return $this;
447
    }
448
    /**
449
     * Get ParentCallIdentity value
450
     * @return string|null
451
     */
452
    public function getParentCallIdentity(): ?string
453
    {
454
        return $this->ParentCallIdentity;
455
    }
456
    /**
457
     * Set ParentCallIdentity value
458
     * @param string $parentCallIdentity
459
     * @return \StructType\EwsCDRDataType
460
     */
461
    public function setParentCallIdentity(?string $parentCallIdentity = null): self
462
    {
463
        // validation for constraint: string
464
        if (!is_null($parentCallIdentity) && !is_string($parentCallIdentity)) {
0 ignored issues
show
introduced by
The condition is_string($parentCallIdentity) is always true.
Loading history...
465
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($parentCallIdentity, true), gettype($parentCallIdentity)), __LINE__);
466
        }
467
        $this->ParentCallIdentity = $parentCallIdentity;
468
        
469
        return $this;
470
    }
471
    /**
472
     * Get UMServerName value
473
     * @return string|null
474
     */
475
    public function getUMServerName(): ?string
476
    {
477
        return $this->UMServerName;
478
    }
479
    /**
480
     * Set UMServerName value
481
     * @param string $uMServerName
482
     * @return \StructType\EwsCDRDataType
483
     */
484
    public function setUMServerName(?string $uMServerName = null): self
485
    {
486
        // validation for constraint: string
487
        if (!is_null($uMServerName) && !is_string($uMServerName)) {
0 ignored issues
show
introduced by
The condition is_string($uMServerName) is always true.
Loading history...
488
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($uMServerName, true), gettype($uMServerName)), __LINE__);
489
        }
490
        $this->UMServerName = $uMServerName;
491
        
492
        return $this;
493
    }
494
    /**
495
     * Get DialPlanGuid value
496
     * @return string|null
497
     */
498
    public function getDialPlanGuid(): ?string
499
    {
500
        return $this->DialPlanGuid;
501
    }
502
    /**
503
     * Set DialPlanGuid value
504
     * @param string $dialPlanGuid
505
     * @return \StructType\EwsCDRDataType
506
     */
507
    public function setDialPlanGuid(?string $dialPlanGuid = null): self
508
    {
509
        // validation for constraint: string
510
        if (!is_null($dialPlanGuid) && !is_string($dialPlanGuid)) {
0 ignored issues
show
introduced by
The condition is_string($dialPlanGuid) is always true.
Loading history...
511
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($dialPlanGuid, true), gettype($dialPlanGuid)), __LINE__);
512
        }
513
        // validation for constraint: pattern([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12})
514
        if (!is_null($dialPlanGuid) && !preg_match('/[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}/', $dialPlanGuid)) {
515
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression /[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}/', var_export($dialPlanGuid, true)), __LINE__);
516
        }
517
        $this->DialPlanGuid = $dialPlanGuid;
518
        
519
        return $this;
520
    }
521
    /**
522
     * Get DialPlanName value
523
     * @return string|null
524
     */
525
    public function getDialPlanName(): ?string
526
    {
527
        return $this->DialPlanName;
528
    }
529
    /**
530
     * Set DialPlanName value
531
     * @param string $dialPlanName
532
     * @return \StructType\EwsCDRDataType
533
     */
534
    public function setDialPlanName(?string $dialPlanName = null): self
535
    {
536
        // validation for constraint: string
537
        if (!is_null($dialPlanName) && !is_string($dialPlanName)) {
0 ignored issues
show
introduced by
The condition is_string($dialPlanName) is always true.
Loading history...
538
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($dialPlanName, true), gettype($dialPlanName)), __LINE__);
539
        }
540
        $this->DialPlanName = $dialPlanName;
541
        
542
        return $this;
543
    }
544
    /**
545
     * Get IPGatewayAddress value
546
     * @return string|null
547
     */
548
    public function getIPGatewayAddress(): ?string
549
    {
550
        return $this->IPGatewayAddress;
551
    }
552
    /**
553
     * Set IPGatewayAddress value
554
     * @param string $iPGatewayAddress
555
     * @return \StructType\EwsCDRDataType
556
     */
557
    public function setIPGatewayAddress(?string $iPGatewayAddress = null): self
558
    {
559
        // validation for constraint: string
560
        if (!is_null($iPGatewayAddress) && !is_string($iPGatewayAddress)) {
0 ignored issues
show
introduced by
The condition is_string($iPGatewayAddress) is always true.
Loading history...
561
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($iPGatewayAddress, true), gettype($iPGatewayAddress)), __LINE__);
562
        }
563
        $this->IPGatewayAddress = $iPGatewayAddress;
564
        
565
        return $this;
566
    }
567
    /**
568
     * Get IPGatewayName value
569
     * @return string|null
570
     */
571
    public function getIPGatewayName(): ?string
572
    {
573
        return $this->IPGatewayName;
574
    }
575
    /**
576
     * Set IPGatewayName value
577
     * @param string $iPGatewayName
578
     * @return \StructType\EwsCDRDataType
579
     */
580
    public function setIPGatewayName(?string $iPGatewayName = null): self
581
    {
582
        // validation for constraint: string
583
        if (!is_null($iPGatewayName) && !is_string($iPGatewayName)) {
0 ignored issues
show
introduced by
The condition is_string($iPGatewayName) is always true.
Loading history...
584
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($iPGatewayName, true), gettype($iPGatewayName)), __LINE__);
585
        }
586
        $this->IPGatewayName = $iPGatewayName;
587
        
588
        return $this;
589
    }
590
    /**
591
     * Get CalledPhoneNumber value
592
     * @return string|null
593
     */
594
    public function getCalledPhoneNumber(): ?string
595
    {
596
        return $this->CalledPhoneNumber;
597
    }
598
    /**
599
     * Set CalledPhoneNumber value
600
     * @param string $calledPhoneNumber
601
     * @return \StructType\EwsCDRDataType
602
     */
603
    public function setCalledPhoneNumber(?string $calledPhoneNumber = null): self
604
    {
605
        // validation for constraint: string
606
        if (!is_null($calledPhoneNumber) && !is_string($calledPhoneNumber)) {
0 ignored issues
show
introduced by
The condition is_string($calledPhoneNumber) is always true.
Loading history...
607
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($calledPhoneNumber, true), gettype($calledPhoneNumber)), __LINE__);
608
        }
609
        $this->CalledPhoneNumber = $calledPhoneNumber;
610
        
611
        return $this;
612
    }
613
    /**
614
     * Get CallerPhoneNumber value
615
     * @return string|null
616
     */
617
    public function getCallerPhoneNumber(): ?string
618
    {
619
        return $this->CallerPhoneNumber;
620
    }
621
    /**
622
     * Set CallerPhoneNumber value
623
     * @param string $callerPhoneNumber
624
     * @return \StructType\EwsCDRDataType
625
     */
626
    public function setCallerPhoneNumber(?string $callerPhoneNumber = null): self
627
    {
628
        // validation for constraint: string
629
        if (!is_null($callerPhoneNumber) && !is_string($callerPhoneNumber)) {
0 ignored issues
show
introduced by
The condition is_string($callerPhoneNumber) is always true.
Loading history...
630
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($callerPhoneNumber, true), gettype($callerPhoneNumber)), __LINE__);
631
        }
632
        $this->CallerPhoneNumber = $callerPhoneNumber;
633
        
634
        return $this;
635
    }
636
    /**
637
     * Get OfferResult value
638
     * @return string|null
639
     */
640
    public function getOfferResult(): ?string
641
    {
642
        return $this->OfferResult;
643
    }
644
    /**
645
     * Set OfferResult value
646
     * @param string $offerResult
647
     * @return \StructType\EwsCDRDataType
648
     */
649
    public function setOfferResult(?string $offerResult = null): self
650
    {
651
        // validation for constraint: string
652
        if (!is_null($offerResult) && !is_string($offerResult)) {
0 ignored issues
show
introduced by
The condition is_string($offerResult) is always true.
Loading history...
653
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($offerResult, true), gettype($offerResult)), __LINE__);
654
        }
655
        $this->OfferResult = $offerResult;
656
        
657
        return $this;
658
    }
659
    /**
660
     * Get DropCallReason value
661
     * @return string|null
662
     */
663
    public function getDropCallReason(): ?string
664
    {
665
        return $this->DropCallReason;
666
    }
667
    /**
668
     * Set DropCallReason value
669
     * @param string $dropCallReason
670
     * @return \StructType\EwsCDRDataType
671
     */
672
    public function setDropCallReason(?string $dropCallReason = null): self
673
    {
674
        // validation for constraint: string
675
        if (!is_null($dropCallReason) && !is_string($dropCallReason)) {
0 ignored issues
show
introduced by
The condition is_string($dropCallReason) is always true.
Loading history...
676
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($dropCallReason, true), gettype($dropCallReason)), __LINE__);
677
        }
678
        $this->DropCallReason = $dropCallReason;
679
        
680
        return $this;
681
    }
682
    /**
683
     * Get ReasonForCall value
684
     * @return string|null
685
     */
686
    public function getReasonForCall(): ?string
687
    {
688
        return $this->ReasonForCall;
689
    }
690
    /**
691
     * Set ReasonForCall value
692
     * @param string $reasonForCall
693
     * @return \StructType\EwsCDRDataType
694
     */
695
    public function setReasonForCall(?string $reasonForCall = null): self
696
    {
697
        // validation for constraint: string
698
        if (!is_null($reasonForCall) && !is_string($reasonForCall)) {
0 ignored issues
show
introduced by
The condition is_string($reasonForCall) is always true.
Loading history...
699
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($reasonForCall, true), gettype($reasonForCall)), __LINE__);
700
        }
701
        $this->ReasonForCall = $reasonForCall;
702
        
703
        return $this;
704
    }
705
    /**
706
     * Get TransferredNumber value
707
     * @return string|null
708
     */
709
    public function getTransferredNumber(): ?string
710
    {
711
        return $this->TransferredNumber;
712
    }
713
    /**
714
     * Set TransferredNumber value
715
     * @param string $transferredNumber
716
     * @return \StructType\EwsCDRDataType
717
     */
718
    public function setTransferredNumber(?string $transferredNumber = null): self
719
    {
720
        // validation for constraint: string
721
        if (!is_null($transferredNumber) && !is_string($transferredNumber)) {
0 ignored issues
show
introduced by
The condition is_string($transferredNumber) is always true.
Loading history...
722
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($transferredNumber, true), gettype($transferredNumber)), __LINE__);
723
        }
724
        $this->TransferredNumber = $transferredNumber;
725
        
726
        return $this;
727
    }
728
    /**
729
     * Get DialedString value
730
     * @return string|null
731
     */
732
    public function getDialedString(): ?string
733
    {
734
        return $this->DialedString;
735
    }
736
    /**
737
     * Set DialedString value
738
     * @param string $dialedString
739
     * @return \StructType\EwsCDRDataType
740
     */
741
    public function setDialedString(?string $dialedString = null): self
742
    {
743
        // validation for constraint: string
744
        if (!is_null($dialedString) && !is_string($dialedString)) {
0 ignored issues
show
introduced by
The condition is_string($dialedString) is always true.
Loading history...
745
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($dialedString, true), gettype($dialedString)), __LINE__);
746
        }
747
        $this->DialedString = $dialedString;
748
        
749
        return $this;
750
    }
751
    /**
752
     * Get CallerMailboxAlias value
753
     * @return string|null
754
     */
755
    public function getCallerMailboxAlias(): ?string
756
    {
757
        return $this->CallerMailboxAlias;
758
    }
759
    /**
760
     * Set CallerMailboxAlias value
761
     * @param string $callerMailboxAlias
762
     * @return \StructType\EwsCDRDataType
763
     */
764
    public function setCallerMailboxAlias(?string $callerMailboxAlias = null): self
765
    {
766
        // validation for constraint: string
767
        if (!is_null($callerMailboxAlias) && !is_string($callerMailboxAlias)) {
0 ignored issues
show
introduced by
The condition is_string($callerMailboxAlias) is always true.
Loading history...
768
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($callerMailboxAlias, true), gettype($callerMailboxAlias)), __LINE__);
769
        }
770
        $this->CallerMailboxAlias = $callerMailboxAlias;
771
        
772
        return $this;
773
    }
774
    /**
775
     * Get CalleeMailboxAlias value
776
     * @return string|null
777
     */
778
    public function getCalleeMailboxAlias(): ?string
779
    {
780
        return $this->CalleeMailboxAlias;
781
    }
782
    /**
783
     * Set CalleeMailboxAlias value
784
     * @param string $calleeMailboxAlias
785
     * @return \StructType\EwsCDRDataType
786
     */
787
    public function setCalleeMailboxAlias(?string $calleeMailboxAlias = null): self
788
    {
789
        // validation for constraint: string
790
        if (!is_null($calleeMailboxAlias) && !is_string($calleeMailboxAlias)) {
0 ignored issues
show
introduced by
The condition is_string($calleeMailboxAlias) is always true.
Loading history...
791
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($calleeMailboxAlias, true), gettype($calleeMailboxAlias)), __LINE__);
792
        }
793
        $this->CalleeMailboxAlias = $calleeMailboxAlias;
794
        
795
        return $this;
796
    }
797
    /**
798
     * Get CallerLegacyExchangeDN value
799
     * @return string|null
800
     */
801
    public function getCallerLegacyExchangeDN(): ?string
802
    {
803
        return $this->CallerLegacyExchangeDN;
804
    }
805
    /**
806
     * Set CallerLegacyExchangeDN value
807
     * @param string $callerLegacyExchangeDN
808
     * @return \StructType\EwsCDRDataType
809
     */
810
    public function setCallerLegacyExchangeDN(?string $callerLegacyExchangeDN = null): self
811
    {
812
        // validation for constraint: string
813
        if (!is_null($callerLegacyExchangeDN) && !is_string($callerLegacyExchangeDN)) {
0 ignored issues
show
introduced by
The condition is_string($callerLegacyExchangeDN) is always true.
Loading history...
814
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($callerLegacyExchangeDN, true), gettype($callerLegacyExchangeDN)), __LINE__);
815
        }
816
        $this->CallerLegacyExchangeDN = $callerLegacyExchangeDN;
817
        
818
        return $this;
819
    }
820
    /**
821
     * Get CalleeLegacyExchangeDN value
822
     * @return string|null
823
     */
824
    public function getCalleeLegacyExchangeDN(): ?string
825
    {
826
        return $this->CalleeLegacyExchangeDN;
827
    }
828
    /**
829
     * Set CalleeLegacyExchangeDN value
830
     * @param string $calleeLegacyExchangeDN
831
     * @return \StructType\EwsCDRDataType
832
     */
833
    public function setCalleeLegacyExchangeDN(?string $calleeLegacyExchangeDN = null): self
834
    {
835
        // validation for constraint: string
836
        if (!is_null($calleeLegacyExchangeDN) && !is_string($calleeLegacyExchangeDN)) {
0 ignored issues
show
introduced by
The condition is_string($calleeLegacyExchangeDN) is always true.
Loading history...
837
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($calleeLegacyExchangeDN, true), gettype($calleeLegacyExchangeDN)), __LINE__);
838
        }
839
        $this->CalleeLegacyExchangeDN = $calleeLegacyExchangeDN;
840
        
841
        return $this;
842
    }
843
    /**
844
     * Get AutoAttendantName value
845
     * @return string|null
846
     */
847
    public function getAutoAttendantName(): ?string
848
    {
849
        return $this->AutoAttendantName;
850
    }
851
    /**
852
     * Set AutoAttendantName value
853
     * @param string $autoAttendantName
854
     * @return \StructType\EwsCDRDataType
855
     */
856
    public function setAutoAttendantName(?string $autoAttendantName = null): self
857
    {
858
        // validation for constraint: string
859
        if (!is_null($autoAttendantName) && !is_string($autoAttendantName)) {
0 ignored issues
show
introduced by
The condition is_string($autoAttendantName) is always true.
Loading history...
860
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($autoAttendantName, true), gettype($autoAttendantName)), __LINE__);
861
        }
862
        $this->AutoAttendantName = $autoAttendantName;
863
        
864
        return $this;
865
    }
866
    /**
867
     * Get AudioQualityMetrics value
868
     * @return \StructType\EwsAudioQualityType|null
869
     */
870
    public function getAudioQualityMetrics(): ?\StructType\EwsAudioQualityType
871
    {
872
        return $this->AudioQualityMetrics;
873
    }
874
    /**
875
     * Set AudioQualityMetrics value
876
     * @param \StructType\EwsAudioQualityType $audioQualityMetrics
877
     * @return \StructType\EwsCDRDataType
878
     */
879
    public function setAudioQualityMetrics(?\StructType\EwsAudioQualityType $audioQualityMetrics = null): self
880
    {
881
        $this->AudioQualityMetrics = $audioQualityMetrics;
882
        
883
        return $this;
884
    }
885
}
886