|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Spinen\Nable\Ncentral\Type; |
|
4
|
|
|
|
|
5
|
|
|
|
|
6
|
|
|
use Phpro\SoapClient\Type\RequestInterface; |
|
7
|
|
|
|
|
8
|
|
|
class DevicePropertyModify implements RequestInterface |
|
9
|
|
|
{ |
|
10
|
|
|
|
|
11
|
|
|
/** |
|
12
|
|
|
* @var string |
|
13
|
|
|
*/ |
|
14
|
|
|
private $username; |
|
15
|
|
|
|
|
16
|
|
|
/** |
|
17
|
|
|
* @var string |
|
18
|
|
|
*/ |
|
19
|
|
|
private $password; |
|
20
|
|
|
|
|
21
|
|
|
/** |
|
22
|
|
|
* @var \Spinen\Nable\Ncentral\Type\DeviceProperties |
|
23
|
|
|
*/ |
|
24
|
|
|
private $deviceProperties; |
|
25
|
|
|
|
|
26
|
|
|
/** |
|
27
|
|
|
* Constructor |
|
28
|
|
|
* |
|
29
|
|
|
* @var string $username |
|
30
|
|
|
* @var string $password |
|
31
|
|
|
* @var \Spinen\Nable\Ncentral\Type\DeviceProperties $deviceProperties |
|
32
|
|
|
*/ |
|
33
|
|
|
public function __construct($username, $password, $deviceProperties) |
|
34
|
|
|
{ |
|
35
|
|
|
$this->username = $username; |
|
36
|
|
|
$this->password = $password; |
|
37
|
|
|
$this->deviceProperties = $deviceProperties; |
|
38
|
|
|
} |
|
39
|
|
|
|
|
40
|
|
|
/** |
|
41
|
|
|
* @return string |
|
42
|
|
|
*/ |
|
43
|
|
|
public function getUsername() |
|
44
|
|
|
{ |
|
45
|
|
|
return $this->username; |
|
46
|
|
|
} |
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* @param string $username |
|
50
|
|
|
* @return DevicePropertyModify |
|
51
|
|
|
*/ |
|
52
|
|
|
public function withUsername($username) |
|
53
|
|
|
{ |
|
54
|
|
|
$new = clone $this; |
|
55
|
|
|
$new->username = $username; |
|
56
|
|
|
|
|
57
|
|
|
return $new; |
|
58
|
|
|
} |
|
59
|
|
|
|
|
60
|
|
|
/** |
|
61
|
|
|
* @return string |
|
62
|
|
|
*/ |
|
63
|
|
|
public function getPassword() |
|
64
|
|
|
{ |
|
65
|
|
|
return $this->password; |
|
66
|
|
|
} |
|
67
|
|
|
|
|
68
|
|
|
/** |
|
69
|
|
|
* @param string $password |
|
70
|
|
|
* @return DevicePropertyModify |
|
71
|
|
|
*/ |
|
72
|
|
|
public function withPassword($password) |
|
73
|
|
|
{ |
|
74
|
|
|
$new = clone $this; |
|
75
|
|
|
$new->password = $password; |
|
76
|
|
|
|
|
77
|
|
|
return $new; |
|
78
|
|
|
} |
|
79
|
|
|
|
|
80
|
|
|
/** |
|
81
|
|
|
* @return \Spinen\Nable\Ncentral\Type\DeviceProperties |
|
82
|
|
|
*/ |
|
83
|
|
|
public function getDeviceProperties() |
|
84
|
|
|
{ |
|
85
|
|
|
return $this->deviceProperties; |
|
86
|
|
|
} |
|
87
|
|
|
|
|
88
|
|
|
/** |
|
89
|
|
|
* @param \Spinen\Nable\Ncentral\Type\DeviceProperties $deviceProperties |
|
90
|
|
|
* @return DevicePropertyModify |
|
91
|
|
|
*/ |
|
92
|
|
|
public function withDeviceProperties($deviceProperties) |
|
93
|
|
|
{ |
|
94
|
|
|
$new = clone $this; |
|
95
|
|
|
$new->deviceProperties = $deviceProperties; |
|
96
|
|
|
|
|
97
|
|
|
return $new; |
|
98
|
|
|
} |
|
99
|
|
|
|
|
100
|
|
|
|
|
101
|
|
|
} |
|
102
|
|
|
|
|
103
|
|
|
|