@@ -20,20 +20,25 @@ class ListDomainsRequest
2020 'projectId ' => [
2121 'type ' => 'string ' ,
2222 ],
23- 'page ' => [
24- 'minimum ' => 1 ,
25- 'type ' => 'integer ' ,
26- ],
27- 'limit ' => [
28- 'minimum ' => 1 ,
29- 'type ' => 'integer ' ,
30- ],
3123 'domainSearchName ' => [
3224 'type ' => 'string ' ,
3325 ],
3426 'contactHash ' => [
3527 'type ' => 'string ' ,
3628 ],
29+ 'limit ' => [
30+ 'type ' => 'integer ' ,
31+ 'default ' => 10000 ,
32+ 'minimum ' => 1 ,
33+ ],
34+ 'skip ' => [
35+ 'type ' => 'integer ' ,
36+ 'default ' => 0 ,
37+ ],
38+ 'page ' => [
39+ 'type ' => 'integer ' ,
40+ 'minimum ' => 1 ,
41+ ],
3742 ],
3843 'required ' => [
3944
@@ -42,14 +47,16 @@ class ListDomainsRequest
4247
4348 private ?string $ projectId = null ;
4449
45- private ?int $ page = null ;
46-
47- private ?int $ limit = null ;
48-
4950 private ?string $ domainSearchName = null ;
5051
5152 private ?string $ contactHash = null ;
5253
54+ private int $ limit = 10000 ;
55+
56+ private int $ skip = 0 ;
57+
58+ private ?int $ page = null ;
59+
5360 private array $ headers = [
5461
5562 ];
@@ -66,24 +73,29 @@ public function getProjectId(): ?string
6673 return $ this ->projectId ?? null ;
6774 }
6875
69- public function getPage (): ?int
76+ public function getDomainSearchName (): ?string
7077 {
71- return $ this ->page ?? null ;
78+ return $ this ->domainSearchName ?? null ;
79+ }
80+
81+ public function getContactHash (): ?string
82+ {
83+ return $ this ->contactHash ?? null ;
7284 }
7385
74- public function getLimit (): ? int
86+ public function getLimit (): int
7587 {
76- return $ this ->limit ?? null ;
88+ return $ this ->limit ;
7789 }
7890
79- public function getDomainSearchName (): ? string
91+ public function getSkip (): int
8092 {
81- return $ this ->domainSearchName ?? null ;
93+ return $ this ->skip ;
8294 }
8395
84- public function getContactHash (): ?string
96+ public function getPage (): ?int
8597 {
86- return $ this ->contactHash ?? null ;
98+ return $ this ->page ?? null ;
8799 }
88100
89101 public function withProjectId (string $ projectId ): self
@@ -108,90 +120,96 @@ public function withoutProjectId(): self
108120 return $ clone ;
109121 }
110122
111- public function withPage ( int $ page ): self
123+ public function withDomainSearchName ( string $ domainSearchName ): self
112124 {
113125 $ validator = new Validator ();
114- $ validator ->validate ($ page , self ::$ internalValidationSchema ['properties ' ]['page ' ]);
126+ $ validator ->validate ($ domainSearchName , self ::$ internalValidationSchema ['properties ' ]['domainSearchName ' ]);
115127 if (!$ validator ->isValid ()) {
116128 throw new InvalidArgumentException ($ validator ->getErrors ()[0 ]['message ' ]);
117129 }
118130
119131 $ clone = clone $ this ;
120- $ clone ->page = $ page ;
132+ $ clone ->domainSearchName = $ domainSearchName ;
121133
122134 return $ clone ;
123135 }
124136
125- public function withoutPage (): self
137+ public function withoutDomainSearchName (): self
126138 {
127139 $ clone = clone $ this ;
128- unset($ clone ->page );
140+ unset($ clone ->domainSearchName );
129141
130142 return $ clone ;
131143 }
132144
133- public function withLimit ( int $ limit ): self
145+ public function withContactHash ( string $ contactHash ): self
134146 {
135147 $ validator = new Validator ();
136- $ validator ->validate ($ limit , self ::$ internalValidationSchema ['properties ' ]['limit ' ]);
148+ $ validator ->validate ($ contactHash , self ::$ internalValidationSchema ['properties ' ]['contactHash ' ]);
137149 if (!$ validator ->isValid ()) {
138150 throw new InvalidArgumentException ($ validator ->getErrors ()[0 ]['message ' ]);
139151 }
140152
141153 $ clone = clone $ this ;
142- $ clone ->limit = $ limit ;
154+ $ clone ->contactHash = $ contactHash ;
143155
144156 return $ clone ;
145157 }
146158
147- public function withoutLimit (): self
159+ public function withoutContactHash (): self
148160 {
149161 $ clone = clone $ this ;
150- unset($ clone ->limit );
162+ unset($ clone ->contactHash );
151163
152164 return $ clone ;
153165 }
154166
155- public function withDomainSearchName ( string $ domainSearchName ): self
167+ public function withLimit ( int $ limit ): self
156168 {
157169 $ validator = new Validator ();
158- $ validator ->validate ($ domainSearchName , self ::$ internalValidationSchema ['properties ' ]['domainSearchName ' ]);
170+ $ validator ->validate ($ limit , self ::$ internalValidationSchema ['properties ' ]['limit ' ]);
159171 if (!$ validator ->isValid ()) {
160172 throw new InvalidArgumentException ($ validator ->getErrors ()[0 ]['message ' ]);
161173 }
162174
163175 $ clone = clone $ this ;
164- $ clone ->domainSearchName = $ domainSearchName ;
176+ $ clone ->limit = $ limit ;
165177
166178 return $ clone ;
167179 }
168180
169- public function withoutDomainSearchName ( ): self
181+ public function withSkip ( int $ skip ): self
170182 {
183+ $ validator = new Validator ();
184+ $ validator ->validate ($ skip , self ::$ internalValidationSchema ['properties ' ]['skip ' ]);
185+ if (!$ validator ->isValid ()) {
186+ throw new InvalidArgumentException ($ validator ->getErrors ()[0 ]['message ' ]);
187+ }
188+
171189 $ clone = clone $ this ;
172- unset( $ clone ->domainSearchName ) ;
190+ $ clone ->skip = $ skip ;
173191
174192 return $ clone ;
175193 }
176194
177- public function withContactHash ( string $ contactHash ): self
195+ public function withPage ( int $ page ): self
178196 {
179197 $ validator = new Validator ();
180- $ validator ->validate ($ contactHash , self ::$ internalValidationSchema ['properties ' ]['contactHash ' ]);
198+ $ validator ->validate ($ page , self ::$ internalValidationSchema ['properties ' ]['page ' ]);
181199 if (!$ validator ->isValid ()) {
182200 throw new InvalidArgumentException ($ validator ->getErrors ()[0 ]['message ' ]);
183201 }
184202
185203 $ clone = clone $ this ;
186- $ clone ->contactHash = $ contactHash ;
204+ $ clone ->page = $ page ;
187205
188206 return $ clone ;
189207 }
190208
191- public function withoutContactHash (): self
209+ public function withoutPage (): self
192210 {
193211 $ clone = clone $ this ;
194- unset($ clone ->contactHash );
212+ unset($ clone ->page );
195213
196214 return $ clone ;
197215 }
@@ -215,14 +233,6 @@ public static function buildFromInput(array|object $input, bool $validate = true
215233 if (isset ($ input ->{'projectId ' })) {
216234 $ projectId = $ input ->{'projectId ' };
217235 }
218- $ page = null ;
219- if (isset ($ input ->{'page ' })) {
220- $ page = (int )($ input ->{'page ' });
221- }
222- $ limit = null ;
223- if (isset ($ input ->{'limit ' })) {
224- $ limit = (int )($ input ->{'limit ' });
225- }
226236 $ domainSearchName = null ;
227237 if (isset ($ input ->{'domainSearchName ' })) {
228238 $ domainSearchName = $ input ->{'domainSearchName ' };
@@ -231,13 +241,26 @@ public static function buildFromInput(array|object $input, bool $validate = true
231241 if (isset ($ input ->{'contactHash ' })) {
232242 $ contactHash = $ input ->{'contactHash ' };
233243 }
244+ $ limit = 10000 ;
245+ if (isset ($ input ->{'limit ' })) {
246+ $ limit = (int )($ input ->{'limit ' });
247+ }
248+ $ skip = 0 ;
249+ if (isset ($ input ->{'skip ' })) {
250+ $ skip = (int )($ input ->{'skip ' });
251+ }
252+ $ page = null ;
253+ if (isset ($ input ->{'page ' })) {
254+ $ page = (int )($ input ->{'page ' });
255+ }
234256
235257 $ obj = new self ();
236258 $ obj ->projectId = $ projectId ;
237- $ obj ->page = $ page ;
238- $ obj ->limit = $ limit ;
239259 $ obj ->domainSearchName = $ domainSearchName ;
240260 $ obj ->contactHash = $ contactHash ;
261+ $ obj ->limit = $ limit ;
262+ $ obj ->skip = $ skip ;
263+ $ obj ->page = $ page ;
241264 return $ obj ;
242265 }
243266
@@ -252,18 +275,17 @@ public function toJson(): array
252275 if (isset ($ this ->projectId )) {
253276 $ output ['projectId ' ] = $ this ->projectId ;
254277 }
255- if (isset ($ this ->page )) {
256- $ output ['page ' ] = $ this ->page ;
257- }
258- if (isset ($ this ->limit )) {
259- $ output ['limit ' ] = $ this ->limit ;
260- }
261278 if (isset ($ this ->domainSearchName )) {
262279 $ output ['domainSearchName ' ] = $ this ->domainSearchName ;
263280 }
264281 if (isset ($ this ->contactHash )) {
265282 $ output ['contactHash ' ] = $ this ->contactHash ;
266283 }
284+ $ output ['limit ' ] = $ this ->limit ;
285+ $ output ['skip ' ] = $ this ->skip ;
286+ if (isset ($ this ->page )) {
287+ $ output ['page ' ] = $ this ->page ;
288+ }
267289
268290 return $ output ;
269291 }
@@ -327,18 +349,21 @@ public function buildRequestOptions(): array
327349 if (isset ($ mapped ['projectId ' ])) {
328350 $ query ['projectId ' ] = $ mapped ['projectId ' ];
329351 }
330- if (isset ($ mapped ['page ' ])) {
331- $ query ['page ' ] = $ mapped ['page ' ];
332- }
333- if (isset ($ mapped ['limit ' ])) {
334- $ query ['limit ' ] = $ mapped ['limit ' ];
335- }
336352 if (isset ($ mapped ['domainSearchName ' ])) {
337353 $ query ['domainSearchName ' ] = $ mapped ['domainSearchName ' ];
338354 }
339355 if (isset ($ mapped ['contactHash ' ])) {
340356 $ query ['contactHash ' ] = $ mapped ['contactHash ' ];
341357 }
358+ if (isset ($ mapped ['limit ' ])) {
359+ $ query ['limit ' ] = $ mapped ['limit ' ];
360+ }
361+ if (isset ($ mapped ['skip ' ])) {
362+ $ query ['skip ' ] = $ mapped ['skip ' ];
363+ }
364+ if (isset ($ mapped ['page ' ])) {
365+ $ query ['page ' ] = $ mapped ['page ' ];
366+ }
342367 return [
343368 'query ' => $ query ,
344369 'headers ' => $ this ->headers ,
0 commit comments