1 | <?php |
||
8 | class Rule extends \ArrayObject |
||
9 | { |
||
10 | use EntityTrait; |
||
11 | |||
12 | /** |
||
13 | * @param array $array |
||
14 | */ |
||
15 | public function __construct(array $array = []) |
||
19 | |||
20 | /** |
||
21 | * Sets the 'id' parameter. |
||
22 | * |
||
23 | * @param string $id |
||
24 | * |
||
25 | * @throws \Acquia\LiftClient\Exception\LiftSdkException |
||
26 | * |
||
27 | * @return \Acquia\LiftClient\Entity\Rule |
||
28 | */ |
||
29 | public function setId($id) |
||
30 | { |
||
31 | if (!is_string($id)) { |
||
32 | throw new LiftSdkException('Argument must be an instance of string.'); |
||
33 | } |
||
34 | $this['id'] = $id; |
||
35 | |||
36 | return $this; |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * Gets the 'id' parameter. |
||
41 | * |
||
42 | * @return string The Identifier of the Rule |
||
43 | */ |
||
44 | public function getId() |
||
48 | |||
49 | /** |
||
50 | * Sets the 'label' parameter. |
||
51 | * |
||
52 | * @param string $label |
||
53 | * |
||
54 | * @throws \Acquia\LiftClient\Exception\LiftSdkException |
||
55 | * |
||
56 | * @return \Acquia\LiftClient\Entity\Rule |
||
57 | */ |
||
58 | public function setLabel($label) |
||
59 | { |
||
60 | if (!is_string($label)) { |
||
61 | throw new LiftSdkException('Argument must be an instance of string.'); |
||
62 | } |
||
63 | $this['label'] = $label; |
||
64 | |||
65 | return $this; |
||
66 | } |
||
67 | |||
68 | /** |
||
69 | * Gets the 'label' parameter. |
||
70 | * |
||
71 | * @return string |
||
72 | */ |
||
73 | public function getLabel() |
||
77 | |||
78 | /** |
||
79 | * Sets the 'description' parameter. |
||
80 | * |
||
81 | * @param string $description |
||
82 | * |
||
83 | * @throws \Acquia\LiftClient\Exception\LiftSdkException |
||
84 | * |
||
85 | * @return \Acquia\LiftClient\Entity\Rule |
||
86 | */ |
||
87 | public function setDescription($description) |
||
88 | { |
||
89 | if (!is_string($description)) { |
||
90 | throw new LiftSdkException('Argument must be an instance of string.'); |
||
91 | } |
||
92 | $this['description'] = $description; |
||
93 | |||
94 | return $this; |
||
95 | } |
||
96 | |||
97 | /** |
||
98 | * Gets the 'description' parameter. |
||
99 | * |
||
100 | * @return string The Description of the Rule |
||
101 | */ |
||
102 | public function getDescription() |
||
106 | |||
107 | /** |
||
108 | * Sets the 'slot_id' parameter. |
||
109 | * |
||
110 | * @param string $slotId |
||
111 | * |
||
112 | * @throws \Acquia\LiftClient\Exception\LiftSdkException |
||
113 | * |
||
114 | * @return \Acquia\LiftClient\Entity\Rule |
||
115 | */ |
||
116 | public function setSlotId($slotId) |
||
125 | |||
126 | /** |
||
127 | * Gets the 'description' parameter. |
||
128 | * |
||
129 | * @return string The Description of the Rule |
||
130 | */ |
||
131 | public function getSlotId() |
||
135 | |||
136 | /** |
||
137 | * Sets the 'weight' parameter. |
||
138 | * |
||
139 | * @param int $weight |
||
140 | * |
||
141 | * @throws \Acquia\LiftClient\Exception\LiftSdkException |
||
142 | * |
||
143 | * @return \Acquia\LiftClient\Entity\Rule |
||
144 | */ |
||
145 | public function setWeight($weight) |
||
154 | |||
155 | /** |
||
156 | * Gets the 'description' parameter. |
||
157 | * |
||
158 | * @return int The Description of the Rule |
||
159 | */ |
||
160 | public function getWeight() |
||
164 | |||
165 | /** |
||
166 | * Sets the 'content' parameter. |
||
167 | * |
||
168 | * @param Content[] $contentList |
||
169 | * |
||
170 | * @throws \Acquia\LiftClient\Exception\LiftSdkException |
||
171 | * |
||
172 | * @return \Acquia\LiftClient\Entity\Rule |
||
173 | */ |
||
174 | public function setContent(array $contentList) |
||
184 | |||
185 | /** |
||
186 | * Gets the 'content' parameter. |
||
187 | * |
||
188 | * @return Content[] The list of content this rule applies to |
||
189 | */ |
||
190 | public function getContent() |
||
200 | |||
201 | /** |
||
202 | * Sets the 'segment' parameter. |
||
203 | * |
||
204 | * @param string $segment |
||
205 | * |
||
206 | * @throws \Acquia\LiftClient\Exception\LiftSdkException |
||
207 | * |
||
208 | * @return \Acquia\LiftClient\Entity\Rule |
||
209 | */ |
||
210 | public function setSegment($segment) |
||
211 | { |
||
212 | if (!is_string($segment)) { |
||
213 | throw new LiftSdkException('Argument must be an instance of integer.'); |
||
214 | } |
||
215 | $this['segment'] = $segment; |
||
216 | |||
217 | return $this; |
||
218 | } |
||
219 | |||
220 | /** |
||
221 | * Gets the 'segment' parameter. |
||
222 | * |
||
223 | * @return string |
||
224 | */ |
||
225 | public function getSegment() |
||
229 | |||
230 | /** |
||
231 | * Sets the 'status' parameter. |
||
232 | * |
||
233 | * @param string $status |
||
234 | * |
||
235 | * @throws \Acquia\LiftClient\Exception\LiftSdkException |
||
236 | * |
||
237 | * @return \Acquia\LiftClient\Entity\Rule |
||
238 | */ |
||
239 | public function setStatus($status) |
||
251 | |||
252 | /** |
||
253 | * Gets the 'status' parameter. |
||
254 | * |
||
255 | * @return string |
||
256 | */ |
||
257 | public function getStatus() |
||
261 | |||
262 | /** |
||
263 | * Gets the 'created' parameter. |
||
264 | * |
||
265 | * @return DateTime |
||
266 | */ |
||
267 | public function getCreated() |
||
274 | |||
275 | /** |
||
276 | * Gets the 'updated' parameter. |
||
277 | * |
||
278 | * @return DateTime |
||
279 | */ |
||
280 | public function getUpdated() |
||
287 | |||
288 | /** |
||
289 | * Sets the Rule test_config property. |
||
290 | * |
||
291 | * @param \Acquia\LiftClient\Entity\TestConfigInterface $testConfig |
||
292 | * |
||
293 | * @return \Acquia\LiftClient\Entity\Rule |
||
294 | */ |
||
295 | public function setTestConfig(TestConfigInterface $testConfig) |
||
321 | |||
322 | /** |
||
323 | * Gets the 'test_config' parameter. |
||
324 | * |
||
325 | * @return \Acquia\LiftClient\Entity\TestConfigInterface|null $testConfig |
||
326 | */ |
||
327 | public function getTestConfig() |
||
349 | } |
||
350 |