Skip to content

Commit 5a33584

Browse files
committed
restore deleted file
1 parent 7a2a716 commit 5a33584

File tree

1 file changed

+242
-0
lines changed

1 file changed

+242
-0
lines changed
Lines changed: 242 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
1+
<?php
2+
3+
namespace Algolia\AlgoliaSearch\Model\Search;
4+
5+
/**
6+
* SchemasQuery Class Doc Comment
7+
*
8+
* @category Class
9+
* @description When providing a string, it replaces the entire query string. When providing an object, it describes incremental edits to be made to the query string (but you can&#39;t do both).
10+
*
11+
* @package Algolia\AlgoliaSearch
12+
*/
13+
class SchemasQuery extends \Algolia\AlgoliaSearch\Model\AbstractModel implements
14+
ModelInterface,
15+
\ArrayAccess,
16+
\JsonSerializable
17+
{
18+
/**
19+
* Array of property to type mappings. Used for (de)serialization
20+
*
21+
* @var string[]
22+
*/
23+
protected static $modelTypes = [
24+
'remove' => 'string[]',
25+
'edits' => '\Algolia\AlgoliaSearch\Model\Search\Edit[]',
26+
];
27+
28+
/**
29+
* Array of property to format mappings. Used for (de)serialization
30+
*
31+
* @var string[]
32+
*/
33+
protected static $modelFormats = [
34+
'remove' => null,
35+
'edits' => null,
36+
];
37+
38+
/**
39+
* Array of property to type mappings. Used for (de)serialization
40+
*
41+
* @return array
42+
*/
43+
public static function modelTypes()
44+
{
45+
return self::$modelTypes;
46+
}
47+
48+
/**
49+
* Array of property to format mappings. Used for (de)serialization
50+
*
51+
* @return array
52+
*/
53+
public static function modelFormats()
54+
{
55+
return self::$modelFormats;
56+
}
57+
58+
/**
59+
* Array of attributes to setter functions (for deserialization of responses)
60+
*
61+
* @var string[]
62+
*/
63+
protected static $setters = [
64+
'remove' => 'setRemove',
65+
'edits' => 'setEdits',
66+
];
67+
68+
/**
69+
* Array of attributes to getter functions (for serialization of requests)
70+
*
71+
* @var string[]
72+
*/
73+
protected static $getters = [
74+
'remove' => 'getRemove',
75+
'edits' => 'getEdits',
76+
];
77+
78+
/**
79+
* Array of attributes to setter functions (for deserialization of responses)
80+
*
81+
* @return array
82+
*/
83+
public static function setters()
84+
{
85+
return self::$setters;
86+
}
87+
88+
/**
89+
* Array of attributes to getter functions (for serialization of requests)
90+
*
91+
* @return array
92+
*/
93+
public static function getters()
94+
{
95+
return self::$getters;
96+
}
97+
98+
/**
99+
* Associative array for storing property values
100+
*
101+
* @var mixed[]
102+
*/
103+
protected $container = [];
104+
105+
/**
106+
* Constructor
107+
*
108+
* @param mixed[] $data Associated array of property values
109+
*/
110+
public function __construct(array $data = null)
111+
{
112+
if (isset($data['remove'])) {
113+
$this->container['remove'] = $data['remove'];
114+
}
115+
if (isset($data['edits'])) {
116+
$this->container['edits'] = $data['edits'];
117+
}
118+
}
119+
120+
/**
121+
* Show all the invalid properties with reasons.
122+
*
123+
* @return array invalid properties with reasons
124+
*/
125+
public function listInvalidProperties()
126+
{
127+
$invalidProperties = [];
128+
129+
return $invalidProperties;
130+
}
131+
132+
/**
133+
* Validate all the properties in the model
134+
* return true if all passed
135+
*
136+
* @return bool True if all properties are valid
137+
*/
138+
public function valid()
139+
{
140+
return count($this->listInvalidProperties()) === 0;
141+
}
142+
143+
/**
144+
* Gets remove
145+
*
146+
* @return string[]|null
147+
*/
148+
public function getRemove()
149+
{
150+
return $this->container['remove'] ?? null;
151+
}
152+
153+
/**
154+
* Sets remove
155+
*
156+
* @param string[]|null $remove words to remove
157+
*
158+
* @return self
159+
*/
160+
public function setRemove($remove)
161+
{
162+
$this->container['remove'] = $remove;
163+
164+
return $this;
165+
}
166+
167+
/**
168+
* Gets edits
169+
*
170+
* @return \Algolia\AlgoliaSearch\Model\Search\Edit[]|null
171+
*/
172+
public function getEdits()
173+
{
174+
return $this->container['edits'] ?? null;
175+
}
176+
177+
/**
178+
* Sets edits
179+
*
180+
* @param \Algolia\AlgoliaSearch\Model\Search\Edit[]|null $edits edits to apply
181+
*
182+
* @return self
183+
*/
184+
public function setEdits($edits)
185+
{
186+
$this->container['edits'] = $edits;
187+
188+
return $this;
189+
}
190+
/**
191+
* Returns true if offset exists. False otherwise.
192+
*
193+
* @param int $offset Offset
194+
*
195+
* @return bool
196+
*/
197+
public function offsetExists($offset)
198+
{
199+
return isset($this->container[$offset]);
200+
}
201+
202+
/**
203+
* Gets offset.
204+
*
205+
* @param int $offset Offset
206+
*
207+
* @return mixed|null
208+
*/
209+
public function offsetGet($offset)
210+
{
211+
return $this->container[$offset] ?? null;
212+
}
213+
214+
/**
215+
* Sets value based on offset.
216+
*
217+
* @param int|null $offset Offset
218+
* @param mixed $value Value to be set
219+
*
220+
* @return void
221+
*/
222+
public function offsetSet($offset, $value)
223+
{
224+
if (is_null($offset)) {
225+
$this->container[] = $value;
226+
} else {
227+
$this->container[$offset] = $value;
228+
}
229+
}
230+
231+
/**
232+
* Unsets offset.
233+
*
234+
* @param int $offset Offset
235+
*
236+
* @return void
237+
*/
238+
public function offsetUnset($offset)
239+
{
240+
unset($this->container[$offset]);
241+
}
242+
}

0 commit comments

Comments
 (0)