diff --git a/lib/Model/Recommend/Banner.php b/lib/Model/Recommend/Banner.php new file mode 100644 index 00000000..bcc6f64c --- /dev/null +++ b/lib/Model/Recommend/Banner.php @@ -0,0 +1,258 @@ + '\Algolia\AlgoliaSearch\Model\Recommend\BannerImage', + 'link' => '\Algolia\AlgoliaSearch\Model\Recommend\BannerLink', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $modelFormats = [ + 'image' => null, + 'link' => null, + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'image' => 'image', + 'link' => 'link', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + 'image' => 'setImage', + 'link' => 'setLink', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'image' => 'getImage', + 'link' => 'getLink', + ]; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + */ + public function __construct(?array $data = null) + { + if (isset($data['image'])) { + $this->container['image'] = $data['image']; + } + if (isset($data['link'])) { + $this->container['link'] = $data['link']; + } + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelTypes() + { + return self::$modelTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelFormats() + { + return self::$modelFormats; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets image. + * + * @return null|BannerImage + */ + public function getImage() + { + return $this->container['image'] ?? null; + } + + /** + * Sets image. + * + * @param null|BannerImage $image image + * + * @return self + */ + public function setImage($image) + { + $this->container['image'] = $image; + + return $this; + } + + /** + * Gets link. + * + * @return null|BannerLink + */ + public function getLink() + { + return $this->container['link'] ?? null; + } + + /** + * Sets link. + * + * @param null|BannerLink $link link + * + * @return self + */ + public function setLink($link) + { + $this->container['link'] = $link; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return null|mixed + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param null|int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/lib/Model/Recommend/BannerImage.php b/lib/Model/Recommend/BannerImage.php new file mode 100644 index 00000000..f90944e3 --- /dev/null +++ b/lib/Model/Recommend/BannerImage.php @@ -0,0 +1,258 @@ + '\Algolia\AlgoliaSearch\Model\Recommend\BannerImageUrl', + 'title' => 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $modelFormats = [ + 'urls' => null, + 'title' => null, + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'urls' => 'urls', + 'title' => 'title', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + 'urls' => 'setUrls', + 'title' => 'setTitle', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'urls' => 'getUrls', + 'title' => 'getTitle', + ]; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + */ + public function __construct(?array $data = null) + { + if (isset($data['urls'])) { + $this->container['urls'] = $data['urls']; + } + if (isset($data['title'])) { + $this->container['title'] = $data['title']; + } + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelTypes() + { + return self::$modelTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelFormats() + { + return self::$modelFormats; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets urls. + * + * @return null|BannerImageUrl + */ + public function getUrls() + { + return $this->container['urls'] ?? null; + } + + /** + * Sets urls. + * + * @param null|BannerImageUrl $urls urls + * + * @return self + */ + public function setUrls($urls) + { + $this->container['urls'] = $urls; + + return $this; + } + + /** + * Gets title. + * + * @return null|string + */ + public function getTitle() + { + return $this->container['title'] ?? null; + } + + /** + * Sets title. + * + * @param null|string $title title + * + * @return self + */ + public function setTitle($title) + { + $this->container['title'] = $title; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return null|mixed + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param null|int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/lib/Model/Recommend/BannerImageUrl.php b/lib/Model/Recommend/BannerImageUrl.php new file mode 100644 index 00000000..90adc229 --- /dev/null +++ b/lib/Model/Recommend/BannerImageUrl.php @@ -0,0 +1,226 @@ + 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $modelFormats = [ + 'url' => null, + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'url' => 'url', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + 'url' => 'setUrl', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'url' => 'getUrl', + ]; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + */ + public function __construct(?array $data = null) + { + if (isset($data['url'])) { + $this->container['url'] = $data['url']; + } + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelTypes() + { + return self::$modelTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelFormats() + { + return self::$modelFormats; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets url. + * + * @return null|string + */ + public function getUrl() + { + return $this->container['url'] ?? null; + } + + /** + * Sets url. + * + * @param null|string $url url + * + * @return self + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return null|mixed + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param null|int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/lib/Model/Recommend/BannerLink.php b/lib/Model/Recommend/BannerLink.php new file mode 100644 index 00000000..f2081d76 --- /dev/null +++ b/lib/Model/Recommend/BannerLink.php @@ -0,0 +1,226 @@ + 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $modelFormats = [ + 'url' => null, + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'url' => 'url', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + 'url' => 'setUrl', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'url' => 'getUrl', + ]; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + */ + public function __construct(?array $data = null) + { + if (isset($data['url'])) { + $this->container['url'] = $data['url']; + } + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelTypes() + { + return self::$modelTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelFormats() + { + return self::$modelFormats; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets url. + * + * @return null|string + */ + public function getUrl() + { + return $this->container['url'] ?? null; + } + + /** + * Sets url. + * + * @param null|string $url url + * + * @return self + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return null|mixed + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param null|int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/lib/Model/Recommend/Banners.php b/lib/Model/Recommend/Banners.php new file mode 100644 index 00000000..bc6c387c --- /dev/null +++ b/lib/Model/Recommend/Banners.php @@ -0,0 +1,226 @@ + '\Algolia\AlgoliaSearch\Model\Recommend\Banner', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $modelFormats = [ + 'banners' => null, + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'banners' => 'banners', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + 'banners' => 'setBanners', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'banners' => 'getBanners', + ]; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + */ + public function __construct(?array $data = null) + { + if (isset($data['banners'])) { + $this->container['banners'] = $data['banners']; + } + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelTypes() + { + return self::$modelTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelFormats() + { + return self::$modelFormats; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets banners. + * + * @return null|Banner + */ + public function getBanners() + { + return $this->container['banners'] ?? null; + } + + /** + * Sets banners. + * + * @param null|Banner $banners banners + * + * @return self + */ + public function setBanners($banners) + { + $this->container['banners'] = $banners; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return null|mixed + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param null|int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/lib/Model/Recommend/RenderingContent.php b/lib/Model/Recommend/RenderingContent.php index e7f82fab..4d79a6b3 100644 --- a/lib/Model/Recommend/RenderingContent.php +++ b/lib/Model/Recommend/RenderingContent.php @@ -24,6 +24,7 @@ class RenderingContent extends AbstractModel implements ModelInterface, \ArrayAc protected static $modelTypes = [ 'facetOrdering' => '\Algolia\AlgoliaSearch\Model\Recommend\FacetOrdering', 'redirect' => '\Algolia\AlgoliaSearch\Model\Recommend\RedirectURL', + 'widgets' => '\Algolia\AlgoliaSearch\Model\Recommend\Widgets', ]; /** @@ -34,6 +35,7 @@ class RenderingContent extends AbstractModel implements ModelInterface, \ArrayAc protected static $modelFormats = [ 'facetOrdering' => null, 'redirect' => null, + 'widgets' => null, ]; /** @@ -45,6 +47,7 @@ class RenderingContent extends AbstractModel implements ModelInterface, \ArrayAc protected static $attributeMap = [ 'facetOrdering' => 'facetOrdering', 'redirect' => 'redirect', + 'widgets' => 'widgets', ]; /** @@ -55,6 +58,7 @@ class RenderingContent extends AbstractModel implements ModelInterface, \ArrayAc protected static $setters = [ 'facetOrdering' => 'setFacetOrdering', 'redirect' => 'setRedirect', + 'widgets' => 'setWidgets', ]; /** @@ -65,6 +69,7 @@ class RenderingContent extends AbstractModel implements ModelInterface, \ArrayAc protected static $getters = [ 'facetOrdering' => 'getFacetOrdering', 'redirect' => 'getRedirect', + 'widgets' => 'getWidgets', ]; /** @@ -87,6 +92,9 @@ public function __construct(?array $data = null) if (isset($data['redirect'])) { $this->container['redirect'] = $data['redirect']; } + if (isset($data['widgets'])) { + $this->container['widgets'] = $data['widgets']; + } } /** @@ -209,6 +217,30 @@ public function setRedirect($redirect) return $this; } + /** + * Gets widgets. + * + * @return null|Widgets + */ + public function getWidgets() + { + return $this->container['widgets'] ?? null; + } + + /** + * Sets widgets. + * + * @param null|Widgets $widgets widgets + * + * @return self + */ + public function setWidgets($widgets) + { + $this->container['widgets'] = $widgets; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/Recommend/Widgets.php b/lib/Model/Recommend/Widgets.php new file mode 100644 index 00000000..63421a92 --- /dev/null +++ b/lib/Model/Recommend/Widgets.php @@ -0,0 +1,226 @@ + '\Algolia\AlgoliaSearch\Model\Recommend\Banners', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $modelFormats = [ + 'banners' => null, + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'banners' => 'banners', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + 'banners' => 'setBanners', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'banners' => 'getBanners', + ]; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + */ + public function __construct(?array $data = null) + { + if (isset($data['banners'])) { + $this->container['banners'] = $data['banners']; + } + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelTypes() + { + return self::$modelTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelFormats() + { + return self::$modelFormats; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets banners. + * + * @return null|Banners + */ + public function getBanners() + { + return $this->container['banners'] ?? null; + } + + /** + * Sets banners. + * + * @param null|Banners $banners banners + * + * @return self + */ + public function setBanners($banners) + { + $this->container['banners'] = $banners; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return null|mixed + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param null|int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/lib/Model/Search/Banner.php b/lib/Model/Search/Banner.php new file mode 100644 index 00000000..755a1cdd --- /dev/null +++ b/lib/Model/Search/Banner.php @@ -0,0 +1,258 @@ + '\Algolia\AlgoliaSearch\Model\Search\BannerImage', + 'link' => '\Algolia\AlgoliaSearch\Model\Search\BannerLink', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $modelFormats = [ + 'image' => null, + 'link' => null, + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'image' => 'image', + 'link' => 'link', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + 'image' => 'setImage', + 'link' => 'setLink', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'image' => 'getImage', + 'link' => 'getLink', + ]; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + */ + public function __construct(?array $data = null) + { + if (isset($data['image'])) { + $this->container['image'] = $data['image']; + } + if (isset($data['link'])) { + $this->container['link'] = $data['link']; + } + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelTypes() + { + return self::$modelTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelFormats() + { + return self::$modelFormats; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets image. + * + * @return null|BannerImage + */ + public function getImage() + { + return $this->container['image'] ?? null; + } + + /** + * Sets image. + * + * @param null|BannerImage $image image + * + * @return self + */ + public function setImage($image) + { + $this->container['image'] = $image; + + return $this; + } + + /** + * Gets link. + * + * @return null|BannerLink + */ + public function getLink() + { + return $this->container['link'] ?? null; + } + + /** + * Sets link. + * + * @param null|BannerLink $link link + * + * @return self + */ + public function setLink($link) + { + $this->container['link'] = $link; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return null|mixed + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param null|int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/lib/Model/Search/BannerImage.php b/lib/Model/Search/BannerImage.php new file mode 100644 index 00000000..10f9d4d2 --- /dev/null +++ b/lib/Model/Search/BannerImage.php @@ -0,0 +1,258 @@ + '\Algolia\AlgoliaSearch\Model\Search\BannerImageUrl', + 'title' => 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $modelFormats = [ + 'urls' => null, + 'title' => null, + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'urls' => 'urls', + 'title' => 'title', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + 'urls' => 'setUrls', + 'title' => 'setTitle', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'urls' => 'getUrls', + 'title' => 'getTitle', + ]; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + */ + public function __construct(?array $data = null) + { + if (isset($data['urls'])) { + $this->container['urls'] = $data['urls']; + } + if (isset($data['title'])) { + $this->container['title'] = $data['title']; + } + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelTypes() + { + return self::$modelTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelFormats() + { + return self::$modelFormats; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets urls. + * + * @return null|BannerImageUrl + */ + public function getUrls() + { + return $this->container['urls'] ?? null; + } + + /** + * Sets urls. + * + * @param null|BannerImageUrl $urls urls + * + * @return self + */ + public function setUrls($urls) + { + $this->container['urls'] = $urls; + + return $this; + } + + /** + * Gets title. + * + * @return null|string + */ + public function getTitle() + { + return $this->container['title'] ?? null; + } + + /** + * Sets title. + * + * @param null|string $title title + * + * @return self + */ + public function setTitle($title) + { + $this->container['title'] = $title; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return null|mixed + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param null|int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/lib/Model/Search/BannerImageUrl.php b/lib/Model/Search/BannerImageUrl.php new file mode 100644 index 00000000..e4973238 --- /dev/null +++ b/lib/Model/Search/BannerImageUrl.php @@ -0,0 +1,226 @@ + 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $modelFormats = [ + 'url' => null, + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'url' => 'url', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + 'url' => 'setUrl', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'url' => 'getUrl', + ]; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + */ + public function __construct(?array $data = null) + { + if (isset($data['url'])) { + $this->container['url'] = $data['url']; + } + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelTypes() + { + return self::$modelTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelFormats() + { + return self::$modelFormats; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets url. + * + * @return null|string + */ + public function getUrl() + { + return $this->container['url'] ?? null; + } + + /** + * Sets url. + * + * @param null|string $url url + * + * @return self + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return null|mixed + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param null|int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/lib/Model/Search/BannerLink.php b/lib/Model/Search/BannerLink.php new file mode 100644 index 00000000..91af5add --- /dev/null +++ b/lib/Model/Search/BannerLink.php @@ -0,0 +1,226 @@ + 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $modelFormats = [ + 'url' => null, + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'url' => 'url', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + 'url' => 'setUrl', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'url' => 'getUrl', + ]; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + */ + public function __construct(?array $data = null) + { + if (isset($data['url'])) { + $this->container['url'] = $data['url']; + } + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelTypes() + { + return self::$modelTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelFormats() + { + return self::$modelFormats; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets url. + * + * @return null|string + */ + public function getUrl() + { + return $this->container['url'] ?? null; + } + + /** + * Sets url. + * + * @param null|string $url url + * + * @return self + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return null|mixed + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param null|int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/lib/Model/Search/Banners.php b/lib/Model/Search/Banners.php new file mode 100644 index 00000000..3bf90b19 --- /dev/null +++ b/lib/Model/Search/Banners.php @@ -0,0 +1,226 @@ + '\Algolia\AlgoliaSearch\Model\Search\Banner', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $modelFormats = [ + 'banners' => null, + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'banners' => 'banners', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + 'banners' => 'setBanners', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'banners' => 'getBanners', + ]; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + */ + public function __construct(?array $data = null) + { + if (isset($data['banners'])) { + $this->container['banners'] = $data['banners']; + } + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelTypes() + { + return self::$modelTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelFormats() + { + return self::$modelFormats; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets banners. + * + * @return null|Banner + */ + public function getBanners() + { + return $this->container['banners'] ?? null; + } + + /** + * Sets banners. + * + * @param null|Banner $banners banners + * + * @return self + */ + public function setBanners($banners) + { + $this->container['banners'] = $banners; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return null|mixed + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param null|int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/lib/Model/Search/RenderingContent.php b/lib/Model/Search/RenderingContent.php index 24cbcf00..d04ba153 100644 --- a/lib/Model/Search/RenderingContent.php +++ b/lib/Model/Search/RenderingContent.php @@ -24,6 +24,7 @@ class RenderingContent extends AbstractModel implements ModelInterface, \ArrayAc protected static $modelTypes = [ 'facetOrdering' => '\Algolia\AlgoliaSearch\Model\Search\FacetOrdering', 'redirect' => '\Algolia\AlgoliaSearch\Model\Search\RedirectURL', + 'widgets' => '\Algolia\AlgoliaSearch\Model\Search\Widgets', ]; /** @@ -34,6 +35,7 @@ class RenderingContent extends AbstractModel implements ModelInterface, \ArrayAc protected static $modelFormats = [ 'facetOrdering' => null, 'redirect' => null, + 'widgets' => null, ]; /** @@ -45,6 +47,7 @@ class RenderingContent extends AbstractModel implements ModelInterface, \ArrayAc protected static $attributeMap = [ 'facetOrdering' => 'facetOrdering', 'redirect' => 'redirect', + 'widgets' => 'widgets', ]; /** @@ -55,6 +58,7 @@ class RenderingContent extends AbstractModel implements ModelInterface, \ArrayAc protected static $setters = [ 'facetOrdering' => 'setFacetOrdering', 'redirect' => 'setRedirect', + 'widgets' => 'setWidgets', ]; /** @@ -65,6 +69,7 @@ class RenderingContent extends AbstractModel implements ModelInterface, \ArrayAc protected static $getters = [ 'facetOrdering' => 'getFacetOrdering', 'redirect' => 'getRedirect', + 'widgets' => 'getWidgets', ]; /** @@ -87,6 +92,9 @@ public function __construct(?array $data = null) if (isset($data['redirect'])) { $this->container['redirect'] = $data['redirect']; } + if (isset($data['widgets'])) { + $this->container['widgets'] = $data['widgets']; + } } /** @@ -209,6 +217,30 @@ public function setRedirect($redirect) return $this; } + /** + * Gets widgets. + * + * @return null|Widgets + */ + public function getWidgets() + { + return $this->container['widgets'] ?? null; + } + + /** + * Sets widgets. + * + * @param null|Widgets $widgets widgets + * + * @return self + */ + public function setWidgets($widgets) + { + $this->container['widgets'] = $widgets; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/Search/Widgets.php b/lib/Model/Search/Widgets.php new file mode 100644 index 00000000..120073b6 --- /dev/null +++ b/lib/Model/Search/Widgets.php @@ -0,0 +1,226 @@ + '\Algolia\AlgoliaSearch\Model\Search\Banners', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $modelFormats = [ + 'banners' => null, + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'banners' => 'banners', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + 'banners' => 'setBanners', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'banners' => 'getBanners', + ]; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + */ + public function __construct(?array $data = null) + { + if (isset($data['banners'])) { + $this->container['banners'] = $data['banners']; + } + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelTypes() + { + return self::$modelTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelFormats() + { + return self::$modelFormats; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets banners. + * + * @return null|Banners + */ + public function getBanners() + { + return $this->container['banners'] ?? null; + } + + /** + * Sets banners. + * + * @param null|Banners $banners banners + * + * @return self + */ + public function setBanners($banners) + { + $this->container['banners'] = $banners; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return null|mixed + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param null|int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +}