1: <?php
2:
3: declare(strict_types=1);
4:
5: namespace LaravelUi5\OData\Edm\Container;
6:
7: use LaravelUi5\OData\Edm\Contracts\Annotation\AnnotationInterface;
8: use LaravelUi5\OData\Edm\Contracts\Container\FunctionImportInterface;
9: use LaravelUi5\OData\Edm\Contracts\FunctionInterface;
10: use LaravelUi5\OData\Edm\HasAnnotations;
11:
12: final readonly class FunctionImport implements FunctionImportInterface
13: {
14: use HasAnnotations;
15:
16: /**
17: * @param list<AnnotationInterface> $annotations
18: */
19: public function __construct(
20: private string $name,
21: private FunctionInterface $function,
22: private ?string $entitySet = null,
23: private bool $includedInServiceDocument = false,
24: array $annotations = [],
25: ) {
26: $this->annotations = $annotations;
27: }
28:
29: public function getName(): string
30: {
31: return $this->name;
32: }
33:
34: public function getFunction(): FunctionInterface
35: {
36: return $this->function;
37: }
38:
39: public function getEntitySet(): ?string
40: {
41: return $this->entitySet;
42: }
43:
44: public function isIncludedInServiceDocument(): bool
45: {
46: return $this->includedInServiceDocument;
47: }
48: }
49: