vendor/api-platform/core/src/Metadata/ApiResource.php line 32

  1. <?php
  2. /*
  3.  * This file is part of the API Platform project.
  4.  *
  5.  * (c) Kévin Dunglas <dunglas@gmail.com>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. declare(strict_types=1);
  11. namespace ApiPlatform\Metadata;
  12. use ApiPlatform\Metadata\GraphQl\Operation as GraphQlOperation;
  13. use ApiPlatform\OpenApi\Model\Operation as OpenApiOperation;
  14. use ApiPlatform\State\OptionsInterface;
  15. /**
  16.  * Resource metadata attribute.
  17.  *
  18.  * The API Resource attribute declares the behaviors attached to a Resource inside API Platform.
  19.  * This class is immutable, and if you set a value yourself, API Platform will not override the value.
  20.  * The API Resource helps sharing options with operations.
  21.  *
  22.  * Read more about how metadata works [here](/docs/in-depth/metadata).
  23.  *
  24.  * @author Antoine Bluchet <soyuka@gmail.com>
  25.  */
  26. #[\Attribute(\Attribute::TARGET_CLASS \Attribute::IS_REPEATABLE)]
  27. class ApiResource extends Metadata
  28. {
  29.     use WithResourceTrait;
  30.     protected ?Operations $operations;
  31.     /**
  32.      * @param array<int, HttpOperation>|array<string, HttpOperation>|Operations|null $operations   Operations is a list of HttpOperation
  33.      * @param array<string, Link>|array<string, mixed[]>|string[]|string|null        $uriVariables
  34.      * @param string|callable|null                                                   $provider
  35.      * @param string|callable|null                                                   $processor
  36.      * @param mixed|null                                                             $mercure
  37.      * @param mixed|null                                                             $messenger
  38.      * @param mixed|null                                                             $input
  39.      * @param mixed|null                                                             $output
  40.      */
  41.     public function __construct(
  42.         /**
  43.          * The URI template represents your resource IRI with optional variables. It follows [RFC 6570](https://www.rfc-editor.org/rfc/rfc6570.html).
  44.          * API Platform generates this URL for you if you leave this empty.
  45.          */
  46.         protected ?string $uriTemplate null,
  47.         /**
  48.          * The short name of your resource is a unique name that identifies your resource.
  49.          * 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.
  50.          */
  51.         protected ?string $shortName null,
  52.         /**
  53.          * A description for this resource that will show on documentations.
  54.          */
  55.         protected ?string $description null,
  56.         /**
  57.          * The RDF types of this resource.
  58.          * 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`
  59.          * or an array of string `['https://schema.org/Flight', 'https://schema.org/BusTrip']`.
  60.          */
  61.         protected string|array|null $types null,
  62.         /**
  63.          * Operations is a list of [HttpOperation](./HttpOperation).
  64.          *
  65.          * By default API Platform declares operations representing CRUD routes if you don't specify this parameter:
  66.          *
  67.          * ```php
  68.          * #[ApiResource(
  69.          *     operations: [
  70.          *         new Get(uriTemplate: '/books/{id}'),
  71.          *         // The GetCollection operation returns a list of Books.
  72.          *         new GetCollection(uriTemplate: '/books'),
  73.          *         new Post(uriTemplate: '/books'),
  74.          *         new Patch(uriTemplate: '/books/{id}'),
  75.          *         new Delete(uriTemplate: '/books/{id}'),
  76.          *     ]
  77.          * )]
  78.          *
  79.          * ```
  80.          *
  81.          * Try this live at [play.api-platform.com/api-resource](play.api-platform.com).
  82.          */
  83.         $operations null,
  84.         /**
  85.          * The `formats` option allows you to customize content negotiation. By default API Platform supports JsonLd, Hal, JsonAPI.
  86.          * For other formats we use the Symfony Serializer.
  87.          *
  88.          * ```php
  89.          * #[ApiResource(
  90.          *   formats: [
  91.          *       'jsonld' => ['application/ld+json'],
  92.          *       'jsonhal' => ['application/hal+json'],
  93.          *       'jsonapi' => ['application/vnd.api+json'],
  94.          *       'json' =>    ['application/json'],
  95.          *       'xml' =>     ['application/xml', 'text/xml'],
  96.          *       'yaml' =>    ['application/x-yaml'],
  97.          *       'csv' =>     ['text/csv'],
  98.          *       'html' =>    ['text/html'],
  99.          *       'myformat' =>['application/vnd.myformat'],
  100.          *   ]
  101.          * )]
  102.          * ```
  103.          *
  104.          * Learn more about custom formats in the [dedicated guide](/guides/custom-formats).
  105.          */
  106.         protected array|string|null $formats null,
  107.         /**
  108.          * The `inputFormats` option allows you to customize content negotiation for HTTP bodies:.
  109.          *
  110.          * ```php
  111.          *  #[ApiResource(formats: ['jsonld', 'csv' => ['text/csv']], operations: [
  112.          *      new Patch(inputFormats: ['json' => ['application/merge-patch+json']]),
  113.          *      new GetCollection(),
  114.          *      new Post(),
  115.          *  ])]
  116.          * ```
  117.          */
  118.         protected array|string|null $inputFormats null,
  119.         /**
  120.          * The `outputFormats` option allows you to customize content negotiation for HTTP responses.
  121.          */
  122.         protected array|string|null $outputFormats null,
  123.         /**
  124.          * The `uriVariables` configuration allows to configure to what each URI Variable.
  125.          * With [simple string expansion](https://www.rfc-editor.org/rfc/rfc6570.html#section-3.2.2), we read the input
  126.          * value and match this to the given `Link`. Note that this setting is usually used on an operation directly:.
  127.          *
  128.          * ```php
  129.          *   #[ApiResource(
  130.          *       uriTemplate: '/companies/{companyId}/employees/{id}',
  131.          *       uriVariables: [
  132.          *           'companyId' => new Link(fromClass: Company::class, toProperty: 'company']),
  133.          *           'id' => new Link(fromClass: Employee::class)
  134.          *       ],
  135.          *       operations: [new Get()]
  136.          *   )]
  137.          * ```
  138.          *
  139.          * For more examples, read our guide on [subresources](/guides/subresources).
  140.          */
  141.         protected $uriVariables null,
  142.         /**
  143.          * The `routePrefix` allows you to configure a prefix that will apply to this resource.
  144.          *
  145.          * ```php
  146.          *   #[ApiResource(
  147.          *       routePrefix: '/books',
  148.          *       operations: [new Get(uriTemplate: '/{id}')]
  149.          *   )]
  150.          * ```
  151.          *
  152.          * This resource will be accessible through `/books/{id}`.
  153.          */
  154.         protected ?string $routePrefix null,
  155.         /**
  156.          * 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.
  157.          */
  158.         protected ?array $defaults null,
  159.         /**
  160.          * The `requirements` option configures the Symfony's Route requirements.
  161.          */
  162.         protected ?array $requirements null,
  163.         /**
  164.          * The `options` option configures the Symfony's Route options.
  165.          */
  166.         protected ?array $options null,
  167.         /**
  168.          * The `stateless` option configures the Symfony's Route stateless option.
  169.          */
  170.         protected ?bool $stateless null,
  171.         /**
  172.          * The `sunset` option indicates when a deprecated operation will be removed.
  173.          *
  174.          * <div data-code-selector>
  175.          *
  176.          * ```php
  177.          * <?php
  178.          * // api/src/Entity/Parchment.php
  179.          * use ApiPlatform\Metadata\ApiResource;
  180.          *
  181.          * #[ApiResource(deprecationReason: 'Create a Book instead', sunset: '01/01/2020')]
  182.          * class Parchment
  183.          * {
  184.          *     // ...
  185.          * }
  186.          * ```
  187.          *
  188.          * ```yaml
  189.          * # api/config/api_platform/resources.yaml
  190.          * resources:
  191.          *     App\Entity\Parchment:
  192.          *         - deprecationReason: 'Create a Book instead'
  193.          *           sunset: '01/01/2020'
  194.          * ```
  195.          *
  196.          * ```xml
  197.          * <?xml version="1.0" encoding="UTF-8" ?>
  198.          * <!-- api/config/api_platform/resources.xml -->
  199.          *
  200.          * <resources
  201.          *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
  202.          *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  203.          *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
  204.          *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
  205.          *     <resource class="App\Entity\Parchment" deprecationReason="Create a Book instead" sunset="01/01/2020" />
  206.          * </resources>
  207.          * ```
  208.          *
  209.          * </div>
  210.          */
  211.         protected ?string $sunset null,
  212.         protected ?string $acceptPatch null,
  213.         protected ?int $status null,
  214.         protected ?string $host null,
  215.         protected ?array $schemes null,
  216.         protected ?string $condition null,
  217.         protected ?string $controller null,
  218.         protected ?string $class null,
  219.         /**
  220.          * The `urlGenerationStrategy` option configures the url generation strategy.
  221.          *
  222.          * See: [UrlGeneratorInterface::class](/reference/Api/UrlGeneratorInterface)
  223.          *
  224.          * <div data-code-selector>
  225.          *
  226.          * ```php
  227.          * <?php
  228.          * // api/src/Entity/Book.php
  229.          * use ApiPlatform\Metadata\ApiResource;
  230.          * use ApiPlatform\Api\UrlGeneratorInterface;
  231.          *
  232.          * #[ApiResource(urlGenerationStrategy: UrlGeneratorInterface::ABS_URL)]
  233.          * class Book
  234.          * {
  235.          *     // ...
  236.          * }
  237.          * ```
  238.          *
  239.          * ```yaml
  240.          * # api/config/api_platform/resources.yaml
  241.          * App\Entity\Book:
  242.          *     urlGenerationStrategy: !php/const ApiPlatform\Api\UrlGeneratorInterface::ABS_URL
  243.          * ```
  244.          *
  245.          * ```xml
  246.          * <?xml version="1.0" encoding="UTF-8" ?>
  247.          * <!-- api/config/api_platform/resources.xml -->
  248.          *
  249.          * <resources
  250.          *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
  251.          *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  252.          *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
  253.          *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
  254.          *     <resource class="App\Entity\Book" urlGenerationStrategy="0" />
  255.          * </resources>
  256.          * ```
  257.          *
  258.          * </div>
  259.          */
  260.         protected ?int $urlGenerationStrategy null,
  261.         /**
  262.          * The `deprecationReason` option deprecates the current resource with a deprecation message.
  263.          *
  264.          * <div data-code-selector>
  265.          *
  266.          * ```php
  267.          * <?php
  268.          * // api/src/Entity/Parchment.php
  269.          * use ApiPlatform\Metadata\ApiResource;
  270.          *
  271.          * #[ApiResource(deprecationReason: 'Create a Book instead')]
  272.          * class Parchment
  273.          * {
  274.          *     // ...
  275.          * }
  276.          * ```
  277.          *
  278.          * ```yaml
  279.          * # api/config/api_platform/resources.yaml
  280.          * resources:
  281.          *     App\Entity\Parchment:
  282.          *         - deprecationReason: 'Create a Book instead'
  283.          * ```
  284.          *
  285.          * ```xml
  286.          * <?xml version="1.0" encoding="UTF-8" ?>
  287.          * <!-- api/config/api_platform/resources.xml -->
  288.          *
  289.          * <resources
  290.          *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
  291.          *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  292.          *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
  293.          *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
  294.          *     <resource class="App\Entity\Parchment" deprecationReason="Create a Book instead" />
  295.          * </resources>
  296.          * ```
  297.          *
  298.          * </div>
  299.          *
  300.          * - 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
  301.          * - With Swagger / OpenAPI, [a `deprecated` property](https://swagger.io/docs/specification/2-0/paths-and-operations/) will be added
  302.          * - With GraphQL, the [`isDeprecated` and `deprecationReason` properties](https://facebook.github.io/graphql/June2018/#sec-Deprecation) will be added to the schema
  303.          */
  304.         protected ?string $deprecationReason null,
  305.         protected ?array $cacheHeaders null,
  306.         protected ?array $normalizationContext null,
  307.         protected ?array $denormalizationContext null,
  308.         protected ?bool $collectDenormalizationErrors null,
  309.         protected ?array $hydraContext null,
  310.         protected ?array $openapiContext null// TODO Remove in 4.0
  311.         protected bool|OpenApiOperation|null $openapi null,
  312.         /**
  313.          * The `validationContext` option configures the context of validation for the current ApiResource.
  314.          * You can, for instance, describe the validation groups that will be used:.
  315.          *
  316.          * ```php
  317.          * #[ApiResource(validationContext: ['groups' => ['a', 'b']])]
  318.          * ```
  319.          *
  320.          * For more examples, read our guide on [validation](/guides/validation).
  321.          */
  322.         protected ?array $validationContext null,
  323.         /**
  324.          * The `filters` option configures the filters (declared as services) available on the collection routes for the current resource.
  325.          *
  326.          * <div data-code-selector>
  327.          *
  328.          * ```php
  329.          * <?php
  330.          * // api/src/Entity/Book.php
  331.          * use ApiPlatform\Metadata\ApiResource;
  332.          *
  333.          * #[ApiResource(filters: ['app.filters.book.search'])]
  334.          * class Book
  335.          * {
  336.          *     // ...
  337.          * }
  338.          * ```
  339.          *
  340.          * ```yaml
  341.          * # api/config/api_platform/resources.yaml
  342.          * resources:
  343.          *     App\Entity\Book:
  344.          *         - filters: ['app.filters.book.search']
  345.          * ```
  346.          *
  347.          * ```xml
  348.          * <?xml version="1.0" encoding="UTF-8" ?>
  349.          * <!-- api/config/api_platform/resources.xml -->
  350.          * <resources
  351.          *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
  352.          *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  353.          *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
  354.          *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
  355.          *     <resource class="App\Entity\Book">
  356.          *         <filters>
  357.          *             <filter>app.filters.book.search</filter>
  358.          *         </filters>
  359.          *     </resource>
  360.          * </resources>
  361.          * ```
  362.          *
  363.          * </div>
  364.          */
  365.         protected ?array $filters null,
  366.         protected ?bool $elasticsearch null,
  367.         protected $mercure null,
  368.         /**
  369.          * The `messenger` option dispatches the current resource through the Message Bus.
  370.          *
  371.          * <div data-code-selector>
  372.          *
  373.          * ```php
  374.          * <?php
  375.          * // api/src/Entity/Book.php
  376.          * use ApiPlatform\Metadata\ApiResource;
  377.          *
  378.          * #[ApiResource(messenger: true)]
  379.          * class Book
  380.          * {
  381.          *     // ...
  382.          * }
  383.          * ```
  384.          *
  385.          * ```yaml
  386.          * # api/config/api_platform/resources.yaml
  387.          * resources:
  388.          *     App\Entity\Book:
  389.          *         - messenger: true
  390.          * ```
  391.          *
  392.          * ```xml
  393.          * <?xml version="1.0" encoding="UTF-8" ?>
  394.          * <!-- api/config/api_platform/resources.xml -->
  395.          *
  396.          * <resources
  397.          *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
  398.          *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  399.          *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
  400.          *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
  401.          *     <resource class="App\Entity\Book" messenger=true />
  402.          * </resources>
  403.          * ```
  404.          *
  405.          * </div>
  406.          *
  407.          * Note: when using `messenger=true` on a Doctrine entity, the Doctrine Processor is not called. If you want it
  408.          * to be called, you should [decorate a built-in state processor](/docs/guide/hook-a-persistence-layer-with-a-processor)
  409.          * and implement your own logic.
  410.          *
  411.          * Read [how to use Messenger with an Input object](/docs/guide/using-messenger-with-an-input-object).
  412.          *
  413.          * @var string|bool|null
  414.          */
  415.         protected $messenger null,
  416.         protected $input null,
  417.         protected $output null,
  418.         /**
  419.          * Override the default order of items in your collection. Note that this is handled by our doctrine filters such as
  420.          * the [OrderFilter](/docs/reference/Doctrine/Orm/Filter/OrderFilter).
  421.          *
  422.          * By default, items in the collection are ordered in ascending (ASC) order by their resource identifier(s). If you want to
  423.          * customize this order, you must add an `order` attribute on your ApiResource annotation:
  424.          *
  425.          * <div data-code-selector>
  426.          *
  427.          * ```php
  428.          * <?php
  429.          * // api/src/Entity/Book.php
  430.          * namespace App\Entity;
  431.          *
  432.          * use ApiPlatform\Metadata\ApiResource;
  433.          *
  434.          * #[ApiResource(order: ['foo' => 'ASC'])]
  435.          * class Book
  436.          * {
  437.          * }
  438.          * ```
  439.          *
  440.          * ```yaml
  441.          * # api/config/api_platform/resources/Book.yaml
  442.          * App\Entity\Book:
  443.          *     order:
  444.          *         foo: ASC
  445.          * ```
  446.          *
  447.          * </div>
  448.          *
  449.          * This `order` attribute is used as an array: the key defines the order field, the values defines the direction.
  450.          * If you only specify the key, `ASC` direction will be used as default.
  451.          */
  452.         protected ?array $order null,
  453.         protected ?bool $fetchPartial null,
  454.         protected ?bool $forceEager null,
  455.         /**
  456.          * The `paginationClientEnabled` option allows (or disallows) the client to enable (or disable) the pagination for the current resource.
  457.          *
  458.          * <div data-code-selector>
  459.          *
  460.          * ```php
  461.          * <?php
  462.          * // api/src/Entity/Book.php
  463.          * use ApiPlatform\Metadata\ApiResource;
  464.          *
  465.          * #[ApiResource(paginationClientEnabled: true)]
  466.          * class Book
  467.          * {
  468.          *     // ...
  469.          * }
  470.          * ```
  471.          *
  472.          * ```yaml
  473.          * # api/config/api_platform/resources.yaml
  474.          * resources:
  475.          *     App\Entity\Book:
  476.          *         - paginationClientEnabled: true
  477.          * ```
  478.          *
  479.          * ```xml
  480.          * <?xml version="1.0" encoding="UTF-8" ?>
  481.          * <!-- api/config/api_platform/resources.xml -->
  482.          *
  483.          * <resources
  484.          *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
  485.          *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  486.          *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
  487.          *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
  488.          *     <resource class="App\Entity\Book" paginationClientEnabled=true />
  489.          * </resources>
  490.          * ```
  491.          *
  492.          * </div>
  493.          *
  494.          * The pagination can now be enabled (or disabled) by adding a query parameter named `pagination`:
  495.          * - `GET /books?pagination=false`: disabled
  496.          * - `GET /books?pagination=true`: enabled
  497.          */
  498.         protected ?bool $paginationClientEnabled null,
  499.         /**
  500.          * The `paginationClientItemsPerPage` option allows (or disallows) the client to set the number of items per page for the current resource.
  501.          *
  502.          * <div data-code-selector>
  503.          *
  504.          * ```php
  505.          * <?php
  506.          * // api/src/Entity/Book.php
  507.          * use ApiPlatform\Metadata\ApiResource;
  508.          *
  509.          * #[ApiResource(paginationClientItemsPerPage: true)]
  510.          * class Book
  511.          * {
  512.          *     // ...
  513.          * }
  514.          * ```
  515.          *
  516.          * ```yaml
  517.          * # api/config/api_platform/resources.yaml
  518.          * resources:
  519.          *     App\Entity\Book:
  520.          *         - paginationClientItemsPerPage: true
  521.          * ```
  522.          *
  523.          * ```xml
  524.          * <?xml version="1.0" encoding="UTF-8" ?>
  525.          * <!-- api/config/api_platform/resources.xml -->
  526.          *
  527.          * <resources
  528.          *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
  529.          *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  530.          *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
  531.          *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
  532.          *     <resource class="App\Entity\Book" paginationClientItemsPerPage=true />
  533.          * </resources>
  534.          * ```
  535.          *
  536.          * </div>
  537.          *
  538.          * The number of items can now be set by adding a query parameter named `itemsPerPage`:
  539.          * - `GET /books?itemsPerPage=50`
  540.          */
  541.         protected ?bool $paginationClientItemsPerPage null,
  542.         /**
  543.          * The `paginationClientPartial` option allows (or disallows) the client to enable (or disable) the partial pagination for the current resource.
  544.          *
  545.          * <div data-code-selector>
  546.          *
  547.          * ```php
  548.          * <?php
  549.          * // api/src/Entity/Book.php
  550.          * use ApiPlatform\Metadata\ApiResource;
  551.          *
  552.          * #[ApiResource(paginationClientPartial: true)]
  553.          * class Book
  554.          * {
  555.          *     // ...
  556.          * }
  557.          * ```
  558.          *
  559.          * ```yaml
  560.          * # api/config/api_platform/resources.yaml
  561.          * resources:
  562.          *     App\Entity\Book:
  563.          *         - paginationClientPartial: true
  564.          * ```
  565.          *
  566.          * ```xml
  567.          * <?xml version="1.0" encoding="UTF-8" ?>
  568.          * <!-- api/config/api_platform/resources.xml -->
  569.          *
  570.          * <resources
  571.          *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
  572.          *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  573.          *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
  574.          *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
  575.          *     <resource class="App\Entity\Book" paginationClientPartial=true />
  576.          * </resources>
  577.          * ```
  578.          *
  579.          * </div>
  580.          *
  581.          * The partial pagination can now be enabled (or disabled) by adding a query parameter named `partial`:
  582.          * - `GET /books?partial=false`: disabled
  583.          * - `GET /books?partial=true`: enabled
  584.          */
  585.         protected ?bool $paginationClientPartial null,
  586.         /**
  587.          * The `paginationViaCursor` option configures the cursor-based pagination for the current resource.
  588.          * Select your unique sorted field as well as the direction you'll like the pagination to go via filters.
  589.          * Note that for now you have to declare a `RangeFilter` and an `OrderFilter` on the property used for the cursor-based pagination:.
  590.          *
  591.          * <div data-code-selector>
  592.          *
  593.          * ```php
  594.          * <?php
  595.          * // api/src/Entity/Book.php
  596.          * use ApiPlatform\Metadata\ApiFilter;
  597.          * use ApiPlatform\Metadata\ApiResource;
  598.          * use ApiPlatform\Doctrine\Odm\Filter\OrderFilter;
  599.          * use ApiPlatform\Doctrine\Odm\Filter\RangeFilter;
  600.          *
  601.          * #[ApiResource(paginationPartial: true, paginationViaCursor: [['field' => 'id', 'direction' => 'DESC']])]
  602.          * #[ApiFilter(RangeFilter::class, properties: ["id"])]
  603.          * #[ApiFilter(OrderFilter::class, properties: ["id" => "DESC"])]
  604.          * class Book
  605.          * {
  606.          *     // ...
  607.          * }
  608.          * ```
  609.          *
  610.          * ```yaml
  611.          * # api/config/api_platform/resources.yaml
  612.          * resources:
  613.          *     App\Entity\Book:
  614.          *         - paginationPartial: true
  615.          *           paginationViaCursor:
  616.          *               - { field: 'id', direction: 'DESC' }
  617.          *           filters: [ 'app.filters.book.range', 'app.filters.book.order' ]
  618.          * ```
  619.          *
  620.          * ```xml
  621.          * <?xml version="1.0" encoding="UTF-8" ?>
  622.          * <!-- api/config/api_platform/resources.xml -->
  623.          *
  624.          * <resources
  625.          *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
  626.          *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  627.          *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
  628.          *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
  629.          *     <resource class="App\Entity\Book" paginationPartial=true>
  630.          *         <filters>
  631.          *             <filter>app.filters.book.range</filter>
  632.          *             <filter>app.filters.book.order</filter>
  633.          *         </filters>
  634.          *         <paginationViaCursor>
  635.          *             <paginationField field="id" direction="DESC" />
  636.          *         </paginationViaCursor>
  637.          *     </resource>
  638.          * </resources>
  639.          * ```
  640.          *
  641.          * </div>
  642.          *
  643.          * To know more about cursor-based pagination take a look at [this blog post on medium (draft)](https://medium.com/@sroze/74fd1d324723).
  644.          */
  645.         protected ?array $paginationViaCursor null,
  646.         /**
  647.          * The `paginationEnabled` option enables (or disables) the pagination for the current resource.
  648.          *
  649.          * <div data-code-selector>
  650.          *
  651.          * ```php
  652.          * <?php
  653.          * // api/src/Entity/Book.php
  654.          * use ApiPlatform\Metadata\ApiResource;
  655.          *
  656.          * #[ApiResource(paginationEnabled: true)]
  657.          * class Book
  658.          * {
  659.          *     // ...
  660.          * }
  661.          * ```
  662.          *
  663.          * ```yaml
  664.          * # api/config/api_platform/resources.yaml
  665.          * resources:
  666.          *     App\Entity\Book:
  667.          *         - paginationEnabled: true
  668.          * ```
  669.          *
  670.          * ```xml
  671.          * <?xml version="1.0" encoding="UTF-8" ?>
  672.          * <!-- api/config/api_platform/resources.xml -->
  673.          *
  674.          * <resources
  675.          *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
  676.          *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  677.          *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
  678.          *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
  679.          *     <resource class="App\Entity\Book" paginationEnabled=true />
  680.          * </resources>
  681.          * ```
  682.          *
  683.          * </div>
  684.          */
  685.         protected ?bool $paginationEnabled null,
  686.         /**
  687.          * The PaginationExtension of API Platform performs some checks on the `QueryBuilder` to guess, in most common
  688.          * cases, the correct values to use when configuring the Doctrine ORM Paginator: `$fetchJoinCollection`
  689.          * argument, whether there is a join to a collection-valued association.
  690.          *
  691.          * When set to `true`, the Doctrine ORM Paginator will perform an additional query, in order to get the
  692.          * correct number of results. You can configure this using the `paginationFetchJoinCollection` option:
  693.          *
  694.          * <div data-code-selector>
  695.          *
  696.          * ```php
  697.          * <?php
  698.          * // api/src/Entity/Book.php
  699.          * use ApiPlatform\Metadata\ApiResource;
  700.          *
  701.          * #[ApiResource(paginationFetchJoinCollection: false)]
  702.          * class Book
  703.          * {
  704.          *     // ...
  705.          * }
  706.          * ```
  707.          *
  708.          * ```yaml
  709.          * # api/config/api_platform/resources.yaml
  710.          * resources:
  711.          *     App\Entity\Book:
  712.          *         - paginationFetchJoinCollection: false
  713.          * ```
  714.          *
  715.          * ```xml
  716.          * <?xml version="1.0" encoding="UTF-8" ?>
  717.          * <!-- api/config/api_platform/resources.xml -->
  718.          *
  719.          * <resources
  720.          *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
  721.          *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  722.          *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
  723.          *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
  724.          *     <resource class="App\Entity\Book" paginationFetchJoinCollection=false />
  725.          * </resources>
  726.          * ```
  727.          *
  728.          * </div>
  729.          *
  730.          * 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.
  731.          */
  732.         protected ?bool $paginationFetchJoinCollection null,
  733.         /**
  734.          * The PaginationExtension of API Platform performs some checks on the `QueryBuilder` to guess, in most common
  735.          * cases, the correct values to use when configuring the Doctrine ORM Paginator: `$setUseOutputWalkers` setter,
  736.          * whether to use output walkers.
  737.          *
  738.          * When set to `true`, the Doctrine ORM Paginator will use output walkers, which are compulsory for some types
  739.          * of queries. You can configure this using the `paginationUseOutputWalkers` option:
  740.          *
  741.          * <div data-code-selector>
  742.          *
  743.          * ```php
  744.          * <?php
  745.          * // api/src/Entity/Book.php
  746.          * use ApiPlatform\Metadata\ApiResource;
  747.          *
  748.          * #[ApiResource(paginationUseOutputWalkers: false)]
  749.          * class Book
  750.          * {
  751.          *     // ...
  752.          * }
  753.          * ```
  754.          *
  755.          * ```yaml
  756.          * # api/config/api_platform/resources.yaml
  757.          * resources:
  758.          *     App\Entity\Book:
  759.          *         - paginationUseOutputWalkers: false
  760.          * ```
  761.          *
  762.          * ```xml
  763.          * <?xml version="1.0" encoding="UTF-8" ?>
  764.          * <!-- api/config/api_platform/resources.xml -->
  765.          * <resources
  766.          *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
  767.          *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  768.          *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
  769.          *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
  770.          *     <resource class="App\Entity\Book" paginationUseOutputWalkers=false />
  771.          * </resources>
  772.          * ```
  773.          *
  774.          * </div>
  775.          *
  776.          * 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.
  777.          */
  778.         protected ?bool $paginationUseOutputWalkers null,
  779.         /**
  780.          * The `paginationItemsPerPage` option defines the number of items per page for the current resource.
  781.          *
  782.          * <div data-code-selector>
  783.          *
  784.          * ```php
  785.          * <?php
  786.          * // api/src/Entity/Book.php
  787.          * use ApiPlatform\Metadata\ApiResource;
  788.          *
  789.          * #[ApiResource(paginationItemsPerPage: 30)]
  790.          * class Book
  791.          * {
  792.          *     // ...
  793.          * }
  794.          * ```
  795.          *
  796.          * ```yaml
  797.          * # api/config/api_platform/resources.yaml
  798.          * resources:
  799.          *     App\Entity\Book:
  800.          *         - paginationItemsPerPage: 30
  801.          * ```
  802.          *
  803.          * ```xml
  804.          * <?xml version="1.0" encoding="UTF-8" ?>
  805.          * <!-- api/config/api_platform/resources.xml -->
  806.          * <resources
  807.          *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
  808.          *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  809.          *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
  810.          *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
  811.          *     <resource class="App\Entity\Book" paginationItemsPerPage=30 />
  812.          * </resources>
  813.          * ```
  814.          *
  815.          * </div>
  816.          */
  817.         protected ?int $paginationItemsPerPage null,
  818.         /**
  819.          * The `paginationMaximumItemsPerPage` option defines the maximum number of items per page for the current resource.
  820.          *
  821.          * <div data-code-selector>
  822.          *
  823.          * ```php
  824.          * <?php
  825.          * // api/src/Entity/Book.php
  826.          * use ApiPlatform\Metadata\ApiResource;
  827.          *
  828.          * #[ApiResource(paginationMaximumItemsPerPage: 50)]
  829.          * class Book
  830.          * {
  831.          *     // ...
  832.          * }
  833.          * ```
  834.          *
  835.          * ```yaml
  836.          * # api/config/api_platform/resources.yaml
  837.          * resources:
  838.          *     App\Entity\Book:
  839.          *         - paginationMaximumItemsPerPage: 50
  840.          * ```
  841.          *
  842.          * ```xml
  843.          * <?xml version="1.0" encoding="UTF-8" ?>
  844.          * <!-- api/config/api_platform/resources.xml -->
  845.          * <resources
  846.          *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
  847.          *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  848.          *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
  849.          *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
  850.          *     <resource class="App\Entity\Book" paginationMaximumItemsPerPage=50 />
  851.          * </resources>
  852.          * ```
  853.          *
  854.          * </div>
  855.          */
  856.         protected ?int $paginationMaximumItemsPerPage null,
  857.         /**
  858.          * The `paginationPartial` option enables (or disables) the partial pagination for the current resource.
  859.          *
  860.          * <div data-code-selector>
  861.          *
  862.          * ```php
  863.          * <?php
  864.          * // api/src/Entity/Book.php
  865.          * use ApiPlatform\Metadata\ApiResource;
  866.          *
  867.          * #[ApiResource(paginationPartial: true)]
  868.          * class Book
  869.          * {
  870.          *     // ...
  871.          * }
  872.          * ```
  873.          *
  874.          * ```yaml
  875.          * # api/config/api_platform/resources.yaml
  876.          * resources:
  877.          *     App\Entity\Book:
  878.          *         - paginationPartial: true
  879.          * ```
  880.          *
  881.          * ```xml
  882.          * <?xml version="1.0" encoding="UTF-8" ?>
  883.          * <!-- api/config/api_platform/resources.xml -->
  884.          * <resources
  885.          *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
  886.          *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  887.          *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
  888.          *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
  889.          *     <resource class="App\Entity\Book" paginationPartial=true />
  890.          * </resources>
  891.          * ```
  892.          *
  893.          * </div>
  894.          */
  895.         protected ?bool $paginationPartial null,
  896.         /**
  897.          * The `paginationType` option defines the type of pagination (`page` or `cursor`) to use for the current resource.
  898.          *
  899.          * <div data-code-selector>
  900.          *
  901.          * ```php
  902.          * <?php
  903.          * // api/src/Entity/Book.php
  904.          * use ApiPlatform\Metadata\ApiResource;
  905.          *
  906.          * #[ApiResource(paginationType: 'page')]
  907.          * class Book
  908.          * {
  909.          *     // ...
  910.          * }
  911.          * ```
  912.          *
  913.          * ```yaml
  914.          * # api/config/api_platform/resources.yaml
  915.          * resources:
  916.          *     App\Entity\Book:
  917.          *         - paginationType: page
  918.          * ```
  919.          *
  920.          * ```xml
  921.          * <?xml version="1.0" encoding="UTF-8" ?>
  922.          * <!-- api/config/api_platform/resources.xml -->
  923.          * <resources
  924.          *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
  925.          *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  926.          *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
  927.          *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
  928.          *     <resource class="App\Entity\Book" paginationType="page" />
  929.          * </resources>
  930.          * ```
  931.          *
  932.          * </div>
  933.          */
  934.         protected ?string $paginationType null,
  935.         protected ?string $security null,
  936.         protected ?string $securityMessage null,
  937.         protected ?string $securityPostDenormalize null,
  938.         protected ?string $securityPostDenormalizeMessage null,
  939.         protected ?string $securityPostValidation null,
  940.         protected ?string $securityPostValidationMessage null,
  941.         protected ?bool $compositeIdentifier null,
  942.         protected ?array $exceptionToStatus null,
  943.         protected ?bool $queryParameterValidationEnabled null,
  944.         protected ?array $links null,
  945.         protected ?array $graphQlOperations null,
  946.         $provider null,
  947.         $processor null,
  948.         protected ?OptionsInterface $stateOptions null,
  949.         protected array $extraProperties = [],
  950.     ) {
  951.         parent::__construct(
  952.             shortName$shortName,
  953.             class: $class,
  954.             description$description,
  955.             urlGenerationStrategy$urlGenerationStrategy,
  956.             deprecationReason$deprecationReason,
  957.             normalizationContext$normalizationContext,
  958.             denormalizationContext$denormalizationContext,
  959.             collectDenormalizationErrors$collectDenormalizationErrors,
  960.             validationContext$validationContext,
  961.             filters$filters,
  962.             elasticsearch$elasticsearch,
  963.             mercure$mercure,
  964.             messenger$messenger,
  965.             input$input,
  966.             output$output,
  967.             order$order,
  968.             fetchPartial$fetchPartial,
  969.             forceEager$forceEager,
  970.             paginationEnabled$paginationEnabled,
  971.             paginationType$paginationType,
  972.             paginationItemsPerPage$paginationItemsPerPage,
  973.             paginationMaximumItemsPerPage$paginationMaximumItemsPerPage,
  974.             paginationPartial$paginationPartial,
  975.             paginationClientEnabled$paginationClientEnabled,
  976.             paginationClientItemsPerPage$paginationClientItemsPerPage,
  977.             paginationClientPartial$paginationClientPartial,
  978.             paginationFetchJoinCollection$paginationFetchJoinCollection,
  979.             paginationUseOutputWalkers$paginationUseOutputWalkers,
  980.             security$security,
  981.             securityMessage$securityMessage,
  982.             securityPostDenormalize$securityPostDenormalize,
  983.             securityPostDenormalizeMessage$securityPostDenormalizeMessage,
  984.             securityPostValidation$securityPostValidation,
  985.             securityPostValidationMessage$securityPostValidationMessage,
  986.             provider$provider,
  987.             processor$processor,
  988.             stateOptions$stateOptions,
  989.             extraProperties$extraProperties
  990.         );
  991.         $this->operations null === $operations null : new Operations($operations);
  992.         $this->provider $provider;
  993.         $this->processor $processor;
  994.         if (\is_string($types)) {
  995.             $this->types = (array) $types;
  996.         }
  997.     }
  998.     public function getOperations(): ?Operations
  999.     {
  1000.         return $this->operations;
  1001.     }
  1002.     public function withOperations(Operations $operations): self
  1003.     {
  1004.         $self = clone $this;
  1005.         $self->operations $operations;
  1006.         $self->operations->sort();
  1007.         return $self;
  1008.     }
  1009.     public function getUriTemplate(): ?string
  1010.     {
  1011.         return $this->uriTemplate;
  1012.     }
  1013.     public function withUriTemplate(string $uriTemplate): self
  1014.     {
  1015.         $self = clone $this;
  1016.         $self->uriTemplate $uriTemplate;
  1017.         return $self;
  1018.     }
  1019.     public function getTypes(): ?array
  1020.     {
  1021.         return $this->types;
  1022.     }
  1023.     /**
  1024.      * @param string[]|string $types
  1025.      */
  1026.     public function withTypes(array|string $types): self
  1027.     {
  1028.         $self = clone $this;
  1029.         $self->types = (array) $types;
  1030.         return $self;
  1031.     }
  1032.     /**
  1033.      * @return array|mixed|string|null
  1034.      */
  1035.     public function getFormats()
  1036.     {
  1037.         return $this->formats;
  1038.     }
  1039.     public function withFormats(mixed $formats): self
  1040.     {
  1041.         $self = clone $this;
  1042.         $self->formats $formats;
  1043.         return $self;
  1044.     }
  1045.     /**
  1046.      * @return array|mixed|string|null
  1047.      */
  1048.     public function getInputFormats()
  1049.     {
  1050.         return $this->inputFormats;
  1051.     }
  1052.     /**
  1053.      * @param mixed|null $inputFormats
  1054.      */
  1055.     public function withInputFormats($inputFormats): self
  1056.     {
  1057.         $self = clone $this;
  1058.         $self->inputFormats $inputFormats;
  1059.         return $self;
  1060.     }
  1061.     /**
  1062.      * @return array|mixed|string|null
  1063.      */
  1064.     public function getOutputFormats()
  1065.     {
  1066.         return $this->outputFormats;
  1067.     }
  1068.     /**
  1069.      * @param mixed|null $outputFormats
  1070.      */
  1071.     public function withOutputFormats($outputFormats): self
  1072.     {
  1073.         $self = clone $this;
  1074.         $self->outputFormats $outputFormats;
  1075.         return $self;
  1076.     }
  1077.     /**
  1078.      * @return array<string, Link>|array<string, array>|string[]|string|null
  1079.      */
  1080.     public function getUriVariables()
  1081.     {
  1082.         return $this->uriVariables;
  1083.     }
  1084.     /**
  1085.      * @param array<string, Link>|array<string, array>|string[]|string|null $uriVariables
  1086.      */
  1087.     public function withUriVariables($uriVariables): self
  1088.     {
  1089.         $self = clone $this;
  1090.         $self->uriVariables $uriVariables;
  1091.         return $self;
  1092.     }
  1093.     public function getRoutePrefix(): ?string
  1094.     {
  1095.         return $this->routePrefix;
  1096.     }
  1097.     public function withRoutePrefix(string $routePrefix): self
  1098.     {
  1099.         $self = clone $this;
  1100.         $self->routePrefix $routePrefix;
  1101.         return $self;
  1102.     }
  1103.     public function getDefaults(): ?array
  1104.     {
  1105.         return $this->defaults;
  1106.     }
  1107.     public function withDefaults(array $defaults): self
  1108.     {
  1109.         $self = clone $this;
  1110.         $self->defaults $defaults;
  1111.         return $self;
  1112.     }
  1113.     public function getRequirements(): ?array
  1114.     {
  1115.         return $this->requirements;
  1116.     }
  1117.     public function withRequirements(array $requirements): self
  1118.     {
  1119.         $self = clone $this;
  1120.         $self->requirements $requirements;
  1121.         return $self;
  1122.     }
  1123.     public function getOptions(): ?array
  1124.     {
  1125.         return $this->options;
  1126.     }
  1127.     public function withOptions(array $options): self
  1128.     {
  1129.         $self = clone $this;
  1130.         $self->options $options;
  1131.         return $self;
  1132.     }
  1133.     public function getStateless(): ?bool
  1134.     {
  1135.         return $this->stateless;
  1136.     }
  1137.     public function withStateless(bool $stateless): self
  1138.     {
  1139.         $self = clone $this;
  1140.         $self->stateless $stateless;
  1141.         return $self;
  1142.     }
  1143.     public function getSunset(): ?string
  1144.     {
  1145.         return $this->sunset;
  1146.     }
  1147.     public function withSunset(string $sunset): self
  1148.     {
  1149.         $self = clone $this;
  1150.         $self->sunset $sunset;
  1151.         return $self;
  1152.     }
  1153.     public function getAcceptPatch(): ?string
  1154.     {
  1155.         return $this->acceptPatch;
  1156.     }
  1157.     public function withAcceptPatch(string $acceptPatch): self
  1158.     {
  1159.         $self = clone $this;
  1160.         $self->acceptPatch $acceptPatch;
  1161.         return $self;
  1162.     }
  1163.     public function getStatus(): ?int
  1164.     {
  1165.         return $this->status;
  1166.     }
  1167.     public function withStatus($status): self
  1168.     {
  1169.         $self = clone $this;
  1170.         $self->status $status;
  1171.         return $self;
  1172.     }
  1173.     public function getHost(): ?string
  1174.     {
  1175.         return $this->host;
  1176.     }
  1177.     public function withHost(string $host): self
  1178.     {
  1179.         $self = clone $this;
  1180.         $self->host $host;
  1181.         return $self;
  1182.     }
  1183.     public function getSchemes(): ?array
  1184.     {
  1185.         return $this->schemes;
  1186.     }
  1187.     public function withSchemes(array $schemes): self
  1188.     {
  1189.         $self = clone $this;
  1190.         $self->schemes $schemes;
  1191.         return $self;
  1192.     }
  1193.     public function getCondition(): ?string
  1194.     {
  1195.         return $this->condition;
  1196.     }
  1197.     public function withCondition(string $condition): self
  1198.     {
  1199.         $self = clone $this;
  1200.         $self->condition $condition;
  1201.         return $self;
  1202.     }
  1203.     public function getController(): ?string
  1204.     {
  1205.         return $this->controller;
  1206.     }
  1207.     public function withController(string $controller): self
  1208.     {
  1209.         $self = clone $this;
  1210.         $self->controller $controller;
  1211.         return $self;
  1212.     }
  1213.     public function getCacheHeaders(): ?array
  1214.     {
  1215.         return $this->cacheHeaders;
  1216.     }
  1217.     public function withCacheHeaders(array $cacheHeaders): self
  1218.     {
  1219.         $self = clone $this;
  1220.         $self->cacheHeaders $cacheHeaders;
  1221.         return $self;
  1222.     }
  1223.     /**
  1224.      * @return string[]|null
  1225.      */
  1226.     public function getHydraContext(): ?array
  1227.     {
  1228.         return $this->hydraContext;
  1229.     }
  1230.     public function withHydraContext(array $hydraContext): self
  1231.     {
  1232.         $self = clone $this;
  1233.         $self->hydraContext $hydraContext;
  1234.         return $self;
  1235.     }
  1236.     /**
  1237.      * TODO Remove in 4.0.
  1238.      *
  1239.      * @deprecated
  1240.      */
  1241.     public function getOpenapiContext(): ?array
  1242.     {
  1243.         return $this->openapiContext;
  1244.     }
  1245.     /**
  1246.      * TODO Remove in 4.0.
  1247.      *
  1248.      * @deprecated
  1249.      */
  1250.     public function withOpenapiContext(array $openapiContext): self
  1251.     {
  1252.         $self = clone $this;
  1253.         $self->openapiContext $openapiContext;
  1254.         return $self;
  1255.     }
  1256.     public function getOpenapi(): bool|OpenApiOperation|null
  1257.     {
  1258.         return $this->openapi;
  1259.     }
  1260.     public function withOpenapi(bool|OpenApiOperation $openapi): self
  1261.     {
  1262.         $self = clone $this;
  1263.         $self->openapi $openapi;
  1264.         return $self;
  1265.     }
  1266.     public function getPaginationViaCursor(): ?array
  1267.     {
  1268.         return $this->paginationViaCursor;
  1269.     }
  1270.     public function withPaginationViaCursor(array $paginationViaCursor): self
  1271.     {
  1272.         $self = clone $this;
  1273.         $self->paginationViaCursor $paginationViaCursor;
  1274.         return $self;
  1275.     }
  1276.     public function getExceptionToStatus(): ?array
  1277.     {
  1278.         return $this->exceptionToStatus;
  1279.     }
  1280.     public function withExceptionToStatus(array $exceptionToStatus): self
  1281.     {
  1282.         $self = clone $this;
  1283.         $self->exceptionToStatus $exceptionToStatus;
  1284.         return $self;
  1285.     }
  1286.     public function getQueryParameterValidationEnabled(): ?bool
  1287.     {
  1288.         return $this->queryParameterValidationEnabled;
  1289.     }
  1290.     public function withQueryParameterValidationEnabled(bool $queryParameterValidationEnabled): self
  1291.     {
  1292.         $self = clone $this;
  1293.         $self->queryParameterValidationEnabled $queryParameterValidationEnabled;
  1294.         return $self;
  1295.     }
  1296.     /**
  1297.      * @return GraphQlOperation[]
  1298.      */
  1299.     public function getGraphQlOperations(): ?array
  1300.     {
  1301.         return $this->graphQlOperations;
  1302.     }
  1303.     public function withGraphQlOperations(array $graphQlOperations): self
  1304.     {
  1305.         $self = clone $this;
  1306.         $self->graphQlOperations $graphQlOperations;
  1307.         return $self;
  1308.     }
  1309.     public function getLinks(): ?array
  1310.     {
  1311.         return $this->links;
  1312.     }
  1313.     /**
  1314.      * @param Link[] $links
  1315.      */
  1316.     public function withLinks(array $links): self
  1317.     {
  1318.         $self = clone $this;
  1319.         $self->links $links;
  1320.         return $self;
  1321.     }
  1322. }