|
| 1 | +<?php |
| 2 | + |
| 3 | +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. |
| 4 | + |
| 5 | +namespace Algolia\AlgoliaSearch\Model\Abtesting; |
| 6 | + |
| 7 | +use Algolia\AlgoliaSearch\Model\AbstractModel; |
| 8 | + |
| 9 | +/** |
| 10 | + * ScheduleABTestResponse Class Doc Comment. |
| 11 | + * |
| 12 | + * @category Class |
| 13 | + */ |
| 14 | +class ScheduleABTestResponse extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable |
| 15 | +{ |
| 16 | + /** |
| 17 | + * Array of property to type mappings. Used for (de)serialization. |
| 18 | + * |
| 19 | + * @var string[] |
| 20 | + */ |
| 21 | + protected static $modelTypes = [ |
| 22 | + 'abTestScheduleID' => 'int', |
| 23 | + ]; |
| 24 | + |
| 25 | + /** |
| 26 | + * Array of property to format mappings. Used for (de)serialization. |
| 27 | + * |
| 28 | + * @var string[] |
| 29 | + */ |
| 30 | + protected static $modelFormats = [ |
| 31 | + 'abTestScheduleID' => null, |
| 32 | + ]; |
| 33 | + |
| 34 | + /** |
| 35 | + * Array of attributes where the key is the local name, |
| 36 | + * and the value is the original name. |
| 37 | + * |
| 38 | + * @var string[] |
| 39 | + */ |
| 40 | + protected static $attributeMap = [ |
| 41 | + 'abTestScheduleID' => 'abTestScheduleID', |
| 42 | + ]; |
| 43 | + |
| 44 | + /** |
| 45 | + * Array of attributes to setter functions (for deserialization of responses). |
| 46 | + * |
| 47 | + * @var string[] |
| 48 | + */ |
| 49 | + protected static $setters = [ |
| 50 | + 'abTestScheduleID' => 'setAbTestScheduleID', |
| 51 | + ]; |
| 52 | + |
| 53 | + /** |
| 54 | + * Array of attributes to getter functions (for serialization of requests). |
| 55 | + * |
| 56 | + * @var string[] |
| 57 | + */ |
| 58 | + protected static $getters = [ |
| 59 | + 'abTestScheduleID' => 'getAbTestScheduleID', |
| 60 | + ]; |
| 61 | + |
| 62 | + /** |
| 63 | + * Associative array for storing property values. |
| 64 | + * |
| 65 | + * @var mixed[] |
| 66 | + */ |
| 67 | + protected $container = []; |
| 68 | + |
| 69 | + /** |
| 70 | + * Constructor. |
| 71 | + * |
| 72 | + * @param mixed[] $data Associated array of property values |
| 73 | + */ |
| 74 | + public function __construct(?array $data = null) |
| 75 | + { |
| 76 | + if (isset($data['abTestScheduleID'])) { |
| 77 | + $this->container['abTestScheduleID'] = $data['abTestScheduleID']; |
| 78 | + } |
| 79 | + } |
| 80 | + |
| 81 | + /** |
| 82 | + * Array of attributes where the key is the local name, |
| 83 | + * and the value is the original name. |
| 84 | + * |
| 85 | + * @return array |
| 86 | + */ |
| 87 | + public static function attributeMap() |
| 88 | + { |
| 89 | + return self::$attributeMap; |
| 90 | + } |
| 91 | + |
| 92 | + /** |
| 93 | + * Array of property to type mappings. Used for (de)serialization. |
| 94 | + * |
| 95 | + * @return array |
| 96 | + */ |
| 97 | + public static function modelTypes() |
| 98 | + { |
| 99 | + return self::$modelTypes; |
| 100 | + } |
| 101 | + |
| 102 | + /** |
| 103 | + * Array of property to format mappings. Used for (de)serialization. |
| 104 | + * |
| 105 | + * @return array |
| 106 | + */ |
| 107 | + public static function modelFormats() |
| 108 | + { |
| 109 | + return self::$modelFormats; |
| 110 | + } |
| 111 | + |
| 112 | + /** |
| 113 | + * Array of attributes to setter functions (for deserialization of responses). |
| 114 | + * |
| 115 | + * @return array |
| 116 | + */ |
| 117 | + public static function setters() |
| 118 | + { |
| 119 | + return self::$setters; |
| 120 | + } |
| 121 | + |
| 122 | + /** |
| 123 | + * Array of attributes to getter functions (for serialization of requests). |
| 124 | + * |
| 125 | + * @return array |
| 126 | + */ |
| 127 | + public static function getters() |
| 128 | + { |
| 129 | + return self::$getters; |
| 130 | + } |
| 131 | + |
| 132 | + /** |
| 133 | + * Show all the invalid properties with reasons. |
| 134 | + * |
| 135 | + * @return array invalid properties with reasons |
| 136 | + */ |
| 137 | + public function listInvalidProperties() |
| 138 | + { |
| 139 | + $invalidProperties = []; |
| 140 | + |
| 141 | + if (!isset($this->container['abTestScheduleID']) || null === $this->container['abTestScheduleID']) { |
| 142 | + $invalidProperties[] = "'abTestScheduleID' can't be null"; |
| 143 | + } |
| 144 | + |
| 145 | + return $invalidProperties; |
| 146 | + } |
| 147 | + |
| 148 | + /** |
| 149 | + * Validate all the properties in the model |
| 150 | + * return true if all passed. |
| 151 | + * |
| 152 | + * @return bool True if all properties are valid |
| 153 | + */ |
| 154 | + public function valid() |
| 155 | + { |
| 156 | + return 0 === count($this->listInvalidProperties()); |
| 157 | + } |
| 158 | + |
| 159 | + /** |
| 160 | + * Gets abTestScheduleID. |
| 161 | + * |
| 162 | + * @return int |
| 163 | + */ |
| 164 | + public function getAbTestScheduleID() |
| 165 | + { |
| 166 | + return $this->container['abTestScheduleID'] ?? null; |
| 167 | + } |
| 168 | + |
| 169 | + /** |
| 170 | + * Sets abTestScheduleID. |
| 171 | + * |
| 172 | + * @param int $abTestScheduleID unique scheduled A/B test identifier |
| 173 | + * |
| 174 | + * @return self |
| 175 | + */ |
| 176 | + public function setAbTestScheduleID($abTestScheduleID) |
| 177 | + { |
| 178 | + $this->container['abTestScheduleID'] = $abTestScheduleID; |
| 179 | + |
| 180 | + return $this; |
| 181 | + } |
| 182 | + |
| 183 | + /** |
| 184 | + * Returns true if offset exists. False otherwise. |
| 185 | + * |
| 186 | + * @param int $offset Offset |
| 187 | + * |
| 188 | + * @return bool |
| 189 | + */ |
| 190 | + public function offsetExists($offset) |
| 191 | + { |
| 192 | + return isset($this->container[$offset]); |
| 193 | + } |
| 194 | + |
| 195 | + /** |
| 196 | + * Gets offset. |
| 197 | + * |
| 198 | + * @param int $offset Offset |
| 199 | + * |
| 200 | + * @return null|mixed |
| 201 | + */ |
| 202 | + public function offsetGet($offset) |
| 203 | + { |
| 204 | + return $this->container[$offset] ?? null; |
| 205 | + } |
| 206 | + |
| 207 | + /** |
| 208 | + * Sets value based on offset. |
| 209 | + * |
| 210 | + * @param null|int $offset Offset |
| 211 | + * @param mixed $value Value to be set |
| 212 | + */ |
| 213 | + public function offsetSet($offset, $value) |
| 214 | + { |
| 215 | + if (is_null($offset)) { |
| 216 | + $this->container[] = $value; |
| 217 | + } else { |
| 218 | + $this->container[$offset] = $value; |
| 219 | + } |
| 220 | + } |
| 221 | + |
| 222 | + /** |
| 223 | + * Unsets offset. |
| 224 | + * |
| 225 | + * @param int $offset Offset |
| 226 | + */ |
| 227 | + public function offsetUnset($offset) |
| 228 | + { |
| 229 | + unset($this->container[$offset]); |
| 230 | + } |
| 231 | +} |
0 commit comments