Issues (74)

src/SDK/Model/HttpRequestSettingModel.php (1 issue)

1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file has been auto generated by Jane,
7
 *
8
 * Do no edit it directly.
9
 */
10
11
namespace Montross50\NetsparkerCloud\SDK\Model;
12
13
class HttpRequestSettingModel
14
{
15
    /**
16
     * Gets or sets the accept.
17
     *
18
     * @var string
19
     */
20
    protected $accept;
21
    /**
22
     * Gets or sets the accept charset.
23
     *
24
     * @var string
25
     */
26
    protected $acceptCharset;
27
    /**
28
     * Gets or sets the accept language.
29
     *
30
     * @var string
31
     */
32
    protected $acceptLanguage;
33
    /**
34
     * Gets or sets a value indicating whether cookies are disabled.
35
     *
36
     * @var bool
37
     */
38
    protected $enableCookies;
39
    /**
40
     * Gets or sets a value indicating whether gzip and deflate is enabled.
41
     *
42
     * @var bool
43
     */
44
    protected $enableGzipAndDeflate;
45
    /**
46
     * Gets or sets a value indicating whether HTTP keep alive is enabled.
47
     *
48
     * @var bool
49
     */
50
    protected $httpKeepAlive;
51
    /**
52
     * Gets or sets a value indicating whether cookies are disabled.
53
     *
54
     * @var bool
55
     */
56
    protected $logHttpRequests;
57
    /**
58
     * Gets or sets the request count per unit time.
59
     *
60
     * @var int
61
     */
62
    protected $requestLimiterRequestPerUnitTime;
63
    /**
64
     * Gets or sets the unit time for request limiter.
65
     *
66
     * @var int
67
     */
68
    protected $requestLimiterUnitTime;
69
    /**
70
     * Gets or sets the request timeout in seconds.
71
     *
72
     * @var int
73
     */
74
    protected $requestTimeout;
75
    /**
76
     * Gets or sets the thread count.
77
     *
78
     * @var int
79
     */
80
    protected $threadCount;
81
    /**
82
     * Gets or sets the user agent.
83
     *
84
     * @var string
85
     */
86
    protected $userAgent;
87
    /**
88
     * Gets or sets the user agents.
89
     *
90
     * @var string[]
91
     */
92
    protected $userAgents;
93
    /**
94
     * Gets or sets a value indicating whether user agent forced.
95
     *
96
     * @var bool
97
     */
98
    protected $forceUserAgent;
99
100
    /**
101
     * Gets or sets the accept.
102
     *
103
     * @return string
104
     */
105
    public function getAccept(): ?string
106
    {
107
        return $this->accept;
108
    }
109
110
    /**
111
     * Gets or sets the accept.
112
     *
113
     * @param string $accept
114
     *
115
     * @return self
116
     */
117
    public function setAccept(?string $accept): self
118
    {
119
        $this->accept = $accept;
120
121
        return $this;
122
    }
123
124
    /**
125
     * Gets or sets the accept charset.
126
     *
127
     * @return string
128
     */
129
    public function getAcceptCharset(): ?string
130
    {
131
        return $this->acceptCharset;
132
    }
133
134
    /**
135
     * Gets or sets the accept charset.
136
     *
137
     * @param string $acceptCharset
138
     *
139
     * @return self
140
     */
141
    public function setAcceptCharset(?string $acceptCharset): self
142
    {
143
        $this->acceptCharset = $acceptCharset;
144
145
        return $this;
146
    }
147
148
    /**
149
     * Gets or sets the accept language.
150
     *
151
     * @return string
152
     */
153
    public function getAcceptLanguage(): ?string
154
    {
155
        return $this->acceptLanguage;
156
    }
157
158
    /**
159
     * Gets or sets the accept language.
160
     *
161
     * @param string $acceptLanguage
162
     *
163
     * @return self
164
     */
165
    public function setAcceptLanguage(?string $acceptLanguage): self
166
    {
167
        $this->acceptLanguage = $acceptLanguage;
168
169
        return $this;
170
    }
171
172
    /**
173
     * Gets or sets a value indicating whether cookies are disabled.
174
     *
175
     * @return bool
176
     */
177
    public function getEnableCookies(): ?bool
178
    {
179
        return $this->enableCookies;
180
    }
181
182
    /**
183
     * Gets or sets a value indicating whether cookies are disabled.
184
     *
185
     * @param bool $enableCookies
186
     *
187
     * @return self
188
     */
189
    public function setEnableCookies(?bool $enableCookies): self
190
    {
191
        $this->enableCookies = $enableCookies;
192
193
        return $this;
194
    }
195
196
    /**
197
     * Gets or sets a value indicating whether gzip and deflate is enabled.
198
     *
199
     * @return bool
200
     */
201
    public function getEnableGzipAndDeflate(): ?bool
202
    {
203
        return $this->enableGzipAndDeflate;
204
    }
205
206
    /**
207
     * Gets or sets a value indicating whether gzip and deflate is enabled.
208
     *
209
     * @param bool $enableGzipAndDeflate
210
     *
211
     * @return self
212
     */
213
    public function setEnableGzipAndDeflate(?bool $enableGzipAndDeflate): self
214
    {
215
        $this->enableGzipAndDeflate = $enableGzipAndDeflate;
216
217
        return $this;
218
    }
219
220
    /**
221
     * Gets or sets a value indicating whether HTTP keep alive is enabled.
222
     *
223
     * @return bool
224
     */
225
    public function getHttpKeepAlive(): ?bool
226
    {
227
        return $this->httpKeepAlive;
228
    }
229
230
    /**
231
     * Gets or sets a value indicating whether HTTP keep alive is enabled.
232
     *
233
     * @param bool $httpKeepAlive
234
     *
235
     * @return self
236
     */
237
    public function setHttpKeepAlive(?bool $httpKeepAlive): self
238
    {
239
        $this->httpKeepAlive = $httpKeepAlive;
240
241
        return $this;
242
    }
243
244
    /**
245
     * Gets or sets a value indicating whether cookies are disabled.
246
     *
247
     * @return bool
248
     */
249
    public function getLogHttpRequests(): ?bool
250
    {
251
        return $this->logHttpRequests;
252
    }
253
254
    /**
255
     * Gets or sets a value indicating whether cookies are disabled.
256
     *
257
     * @param bool $logHttpRequests
258
     *
259
     * @return self
260
     */
261
    public function setLogHttpRequests(?bool $logHttpRequests): self
262
    {
263
        $this->logHttpRequests = $logHttpRequests;
264
265
        return $this;
266
    }
267
268
    /**
269
     * Gets or sets the request count per unit time.
270
     *
271
     * @return int
272
     */
273
    public function getRequestLimiterRequestPerUnitTime(): ?int
274
    {
275
        return $this->requestLimiterRequestPerUnitTime;
276
    }
277
278
    /**
279
     * Gets or sets the request count per unit time.
280
     *
281
     * @param int $requestLimiterRequestPerUnitTime
282
     *
283
     * @return self
284
     */
285
    public function setRequestLimiterRequestPerUnitTime(?int $requestLimiterRequestPerUnitTime): self
286
    {
287
        $this->requestLimiterRequestPerUnitTime = $requestLimiterRequestPerUnitTime;
288
289
        return $this;
290
    }
291
292
    /**
293
     * Gets or sets the unit time for request limiter.
294
     *
295
     * @return int
296
     */
297
    public function getRequestLimiterUnitTime(): ?int
298
    {
299
        return $this->requestLimiterUnitTime;
300
    }
301
302
    /**
303
     * Gets or sets the unit time for request limiter.
304
     *
305
     * @param int $requestLimiterUnitTime
306
     *
307
     * @return self
308
     */
309
    public function setRequestLimiterUnitTime(?int $requestLimiterUnitTime): self
310
    {
311
        $this->requestLimiterUnitTime = $requestLimiterUnitTime;
312
313
        return $this;
314
    }
315
316
    /**
317
     * Gets or sets the request timeout in seconds.
318
     *
319
     * @return int
320
     */
321
    public function getRequestTimeout(): ?int
322
    {
323
        return $this->requestTimeout;
324
    }
325
326
    /**
327
     * Gets or sets the request timeout in seconds.
328
     *
329
     * @param int $requestTimeout
330
     *
331
     * @return self
332
     */
333
    public function setRequestTimeout(?int $requestTimeout): self
334
    {
335
        $this->requestTimeout = $requestTimeout;
336
337
        return $this;
338
    }
339
340
    /**
341
     * Gets or sets the thread count.
342
     *
343
     * @return int
344
     */
345
    public function getThreadCount(): ?int
346
    {
347
        return $this->threadCount;
348
    }
349
350
    /**
351
     * Gets or sets the thread count.
352
     *
353
     * @param int $threadCount
354
     *
355
     * @return self
356
     */
357
    public function setThreadCount(?int $threadCount): self
358
    {
359
        $this->threadCount = $threadCount;
360
361
        return $this;
362
    }
363
364
    /**
365
     * Gets or sets the user agent.
366
     *
367
     * @return string
368
     */
369
    public function getUserAgent(): ?string
370
    {
371
        return $this->userAgent;
372
    }
373
374
    /**
375
     * Gets or sets the user agent.
376
     *
377
     * @param string $userAgent
378
     *
379
     * @return self
380
     */
381
    public function setUserAgent(?string $userAgent): self
382
    {
383
        $this->userAgent = $userAgent;
384
385
        return $this;
386
    }
387
388
    /**
389
     * Gets or sets the user agents.
390
     *
391
     * @return string[]
392
     */
393
    public function getUserAgents(): ?\ArrayObject
394
    {
395
        return $this->userAgents;
396
    }
397
398
    /**
399
     * Gets or sets the user agents.
400
     *
401
     * @param string[] $userAgents
402
     *
403
     * @return self
404
     */
405
    public function setUserAgents(?\ArrayObject $userAgents): self
406
    {
407
        $this->userAgents = $userAgents;
0 ignored issues
show
Documentation Bug introduced by
It seems like $userAgents can also be of type ArrayObject. However, the property $userAgents is declared as type string[]. Maybe add an additional type check?

Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a mixed type is assigned to a property that is type hinted more strictly.

For example, imagine you have a variable $accountId that can either hold an Id object or false (if there is no account id yet). Your code now assigns that value to the id property of an instance of the Account class. This class holds a proper account, so the id value must no longer be false.

Either this assignment is in error or a type check should be added for that assignment.

class Id
{
    public $id;

    public function __construct($id)
    {
        $this->id = $id;
    }

}

class Account
{
    /** @var  Id $id */
    public $id;
}

$account_id = false;

if (starsAreRight()) {
    $account_id = new Id(42);
}

$account = new Account();
if ($account instanceof Id)
{
    $account->id = $account_id;
}
Loading history...
408
409
        return $this;
410
    }
411
412
    /**
413
     * Gets or sets a value indicating whether user agent forced.
414
     *
415
     * @return bool
416
     */
417
    public function getForceUserAgent(): ?bool
418
    {
419
        return $this->forceUserAgent;
420
    }
421
422
    /**
423
     * Gets or sets a value indicating whether user agent forced.
424
     *
425
     * @param bool $forceUserAgent
426
     *
427
     * @return self
428
     */
429
    public function setForceUserAgent(?bool $forceUserAgent): self
430
    {
431
        $this->forceUserAgent = $forceUserAgent;
432
433
        return $this;
434
    }
435
}
436