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

TEntityTypeType::getTypeAccess()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace AlgoWeb\ODataMetadata\MetadataV3\edm;
4
5
use AlgoWeb\ODataMetadata\IsOK;
6
use AlgoWeb\ODataMetadata\MetadataV3\edm\Groups\TDerivableTypeAttributesTrait;
7
8
/**
9
 * Class representing TEntityTypeType
10
 *
11
 *
12
 * XSD Type: TEntityType
13
 */
14
class TEntityTypeType extends IsOK
15
{
16
    use TDerivableTypeAttributesTrait;
17
    /**
18
     * @property string $name
19
     */
20
    private $name = null;
21
22
    /**
23
     * @property boolean $openType
24
     */
25
    private $openType = null;
26
27
    /**
28
     * @property string $typeAccess
29
     */
30
    private $typeAccess = null;
31
32
    /**
33
     * @property \AlgoWeb\ODataMetadata\MetadataV3\edm\TDocumentationType $documentation
34
     */
35
    private $documentation = null;
36
37
    /**
38
     * @property \AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyRefType[] $key
39
     */
40
    private $key = null;
41
42
    /**
43
     * @property \AlgoWeb\ODataMetadata\MetadataV3\edm\TEntityPropertyType[] $property
44
     */
45
    private $property = [];
46
47
    /**
48
     * @property \AlgoWeb\ODataMetadata\MetadataV3\edm\TNavigationPropertyType[] $navigationProperty
49
     */
50
    private $navigationProperty = [];
51
52
    /**
53
     * @property \AlgoWeb\ODataMetadata\MetadataV3\edm\TValueAnnotationType[] $valueAnnotation
54
     */
55
    private $valueAnnotation = [];
56
57
    /**
58
     * @property \AlgoWeb\ODataMetadata\MetadataV3\edm\TTypeAnnotationType[] $typeAnnotation
59
     */
60
    private $typeAnnotation = [];
61
62
    /**
63
     * Gets as name
64
     *
65
     * @return string
66
     */
67
    public function getName()
68
    {
69
        return $this->name;
70
    }
71
72
    /**
73
     * Sets a new name
74
     *
75
     * @param string $name
76
     * @return self
77
     */
78
    public function setName($name)
79
    {
80
        $this->name = $name;
81
        return $this;
82
    }
83
84
    /**
85
     * Gets as openType
86
     *
87
     * @return boolean
88
     */
89
    public function getOpenType()
90
    {
91
        return $this->openType;
92
    }
93
94
    /**
95
     * Sets a new openType
96
     *
97
     * @param boolean $openType
98
     * @return self
99
     */
100
    public function setOpenType($openType)
101
    {
102
        $this->openType = $openType;
103
        return $this;
104
    }
105
106
    /**
107
     * Gets as typeAccess
108
     *
109
     * @return string
110
     */
111
    public function getTypeAccess()
112
    {
113
        return $this->typeAccess;
114
    }
115
116
    /**
117
     * Sets a new typeAccess
118
     *
119
     * @param string $typeAccess
120
     * @return self
121
     */
122
    public function setTypeAccess($typeAccess)
123
    {
124
        $this->typeAccess = $typeAccess;
125
        return $this;
126
    }
127
128
    /**
129
     * Gets as documentation
130
     *
131
     * @return \AlgoWeb\ODataMetadata\MetadataV3\edm\TDocumentationType
132
     */
133
    public function getDocumentation()
134
    {
135
        return $this->documentation;
136
    }
137
138
    /**
139
     * Sets a new documentation
140
     *
141
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TDocumentationType $documentation
142
     * @return self
143
     */
144
    public function setDocumentation(TDocumentationType $documentation)
145
    {
146
        $this->documentation = $documentation;
147
        return $this;
148
    }
149
150
    /**
151
     * Adds as propertyRef
152
     *
153
     * @return self
154
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyRefType $propertyRef
155
     */
156
    public function addToKey(TPropertyRefType $propertyRef)
157
    {
158
        $this->key[] = $propertyRef;
159
        return $this;
160
    }
161
162
    /**
163
     * isset key
164
     *
165
     * @param scalar $index
166
     * @return boolean
167
     */
168
    public function issetKey($index)
169
    {
170
        return isset($this->key[$index]);
171
    }
172
173
    /**
174
     * unset key
175
     *
176
     * @param scalar $index
177
     * @return void
178
     */
179
    public function unsetKey($index)
180
    {
181
        unset($this->key[$index]);
182
    }
183
184
    /**
185
     * Gets as key
186
     *
187
     * @return \AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyRefType[]
188
     */
189
    public function getKey()
190
    {
191
        return $this->key;
192
    }
193
194
    /**
195
     * Sets a new key
196
     *
197
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyRefType[] $key
198
     * @return self
199
     */
200
    public function setKey(array $key)
201
    {
202
        $this->key = $key;
203
        return $this;
204
    }
205
206
    /**
207
     * Adds as property
208
     *
209
     * @return self
210
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TEntityPropertyType $property
211
     */
212
    public function addToProperty(TEntityPropertyType $property)
213
    {
214
        $this->property[] = $property;
215
        return $this;
216
    }
217
218
    /**
219
     * isset property
220
     *
221
     * @param scalar $index
222
     * @return boolean
223
     */
224
    public function issetProperty($index)
225
    {
226
        return isset($this->property[$index]);
227
    }
228
229
    /**
230
     * unset property
231
     *
232
     * @param scalar $index
233
     * @return void
234
     */
235
    public function unsetProperty($index)
236
    {
237
        unset($this->property[$index]);
238
    }
239
240
    /**
241
     * Gets as property
242
     *
243
     * @return \AlgoWeb\ODataMetadata\MetadataV3\edm\TEntityPropertyType[]
244
     */
245
    public function getProperty()
246
    {
247
        return $this->property;
248
    }
249
250
    /**
251
     * Sets a new property
252
     *
253
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TEntityPropertyType[] $property
254
     * @return self
255
     */
256
    public function setProperty(array $property)
257
    {
258
        $this->property = $property;
259
        return $this;
260
    }
261
262
    /**
263
     * Adds as navigationProperty
264
     *
265
     * @return self
266
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TNavigationPropertyType $navigationProperty
267
     */
268
    public function addToNavigationProperty(TNavigationPropertyType $navigationProperty)
269
    {
270
        $this->navigationProperty[] = $navigationProperty;
271
        return $this;
272
    }
273
274
    /**
275
     * isset navigationProperty
276
     *
277
     * @param scalar $index
278
     * @return boolean
279
     */
280
    public function issetNavigationProperty($index)
281
    {
282
        return isset($this->navigationProperty[$index]);
283
    }
284
285
    /**
286
     * unset navigationProperty
287
     *
288
     * @param scalar $index
289
     * @return void
290
     */
291
    public function unsetNavigationProperty($index)
292
    {
293
        unset($this->navigationProperty[$index]);
294
    }
295
296
    /**
297
     * Gets as navigationProperty
298
     *
299
     * @return \AlgoWeb\ODataMetadata\MetadataV3\edm\TNavigationPropertyType[]
300
     */
301
    public function getNavigationProperty()
302
    {
303
        return $this->navigationProperty;
304
    }
305
306
    /**
307
     * Sets a new navigationProperty
308
     *
309
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TNavigationPropertyType[] $navigationProperty
310
     * @return self
311
     */
312
    public function setNavigationProperty(array $navigationProperty)
313
    {
314
        $this->navigationProperty = $navigationProperty;
315
        return $this;
316
    }
317
318
    /**
319
     * Adds as valueAnnotation
320
     *
321
     * @return self
322
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TValueAnnotationType $valueAnnotation
323
     */
324
    public function addToValueAnnotation(TValueAnnotationType $valueAnnotation)
325
    {
326
        $this->valueAnnotation[] = $valueAnnotation;
327
        return $this;
328
    }
329
330
    /**
331
     * isset valueAnnotation
332
     *
333
     * @param scalar $index
334
     * @return boolean
335
     */
336
    public function issetValueAnnotation($index)
337
    {
338
        return isset($this->valueAnnotation[$index]);
339
    }
340
341
    /**
342
     * unset valueAnnotation
343
     *
344
     * @param scalar $index
345
     * @return void
346
     */
347
    public function unsetValueAnnotation($index)
348
    {
349
        unset($this->valueAnnotation[$index]);
350
    }
351
352
    /**
353
     * Gets as valueAnnotation
354
     *
355
     * @return \AlgoWeb\ODataMetadata\MetadataV3\edm\TValueAnnotationType[]
356
     */
357
    public function getValueAnnotation()
358
    {
359
        return $this->valueAnnotation;
360
    }
361
362
    /**
363
     * Sets a new valueAnnotation
364
     *
365
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TValueAnnotationType[] $valueAnnotation
366
     * @return self
367
     */
368
    public function setValueAnnotation(array $valueAnnotation)
369
    {
370
        $this->valueAnnotation = $valueAnnotation;
371
        return $this;
372
    }
373
374
    /**
375
     * Adds as typeAnnotation
376
     *
377
     * @return self
378
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TTypeAnnotationType $typeAnnotation
379
     */
380
    public function addToTypeAnnotation(TTypeAnnotationType $typeAnnotation)
381
    {
382
        $this->typeAnnotation[] = $typeAnnotation;
383
        return $this;
384
    }
385
386
    /**
387
     * isset typeAnnotation
388
     *
389
     * @param scalar $index
390
     * @return boolean
391
     */
392
    public function issetTypeAnnotation($index)
393
    {
394
        return isset($this->typeAnnotation[$index]);
395
    }
396
397
    /**
398
     * unset typeAnnotation
399
     *
400
     * @param scalar $index
401
     * @return void
402
     */
403
    public function unsetTypeAnnotation($index)
404
    {
405
        unset($this->typeAnnotation[$index]);
406
    }
407
408
    /**
409
     * Gets as typeAnnotation
410
     *
411
     * @return \AlgoWeb\ODataMetadata\MetadataV3\edm\TTypeAnnotationType[]
412
     */
413
    public function getTypeAnnotation()
414
    {
415
        return $this->typeAnnotation;
416
    }
417
418
    /**
419
     * Sets a new typeAnnotation
420
     *
421
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TTypeAnnotationType[] $typeAnnotation
422
     * @return self
423
     */
424
    public function setTypeAnnotation(array $typeAnnotation)
425
    {
426
        $this->typeAnnotation = $typeAnnotation;
427
        return $this;
428
    }
429
    
430
    public function isOK(&$msg = null)
431
    {
432
        if (!$this->isTDerivableTypeAttributesValid($msg)) {
433
            return false;
434
        }
435
        return true;
436
    }
437
}
438