Passed
Push — master ( feaee9...2b3e4e )
by Alex
04:28
created

TTypeAssertExpressionType::setOperand()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace AlgoWeb\ODataMetadata\MetadataV3\edm;
4
5
use AlgoWeb\ODataMetadata\IsOK;
6
use AlgoWeb\ODataMetadata\MetadataV3\edm\Groups\TFacetAttributesTrait;
7
8
/**
9
 * Class representing TTypeAssertExpressionType
10
 *
11
 *
12
 * XSD Type: TTypeAssertExpression
13
 */
14
class TTypeAssertExpressionType extends IsOK
15
{
16
    use TFacetAttributesTrait;
17
    /**
18
     * @property string $type
19
     */
20
    private $type = null;
21
22
    /**
23
     * @property \AlgoWeb\ODataMetadata\MetadataV3\edm\TOperandType[] $operand
24
     */
25
    private $operand = [];
26
27
    /**
28
     * @property \AlgoWeb\ODataMetadata\MetadataV3\edm\TCollectionTypeType[] $collectionType
29
     */
30
    private $collectionType = [];
31
32
    /**
33
     * @property \AlgoWeb\ODataMetadata\MetadataV3\edm\TReferenceTypeType[] $referenceType
34
     */
35
    private $referenceType = [];
36
37
    /**
38
     * @property \AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyType[] $rowType
39
     */
40
    private $rowType = null;
41
42
    /**
43
     * Gets as type
44
     *
45
     * @return string
46
     */
47
    public function getType()
48
    {
49
        return $this->type;
50
    }
51
52
    /**
53
     * Sets a new type
54
     *
55
     * @param string $type
56
     * @return self
57
     */
58
    public function setType($type)
59
    {
60
        $this->type = $type;
61
        return $this;
62
    }
63
64
    /**
65
     * Adds as operand
66
     *
67
     * @return self
68
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TOperandType $operand
69
     */
70
    public function addToOperand(TOperandType $operand)
71
    {
72
        $this->operand[] = $operand;
73
        return $this;
74
    }
75
76
    /**
77
     * isset operand
78
     *
79
     * @param scalar $index
80
     * @return boolean
81
     */
82
    public function issetOperand($index)
83
    {
84
        return isset($this->operand[$index]);
85
    }
86
87
    /**
88
     * unset operand
89
     *
90
     * @param scalar $index
91
     * @return void
92
     */
93
    public function unsetOperand($index)
94
    {
95
        unset($this->operand[$index]);
96
    }
97
98
    /**
99
     * Gets as operand
100
     *
101
     * @return \AlgoWeb\ODataMetadata\MetadataV3\edm\TOperandType[]
102
     */
103
    public function getOperand()
104
    {
105
        return $this->operand;
106
    }
107
108
    /**
109
     * Sets a new operand
110
     *
111
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TOperandType[] $operand
112
     * @return self
113
     */
114
    public function setOperand(array $operand)
115
    {
116
        $this->operand = $operand;
117
        return $this;
118
    }
119
120
    /**
121
     * Adds as collectionType
122
     *
123
     * @return self
124
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TCollectionTypeType $collectionType
125
     */
126
    public function addToCollectionType(TCollectionTypeType $collectionType)
127
    {
128
        $this->collectionType[] = $collectionType;
129
        return $this;
130
    }
131
132
    /**
133
     * isset collectionType
134
     *
135
     * @param scalar $index
136
     * @return boolean
137
     */
138
    public function issetCollectionType($index)
139
    {
140
        return isset($this->collectionType[$index]);
141
    }
142
143
    /**
144
     * unset collectionType
145
     *
146
     * @param scalar $index
147
     * @return void
148
     */
149
    public function unsetCollectionType($index)
150
    {
151
        unset($this->collectionType[$index]);
152
    }
153
154
    /**
155
     * Gets as collectionType
156
     *
157
     * @return \AlgoWeb\ODataMetadata\MetadataV3\edm\TCollectionTypeType[]
158
     */
159
    public function getCollectionType()
160
    {
161
        return $this->collectionType;
162
    }
163
164
    /**
165
     * Sets a new collectionType
166
     *
167
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TCollectionTypeType[] $collectionType
168
     * @return self
169
     */
170
    public function setCollectionType(array $collectionType)
171
    {
172
        $this->collectionType = $collectionType;
173
        return $this;
174
    }
175
176
    /**
177
     * Adds as referenceType
178
     *
179
     * @return self
180
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TReferenceTypeType $referenceType
181
     */
182
    public function addToReferenceType(TReferenceTypeType $referenceType)
183
    {
184
        $this->referenceType[] = $referenceType;
185
        return $this;
186
    }
187
188
    /**
189
     * isset referenceType
190
     *
191
     * @param scalar $index
192
     * @return boolean
193
     */
194
    public function issetReferenceType($index)
195
    {
196
        return isset($this->referenceType[$index]);
197
    }
198
199
    /**
200
     * unset referenceType
201
     *
202
     * @param scalar $index
203
     * @return void
204
     */
205
    public function unsetReferenceType($index)
206
    {
207
        unset($this->referenceType[$index]);
208
    }
209
210
    /**
211
     * Gets as referenceType
212
     *
213
     * @return \AlgoWeb\ODataMetadata\MetadataV3\edm\TReferenceTypeType[]
214
     */
215
    public function getReferenceType()
216
    {
217
        return $this->referenceType;
218
    }
219
220
    /**
221
     * Sets a new referenceType
222
     *
223
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TReferenceTypeType[] $referenceType
224
     * @return self
225
     */
226
    public function setReferenceType(array $referenceType)
227
    {
228
        $this->referenceType = $referenceType;
229
        return $this;
230
    }
231
232
    /**
233
     * Adds as property
234
     *
235
     * @return self
236
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyType $property
237
     */
238
    public function addToRowType(TPropertyType $property)
239
    {
240
        $this->rowType[] = $property;
241
        return $this;
242
    }
243
244
    /**
245
     * isset rowType
246
     *
247
     * @param scalar $index
248
     * @return boolean
249
     */
250
    public function issetRowType($index)
251
    {
252
        return isset($this->rowType[$index]);
253
    }
254
255
    /**
256
     * unset rowType
257
     *
258
     * @param scalar $index
259
     * @return void
260
     */
261
    public function unsetRowType($index)
262
    {
263
        unset($this->rowType[$index]);
264
    }
265
266
    /**
267
     * Gets as rowType
268
     *
269
     * @return \AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyType[]
270
     */
271
    public function getRowType()
272
    {
273
        return $this->rowType;
274
    }
275
276
    /**
277
     * Sets a new rowType
278
     *
279
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyType[] $rowType
280
     * @return self
281
     */
282
    public function setRowType(array $rowType)
283
    {
284
        $this->rowType = $rowType;
285
        return $this;
286
    }
287
288
    public function isOK(&$msg = null)
289
    {
290
        if (!$this->isTFacetAttributesTraitValid($msg)) {
291
            return false;
292
        }
293
        return true;
294
    }
295
}
296