CatalogTimePeriod.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 | * CatalogTimePeriod 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 CatalogTimePeriod implements ArrayAccess |
| 21 | { |
| 22 | /** |
| 23 | * Array of property to type mappings. Used for (de)serialization |
| 24 | * @var string[] |
| 25 | */ |
| 26 | static $swaggerTypes = array( |
| 27 | 'event' => 'string' |
| 28 | ); |
| 29 | |
| 30 | /** |
| 31 | * Array of attributes where the key is the local name, and the value is the original name |
| 32 | * @var string[] |
| 33 | */ |
| 34 | static $attributeMap = array( |
| 35 | 'event' => 'event' |
| 36 | ); |
| 37 | |
| 38 | /** |
| 39 | * Array of attributes to setter functions (for deserialization of responses) |
| 40 | * @var string[] |
| 41 | */ |
| 42 | static $setters = array( |
| 43 | 'event' => 'setEvent' |
| 44 | ); |
| 45 | |
| 46 | /** |
| 47 | * Array of attributes to getter functions (for serialization of requests) |
| 48 | * @var string[] |
| 49 | */ |
| 50 | static $getters = array( |
| 51 | 'event' => 'getEvent' |
| 52 | ); |
| 53 | |
| 54 | /** |
| 55 | * $event An iCalendar (RFC5545) [event](https://tools.ietf.org/html/rfc5545#section-3.6.1), which specifies the name, timing, duration and recurrence of this time period. Example: ``` DTSTART:20190707T180000 DURATION:P2H RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR ``` Only `SUMMARY`, `DTSTART`, `DURATION` and `RRULE` fields are supported. `DTSTART` must be in local (unzoned) time format. Note that while `BEGIN:VEVENT` and `END:VEVENT` is not required in the request. The response will always include them. |
| 56 | * @var string |
| 57 | */ |
| 58 | protected $event; |
| 59 | |
| 60 | /** |
| 61 | * Constructor |
| 62 | * @param mixed[] $data Associated array of property value initializing the model |
| 63 | */ |
| 64 | public function __construct(array $data = null) |
| 65 | { |
| 66 | if ($data != null) { |
| 67 | if (isset($data["event"])) { |
| 68 | $this->event = $data["event"]; |
| 69 | } else { |
| 70 | $this->event = null; |
| 71 | } |
| 72 | } |
| 73 | } |
| 74 | /** |
| 75 | * Gets event |
| 76 | * @return string |
| 77 | */ |
| 78 | public function getEvent() |
| 79 | { |
| 80 | return $this->event; |
| 81 | } |
| 82 | |
| 83 | /** |
| 84 | * Sets event |
| 85 | * @param string $event An iCalendar (RFC5545) [event](https://tools.ietf.org/html/rfc5545#section-3.6.1), which specifies the name, timing, duration and recurrence of this time period. Example: ``` DTSTART:20190707T180000 DURATION:P2H RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR ``` Only `SUMMARY`, `DTSTART`, `DURATION` and `RRULE` fields are supported. `DTSTART` must be in local (unzoned) time format. Note that while `BEGIN:VEVENT` and `END:VEVENT` is not required in the request. The response will always include them. |
| 86 | * @return $this |
| 87 | */ |
| 88 | public function setEvent($event) |
| 89 | { |
| 90 | $this->event = $event; |
| 91 | return $this; |
| 92 | } |
| 93 | /** |
| 94 | * Returns true if offset exists. False otherwise. |
| 95 | * @param integer $offset Offset |
| 96 | * @return boolean |
| 97 | */ |
| 98 | public function offsetExists($offset) |
| 99 | { |
| 100 | return isset($this->$offset); |
| 101 | } |
| 102 | |
| 103 | /** |
| 104 | * Gets offset. |
| 105 | * @param integer $offset Offset |
| 106 | * @return mixed |
| 107 | */ |
| 108 | public function offsetGet($offset) |
| 109 | { |
| 110 | return $this->$offset; |
| 111 | } |
| 112 | |
| 113 | /** |
| 114 | * Sets value based on offset. |
| 115 | * @param integer $offset Offset |
| 116 | * @param mixed $value Value to be set |
| 117 | * @return void |
| 118 | */ |
| 119 | public function offsetSet($offset, $value) |
| 120 | { |
| 121 | $this->$offset = $value; |
| 122 | } |
| 123 | |
| 124 | /** |
| 125 | * Unsets offset. |
| 126 | * @param integer $offset Offset |
| 127 | * @return void |
| 128 | */ |
| 129 | public function offsetUnset($offset) |
| 130 | { |
| 131 | unset($this->$offset); |
| 132 | } |
| 133 | |
| 134 | /** |
| 135 | * Gets the string presentation of the object |
| 136 | * @return string |
| 137 | */ |
| 138 | public function __toString() |
| 139 | { |
| 140 | if (defined('JSON_PRETTY_PRINT')) { |
| 141 | return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); |
| 142 | } else { |
| 143 | return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this)); |
| 144 | } |
| 145 | } |
| 146 | } |
| 147 |