RetrieveLocationResponse.php
| 1 | <?php |
| 2 | /** |
| 3 | * NOTE: This class is auto generated by the swagger code generator program. |
| 4 | * https://github.com/swagger-api/swagger-codegen |
| 5 | * Do not edit the class manually. |
| 6 | */ |
| 7 | |
| 8 | namespace SquareConnect\Model; |
| 9 | |
| 10 | use \ArrayAccess; |
| 11 | /** |
| 12 | * RetrieveLocationResponse Class Doc Comment |
| 13 | * |
| 14 | * @category Class |
| 15 | * @package SquareConnect |
| 16 | * @author Square Inc. |
| 17 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2 |
| 18 | * @link https://squareup.com/developers |
| 19 | */ |
| 20 | class RetrieveLocationResponse implements ArrayAccess |
| 21 | { |
| 22 | /** |
| 23 | * Array of property to type mappings. Used for (de)serialization |
| 24 | * @var string[] |
| 25 | */ |
| 26 | static $swaggerTypes = array( |
| 27 | 'errors' => '\SquareConnect\Model\Error[]', |
| 28 | 'location' => '\SquareConnect\Model\Location' |
| 29 | ); |
| 30 | |
| 31 | /** |
| 32 | * Array of attributes where the key is the local name, and the value is the original name |
| 33 | * @var string[] |
| 34 | */ |
| 35 | static $attributeMap = array( |
| 36 | 'errors' => 'errors', |
| 37 | 'location' => 'location' |
| 38 | ); |
| 39 | |
| 40 | /** |
| 41 | * Array of attributes to setter functions (for deserialization of responses) |
| 42 | * @var string[] |
| 43 | */ |
| 44 | static $setters = array( |
| 45 | 'errors' => 'setErrors', |
| 46 | 'location' => 'setLocation' |
| 47 | ); |
| 48 | |
| 49 | /** |
| 50 | * Array of attributes to getter functions (for serialization of requests) |
| 51 | * @var string[] |
| 52 | */ |
| 53 | static $getters = array( |
| 54 | 'errors' => 'getErrors', |
| 55 | 'location' => 'getLocation' |
| 56 | ); |
| 57 | |
| 58 | /** |
| 59 | * $errors Any errors that occurred during the request. |
| 60 | * @var \SquareConnect\Model\Error[] |
| 61 | */ |
| 62 | protected $errors; |
| 63 | /** |
| 64 | * $location The requested location. |
| 65 | * @var \SquareConnect\Model\Location |
| 66 | */ |
| 67 | protected $location; |
| 68 | |
| 69 | /** |
| 70 | * Constructor |
| 71 | * @param mixed[] $data Associated array of property value initializing the model |
| 72 | */ |
| 73 | public function __construct(array $data = null) |
| 74 | { |
| 75 | if ($data != null) { |
| 76 | if (isset($data["errors"])) { |
| 77 | $this->errors = $data["errors"]; |
| 78 | } else { |
| 79 | $this->errors = null; |
| 80 | } |
| 81 | if (isset($data["location"])) { |
| 82 | $this->location = $data["location"]; |
| 83 | } else { |
| 84 | $this->location = null; |
| 85 | } |
| 86 | } |
| 87 | } |
| 88 | /** |
| 89 | * Gets errors |
| 90 | * @return \SquareConnect\Model\Error[] |
| 91 | */ |
| 92 | public function getErrors() |
| 93 | { |
| 94 | return $this->errors; |
| 95 | } |
| 96 | |
| 97 | /** |
| 98 | * Sets errors |
| 99 | * @param \SquareConnect\Model\Error[] $errors Any errors that occurred during the request. |
| 100 | * @return $this |
| 101 | */ |
| 102 | public function setErrors($errors) |
| 103 | { |
| 104 | $this->errors = $errors; |
| 105 | return $this; |
| 106 | } |
| 107 | /** |
| 108 | * Gets location |
| 109 | * @return \SquareConnect\Model\Location |
| 110 | */ |
| 111 | public function getLocation() |
| 112 | { |
| 113 | return $this->location; |
| 114 | } |
| 115 | |
| 116 | /** |
| 117 | * Sets location |
| 118 | * @param \SquareConnect\Model\Location $location The requested location. |
| 119 | * @return $this |
| 120 | */ |
| 121 | public function setLocation($location) |
| 122 | { |
| 123 | $this->location = $location; |
| 124 | return $this; |
| 125 | } |
| 126 | /** |
| 127 | * Returns true if offset exists. False otherwise. |
| 128 | * @param integer $offset Offset |
| 129 | * @return boolean |
| 130 | */ |
| 131 | public function offsetExists($offset) |
| 132 | { |
| 133 | return isset($this->$offset); |
| 134 | } |
| 135 | |
| 136 | /** |
| 137 | * Gets offset. |
| 138 | * @param integer $offset Offset |
| 139 | * @return mixed |
| 140 | */ |
| 141 | public function offsetGet($offset) |
| 142 | { |
| 143 | return $this->$offset; |
| 144 | } |
| 145 | |
| 146 | /** |
| 147 | * Sets value based on offset. |
| 148 | * @param integer $offset Offset |
| 149 | * @param mixed $value Value to be set |
| 150 | * @return void |
| 151 | */ |
| 152 | public function offsetSet($offset, $value) |
| 153 | { |
| 154 | $this->$offset = $value; |
| 155 | } |
| 156 | |
| 157 | /** |
| 158 | * Unsets offset. |
| 159 | * @param integer $offset Offset |
| 160 | * @return void |
| 161 | */ |
| 162 | public function offsetUnset($offset) |
| 163 | { |
| 164 | unset($this->$offset); |
| 165 | } |
| 166 | |
| 167 | /** |
| 168 | * Gets the string presentation of the object |
| 169 | * @return string |
| 170 | */ |
| 171 | public function __toString() |
| 172 | { |
| 173 | if (defined('JSON_PRETTY_PRINT')) { |
| 174 | return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); |
| 175 | } else { |
| 176 | return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this)); |
| 177 | } |
| 178 | } |
| 179 | } |
| 180 |