1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace ColissimoPickupPoint\StructType; |
4
|
|
|
|
5
|
|
|
use \WsdlToPhp\PackageBase\AbstractStructBase; |
6
|
|
|
|
7
|
|
|
/** |
8
|
|
|
* This class stands for pointRetraitAcheminementResult StructType |
9
|
|
|
* @subpackage Structs |
10
|
|
|
* @author WsdlToPhp <[email protected]> |
11
|
|
|
*/ |
12
|
|
|
class PointRetraitAcheminementResult extends AbstractStructBase |
13
|
|
|
{ |
14
|
|
|
/** |
15
|
|
|
* The errorCode |
16
|
|
|
* @var int |
17
|
|
|
*/ |
18
|
|
|
public $errorCode; |
19
|
|
|
/** |
20
|
|
|
* The errorMessage |
21
|
|
|
* Meta information extracted from the WSDL |
22
|
|
|
* - minOccurs: 0 |
23
|
|
|
* @var string |
24
|
|
|
*/ |
25
|
|
|
public $errorMessage; |
26
|
|
|
/** |
27
|
|
|
* The listePointRetraitAcheminement |
28
|
|
|
* Meta information extracted from the WSDL |
29
|
|
|
* - maxOccurs: unbounded |
30
|
|
|
* - minOccurs: 0 |
31
|
|
|
* - nillable: true |
32
|
|
|
* @var \ColissimoPickupPoint\StructType\PointRetraitAcheminement[] |
33
|
|
|
*/ |
34
|
|
|
public $listePointRetraitAcheminement; |
35
|
|
|
/** |
36
|
|
|
* The qualiteReponse |
37
|
|
|
* @var int |
38
|
|
|
*/ |
39
|
|
|
public $qualiteReponse; |
40
|
|
|
/** |
41
|
|
|
* The wsRequestId |
42
|
|
|
* Meta information extracted from the WSDL |
43
|
|
|
* - minOccurs: 0 |
44
|
|
|
* @var string |
45
|
|
|
*/ |
46
|
|
|
public $wsRequestId; |
47
|
|
|
/** |
48
|
|
|
* Constructor method for pointRetraitAcheminementResult |
49
|
|
|
* @uses PointRetraitAcheminementResult::setErrorCode() |
50
|
|
|
* @uses PointRetraitAcheminementResult::setErrorMessage() |
51
|
|
|
* @uses PointRetraitAcheminementResult::setListePointRetraitAcheminement() |
52
|
|
|
* @uses PointRetraitAcheminementResult::setQualiteReponse() |
53
|
|
|
* @uses PointRetraitAcheminementResult::setWsRequestId() |
54
|
|
|
* @param int $errorCode |
55
|
|
|
* @param string $errorMessage |
56
|
|
|
* @param \ColissimoPickupPoint\StructType\PointRetraitAcheminement[] $listePointRetraitAcheminement |
57
|
|
|
* @param int $qualiteReponse |
58
|
|
|
* @param string $wsRequestId |
59
|
|
|
*/ |
60
|
|
|
public function __construct($errorCode = null, $errorMessage = null, array $listePointRetraitAcheminement = array(), $qualiteReponse = null, $wsRequestId = null) |
61
|
|
|
{ |
62
|
|
|
$this |
63
|
|
|
->setErrorCode($errorCode) |
64
|
|
|
->setErrorMessage($errorMessage) |
65
|
|
|
->setListePointRetraitAcheminement($listePointRetraitAcheminement) |
66
|
|
|
->setQualiteReponse($qualiteReponse) |
67
|
|
|
->setWsRequestId($wsRequestId); |
68
|
|
|
} |
69
|
|
|
/** |
70
|
|
|
* Get errorCode value |
71
|
|
|
* @return int|null |
72
|
|
|
*/ |
73
|
|
|
public function getErrorCode() |
74
|
|
|
{ |
75
|
|
|
return $this->errorCode; |
76
|
|
|
} |
77
|
|
|
/** |
78
|
|
|
* Set errorCode value |
79
|
|
|
* @param int $errorCode |
80
|
|
|
* @return \ColissimoPickupPoint\StructType\PointRetraitAcheminementResult |
81
|
|
|
*/ |
82
|
|
|
public function setErrorCode($errorCode = null) |
83
|
|
|
{ |
84
|
|
|
// validation for constraint: int |
85
|
|
|
if (!is_null($errorCode) && !(is_int($errorCode) || ctype_digit($errorCode))) { |
|
|
|
|
86
|
|
|
throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($errorCode, true), gettype($errorCode)), __LINE__); |
87
|
|
|
} |
88
|
|
|
$this->errorCode = $errorCode; |
89
|
|
|
return $this; |
90
|
|
|
} |
91
|
|
|
/** |
92
|
|
|
* Get errorMessage value |
93
|
|
|
* @return string|null |
94
|
|
|
*/ |
95
|
|
|
public function getErrorMessage() |
96
|
|
|
{ |
97
|
|
|
return $this->errorMessage; |
98
|
|
|
} |
99
|
|
|
/** |
100
|
|
|
* Set errorMessage value |
101
|
|
|
* @param string $errorMessage |
102
|
|
|
* @return \ColissimoPickupPoint\StructType\PointRetraitAcheminementResult |
103
|
|
|
*/ |
104
|
|
|
public function setErrorMessage($errorMessage = null) |
105
|
|
|
{ |
106
|
|
|
// validation for constraint: string |
107
|
|
|
if (!is_null($errorMessage) && !is_string($errorMessage)) { |
|
|
|
|
108
|
|
|
throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($errorMessage, true), gettype($errorMessage)), __LINE__); |
109
|
|
|
} |
110
|
|
|
$this->errorMessage = $errorMessage; |
111
|
|
|
return $this; |
112
|
|
|
} |
113
|
|
|
/** |
114
|
|
|
* Get listePointRetraitAcheminement value |
115
|
|
|
* An additional test has been added (isset) before returning the property value as |
116
|
|
|
* this property may have been unset before, due to the fact that this property is |
117
|
|
|
* removable from the request (nillable=true+minOccurs=0) |
118
|
|
|
* @return \ColissimoPickupPoint\StructType\PointRetraitAcheminement[]|null |
119
|
|
|
*/ |
120
|
|
|
public function getListePointRetraitAcheminement() |
121
|
|
|
{ |
122
|
|
|
return isset($this->listePointRetraitAcheminement) ? $this->listePointRetraitAcheminement : null; |
123
|
|
|
} |
124
|
|
|
/** |
125
|
|
|
* This method is responsible for validating the values passed to the setListePointRetraitAcheminement method |
126
|
|
|
* This method is willingly generated in order to preserve the one-line inline validation within the setListePointRetraitAcheminement method |
127
|
|
|
* @param array $values |
128
|
|
|
* @return string A non-empty message if the values does not match the validation rules |
129
|
|
|
*/ |
130
|
|
|
public static function validateListePointRetraitAcheminementForArrayConstraintsFromSetListePointRetraitAcheminement(array $values = array()) |
131
|
|
|
{ |
132
|
|
|
$message = ''; |
133
|
|
|
$invalidValues = []; |
134
|
|
|
foreach ($values as $pointRetraitAcheminementResultListePointRetraitAcheminementItem) { |
135
|
|
|
// validation for constraint: itemType |
136
|
|
|
if (!$pointRetraitAcheminementResultListePointRetraitAcheminementItem instanceof \ColissimoPickupPoint\StructType\PointRetraitAcheminement) { |
137
|
|
|
$invalidValues[] = is_object($pointRetraitAcheminementResultListePointRetraitAcheminementItem) ? get_class($pointRetraitAcheminementResultListePointRetraitAcheminementItem) : sprintf('%s(%s)', gettype($pointRetraitAcheminementResultListePointRetraitAcheminementItem), var_export($pointRetraitAcheminementResultListePointRetraitAcheminementItem, true)); |
138
|
|
|
} |
139
|
|
|
} |
140
|
|
|
if (!empty($invalidValues)) { |
141
|
|
|
$message = sprintf('The listePointRetraitAcheminement property can only contain items of type \ColissimoPickupPoint\StructType\PointRetraitAcheminement, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues))); |
|
|
|
|
142
|
|
|
} |
143
|
|
|
unset($invalidValues); |
144
|
|
|
return $message; |
145
|
|
|
} |
146
|
|
|
/** |
147
|
|
|
* Set listePointRetraitAcheminement value |
148
|
|
|
* This property is removable from request (nillable=true+minOccurs=0), therefore |
149
|
|
|
* if the value assigned to this property is null, it is removed from this object |
150
|
|
|
* @throws \InvalidArgumentException |
151
|
|
|
* @param \ColissimoPickupPoint\StructType\PointRetraitAcheminement[] $listePointRetraitAcheminement |
152
|
|
|
* @return \ColissimoPickupPoint\StructType\PointRetraitAcheminementResult |
153
|
|
|
*/ |
154
|
|
|
public function setListePointRetraitAcheminement(array $listePointRetraitAcheminement = array()) |
155
|
|
|
{ |
156
|
|
|
// validation for constraint: array |
157
|
|
|
if ('' !== ($listePointRetraitAcheminementArrayErrorMessage = self::validateListePointRetraitAcheminementForArrayConstraintsFromSetListePointRetraitAcheminement($listePointRetraitAcheminement))) { |
158
|
|
|
throw new \InvalidArgumentException($listePointRetraitAcheminementArrayErrorMessage, __LINE__); |
159
|
|
|
} |
160
|
|
|
if (is_null($listePointRetraitAcheminement) || (is_array($listePointRetraitAcheminement) && empty($listePointRetraitAcheminement))) { |
161
|
|
|
unset($this->listePointRetraitAcheminement); |
162
|
|
|
} else { |
163
|
|
|
$this->listePointRetraitAcheminement = $listePointRetraitAcheminement; |
164
|
|
|
} |
165
|
|
|
return $this; |
166
|
|
|
} |
167
|
|
|
/** |
168
|
|
|
* Add item to listePointRetraitAcheminement value |
169
|
|
|
* @throws \InvalidArgumentException |
170
|
|
|
* @param \ColissimoPickupPoint\StructType\PointRetraitAcheminement $item |
171
|
|
|
* @return \ColissimoPickupPoint\StructType\PointRetraitAcheminementResult |
172
|
|
|
*/ |
173
|
|
|
public function addToListePointRetraitAcheminement(\ColissimoPickupPoint\StructType\PointRetraitAcheminement $item) |
174
|
|
|
{ |
175
|
|
|
// validation for constraint: itemType |
176
|
|
|
if (!$item instanceof \ColissimoPickupPoint\StructType\PointRetraitAcheminement) { |
|
|
|
|
177
|
|
|
throw new \InvalidArgumentException(sprintf('The listePointRetraitAcheminement property can only contain items of type \ColissimoPickupPoint\StructType\PointRetraitAcheminement, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__); |
178
|
|
|
} |
179
|
|
|
$this->listePointRetraitAcheminement[] = $item; |
180
|
|
|
return $this; |
181
|
|
|
} |
182
|
|
|
/** |
183
|
|
|
* Get qualiteReponse value |
184
|
|
|
* @return int|null |
185
|
|
|
*/ |
186
|
|
|
public function getQualiteReponse() |
187
|
|
|
{ |
188
|
|
|
return $this->qualiteReponse; |
189
|
|
|
} |
190
|
|
|
/** |
191
|
|
|
* Set qualiteReponse value |
192
|
|
|
* @param int $qualiteReponse |
193
|
|
|
* @return \ColissimoPickupPoint\StructType\PointRetraitAcheminementResult |
194
|
|
|
*/ |
195
|
|
|
public function setQualiteReponse($qualiteReponse = null) |
196
|
|
|
{ |
197
|
|
|
// validation for constraint: int |
198
|
|
|
if (!is_null($qualiteReponse) && !(is_int($qualiteReponse) || ctype_digit($qualiteReponse))) { |
|
|
|
|
199
|
|
|
throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($qualiteReponse, true), gettype($qualiteReponse)), __LINE__); |
200
|
|
|
} |
201
|
|
|
$this->qualiteReponse = $qualiteReponse; |
202
|
|
|
return $this; |
203
|
|
|
} |
204
|
|
|
/** |
205
|
|
|
* Get wsRequestId value |
206
|
|
|
* @return string|null |
207
|
|
|
*/ |
208
|
|
|
public function getWsRequestId() |
209
|
|
|
{ |
210
|
|
|
return $this->wsRequestId; |
211
|
|
|
} |
212
|
|
|
/** |
213
|
|
|
* Set wsRequestId value |
214
|
|
|
* @param string $wsRequestId |
215
|
|
|
* @return \ColissimoPickupPoint\StructType\PointRetraitAcheminementResult |
216
|
|
|
*/ |
217
|
|
|
public function setWsRequestId($wsRequestId = null) |
218
|
|
|
{ |
219
|
|
|
// validation for constraint: string |
220
|
|
|
if (!is_null($wsRequestId) && !is_string($wsRequestId)) { |
|
|
|
|
221
|
|
|
throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($wsRequestId, true), gettype($wsRequestId)), __LINE__); |
222
|
|
|
} |
223
|
|
|
$this->wsRequestId = $wsRequestId; |
224
|
|
|
return $this; |
225
|
|
|
} |
226
|
|
|
} |
227
|
|
|
|