PrepaidDomainCreate::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 19
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 17
nc 1
nop 16
dl 0
loc 19
rs 9.7
c 0
b 0
f 0

How to fix   Many Parameters   

Many Parameters

Methods with many parameters are not only hard to understand, but their parameters also often become inconsistent when you need more, or different data.

There are several approaches to avoid long parameter lists:

1
<?php
2
3
namespace Ovh\StructType;
4
5
use \WsdlToPhp\PackageBase\AbstractStructBase;
6
7
/**
8
 * This class stands for prepaidDomainCreate StructType
9
 * @subpackage Structs
10
 * @author WsdlToPhp <[email protected]>
11
 */
12
class PrepaidDomainCreate 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 domain
23
     * Meta information extracted from the WSDL
24
     * - nillable: true
25
     * @var string
26
     */
27
    public $domain;
28
    /**
29
     * The nicowner
30
     * Meta information extracted from the WSDL
31
     * - nillable: true
32
     * @var string
33
     */
34
    public $nicowner;
35
    /**
36
     * The nicadmin
37
     * Meta information extracted from the WSDL
38
     * - nillable: true
39
     * @var string
40
     */
41
    public $nicadmin;
42
    /**
43
     * The nictech
44
     * Meta information extracted from the WSDL
45
     * - nillable: true
46
     * @var string
47
     */
48
    public $nictech;
49
    /**
50
     * The nicbilling
51
     * Meta information extracted from the WSDL
52
     * - nillable: true
53
     * @var string
54
     */
55
    public $nicbilling;
56
    /**
57
     * The dns1
58
     * Meta information extracted from the WSDL
59
     * - nillable: true
60
     * @var string
61
     */
62
    public $dns1;
63
    /**
64
     * The dns2
65
     * Meta information extracted from the WSDL
66
     * - nillable: true
67
     * @var string
68
     */
69
    public $dns2;
70
    /**
71
     * The dns3
72
     * Meta information extracted from the WSDL
73
     * - nillable: true
74
     * @var string
75
     */
76
    public $dns3;
77
    /**
78
     * The dns4
79
     * Meta information extracted from the WSDL
80
     * - nillable: true
81
     * @var string
82
     */
83
    public $dns4;
84
    /**
85
     * The dns5
86
     * Meta information extracted from the WSDL
87
     * - nillable: true
88
     * @var string
89
     */
90
    public $dns5;
91
    /**
92
     * The frpartBirthday
93
     * Meta information extracted from the WSDL
94
     * - nillable: true
95
     * @var string
96
     */
97
    public $frpartBirthday;
98
    /**
99
     * The frpartBirthCountry
100
     * Meta information extracted from the WSDL
101
     * - nillable: true
102
     * @var string
103
     */
104
    public $frpartBirthCountry;
105
    /**
106
     * The frpartBirthDepartment
107
     * Meta information extracted from the WSDL
108
     * - nillable: true
109
     * @var string
110
     */
111
    public $frpartBirthDepartment;
112
    /**
113
     * The frpartBirthTown
114
     * Meta information extracted from the WSDL
115
     * - nillable: true
116
     * @var string
117
     */
118
    public $frpartBirthTown;
119
    /**
120
     * The dryRun
121
     * Meta information extracted from the WSDL
122
     * - nillable: true
123
     * @var bool
124
     */
125
    public $dryRun;
126
    /**
127
     * Constructor method for prepaidDomainCreate
128
     * @uses PrepaidDomainCreate::setSession()
129
     * @uses PrepaidDomainCreate::setDomain()
130
     * @uses PrepaidDomainCreate::setNicowner()
131
     * @uses PrepaidDomainCreate::setNicadmin()
132
     * @uses PrepaidDomainCreate::setNictech()
133
     * @uses PrepaidDomainCreate::setNicbilling()
134
     * @uses PrepaidDomainCreate::setDns1()
135
     * @uses PrepaidDomainCreate::setDns2()
136
     * @uses PrepaidDomainCreate::setDns3()
137
     * @uses PrepaidDomainCreate::setDns4()
138
     * @uses PrepaidDomainCreate::setDns5()
139
     * @uses PrepaidDomainCreate::setFrpartBirthday()
140
     * @uses PrepaidDomainCreate::setFrpartBirthCountry()
141
     * @uses PrepaidDomainCreate::setFrpartBirthDepartment()
142
     * @uses PrepaidDomainCreate::setFrpartBirthTown()
143
     * @uses PrepaidDomainCreate::setDryRun()
144
     * @param string $session
145
     * @param string $domain
146
     * @param string $nicowner
147
     * @param string $nicadmin
148
     * @param string $nictech
149
     * @param string $nicbilling
150
     * @param string $dns1
151
     * @param string $dns2
152
     * @param string $dns3
153
     * @param string $dns4
154
     * @param string $dns5
155
     * @param string $frpartBirthday
156
     * @param string $frpartBirthCountry
157
     * @param string $frpartBirthDepartment
158
     * @param string $frpartBirthTown
159
     * @param bool $dryRun
160
     */
161
    public function __construct($session = null, $domain = null, $nicowner = null, $nicadmin = null, $nictech = null, $nicbilling = null, $dns1 = null, $dns2 = null, $dns3 = null, $dns4 = null, $dns5 = null, $frpartBirthday = null, $frpartBirthCountry = null, $frpartBirthDepartment = null, $frpartBirthTown = null, $dryRun = null)
162
    {
163
        $this
164
            ->setSession($session)
165
            ->setDomain($domain)
166
            ->setNicowner($nicowner)
167
            ->setNicadmin($nicadmin)
168
            ->setNictech($nictech)
169
            ->setNicbilling($nicbilling)
170
            ->setDns1($dns1)
171
            ->setDns2($dns2)
172
            ->setDns3($dns3)
173
            ->setDns4($dns4)
174
            ->setDns5($dns5)
175
            ->setFrpartBirthday($frpartBirthday)
176
            ->setFrpartBirthCountry($frpartBirthCountry)
177
            ->setFrpartBirthDepartment($frpartBirthDepartment)
178
            ->setFrpartBirthTown($frpartBirthTown)
179
            ->setDryRun($dryRun);
180
    }
181
    /**
182
     * Get session value
183
     * @return string|null
184
     */
185
    public function getSession()
186
    {
187
        return $this->session;
188
    }
189
    /**
190
     * Set session value
191
     * @param string $session
192
     * @return \Ovh\StructType\PrepaidDomainCreate
193
     */
194
    public function setSession($session = null)
195
    {
196
        // validation for constraint: string
197
        if (!is_null($session) && !is_string($session)) {
0 ignored issues
show
introduced by
The condition is_string($session) is always true.
Loading history...
198
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($session, true), gettype($session)), __LINE__);
199
        }
200
        $this->session = $session;
201
        return $this;
202
    }
203
    /**
204
     * Get domain value
205
     * @return string|null
206
     */
207
    public function getDomain()
208
    {
209
        return $this->domain;
210
    }
211
    /**
212
     * Set domain value
213
     * @param string $domain
214
     * @return \Ovh\StructType\PrepaidDomainCreate
215
     */
216
    public function setDomain($domain = null)
217
    {
218
        // validation for constraint: string
219
        if (!is_null($domain) && !is_string($domain)) {
0 ignored issues
show
introduced by
The condition is_string($domain) is always true.
Loading history...
220
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($domain, true), gettype($domain)), __LINE__);
221
        }
222
        $this->domain = $domain;
223
        return $this;
224
    }
225
    /**
226
     * Get nicowner value
227
     * @return string|null
228
     */
229
    public function getNicowner()
230
    {
231
        return $this->nicowner;
232
    }
233
    /**
234
     * Set nicowner value
235
     * @param string $nicowner
236
     * @return \Ovh\StructType\PrepaidDomainCreate
237
     */
238
    public function setNicowner($nicowner = null)
239
    {
240
        // validation for constraint: string
241
        if (!is_null($nicowner) && !is_string($nicowner)) {
0 ignored issues
show
introduced by
The condition is_string($nicowner) is always true.
Loading history...
242
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($nicowner, true), gettype($nicowner)), __LINE__);
243
        }
244
        $this->nicowner = $nicowner;
245
        return $this;
246
    }
247
    /**
248
     * Get nicadmin value
249
     * @return string|null
250
     */
251
    public function getNicadmin()
252
    {
253
        return $this->nicadmin;
254
    }
255
    /**
256
     * Set nicadmin value
257
     * @param string $nicadmin
258
     * @return \Ovh\StructType\PrepaidDomainCreate
259
     */
260
    public function setNicadmin($nicadmin = null)
261
    {
262
        // validation for constraint: string
263
        if (!is_null($nicadmin) && !is_string($nicadmin)) {
0 ignored issues
show
introduced by
The condition is_string($nicadmin) is always true.
Loading history...
264
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($nicadmin, true), gettype($nicadmin)), __LINE__);
265
        }
266
        $this->nicadmin = $nicadmin;
267
        return $this;
268
    }
269
    /**
270
     * Get nictech value
271
     * @return string|null
272
     */
273
    public function getNictech()
274
    {
275
        return $this->nictech;
276
    }
277
    /**
278
     * Set nictech value
279
     * @param string $nictech
280
     * @return \Ovh\StructType\PrepaidDomainCreate
281
     */
282
    public function setNictech($nictech = null)
283
    {
284
        // validation for constraint: string
285
        if (!is_null($nictech) && !is_string($nictech)) {
0 ignored issues
show
introduced by
The condition is_string($nictech) is always true.
Loading history...
286
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($nictech, true), gettype($nictech)), __LINE__);
287
        }
288
        $this->nictech = $nictech;
289
        return $this;
290
    }
291
    /**
292
     * Get nicbilling value
293
     * @return string|null
294
     */
295
    public function getNicbilling()
296
    {
297
        return $this->nicbilling;
298
    }
299
    /**
300
     * Set nicbilling value
301
     * @param string $nicbilling
302
     * @return \Ovh\StructType\PrepaidDomainCreate
303
     */
304
    public function setNicbilling($nicbilling = null)
305
    {
306
        // validation for constraint: string
307
        if (!is_null($nicbilling) && !is_string($nicbilling)) {
0 ignored issues
show
introduced by
The condition is_string($nicbilling) is always true.
Loading history...
308
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($nicbilling, true), gettype($nicbilling)), __LINE__);
309
        }
310
        $this->nicbilling = $nicbilling;
311
        return $this;
312
    }
313
    /**
314
     * Get dns1 value
315
     * @return string|null
316
     */
317
    public function getDns1()
318
    {
319
        return $this->dns1;
320
    }
321
    /**
322
     * Set dns1 value
323
     * @param string $dns1
324
     * @return \Ovh\StructType\PrepaidDomainCreate
325
     */
326
    public function setDns1($dns1 = null)
327
    {
328
        // validation for constraint: string
329
        if (!is_null($dns1) && !is_string($dns1)) {
0 ignored issues
show
introduced by
The condition is_string($dns1) is always true.
Loading history...
330
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($dns1, true), gettype($dns1)), __LINE__);
331
        }
332
        $this->dns1 = $dns1;
333
        return $this;
334
    }
335
    /**
336
     * Get dns2 value
337
     * @return string|null
338
     */
339
    public function getDns2()
340
    {
341
        return $this->dns2;
342
    }
343
    /**
344
     * Set dns2 value
345
     * @param string $dns2
346
     * @return \Ovh\StructType\PrepaidDomainCreate
347
     */
348
    public function setDns2($dns2 = null)
349
    {
350
        // validation for constraint: string
351
        if (!is_null($dns2) && !is_string($dns2)) {
0 ignored issues
show
introduced by
The condition is_string($dns2) is always true.
Loading history...
352
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($dns2, true), gettype($dns2)), __LINE__);
353
        }
354
        $this->dns2 = $dns2;
355
        return $this;
356
    }
357
    /**
358
     * Get dns3 value
359
     * @return string|null
360
     */
361
    public function getDns3()
362
    {
363
        return $this->dns3;
364
    }
365
    /**
366
     * Set dns3 value
367
     * @param string $dns3
368
     * @return \Ovh\StructType\PrepaidDomainCreate
369
     */
370
    public function setDns3($dns3 = null)
371
    {
372
        // validation for constraint: string
373
        if (!is_null($dns3) && !is_string($dns3)) {
0 ignored issues
show
introduced by
The condition is_string($dns3) is always true.
Loading history...
374
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($dns3, true), gettype($dns3)), __LINE__);
375
        }
376
        $this->dns3 = $dns3;
377
        return $this;
378
    }
379
    /**
380
     * Get dns4 value
381
     * @return string|null
382
     */
383
    public function getDns4()
384
    {
385
        return $this->dns4;
386
    }
387
    /**
388
     * Set dns4 value
389
     * @param string $dns4
390
     * @return \Ovh\StructType\PrepaidDomainCreate
391
     */
392
    public function setDns4($dns4 = null)
393
    {
394
        // validation for constraint: string
395
        if (!is_null($dns4) && !is_string($dns4)) {
0 ignored issues
show
introduced by
The condition is_string($dns4) is always true.
Loading history...
396
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($dns4, true), gettype($dns4)), __LINE__);
397
        }
398
        $this->dns4 = $dns4;
399
        return $this;
400
    }
401
    /**
402
     * Get dns5 value
403
     * @return string|null
404
     */
405
    public function getDns5()
406
    {
407
        return $this->dns5;
408
    }
409
    /**
410
     * Set dns5 value
411
     * @param string $dns5
412
     * @return \Ovh\StructType\PrepaidDomainCreate
413
     */
414
    public function setDns5($dns5 = null)
415
    {
416
        // validation for constraint: string
417
        if (!is_null($dns5) && !is_string($dns5)) {
0 ignored issues
show
introduced by
The condition is_string($dns5) is always true.
Loading history...
418
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($dns5, true), gettype($dns5)), __LINE__);
419
        }
420
        $this->dns5 = $dns5;
421
        return $this;
422
    }
423
    /**
424
     * Get frpartBirthday value
425
     * @return string|null
426
     */
427
    public function getFrpartBirthday()
428
    {
429
        return $this->frpartBirthday;
430
    }
431
    /**
432
     * Set frpartBirthday value
433
     * @param string $frpartBirthday
434
     * @return \Ovh\StructType\PrepaidDomainCreate
435
     */
436
    public function setFrpartBirthday($frpartBirthday = null)
437
    {
438
        // validation for constraint: string
439
        if (!is_null($frpartBirthday) && !is_string($frpartBirthday)) {
0 ignored issues
show
introduced by
The condition is_string($frpartBirthday) is always true.
Loading history...
440
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($frpartBirthday, true), gettype($frpartBirthday)), __LINE__);
441
        }
442
        $this->frpartBirthday = $frpartBirthday;
443
        return $this;
444
    }
445
    /**
446
     * Get frpartBirthCountry value
447
     * @return string|null
448
     */
449
    public function getFrpartBirthCountry()
450
    {
451
        return $this->frpartBirthCountry;
452
    }
453
    /**
454
     * Set frpartBirthCountry value
455
     * @param string $frpartBirthCountry
456
     * @return \Ovh\StructType\PrepaidDomainCreate
457
     */
458
    public function setFrpartBirthCountry($frpartBirthCountry = null)
459
    {
460
        // validation for constraint: string
461
        if (!is_null($frpartBirthCountry) && !is_string($frpartBirthCountry)) {
0 ignored issues
show
introduced by
The condition is_string($frpartBirthCountry) is always true.
Loading history...
462
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($frpartBirthCountry, true), gettype($frpartBirthCountry)), __LINE__);
463
        }
464
        $this->frpartBirthCountry = $frpartBirthCountry;
465
        return $this;
466
    }
467
    /**
468
     * Get frpartBirthDepartment value
469
     * @return string|null
470
     */
471
    public function getFrpartBirthDepartment()
472
    {
473
        return $this->frpartBirthDepartment;
474
    }
475
    /**
476
     * Set frpartBirthDepartment value
477
     * @param string $frpartBirthDepartment
478
     * @return \Ovh\StructType\PrepaidDomainCreate
479
     */
480
    public function setFrpartBirthDepartment($frpartBirthDepartment = null)
481
    {
482
        // validation for constraint: string
483
        if (!is_null($frpartBirthDepartment) && !is_string($frpartBirthDepartment)) {
0 ignored issues
show
introduced by
The condition is_string($frpartBirthDepartment) is always true.
Loading history...
484
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($frpartBirthDepartment, true), gettype($frpartBirthDepartment)), __LINE__);
485
        }
486
        $this->frpartBirthDepartment = $frpartBirthDepartment;
487
        return $this;
488
    }
489
    /**
490
     * Get frpartBirthTown value
491
     * @return string|null
492
     */
493
    public function getFrpartBirthTown()
494
    {
495
        return $this->frpartBirthTown;
496
    }
497
    /**
498
     * Set frpartBirthTown value
499
     * @param string $frpartBirthTown
500
     * @return \Ovh\StructType\PrepaidDomainCreate
501
     */
502
    public function setFrpartBirthTown($frpartBirthTown = null)
503
    {
504
        // validation for constraint: string
505
        if (!is_null($frpartBirthTown) && !is_string($frpartBirthTown)) {
0 ignored issues
show
introduced by
The condition is_string($frpartBirthTown) is always true.
Loading history...
506
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($frpartBirthTown, true), gettype($frpartBirthTown)), __LINE__);
507
        }
508
        $this->frpartBirthTown = $frpartBirthTown;
509
        return $this;
510
    }
511
    /**
512
     * Get dryRun value
513
     * @return bool|null
514
     */
515
    public function getDryRun()
516
    {
517
        return $this->dryRun;
518
    }
519
    /**
520
     * Set dryRun value
521
     * @param bool $dryRun
522
     * @return \Ovh\StructType\PrepaidDomainCreate
523
     */
524
    public function setDryRun($dryRun = null)
525
    {
526
        // validation for constraint: boolean
527
        if (!is_null($dryRun) && !is_bool($dryRun)) {
0 ignored issues
show
introduced by
The condition is_bool($dryRun) is always true.
Loading history...
528
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($dryRun, true), gettype($dryRun)), __LINE__);
529
        }
530
        $this->dryRun = $dryRun;
531
        return $this;
532
    }
533
}
534