Completed
Push — develop ( e2d101...8d74c2 )
by Mikaël
31:41
created

EwsFieldOrderType   A

Complexity

Total Complexity 12

Size/Duplication

Total Lines 143
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 12
c 0
b 0
f 0
lcom 1
cbo 2
dl 0
loc 143
rs 10

11 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A getOrder() 0 4 1
A setOrder() 0 9 2
A getFieldURI() 0 4 1
A setFieldURI() 0 5 1
A getIndexedFieldURI() 0 4 1
A setIndexedFieldURI() 0 5 1
A getExtendedFieldURI() 0 4 1
A setExtendedFieldURI() 0 5 1
A __set_state() 0 4 1
A __toString() 0 4 1
1
<?php
2
3
namespace Ews\StructType;
4
5
use \WsdlToPhp\PackageBase\AbstractStructBase;
6
7
/**
8
 * This class stands for FieldOrderType StructType
9
 * @package Ews
10
 * @subpackage Structs
11
 * @author WsdlToPhp <[email protected]>
12
 */
13
class EwsFieldOrderType extends AbstractStructBase
14
{
15
    /**
16
     * The Order
17
     * Meta informations extracted from the WSDL
18
     * - use: required
19
     * @var string
20
     */
21
    public $Order;
22
    /**
23
     * The FieldURI
24
     * @var \Ews\StructType\EwsPathToUnindexedFieldType
25
     */
26
    public $FieldURI;
27
    /**
28
     * The IndexedFieldURI
29
     * @var \Ews\StructType\EwsPathToIndexedFieldType
30
     */
31
    public $IndexedFieldURI;
32
    /**
33
     * The ExtendedFieldURI
34
     * @var \Ews\StructType\EwsPathToExtendedFieldType
35
     */
36
    public $ExtendedFieldURI;
37
    /**
38
     * Constructor method for FieldOrderType
39
     * @uses EwsFieldOrderType::setOrder()
40
     * @uses EwsFieldOrderType::setFieldURI()
41
     * @uses EwsFieldOrderType::setIndexedFieldURI()
42
     * @uses EwsFieldOrderType::setExtendedFieldURI()
43
     * @param string $order
44
     * @param \Ews\StructType\EwsPathToUnindexedFieldType $fieldURI
45
     * @param \Ews\StructType\EwsPathToIndexedFieldType $indexedFieldURI
46
     * @param \Ews\StructType\EwsPathToExtendedFieldType $extendedFieldURI
47
     */
48
    public function __construct($order = null, \Ews\StructType\EwsPathToUnindexedFieldType $fieldURI = null, \Ews\StructType\EwsPathToIndexedFieldType $indexedFieldURI = null, \Ews\StructType\EwsPathToExtendedFieldType $extendedFieldURI = null)
49
    {
50
        $this
51
            ->setOrder($order)
52
            ->setFieldURI($fieldURI)
53
            ->setIndexedFieldURI($indexedFieldURI)
54
            ->setExtendedFieldURI($extendedFieldURI);
55
    }
56
    /**
57
     * Get Order value
58
     * @return string
59
     */
60
    public function getOrder()
61
    {
62
        return $this->Order;
63
    }
64
    /**
65
     * Set Order value
66
     * @uses \Ews\EnumType\EwsSortDirectionType::valueIsValid()
67
     * @uses \Ews\EnumType\EwsSortDirectionType::getValidValues()
68
     * @throws \InvalidArgumentException
69
     * @param string $order
70
     * @return \Ews\StructType\EwsFieldOrderType
71
     */
72
    public function setOrder($order = null)
73
    {
74
        // validation for constraint: enumeration
75
        if (!\Ews\EnumType\EwsSortDirectionType::valueIsValid($order)) {
76
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $order, implode(', ', \Ews\EnumType\EwsSortDirectionType::getValidValues())), __LINE__);
77
        }
78
        $this->Order = $order;
79
        return $this;
80
    }
81
    /**
82
     * Get FieldURI value
83
     * @return \Ews\StructType\EwsPathToUnindexedFieldType|null
84
     */
85
    public function getFieldURI()
86
    {
87
        return $this->FieldURI;
88
    }
89
    /**
90
     * Set FieldURI value
91
     * @param \Ews\StructType\EwsPathToUnindexedFieldType $fieldURI
92
     * @return \Ews\StructType\EwsFieldOrderType
93
     */
94
    public function setFieldURI(\Ews\StructType\EwsPathToUnindexedFieldType $fieldURI = null)
95
    {
96
        $this->FieldURI = $fieldURI;
97
        return $this;
98
    }
99
    /**
100
     * Get IndexedFieldURI value
101
     * @return \Ews\StructType\EwsPathToIndexedFieldType|null
102
     */
103
    public function getIndexedFieldURI()
104
    {
105
        return $this->IndexedFieldURI;
106
    }
107
    /**
108
     * Set IndexedFieldURI value
109
     * @param \Ews\StructType\EwsPathToIndexedFieldType $indexedFieldURI
110
     * @return \Ews\StructType\EwsFieldOrderType
111
     */
112
    public function setIndexedFieldURI(\Ews\StructType\EwsPathToIndexedFieldType $indexedFieldURI = null)
113
    {
114
        $this->IndexedFieldURI = $indexedFieldURI;
115
        return $this;
116
    }
117
    /**
118
     * Get ExtendedFieldURI value
119
     * @return \Ews\StructType\EwsPathToExtendedFieldType|null
120
     */
121
    public function getExtendedFieldURI()
122
    {
123
        return $this->ExtendedFieldURI;
124
    }
125
    /**
126
     * Set ExtendedFieldURI value
127
     * @param \Ews\StructType\EwsPathToExtendedFieldType $extendedFieldURI
128
     * @return \Ews\StructType\EwsFieldOrderType
129
     */
130
    public function setExtendedFieldURI(\Ews\StructType\EwsPathToExtendedFieldType $extendedFieldURI = null)
131
    {
132
        $this->ExtendedFieldURI = $extendedFieldURI;
133
        return $this;
134
    }
135
    /**
136
     * Method called when an object has been exported with var_export() functions
137
     * It allows to return an object instantiated with the values
138
     * @see AbstractStructBase::__set_state()
139
     * @uses AbstractStructBase::__set_state()
140
     * @param array $array the exported values
141
     * @return \Ews\StructType\EwsFieldOrderType
142
     */
143
    public static function __set_state(array $array)
144
    {
145
        return parent::__set_state($array);
146
    }
147
    /**
148
     * Method returning the class name
149
     * @return string __CLASS__
150
     */
151
    public function __toString()
152
    {
153
        return __CLASS__;
154
    }
155
}
156