• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

api-platform / core / 19438754788

17 Nov 2025 05:34PM UTC coverage: 0.0%. Remained the same
19438754788

push

github

soyuka
Merge 4.2

0 of 95 new or added lines in 28 files covered. (0.0%)

19 existing lines in 18 files now uncovered.

0 of 57020 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Metadata/ApiResource.php
1
<?php
2

3
/*
4
 * This file is part of the API Platform project.
5
 *
6
 * (c) Kévin Dunglas <dunglas@gmail.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11

12
declare(strict_types=1);
13

14
namespace ApiPlatform\Metadata;
15

16
use ApiPlatform\Metadata\GraphQl\Operation as GraphQlOperation;
17
use ApiPlatform\OpenApi\Model\Operation as OpenApiOperation;
18
use ApiPlatform\State\OptionsInterface;
19

20
/**
21
 * Resource metadata attribute.
22
 *
23
 * The API Resource attribute declares the behaviors attached to a Resource inside API Platform.
24
 * This class is immutable, and if you set a value yourself, API Platform will not override the value.
25
 * The API Resource helps to share options with operations.
26
 *
27
 * Read more about how metadata works [here](/docs/in-depth/metadata).
28
 *
29
 * @author Antoine Bluchet <soyuka@gmail.com>
30
 */
31
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
32
class ApiResource extends Metadata
33
{
34
    use CascadeToOperationsTrait;
35
    use WithResourceTrait;
36

37
    /**
38
     * @var Operations<HttpOperation>
39
     */
40
    protected ?Operations $operations;
41

42
    /**
43
     * @param list<HttpOperation>|array<string, HttpOperation>|Operations<HttpOperation>|null $operations   Operations is a list of HttpOperation
44
     * @param array<string, Link>|array<string, mixed[]>|string[]|string|null                 $uriVariables
45
     * @param class-string                                                                    $class
46
     * @param array<string, string>                                                           $headers
47
     * @param string|callable|null                                                            $provider
48
     * @param string|callable|null                                                            $processor
49
     * @param mixed|null                                                                      $mercure
50
     * @param mixed|null                                                                      $messenger
51
     * @param mixed|null                                                                      $input
52
     * @param mixed|null                                                                      $output
53
     */
54
    public function __construct(
55
        /**
56
         * The URI template represents your resource IRI with optional variables. It follows [RFC 6570](https://www.rfc-editor.org/rfc/rfc6570.html).
57
         * API Platform generates this URL for you if you leave this empty.
58
         */
59
        protected ?string $uriTemplate = null,
60

61
        /**
62
         * The short name of your resource is a unique name that identifies your resource.
63
         * It is used within the documentation and for url generation if the `uriTemplate` is not filled. By default, this will be the name of your PHP class.
64
         */
65
        protected ?string $shortName = null,
66

67
        /**
68
         * A description for this resource that will show on documentations.
69
         */
70
        protected ?string $description = null,
71

72
        /**
73
         * The RDF types of this resource.
74
         * An RDF type is usually a URI referencing how your resource is structured for the outside world. Values can be a string `https://schema.org/Book`
75
         * or an array of string `['https://schema.org/Flight', 'https://schema.org/BusTrip']`.
76
         */
77
        protected string|array|null $types = null,
78

79
        /**
80
         * Operations is a list of [HttpOperation](./HttpOperation).
81
         *
82
         * By default API Platform declares operations representing CRUD routes if you don't specify this parameter:
83
         *
84
         * ```php
85
         * #[ApiResource(
86
         *     operations: [
87
         *         new Get(uriTemplate: '/books/{id}'),
88
         *         // The GetCollection operation returns a list of Books.
89
         *         new GetCollection(uriTemplate: '/books'),
90
         *         new Post(uriTemplate: '/books'),
91
         *         new Patch(uriTemplate: '/books/{id}'),
92
         *         new Delete(uriTemplate: '/books/{id}'),
93
         *     ]
94
         * )]
95
         *
96
         * ```
97
         *
98
         * Try this live at [play.api-platform.com/api-resource](play.api-platform.com).
99
         */
100
        $operations = null,
101

102
        /**
103
         * The `formats` option allows you to customize content negotiation. By default API Platform supports JsonLd, Hal, JsonAPI.
104
         * For other formats we use the Symfony Serializer.
105
         *
106
         * ```php
107
         * #[ApiResource(
108
         *   formats: [
109
         *       'jsonld' => ['application/ld+json'],
110
         *       'jsonhal' => ['application/hal+json'],
111
         *       'jsonapi' => ['application/vnd.api+json'],
112
         *       'json' =>    ['application/json'],
113
         *       'xml' =>     ['application/xml', 'text/xml'],
114
         *       'yaml' =>    ['application/yaml'],
115
         *       'csv' =>     ['text/csv'],
116
         *       'html' =>    ['text/html'],
117
         *       'myformat' =>['application/vnd.myformat'],
118
         *   ]
119
         * )]
120
         * ```
121
         *
122
         * Learn more about custom formats in the [dedicated guide](/guides/custom-formats).
123
         */
124
        protected array|string|null $formats = null,
125
        /**
126
         * The `inputFormats` option allows you to customize content negotiation for HTTP bodies:.
127
         *
128
         * ```php
129
         *  #[ApiResource(formats: ['jsonld', 'csv' => ['text/csv']], operations: [
130
         *      new Patch(inputFormats: ['json' => ['application/merge-patch+json']]),
131
         *      new GetCollection(),
132
         *      new Post(),
133
         *  ])]
134
         * ```
135
         */
136
        protected array|string|null $inputFormats = null,
137
        /**
138
         * The `outputFormats` option allows you to customize content negotiation for HTTP responses.
139
         */
140
        protected array|string|null $outputFormats = null,
141
        /**
142
         * The `uriVariables` configuration allows to configure to what each URI Variable.
143
         * With [simple string expansion](https://www.rfc-editor.org/rfc/rfc6570.html#section-3.2.2), we read the input
144
         * value and match this to the given `Link`. Note that this setting is usually used on an operation directly:.
145
         *
146
         * ```php
147
         *   #[ApiResource(
148
         *       uriTemplate: '/companies/{companyId}/employees/{id}',
149
         *       uriVariables: [
150
         *           'companyId' => new Link(fromClass: Company::class, toProperty: 'company'),
151
         *           'id' => new Link(fromClass: Employee::class)
152
         *       ],
153
         *       operations: [new Get()]
154
         *   )]
155
         * ```
156
         *
157
         * For more examples, read our guide on [subresources](/guides/subresources).
158
         */
159
        protected $uriVariables = null,
160
        /**
161
         * The `routePrefix` allows you to configure a prefix that will apply to this resource.
162
         *
163
         * ```php
164
         *   #[ApiResource(
165
         *       routePrefix: '/books',
166
         *       operations: [new Get(uriTemplate: '/{id}')]
167
         *   )]
168
         * ```
169
         *
170
         * This resource will be accessible through `/books/{id}`.
171
         */
172
        protected ?string $routePrefix = null,
173
        /**
174
         * The `defaults` option adds up to [Symfony's route defaults](https://github.com/symfony/routing/blob/8f068b792e515b25e26855ac8dc7fe800399f3e5/Route.php#L41). You can override [API Platform's defaults](https://github.com/api-platform/core/blob/6abd0fe0a69d4842eb6d5c31ef2bd6dce0e1d372/src/Symfony/Routing/ApiLoader.php#L87) if needed.
175
         */
176
        protected ?array $defaults = null,
177
        /**
178
         * The `requirements` option configures the Symfony's Route requirements.
179
         */
180
        protected ?array $requirements = null,
181
        /**
182
         * The `options` option configures the Symfony's Route options.
183
         */
184
        protected ?array $options = null,
185
        /**
186
         * The `stateless` option configures the Symfony's Route stateless option.
187
         */
188
        protected ?bool $stateless = null,
189
        /**
190
         * The `sunset` option indicates when a deprecated operation will be removed.
191
         *
192
         * <div data-code-selector>
193
         *
194
         * ```php
195
         * <?php
196
         * // api/src/Entity/Parchment.php
197
         * use ApiPlatform\Metadata\ApiResource;
198
         *
199
         * #[ApiResource(deprecationReason: 'Create a Book instead', sunset: '01/01/2020')]
200
         * class Parchment
201
         * {
202
         *     // ...
203
         * }
204
         * ```
205
         *
206
         * ```yaml
207
         * # api/config/api_platform/resources.yaml
208
         * resources:
209
         *     App\Entity\Parchment:
210
         *         - deprecationReason: 'Create a Book instead'
211
         *           sunset: '01/01/2020'
212
         * ```
213
         *
214
         * ```xml
215
         * <?xml version="1.0" encoding="UTF-8" ?>
216
         * <!-- api/config/api_platform/resources.xml -->
217
         *
218
         * <resources
219
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
220
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
221
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
222
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
223
         *     <resource class="App\Entity\Parchment" deprecationReason="Create a Book instead" sunset="01/01/2020" />
224
         * </resources>
225
         * ```
226
         *
227
         * </div>
228
         */
229
        protected ?string $sunset = null,
230
        protected ?string $acceptPatch = null,
231
        protected ?int $status = null,
232
        protected ?string $host = null,
233
        protected ?array $schemes = null,
234
        protected ?string $condition = null,
235
        protected ?string $controller = null,
236
        protected ?string $class = null,
237
        /**
238
         * The `urlGenerationStrategy` option configures the url generation strategy.
239
         *
240
         * See: [UrlGeneratorInterface::class](/reference/Api/UrlGeneratorInterface)
241
         *
242
         * <div data-code-selector>
243
         *
244
         * ```php
245
         * <?php
246
         * // api/src/Entity/Book.php
247
         * use ApiPlatform\Metadata\ApiResource;
248
         * use ApiPlatform\Api\UrlGeneratorInterface;
249
         *
250
         * #[ApiResource(urlGenerationStrategy: UrlGeneratorInterface::ABS_URL)]
251
         * class Book
252
         * {
253
         *     // ...
254
         * }
255
         * ```
256
         *
257
         * ```yaml
258
         * # api/config/api_platform/resources.yaml
259
         * App\Entity\Book:
260
         *     urlGenerationStrategy: !php/const ApiPlatform\Metadata\UrlGeneratorInterface::ABS_URL
261
         * ```
262
         *
263
         * ```xml
264
         * <?xml version="1.0" encoding="UTF-8" ?>
265
         * <!-- api/config/api_platform/resources.xml -->
266
         *
267
         * <resources
268
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
269
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
270
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
271
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
272
         *     <resource class="App\Entity\Book" urlGenerationStrategy="0" />
273
         * </resources>
274
         * ```
275
         *
276
         * </div>
277
         */
278
        protected ?int $urlGenerationStrategy = null,
279
        /**
280
         * The `deprecationReason` option deprecates the current resource with a deprecation message.
281
         *
282
         * <div data-code-selector>
283
         *
284
         * ```php
285
         * <?php
286
         * // api/src/Entity/Parchment.php
287
         * use ApiPlatform\Metadata\ApiResource;
288
         *
289
         * #[ApiResource(deprecationReason: 'Create a Book instead')]
290
         * class Parchment
291
         * {
292
         *     // ...
293
         * }
294
         * ```
295
         *
296
         * ```yaml
297
         * # api/config/api_platform/resources.yaml
298
         * resources:
299
         *     App\Entity\Parchment:
300
         *         - deprecationReason: 'Create a Book instead'
301
         * ```
302
         *
303
         * ```xml
304
         * <?xml version="1.0" encoding="UTF-8" ?>
305
         * <!-- api/config/api_platform/resources.xml -->
306
         *
307
         * <resources
308
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
309
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
310
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
311
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
312
         *     <resource class="App\Entity\Parchment" deprecationReason="Create a Book instead" />
313
         * </resources>
314
         * ```
315
         *
316
         * </div>
317
         *
318
         * - With JSON-lD / Hydra, [an `owl:deprecated` annotation property](https://www.w3.org/TR/owl2-syntax/#Annotation_Properties) will be added to the appropriate data structure
319
         * - With Swagger / OpenAPI, [a `deprecated` property](https://swagger.io/docs/specification/2-0/paths-and-operations/) will be added
320
         * - With GraphQL, the [`isDeprecated` and `deprecationReason` properties](https://facebook.github.io/graphql/June2018/#sec-Deprecation) will be added to the schema
321
         */
322
        protected ?string $deprecationReason = null,
323
        protected ?array $headers = null,
324
        protected ?array $cacheHeaders = null,
325
        protected ?array $normalizationContext = null,
326
        protected ?array $denormalizationContext = null,
327
        protected ?bool $collectDenormalizationErrors = null,
328
        protected ?array $hydraContext = null,
329
        protected bool|OpenApiOperation|null $openapi = null,
330
        /**
331
         * The `validationContext` option configures the context of validation for the current ApiResource.
332
         * You can, for instance, describe the validation groups that will be used:.
333
         *
334
         * ```php
335
         * #[ApiResource(validationContext: ['groups' => ['a', 'b']])]
336
         * ```
337
         *
338
         * For more examples, read our guide on [validation](/guides/validation).
339
         */
340
        protected ?array $validationContext = null,
341
        /**
342
         * The `filters` option configures the filters (declared as services) available on the collection routes for the current resource.
343
         *
344
         * <div data-code-selector>
345
         *
346
         * ```php
347
         * <?php
348
         * // api/src/Entity/Book.php
349
         * use ApiPlatform\Metadata\ApiResource;
350
         *
351
         * #[ApiResource(filters: ['app.filters.book.search'])]
352
         * class Book
353
         * {
354
         *     // ...
355
         * }
356
         * ```
357
         *
358
         * ```yaml
359
         * # api/config/api_platform/resources.yaml
360
         * resources:
361
         *     App\Entity\Book:
362
         *         - filters: ['app.filters.book.search']
363
         * ```
364
         *
365
         * ```xml
366
         * <?xml version="1.0" encoding="UTF-8" ?>
367
         * <!-- api/config/api_platform/resources.xml -->
368
         * <resources
369
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
370
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
371
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
372
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
373
         *     <resource class="App\Entity\Book">
374
         *         <filters>
375
         *             <filter>app.filters.book.search</filter>
376
         *         </filters>
377
         *     </resource>
378
         * </resources>
379
         * ```
380
         *
381
         * </div>
382
         */
383
        protected ?array $filters = null,
384
        protected $mercure = null,
385
        /**
386
         * The `messenger` option dispatches the current resource through the Message Bus.
387
         *
388
         * <div data-code-selector>
389
         *
390
         * ```php
391
         * <?php
392
         * // api/src/Entity/Book.php
393
         * use ApiPlatform\Metadata\ApiResource;
394
         *
395
         * #[ApiResource(messenger: true)]
396
         * class Book
397
         * {
398
         *     // ...
399
         * }
400
         * ```
401
         *
402
         * ```yaml
403
         * # api/config/api_platform/resources.yaml
404
         * resources:
405
         *     App\Entity\Book:
406
         *         - messenger: true
407
         * ```
408
         *
409
         * ```xml
410
         * <?xml version="1.0" encoding="UTF-8" ?>
411
         * <!-- api/config/api_platform/resources.xml -->
412
         *
413
         * <resources
414
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
415
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
416
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
417
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
418
         *     <resource class="App\Entity\Book" messenger=true />
419
         * </resources>
420
         * ```
421
         *
422
         * </div>
423
         *
424
         * Note: when using `messenger=true` on a Doctrine entity, the Doctrine Processor is not called. If you want it
425
         * to be called, you should [decorate a built-in state processor](/docs/guide/hook-a-persistence-layer-with-a-processor)
426
         * and implement your own logic.
427
         *
428
         * Read [how to use Messenger with an Input object](/docs/guide/using-messenger-with-an-input-object).
429
         *
430
         * @var string|bool|null
431
         */
432
        protected $messenger = null,
433
        protected $input = null,
434
        protected $output = null,
435
        /**
436
         * Override the default order of items in your collection. Note that this is handled by our doctrine filters such as
437
         * the [OrderFilter](/docs/reference/Doctrine/Orm/Filter/OrderFilter).
438
         *
439
         * By default, items in the collection are ordered in ascending (ASC) order by their resource identifier(s). If you want to
440
         * customize this order, you must add an `order` attribute on your ApiResource annotation:
441
         *
442
         * <div data-code-selector>
443
         *
444
         * ```php
445
         * <?php
446
         * // api/src/Entity/Book.php
447
         * namespace App\Entity;
448
         *
449
         * use ApiPlatform\Metadata\ApiResource;
450
         *
451
         * #[ApiResource(order: ['foo' => 'ASC'])]
452
         * class Book
453
         * {
454
         * }
455
         * ```
456
         *
457
         * ```yaml
458
         * # api/config/api_platform/resources/Book.yaml
459
         * App\Entity\Book:
460
         *     order:
461
         *         foo: ASC
462
         * ```
463
         *
464
         * </div>
465
         *
466
         * This `order` attribute is used as an array: the key defines the order field, the values defines the direction.
467
         * If you only specify the key, `ASC` direction will be used as default.
468
         */
469
        protected ?array $order = null,
470
        protected ?bool $fetchPartial = null,
471
        protected ?bool $forceEager = null,
472
        /**
473
         * The `paginationClientEnabled` option allows (or disallows) the client to enable (or disable) the pagination for the current resource.
474
         *
475
         * <div data-code-selector>
476
         *
477
         * ```php
478
         * <?php
479
         * // api/src/Entity/Book.php
480
         * use ApiPlatform\Metadata\ApiResource;
481
         *
482
         * #[ApiResource(paginationClientEnabled: true)]
483
         * class Book
484
         * {
485
         *     // ...
486
         * }
487
         * ```
488
         *
489
         * ```yaml
490
         * # api/config/api_platform/resources.yaml
491
         * resources:
492
         *     App\Entity\Book:
493
         *         - paginationClientEnabled: true
494
         * ```
495
         *
496
         * ```xml
497
         * <?xml version="1.0" encoding="UTF-8" ?>
498
         * <!-- api/config/api_platform/resources.xml -->
499
         *
500
         * <resources
501
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
502
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
503
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
504
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
505
         *     <resource class="App\Entity\Book" paginationClientEnabled=true />
506
         * </resources>
507
         * ```
508
         *
509
         * </div>
510
         *
511
         * The pagination can now be enabled (or disabled) by adding a query parameter named `pagination`:
512
         * - `GET /books?pagination=false`: disabled
513
         * - `GET /books?pagination=true`: enabled
514
         */
515
        protected ?bool $paginationClientEnabled = null,
516
        /**
517
         * The `paginationClientItemsPerPage` option allows (or disallows) the client to set the number of items per page for the current resource.
518
         *
519
         * <div data-code-selector>
520
         *
521
         * ```php
522
         * <?php
523
         * // api/src/Entity/Book.php
524
         * use ApiPlatform\Metadata\ApiResource;
525
         *
526
         * #[ApiResource(paginationClientItemsPerPage: true)]
527
         * class Book
528
         * {
529
         *     // ...
530
         * }
531
         * ```
532
         *
533
         * ```yaml
534
         * # api/config/api_platform/resources.yaml
535
         * resources:
536
         *     App\Entity\Book:
537
         *         - paginationClientItemsPerPage: true
538
         * ```
539
         *
540
         * ```xml
541
         * <?xml version="1.0" encoding="UTF-8" ?>
542
         * <!-- api/config/api_platform/resources.xml -->
543
         *
544
         * <resources
545
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
546
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
547
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
548
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
549
         *     <resource class="App\Entity\Book" paginationClientItemsPerPage=true />
550
         * </resources>
551
         * ```
552
         *
553
         * </div>
554
         *
555
         * The number of items can now be set by adding a query parameter named `itemsPerPage`:
556
         * - `GET /books?itemsPerPage=50`
557
         */
558
        protected ?bool $paginationClientItemsPerPage = null,
559
        /**
560
         * The `paginationClientPartial` option allows (or disallows) the client to enable (or disable) the partial pagination for the current resource.
561
         *
562
         * <div data-code-selector>
563
         *
564
         * ```php
565
         * <?php
566
         * // api/src/Entity/Book.php
567
         * use ApiPlatform\Metadata\ApiResource;
568
         *
569
         * #[ApiResource(paginationClientPartial: true)]
570
         * class Book
571
         * {
572
         *     // ...
573
         * }
574
         * ```
575
         *
576
         * ```yaml
577
         * # api/config/api_platform/resources.yaml
578
         * resources:
579
         *     App\Entity\Book:
580
         *         - paginationClientPartial: true
581
         * ```
582
         *
583
         * ```xml
584
         * <?xml version="1.0" encoding="UTF-8" ?>
585
         * <!-- api/config/api_platform/resources.xml -->
586
         *
587
         * <resources
588
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
589
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
590
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
591
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
592
         *     <resource class="App\Entity\Book" paginationClientPartial=true />
593
         * </resources>
594
         * ```
595
         *
596
         * </div>
597
         *
598
         * The partial pagination can now be enabled (or disabled) by adding a query parameter named `partial`:
599
         * - `GET /books?partial=false`: disabled
600
         * - `GET /books?partial=true`: enabled
601
         */
602
        protected ?bool $paginationClientPartial = null,
603
        /**
604
         * The `paginationViaCursor` option configures the cursor-based pagination for the current resource.
605
         * Select your unique sorted field as well as the direction you'll like the pagination to go via filters.
606
         * Note that for now you have to declare a `RangeFilter` and an `OrderFilter` on the property used for the cursor-based pagination:.
607
         *
608
         * <div data-code-selector>
609
         *
610
         * ```php
611
         * <?php
612
         * // api/src/Entity/Book.php
613
         * use ApiPlatform\Metadata\ApiFilter;
614
         * use ApiPlatform\Metadata\ApiResource;
615
         * use ApiPlatform\Doctrine\Odm\Filter\OrderFilter;
616
         * use ApiPlatform\Doctrine\Odm\Filter\RangeFilter;
617
         *
618
         * #[ApiResource(paginationPartial: true, paginationViaCursor: [['field' => 'id', 'direction' => 'DESC']])]
619
         * #[ApiFilter(RangeFilter::class, properties: ["id"])]
620
         * #[ApiFilter(OrderFilter::class, properties: ["id" => "DESC"])]
621
         * class Book
622
         * {
623
         *     // ...
624
         * }
625
         * ```
626
         *
627
         * ```yaml
628
         * # api/config/api_platform/resources.yaml
629
         * resources:
630
         *     App\Entity\Book:
631
         *         - paginationPartial: true
632
         *           paginationViaCursor:
633
         *               - { field: 'id', direction: 'DESC' }
634
         *           filters: [ 'app.filters.book.range', 'app.filters.book.order' ]
635
         * ```
636
         *
637
         * ```xml
638
         * <?xml version="1.0" encoding="UTF-8" ?>
639
         * <!-- api/config/api_platform/resources.xml -->
640
         *
641
         * <resources
642
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
643
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
644
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
645
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
646
         *     <resource class="App\Entity\Book" paginationPartial=true>
647
         *         <filters>
648
         *             <filter>app.filters.book.range</filter>
649
         *             <filter>app.filters.book.order</filter>
650
         *         </filters>
651
         *         <paginationViaCursor>
652
         *             <paginationField field="id" direction="DESC" />
653
         *         </paginationViaCursor>
654
         *     </resource>
655
         * </resources>
656
         * ```
657
         *
658
         * </div>
659
         *
660
         * To know more about cursor-based pagination take a look at [this blog post on medium (draft)](https://medium.com/@sroze/74fd1d324723).
661
         */
662
        protected ?array $paginationViaCursor = null,
663
        /**
664
         * The `paginationEnabled` option enables (or disables) the pagination for the current resource.
665
         *
666
         * <div data-code-selector>
667
         *
668
         * ```php
669
         * <?php
670
         * // api/src/Entity/Book.php
671
         * use ApiPlatform\Metadata\ApiResource;
672
         *
673
         * #[ApiResource(paginationEnabled: true)]
674
         * class Book
675
         * {
676
         *     // ...
677
         * }
678
         * ```
679
         *
680
         * ```yaml
681
         * # api/config/api_platform/resources.yaml
682
         * resources:
683
         *     App\Entity\Book:
684
         *         - paginationEnabled: true
685
         * ```
686
         *
687
         * ```xml
688
         * <?xml version="1.0" encoding="UTF-8" ?>
689
         * <!-- api/config/api_platform/resources.xml -->
690
         *
691
         * <resources
692
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
693
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
694
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
695
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
696
         *     <resource class="App\Entity\Book" paginationEnabled=true />
697
         * </resources>
698
         * ```
699
         *
700
         * </div>
701
         */
702
        protected ?bool $paginationEnabled = null,
703
        /**
704
         * The PaginationExtension of API Platform performs some checks on the `QueryBuilder` to guess, in most common
705
         * cases, the correct values to use when configuring the Doctrine ORM Paginator: `$fetchJoinCollection`
706
         * argument, whether there is a join to a collection-valued association.
707
         *
708
         * When set to `true`, the Doctrine ORM Paginator will perform an additional query, in order to get the
709
         * correct number of results. You can configure this using the `paginationFetchJoinCollection` option:
710
         *
711
         * <div data-code-selector>
712
         *
713
         * ```php
714
         * <?php
715
         * // api/src/Entity/Book.php
716
         * use ApiPlatform\Metadata\ApiResource;
717
         *
718
         * #[ApiResource(paginationFetchJoinCollection: false)]
719
         * class Book
720
         * {
721
         *     // ...
722
         * }
723
         * ```
724
         *
725
         * ```yaml
726
         * # api/config/api_platform/resources.yaml
727
         * resources:
728
         *     App\Entity\Book:
729
         *         - paginationFetchJoinCollection: false
730
         * ```
731
         *
732
         * ```xml
733
         * <?xml version="1.0" encoding="UTF-8" ?>
734
         * <!-- api/config/api_platform/resources.xml -->
735
         *
736
         * <resources
737
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
738
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
739
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
740
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
741
         *     <resource class="App\Entity\Book" paginationFetchJoinCollection=false />
742
         * </resources>
743
         * ```
744
         *
745
         * </div>
746
         *
747
         * For more information, please see the [Pagination](https://www.doctrine-project.org/projects/doctrine-orm/en/current/tutorials/pagination.html) entry in the Doctrine ORM documentation.
748
         */
749
        protected ?bool $paginationFetchJoinCollection = null,
750
        /**
751
         * The PaginationExtension of API Platform performs some checks on the `QueryBuilder` to guess, in most common
752
         * cases, the correct values to use when configuring the Doctrine ORM Paginator: `$setUseOutputWalkers` setter,
753
         * whether to use output walkers.
754
         *
755
         * When set to `true`, the Doctrine ORM Paginator will use output walkers, which are compulsory for some types
756
         * of queries. You can configure this using the `paginationUseOutputWalkers` option:
757
         *
758
         * <div data-code-selector>
759
         *
760
         * ```php
761
         * <?php
762
         * // api/src/Entity/Book.php
763
         * use ApiPlatform\Metadata\ApiResource;
764
         *
765
         * #[ApiResource(paginationUseOutputWalkers: false)]
766
         * class Book
767
         * {
768
         *     // ...
769
         * }
770
         * ```
771
         *
772
         * ```yaml
773
         * # api/config/api_platform/resources.yaml
774
         * resources:
775
         *     App\Entity\Book:
776
         *         - paginationUseOutputWalkers: false
777
         * ```
778
         *
779
         * ```xml
780
         * <?xml version="1.0" encoding="UTF-8" ?>
781
         * <!-- api/config/api_platform/resources.xml -->
782
         * <resources
783
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
784
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
785
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
786
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
787
         *     <resource class="App\Entity\Book" paginationUseOutputWalkers=false />
788
         * </resources>
789
         * ```
790
         *
791
         * </div>
792
         *
793
         * For more information, please see the [Pagination](https://www.doctrine-project.org/projects/doctrine-orm/en/current/tutorials/pagination.html) entry in the Doctrine ORM documentation.
794
         */
795
        protected ?bool $paginationUseOutputWalkers = null,
796
        /**
797
         * The `paginationItemsPerPage` option defines the number of items per page for the current resource.
798
         *
799
         * <div data-code-selector>
800
         *
801
         * ```php
802
         * <?php
803
         * // api/src/Entity/Book.php
804
         * use ApiPlatform\Metadata\ApiResource;
805
         *
806
         * #[ApiResource(paginationItemsPerPage: 30)]
807
         * class Book
808
         * {
809
         *     // ...
810
         * }
811
         * ```
812
         *
813
         * ```yaml
814
         * # api/config/api_platform/resources.yaml
815
         * resources:
816
         *     App\Entity\Book:
817
         *         - paginationItemsPerPage: 30
818
         * ```
819
         *
820
         * ```xml
821
         * <?xml version="1.0" encoding="UTF-8" ?>
822
         * <!-- api/config/api_platform/resources.xml -->
823
         * <resources
824
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
825
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
826
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
827
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
828
         *     <resource class="App\Entity\Book" paginationItemsPerPage=30 />
829
         * </resources>
830
         * ```
831
         *
832
         * </div>
833
         */
834
        protected ?int $paginationItemsPerPage = null,
835
        /**
836
         * The `paginationMaximumItemsPerPage` option defines the maximum number of items per page for the current resource.
837
         *
838
         * <div data-code-selector>
839
         *
840
         * ```php
841
         * <?php
842
         * // api/src/Entity/Book.php
843
         * use ApiPlatform\Metadata\ApiResource;
844
         *
845
         * #[ApiResource(paginationMaximumItemsPerPage: 50)]
846
         * class Book
847
         * {
848
         *     // ...
849
         * }
850
         * ```
851
         *
852
         * ```yaml
853
         * # api/config/api_platform/resources.yaml
854
         * resources:
855
         *     App\Entity\Book:
856
         *         - paginationMaximumItemsPerPage: 50
857
         * ```
858
         *
859
         * ```xml
860
         * <?xml version="1.0" encoding="UTF-8" ?>
861
         * <!-- api/config/api_platform/resources.xml -->
862
         * <resources
863
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
864
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
865
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
866
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
867
         *     <resource class="App\Entity\Book" paginationMaximumItemsPerPage=50 />
868
         * </resources>
869
         * ```
870
         *
871
         * </div>
872
         */
873
        protected ?int $paginationMaximumItemsPerPage = null,
874
        /**
875
         * The `paginationPartial` option enables (or disables) the partial pagination for the current resource.
876
         *
877
         * <div data-code-selector>
878
         *
879
         * ```php
880
         * <?php
881
         * // api/src/Entity/Book.php
882
         * use ApiPlatform\Metadata\ApiResource;
883
         *
884
         * #[ApiResource(paginationPartial: true)]
885
         * class Book
886
         * {
887
         *     // ...
888
         * }
889
         * ```
890
         *
891
         * ```yaml
892
         * # api/config/api_platform/resources.yaml
893
         * resources:
894
         *     App\Entity\Book:
895
         *         - paginationPartial: true
896
         * ```
897
         *
898
         * ```xml
899
         * <?xml version="1.0" encoding="UTF-8" ?>
900
         * <!-- api/config/api_platform/resources.xml -->
901
         * <resources
902
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
903
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
904
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
905
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
906
         *     <resource class="App\Entity\Book" paginationPartial=true />
907
         * </resources>
908
         * ```
909
         *
910
         * </div>
911
         */
912
        protected ?bool $paginationPartial = null,
913
        /**
914
         * The `paginationType` option defines the type of pagination (`page` or `cursor`) to use for the current resource.
915
         *
916
         * <div data-code-selector>
917
         *
918
         * ```php
919
         * <?php
920
         * // api/src/Entity/Book.php
921
         * use ApiPlatform\Metadata\ApiResource;
922
         *
923
         * #[ApiResource(paginationType: 'page')]
924
         * class Book
925
         * {
926
         *     // ...
927
         * }
928
         * ```
929
         *
930
         * ```yaml
931
         * # api/config/api_platform/resources.yaml
932
         * resources:
933
         *     App\Entity\Book:
934
         *         - paginationType: page
935
         * ```
936
         *
937
         * ```xml
938
         * <?xml version="1.0" encoding="UTF-8" ?>
939
         * <!-- api/config/api_platform/resources.xml -->
940
         * <resources
941
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
942
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
943
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
944
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
945
         *     <resource class="App\Entity\Book" paginationType="page" />
946
         * </resources>
947
         * ```
948
         *
949
         * </div>
950
         */
951
        protected ?string $paginationType = null,
952
        protected string|\Stringable|null $security = null,
953
        protected ?string $securityMessage = null,
954
        protected string|\Stringable|null $securityPostDenormalize = null,
955
        protected ?string $securityPostDenormalizeMessage = null,
956
        protected string|\Stringable|null $securityPostValidation = null,
957
        protected ?string $securityPostValidationMessage = null,
958
        protected ?bool $compositeIdentifier = null,
959
        protected ?array $exceptionToStatus = null,
960
        protected ?bool $queryParameterValidationEnabled = null,
961
        protected ?array $links = null,
962
        protected ?array $graphQlOperations = null,
963
        $provider = null,
964
        $processor = null,
965
        protected ?OptionsInterface $stateOptions = null,
966
        protected mixed $rules = null,
967
        ?string $policy = null,
968
        array|string|null $middleware = null,
969
        array|Parameters|null $parameters = null,
970
        protected ?bool $strictQueryParameterValidation = null,
971
        protected ?bool $hideHydraOperation = null,
972
        protected ?bool $jsonStream = null,
973
        protected array $extraProperties = [],
974
        ?bool $map = null,
975
    ) {
976
        parent::__construct(
×
977
            shortName: $shortName,
×
978
            class: $class,
×
979
            description: $description,
×
980
            urlGenerationStrategy: $urlGenerationStrategy,
×
981
            deprecationReason: $deprecationReason,
×
982
            normalizationContext: $normalizationContext,
×
983
            denormalizationContext: $denormalizationContext,
×
984
            collectDenormalizationErrors: $collectDenormalizationErrors,
×
985
            validationContext: $validationContext,
×
986
            filters: $filters,
×
987
            mercure: $mercure,
×
988
            messenger: $messenger,
×
989
            input: $input,
×
990
            output: $output,
×
991
            order: $order,
×
992
            fetchPartial: $fetchPartial,
×
993
            forceEager: $forceEager,
×
994
            paginationEnabled: $paginationEnabled,
×
995
            paginationType: $paginationType,
×
996
            paginationItemsPerPage: $paginationItemsPerPage,
×
997
            paginationMaximumItemsPerPage: $paginationMaximumItemsPerPage,
×
998
            paginationPartial: $paginationPartial,
×
999
            paginationClientEnabled: $paginationClientEnabled,
×
1000
            paginationClientItemsPerPage: $paginationClientItemsPerPage,
×
1001
            paginationClientPartial: $paginationClientPartial,
×
1002
            paginationFetchJoinCollection: $paginationFetchJoinCollection,
×
1003
            paginationUseOutputWalkers: $paginationUseOutputWalkers,
×
1004
            security: $security,
×
1005
            securityMessage: $securityMessage,
×
1006
            securityPostDenormalize: $securityPostDenormalize,
×
1007
            securityPostDenormalizeMessage: $securityPostDenormalizeMessage,
×
1008
            securityPostValidation: $securityPostValidation,
×
1009
            securityPostValidationMessage: $securityPostValidationMessage,
×
1010
            provider: $provider,
×
1011
            processor: $processor,
×
1012
            stateOptions: $stateOptions,
×
1013
            parameters: $parameters,
×
1014
            rules: $rules,
×
1015
            policy: $policy,
×
1016
            middleware: $middleware,
×
1017
            strictQueryParameterValidation: $strictQueryParameterValidation,
×
1018
            hideHydraOperation: $hideHydraOperation,
×
1019
            jsonStream: $jsonStream,
×
NEW
1020
            extraProperties: $extraProperties,
×
NEW
1021
            map: $map
×
UNCOV
1022
        );
×
1023

1024
        /* @var Operations<HttpOperation> $operations> */
1025
        $this->operations = null === $operations ? null : new Operations($operations);
×
1026
        $this->provider = $provider;
×
1027
        $this->processor = $processor;
×
1028
        if (\is_string($types)) {
×
1029
            $this->types = (array) $types;
×
1030
        }
1031
    }
1032

1033
    /**
1034
     * @return Operations<HttpOperation>|null
1035
     */
1036
    public function getOperations(): ?Operations
1037
    {
1038
        return $this->operations;
×
1039
    }
1040

1041
    /**
1042
     * @param Operations<HttpOperation> $operations
1043
     */
1044
    public function withOperations(Operations $operations): static
1045
    {
1046
        $self = clone $this;
×
1047
        $self->operations = $operations;
×
1048
        $self->operations->sort();
×
1049

1050
        return $self;
×
1051
    }
1052

1053
    public function getUriTemplate(): ?string
1054
    {
1055
        return $this->uriTemplate;
×
1056
    }
1057

1058
    public function withUriTemplate(string $uriTemplate): static
1059
    {
1060
        $self = clone $this;
×
1061
        $self->uriTemplate = $uriTemplate;
×
1062

1063
        return $self;
×
1064
    }
1065

1066
    public function getTypes(): ?array
1067
    {
1068
        return $this->types;
×
1069
    }
1070

1071
    /**
1072
     * @param string[]|string $types
1073
     */
1074
    public function withTypes(array|string $types): static
1075
    {
1076
        $self = clone $this;
×
1077
        $self->types = (array) $types;
×
1078

1079
        return $self;
×
1080
    }
1081

1082
    /**
1083
     * @return array|mixed|string|null
1084
     */
1085
    public function getFormats()
1086
    {
1087
        return $this->formats;
×
1088
    }
1089

1090
    public function withFormats(mixed $formats): static
1091
    {
1092
        $self = clone $this;
×
1093
        $self->formats = $formats;
×
1094

1095
        return $self;
×
1096
    }
1097

1098
    /**
1099
     * @return array|mixed|string|null
1100
     */
1101
    public function getInputFormats()
1102
    {
1103
        return $this->inputFormats;
×
1104
    }
1105

1106
    /**
1107
     * @param mixed|null $inputFormats
1108
     */
1109
    public function withInputFormats($inputFormats): static
1110
    {
1111
        $self = clone $this;
×
1112
        $self->inputFormats = $inputFormats;
×
1113

1114
        return $self;
×
1115
    }
1116

1117
    /**
1118
     * @return array|mixed|string|null
1119
     */
1120
    public function getOutputFormats()
1121
    {
1122
        return $this->outputFormats;
×
1123
    }
1124

1125
    /**
1126
     * @param mixed|null $outputFormats
1127
     */
1128
    public function withOutputFormats($outputFormats): static
1129
    {
1130
        $self = clone $this;
×
1131
        $self->outputFormats = $outputFormats;
×
1132

1133
        return $self;
×
1134
    }
1135

1136
    /**
1137
     * @return array<string, Link>|array<string, array>|string[]|string|null
1138
     */
1139
    public function getUriVariables()
1140
    {
1141
        return $this->uriVariables;
×
1142
    }
1143

1144
    /**
1145
     * @param array<string, Link>|array<string, array>|string[]|string|null $uriVariables
1146
     */
1147
    public function withUriVariables($uriVariables): static
1148
    {
1149
        $self = clone $this;
×
1150
        $self->uriVariables = $uriVariables;
×
1151

1152
        return $self;
×
1153
    }
1154

1155
    public function getRoutePrefix(): ?string
1156
    {
1157
        return $this->routePrefix;
×
1158
    }
1159

1160
    public function withRoutePrefix(string $routePrefix): static
1161
    {
1162
        $self = clone $this;
×
1163
        $self->routePrefix = $routePrefix;
×
1164

1165
        return $self;
×
1166
    }
1167

1168
    public function getDefaults(): ?array
1169
    {
1170
        return $this->defaults;
×
1171
    }
1172

1173
    public function withDefaults(array $defaults): static
1174
    {
1175
        $self = clone $this;
×
1176
        $self->defaults = $defaults;
×
1177

1178
        return $self;
×
1179
    }
1180

1181
    public function getRequirements(): ?array
1182
    {
1183
        return $this->requirements;
×
1184
    }
1185

1186
    public function withRequirements(array $requirements): static
1187
    {
1188
        $self = clone $this;
×
1189
        $self->requirements = $requirements;
×
1190

1191
        return $self;
×
1192
    }
1193

1194
    public function getOptions(): ?array
1195
    {
1196
        return $this->options;
×
1197
    }
1198

1199
    public function withOptions(array $options): static
1200
    {
1201
        $self = clone $this;
×
1202
        $self->options = $options;
×
1203

1204
        return $self;
×
1205
    }
1206

1207
    public function getStateless(): ?bool
1208
    {
1209
        return $this->stateless;
×
1210
    }
1211

1212
    public function withStateless(bool $stateless): static
1213
    {
1214
        $self = clone $this;
×
1215
        $self->stateless = $stateless;
×
1216

1217
        return $self;
×
1218
    }
1219

1220
    public function getSunset(): ?string
1221
    {
1222
        return $this->sunset;
×
1223
    }
1224

1225
    public function withSunset(string $sunset): static
1226
    {
1227
        $self = clone $this;
×
1228
        $self->sunset = $sunset;
×
1229

1230
        return $self;
×
1231
    }
1232

1233
    public function getAcceptPatch(): ?string
1234
    {
1235
        return $this->acceptPatch;
×
1236
    }
1237

1238
    public function withAcceptPatch(string $acceptPatch): static
1239
    {
1240
        $self = clone $this;
×
1241
        $self->acceptPatch = $acceptPatch;
×
1242

1243
        return $self;
×
1244
    }
1245

1246
    public function getStatus(): ?int
1247
    {
1248
        return $this->status;
×
1249
    }
1250

1251
    /**
1252
     * @param int $status
1253
     */
1254
    public function withStatus($status): static
1255
    {
1256
        $self = clone $this;
×
1257
        $self->status = $status;
×
1258

1259
        return $self;
×
1260
    }
1261

1262
    public function getHost(): ?string
1263
    {
1264
        return $this->host;
×
1265
    }
1266

1267
    public function withHost(string $host): static
1268
    {
1269
        $self = clone $this;
×
1270
        $self->host = $host;
×
1271

1272
        return $self;
×
1273
    }
1274

1275
    public function getSchemes(): ?array
1276
    {
1277
        return $this->schemes;
×
1278
    }
1279

1280
    public function withSchemes(array $schemes): static
1281
    {
1282
        $self = clone $this;
×
1283
        $self->schemes = $schemes;
×
1284

1285
        return $self;
×
1286
    }
1287

1288
    public function getCondition(): ?string
1289
    {
1290
        return $this->condition;
×
1291
    }
1292

1293
    public function withCondition(string $condition): static
1294
    {
1295
        $self = clone $this;
×
1296
        $self->condition = $condition;
×
1297

1298
        return $self;
×
1299
    }
1300

1301
    public function getController(): ?string
1302
    {
1303
        return $this->controller;
×
1304
    }
1305

1306
    public function withController(string $controller): static
1307
    {
1308
        $self = clone $this;
×
1309
        $self->controller = $controller;
×
1310

1311
        return $self;
×
1312
    }
1313

1314
    public function getHeaders(): ?array
1315
    {
1316
        return $this->headers;
×
1317
    }
1318

1319
    public function withHeaders(array $headers): static
1320
    {
1321
        $self = clone $this;
×
1322
        $self->headers = $headers;
×
1323

1324
        return $self;
×
1325
    }
1326

1327
    public function getCacheHeaders(): ?array
1328
    {
1329
        return $this->cacheHeaders;
×
1330
    }
1331

1332
    public function withCacheHeaders(array $cacheHeaders): static
1333
    {
1334
        $self = clone $this;
×
1335
        $self->cacheHeaders = $cacheHeaders;
×
1336

1337
        return $self;
×
1338
    }
1339

1340
    /**
1341
     * @return string[]|null
1342
     */
1343
    public function getHydraContext(): ?array
1344
    {
1345
        return $this->hydraContext;
×
1346
    }
1347

1348
    public function withHydraContext(array $hydraContext): static
1349
    {
1350
        $self = clone $this;
×
1351
        $self->hydraContext = $hydraContext;
×
1352

1353
        return $self;
×
1354
    }
1355

1356
    public function getOpenapi(): bool|OpenApiOperation|null
1357
    {
1358
        return $this->openapi;
×
1359
    }
1360

1361
    public function withOpenapi(bool|OpenApiOperation $openapi): static
1362
    {
1363
        $self = clone $this;
×
1364
        $self->openapi = $openapi;
×
1365

1366
        return $self;
×
1367
    }
1368

1369
    public function getPaginationViaCursor(): ?array
1370
    {
1371
        return $this->paginationViaCursor;
×
1372
    }
1373

1374
    public function withPaginationViaCursor(array $paginationViaCursor): static
1375
    {
1376
        $self = clone $this;
×
1377
        $self->paginationViaCursor = $paginationViaCursor;
×
1378

1379
        return $self;
×
1380
    }
1381

1382
    public function getExceptionToStatus(): ?array
1383
    {
1384
        return $this->exceptionToStatus;
×
1385
    }
1386

1387
    public function withExceptionToStatus(array $exceptionToStatus): static
1388
    {
1389
        $self = clone $this;
×
1390
        $self->exceptionToStatus = $exceptionToStatus;
×
1391

1392
        return $self;
×
1393
    }
1394

1395
    /**
1396
     * @return GraphQlOperation[]
1397
     */
1398
    public function getGraphQlOperations(): ?array
1399
    {
1400
        return $this->graphQlOperations;
×
1401
    }
1402

1403
    public function withGraphQlOperations(array $graphQlOperations): static
1404
    {
1405
        $self = clone $this;
×
1406
        $self->graphQlOperations = $graphQlOperations;
×
1407

1408
        return $self;
×
1409
    }
1410

1411
    public function getLinks(): ?array
1412
    {
1413
        return $this->links;
×
1414
    }
1415

1416
    /**
1417
     * @param Link[] $links
1418
     */
1419
    public function withLinks(array $links): static
1420
    {
1421
        $self = clone $this;
×
1422
        $self->links = $links;
×
1423

1424
        return $self;
×
1425
    }
1426
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc