|
| 1 | +<?php |
| 2 | + |
| 3 | +declare(strict_types=1); |
| 4 | + |
| 5 | +namespace Thesis\Protobuf\Compiler; |
| 6 | + |
| 7 | +use Thesis\Protobuf\Reflection; |
| 8 | + |
| 9 | +/** |
| 10 | + * @api |
| 11 | + * @see https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/compiler/plugin.proto |
| 12 | + */ |
| 13 | +final readonly class CodeGeneratorRequest |
| 14 | +{ |
| 15 | + /** |
| 16 | + * @param list<string> $filesToGenerate |
| 17 | + * @param list<FileDescriptorProto> $protoFiles |
| 18 | + * @param list<FileDescriptorProto> $sourceFileDescriptors |
| 19 | + */ |
| 20 | + public function __construct( |
| 21 | + #[Reflection\Field(1, new Reflection\ListT(Reflection\StringT::T))] |
| 22 | + public array $filesToGenerate = [], |
| 23 | + #[Reflection\Field(2, Reflection\StringT::T)] |
| 24 | + public ?string $parameter = null, |
| 25 | + #[Reflection\Field(15, new Reflection\ListT( |
| 26 | + new Reflection\ObjectT(FileDescriptorProto::class), |
| 27 | + ))] |
| 28 | + public array $protoFiles = [], |
| 29 | + #[Reflection\Field(17, new Reflection\ListT( |
| 30 | + new Reflection\ObjectT(FileDescriptorProto::class), |
| 31 | + ))] |
| 32 | + public array $sourceFileDescriptors = [], |
| 33 | + #[Reflection\Field(3, new Reflection\ObjectT(CompilerVersion::class))] |
| 34 | + public ?CompilerVersion $compilerVersion = null, |
| 35 | + ) {} |
| 36 | +} |
0 commit comments