From 51d427658a9af8dfef535d2301e3a1a3801b75e4 Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Wed, 17 Jan 2024 11:21:13 -0700 Subject: [PATCH] fix: use original proto, generate files --- Makefile | 6 +- proto/v1/go/modsurferpb/api.pb.go | 18 +- proto/v1/module-no-option.proto | 77 -- proto/v1/php/AuditModulesRequest.php | 130 ++++ proto/v1/php/AuditModulesResponse.php | 181 +++++ proto/v1/php/AuditOutcome.php | 48 ++ proto/v1/php/CallPluginRequest.php | 156 ++++ proto/v1/php/CallPluginResponse.php | 93 +++ proto/v1/php/CreateModuleRequest.php | 130 ++++ proto/v1/php/CreateModuleResponse.php | 122 +++ proto/v1/php/DeleteModulesRequest.php | 59 ++ proto/v1/php/DeleteModulesResponse.php | 95 +++ proto/v1/php/DiffRequest.php | 140 ++++ proto/v1/php/DiffResponse.php | 96 +++ proto/v1/php/Direction.php | 46 ++ proto/v1/php/Error.php | 85 +++ proto/v1/php/Export.php | 18 +- proto/v1/php/Field.php | 76 ++ proto/v1/php/GPBMetadata/Proto/V1/Api.php | Bin 0 -> 4950 bytes .../GPBMetadata/Proto/V1/ModuleNoOption.php | 25 - proto/v1/php/GetModuleGraphRequest.php | 59 ++ proto/v1/php/GetModuleGraphResponse.php | 105 +++ proto/v1/php/GetModuleRequest.php | 59 ++ proto/v1/php/GetModuleResponse.php | 105 +++ proto/v1/php/Import.php | 18 +- proto/v1/php/InstallPluginRequest.php | 156 ++++ proto/v1/php/InstallPluginResponse.php | 93 +++ proto/v1/php/ListModulesRequest.php | 106 +++ proto/v1/php/ListModulesResponse.php | 207 ++++++ proto/v1/php/Module.php | 110 ++- proto/v1/php/ModuleGraph.php | 99 +++ proto/v1/php/PBFunction.php | 4 +- proto/v1/php/Pagination.php | 86 +++ proto/v1/php/SearchModulesRequest.php | 696 ++++++++++++++++++ proto/v1/php/SearchModulesResponse.php | 207 ++++++ proto/v1/php/Sort.php | 85 +++ proto/v1/php/SourceLanguage.php | 2 +- proto/v1/php/UninstallPluginRequest.php | 58 ++ proto/v1/php/UninstallPluginResponse.php | 66 ++ proto/v1/php/ValType.php | 2 +- proto/v1/php/ValidateModuleRequest.php | 131 ++++ proto/v1/php/ValidateModuleResponse.php | 95 +++ 42 files changed, 4018 insertions(+), 132 deletions(-) delete mode 100644 proto/v1/module-no-option.proto create mode 100644 proto/v1/php/AuditModulesRequest.php create mode 100644 proto/v1/php/AuditModulesResponse.php create mode 100644 proto/v1/php/AuditOutcome.php create mode 100644 proto/v1/php/CallPluginRequest.php create mode 100644 proto/v1/php/CallPluginResponse.php create mode 100644 proto/v1/php/CreateModuleRequest.php create mode 100644 proto/v1/php/CreateModuleResponse.php create mode 100644 proto/v1/php/DeleteModulesRequest.php create mode 100644 proto/v1/php/DeleteModulesResponse.php create mode 100644 proto/v1/php/DiffRequest.php create mode 100644 proto/v1/php/DiffResponse.php create mode 100644 proto/v1/php/Direction.php create mode 100644 proto/v1/php/Error.php create mode 100644 proto/v1/php/Field.php create mode 100644 proto/v1/php/GPBMetadata/Proto/V1/Api.php delete mode 100644 proto/v1/php/GPBMetadata/Proto/V1/ModuleNoOption.php create mode 100644 proto/v1/php/GetModuleGraphRequest.php create mode 100644 proto/v1/php/GetModuleGraphResponse.php create mode 100644 proto/v1/php/GetModuleRequest.php create mode 100644 proto/v1/php/GetModuleResponse.php create mode 100644 proto/v1/php/InstallPluginRequest.php create mode 100644 proto/v1/php/InstallPluginResponse.php create mode 100644 proto/v1/php/ListModulesRequest.php create mode 100644 proto/v1/php/ListModulesResponse.php create mode 100644 proto/v1/php/ModuleGraph.php create mode 100644 proto/v1/php/Pagination.php create mode 100644 proto/v1/php/SearchModulesRequest.php create mode 100644 proto/v1/php/SearchModulesResponse.php create mode 100644 proto/v1/php/Sort.php create mode 100644 proto/v1/php/UninstallPluginRequest.php create mode 100644 proto/v1/php/UninstallPluginResponse.php create mode 100644 proto/v1/php/ValidateModuleRequest.php create mode 100644 proto/v1/php/ValidateModuleResponse.php diff --git a/Makefile b/Makefile index d07d42b..83c7101 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,7 @@ unknown-cli: cargo run -- validate -p test/spidermonkey.wasm -c test/unknown-fields.yaml install: + @echo "if this fails, be sure to install protoc via: https://grpc.io/docs/protoc-installation/" @echo "check PROTOC: `which protoc`" go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.32.0 cargo install protobuf-codegen@3.2.0 @@ -22,11 +23,6 @@ generate: install --php_out=proto/v1/php \ proto/v1/api.proto -generate-php: install - protoc --experimental_allow_proto3_optional \ - --php_out=proto/v1/php \ - proto/v1/module-no-option.proto - generate-web-list-mods-response: cd scripts/protobuf-list-modules-response && cargo run --release -- $(take) mv scripts/protobuf-list-modules-response/ListModulesResponse.pb api/ diff --git a/proto/v1/go/modsurferpb/api.pb.go b/proto/v1/go/modsurferpb/api.pb.go index 0a54306..b28f570 100644 --- a/proto/v1/go/modsurferpb/api.pb.go +++ b/proto/v1/go/modsurferpb/api.pb.go @@ -1,15 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.32.0 -// protoc v3.12.4 +// protoc v3.15.8 // source: proto/v1/api.proto package modsurferpb import ( - timestamp "github.com/golang/protobuf/ptypes/timestamp" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" ) @@ -512,7 +512,7 @@ type Module struct { // arbitrary metadata provided by the operator of this module Metadata map[string]string `protobuf:"bytes,9,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // timestamp when this module was loaded and stored - InsertedAt *timestamp.Timestamp `protobuf:"bytes,10,opt,name=inserted_at,json=insertedAt,proto3" json:"inserted_at,omitempty"` + InsertedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=inserted_at,json=insertedAt,proto3" json:"inserted_at,omitempty"` // the interned strings stored in the wasm binary (panic/abort messages, etc.) Strings []string `protobuf:"bytes,11,rep,name=strings,proto3" json:"strings,omitempty"` // the cyclomatic complexity @@ -612,7 +612,7 @@ func (x *Module) GetMetadata() map[string]string { return nil } -func (x *Module) GetInsertedAt() *timestamp.Timestamp { +func (x *Module) GetInsertedAt() *timestamppb.Timestamp { if x != nil { return x.InsertedAt } @@ -1279,9 +1279,9 @@ type SearchModulesRequest struct { // arbitrary metadata provided by the operator of this module Metadata map[string]string `protobuf:"bytes,10,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // timestamp when this module was loaded and stored - InsertedBefore *timestamp.Timestamp `protobuf:"bytes,11,opt,name=inserted_before,json=insertedBefore,proto3,oneof" json:"inserted_before,omitempty"` + InsertedBefore *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=inserted_before,json=insertedBefore,proto3,oneof" json:"inserted_before,omitempty"` // timestamp when this module was loaded and stored - InsertedAfter *timestamp.Timestamp `protobuf:"bytes,12,opt,name=inserted_after,json=insertedAfter,proto3,oneof" json:"inserted_after,omitempty"` + InsertedAfter *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=inserted_after,json=insertedAfter,proto3,oneof" json:"inserted_after,omitempty"` // the interned strings stored in the wasm binary (panic/abort messages, etc.) Strings []string `protobuf:"bytes,13,rep,name=strings,proto3" json:"strings,omitempty"` // match on any function name in an import or export. @@ -1387,14 +1387,14 @@ func (x *SearchModulesRequest) GetMetadata() map[string]string { return nil } -func (x *SearchModulesRequest) GetInsertedBefore() *timestamp.Timestamp { +func (x *SearchModulesRequest) GetInsertedBefore() *timestamppb.Timestamp { if x != nil { return x.InsertedBefore } return nil } -func (x *SearchModulesRequest) GetInsertedAfter() *timestamp.Timestamp { +func (x *SearchModulesRequest) GetInsertedAfter() *timestamppb.Timestamp { if x != nil { return x.InsertedAfter } @@ -2904,7 +2904,7 @@ var file_proto_v1_api_proto_goTypes = []interface{}{ nil, // 40: SearchModulesRequest.MetadataEntry nil, // 41: DeleteModulesResponse.ModuleIdHashEntry nil, // 42: AuditModulesResponse.InvalidModuleReportEntry - (*timestamp.Timestamp)(nil), // 43: google.protobuf.Timestamp + (*timestamppb.Timestamp)(nil), // 43: google.protobuf.Timestamp } var file_proto_v1_api_proto_depIdxs = []int32{ 0, // 0: Function.params:type_name -> ValType diff --git a/proto/v1/module-no-option.proto b/proto/v1/module-no-option.proto deleted file mode 100644 index 4836743..0000000 --- a/proto/v1/module-no-option.proto +++ /dev/null @@ -1,77 +0,0 @@ -syntax = "proto3"; - -import "google/protobuf/timestamp.proto"; - -// Used to type the arguments and return types from wasm elements such as import -// and export functions. -enum ValType { - I32 = 0; - I64 = 1; - F32 = 2; - F64 = 3; - V128 = 4; - FuncRef = 5; - ExternRef = 6; -} - -// Contained by an import or export element within a wasm binary. -message Function { - repeated ValType params = 1; - repeated ValType results = 2; - string name = 3; -} - -// A function and module namespace that is defined outside of the current -// module, and referenced & called by the current module. -message Import { - string module_name = 1; - Function func = 2; -} - -// A function that is defined inside the current module, made available to -// outside modules / environments. -message Export { Function func = 1; } - -// The language (or most similar match) used to produce a wasm module. -enum SourceLanguage { - Unknown = 0; - Rust = 1; - Go = 2; - C = 3; - Cpp = 4; - AssemblyScript = 5; - Swift = 6; - JavaScript = 7; - Haskell = 8; - Zig = 9; -} - -// Details about a wasm module, either extracted directly from the binary, or -// inferred somehow. -message Module { - // ID for this module, generated by the database. - int64 id = 1; - // sha256 hash of the modules raw bytes - string hash = 3; - // function imports called by the module (see: - // - repeated Import imports = 4; - // function exports provided by the module (see: - // - repeated Export exports = 5; - // size in bytes of the module - uint64 size = 6; - // path or locator to the module - string location = 7; - // programming language used to produce this module - SourceLanguage source_language = 8; - // arbitrary metadata provided by the operator of this module - map metadata = 9; - // timestamp when this module was loaded and stored - google.protobuf.Timestamp inserted_at = 10; - // the interned strings stored in the wasm binary (panic/abort messages, etc.) - repeated string strings = 11; - // function hashes - map function_hashes = 15; -} - diff --git a/proto/v1/php/AuditModulesRequest.php b/proto/v1/php/AuditModulesRequest.php new file mode 100644 index 0000000..ba3adcc --- /dev/null +++ b/proto/v1/php/AuditModulesRequest.php @@ -0,0 +1,130 @@ +AuditModulesRequest + */ +class AuditModulesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * the YAML checkfile (e.g. mod.yaml) bytes + * + * Generated from protobuf field bytes checkfile = 1; + */ + protected $checkfile = ''; + /** + * Generated from protobuf field .AuditOutcome outcome = 2; + */ + protected $outcome = 0; + /** + * Generated from protobuf field .Pagination pagination = 3; + */ + protected $pagination = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $checkfile + * the YAML checkfile (e.g. mod.yaml) bytes + * @type int $outcome + * @type \Pagination $pagination + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * the YAML checkfile (e.g. mod.yaml) bytes + * + * Generated from protobuf field bytes checkfile = 1; + * @return string + */ + public function getCheckfile() + { + return $this->checkfile; + } + + /** + * the YAML checkfile (e.g. mod.yaml) bytes + * + * Generated from protobuf field bytes checkfile = 1; + * @param string $var + * @return $this + */ + public function setCheckfile($var) + { + GPBUtil::checkString($var, False); + $this->checkfile = $var; + + return $this; + } + + /** + * Generated from protobuf field .AuditOutcome outcome = 2; + * @return int + */ + public function getOutcome() + { + return $this->outcome; + } + + /** + * Generated from protobuf field .AuditOutcome outcome = 2; + * @param int $var + * @return $this + */ + public function setOutcome($var) + { + GPBUtil::checkEnum($var, \AuditOutcome::class); + $this->outcome = $var; + + return $this; + } + + /** + * Generated from protobuf field .Pagination pagination = 3; + * @return \Pagination|null + */ + public function getPagination() + { + return isset($this->pagination) ? $this->pagination : null; + } + + public function hasPagination() + { + return isset($this->pagination); + } + + public function clearPagination() + { + unset($this->pagination); + } + + /** + * Generated from protobuf field .Pagination pagination = 3; + * @param \Pagination $var + * @return $this + */ + public function setPagination($var) + { + GPBUtil::checkMessage($var, \Pagination::class); + $this->pagination = $var; + + return $this; + } + +} + diff --git a/proto/v1/php/AuditModulesResponse.php b/proto/v1/php/AuditModulesResponse.php new file mode 100644 index 0000000..51b8c87 --- /dev/null +++ b/proto/v1/php/AuditModulesResponse.php @@ -0,0 +1,181 @@ +AuditModulesResponse + */ +class AuditModulesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * each record contains the ID of the invalid Module which failed the audit, as well as the failure + * report produced by the validation check (encoded in JSON) + * + * Generated from protobuf field map invalid_module_report = 1; + */ + private $invalid_module_report; + /** + * Generated from protobuf field .Pagination pagination = 2; + */ + protected $pagination = null; + /** + * the full count of results in the database (not the count of this message's + * `modules`). + * + * Generated from protobuf field uint64 total = 3; + */ + protected $total = 0; + /** + * Generated from protobuf field .Error error = 4; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $invalid_module_report + * each record contains the ID of the invalid Module which failed the audit, as well as the failure + * report produced by the validation check (encoded in JSON) + * @type \Pagination $pagination + * @type int|string $total + * the full count of results in the database (not the count of this message's + * `modules`). + * @type \Error $error + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * each record contains the ID of the invalid Module which failed the audit, as well as the failure + * report produced by the validation check (encoded in JSON) + * + * Generated from protobuf field map invalid_module_report = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getInvalidModuleReport() + { + return $this->invalid_module_report; + } + + /** + * each record contains the ID of the invalid Module which failed the audit, as well as the failure + * report produced by the validation check (encoded in JSON) + * + * Generated from protobuf field map invalid_module_report = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setInvalidModuleReport($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::INT64, \Google\Protobuf\Internal\GPBType::BYTES); + $this->invalid_module_report = $arr; + + return $this; + } + + /** + * Generated from protobuf field .Pagination pagination = 2; + * @return \Pagination|null + */ + public function getPagination() + { + return isset($this->pagination) ? $this->pagination : null; + } + + public function hasPagination() + { + return isset($this->pagination); + } + + public function clearPagination() + { + unset($this->pagination); + } + + /** + * Generated from protobuf field .Pagination pagination = 2; + * @param \Pagination $var + * @return $this + */ + public function setPagination($var) + { + GPBUtil::checkMessage($var, \Pagination::class); + $this->pagination = $var; + + return $this; + } + + /** + * the full count of results in the database (not the count of this message's + * `modules`). + * + * Generated from protobuf field uint64 total = 3; + * @return int|string + */ + public function getTotal() + { + return $this->total; + } + + /** + * the full count of results in the database (not the count of this message's + * `modules`). + * + * Generated from protobuf field uint64 total = 3; + * @param int|string $var + * @return $this + */ + public function setTotal($var) + { + GPBUtil::checkUint64($var); + $this->total = $var; + + return $this; + } + + /** + * Generated from protobuf field .Error error = 4; + * @return \Error|null + */ + public function getError() + { + return isset($this->error) ? $this->error : null; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .Error error = 4; + * @param \Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Error::class); + $this->error = $var; + + return $this; + } + +} + diff --git a/proto/v1/php/AuditOutcome.php b/proto/v1/php/AuditOutcome.php new file mode 100644 index 0000000..3f79ffd --- /dev/null +++ b/proto/v1/php/AuditOutcome.php @@ -0,0 +1,48 @@ +AuditOutcome + */ +class AuditOutcome +{ + /** + * Generated from protobuf enum PASS = 0; + */ + const PASS = 0; + /** + * Generated from protobuf enum FAIL = 1; + */ + const FAIL = 1; + + private static $valueToName = [ + self::PASS => 'PASS', + self::FAIL => 'FAIL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/proto/v1/php/CallPluginRequest.php b/proto/v1/php/CallPluginRequest.php new file mode 100644 index 0000000..d0fd1f0 --- /dev/null +++ b/proto/v1/php/CallPluginRequest.php @@ -0,0 +1,156 @@ +CallPluginRequest + */ +class CallPluginRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string identifier = 1; + */ + protected $identifier = ''; + /** + * Generated from protobuf field string function_name = 2; + */ + protected $function_name = ''; + /** + * Generated from protobuf field bytes input = 3; + */ + protected $input = ''; + /** + * bytes config = 5; + * + * Generated from protobuf field string hash = 4; + */ + protected $hash = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $identifier + * @type string $function_name + * @type string $input + * @type string $hash + * bytes config = 5; + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string identifier = 1; + * @return string + */ + public function getIdentifier() + { + return $this->identifier; + } + + /** + * Generated from protobuf field string identifier = 1; + * @param string $var + * @return $this + */ + public function setIdentifier($var) + { + GPBUtil::checkString($var, True); + $this->identifier = $var; + + return $this; + } + + /** + * Generated from protobuf field string function_name = 2; + * @return string + */ + public function getFunctionName() + { + return $this->function_name; + } + + /** + * Generated from protobuf field string function_name = 2; + * @param string $var + * @return $this + */ + public function setFunctionName($var) + { + GPBUtil::checkString($var, True); + $this->function_name = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes input = 3; + * @return string + */ + public function getInput() + { + return $this->input; + } + + /** + * Generated from protobuf field bytes input = 3; + * @param string $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkString($var, False); + $this->input = $var; + + return $this; + } + + /** + * bytes config = 5; + * + * Generated from protobuf field string hash = 4; + * @return string + */ + public function getHash() + { + return isset($this->hash) ? $this->hash : ''; + } + + public function hasHash() + { + return isset($this->hash); + } + + public function clearHash() + { + unset($this->hash); + } + + /** + * bytes config = 5; + * + * Generated from protobuf field string hash = 4; + * @param string $var + * @return $this + */ + public function setHash($var) + { + GPBUtil::checkString($var, True); + $this->hash = $var; + + return $this; + } + +} + diff --git a/proto/v1/php/CallPluginResponse.php b/proto/v1/php/CallPluginResponse.php new file mode 100644 index 0000000..80f68a6 --- /dev/null +++ b/proto/v1/php/CallPluginResponse.php @@ -0,0 +1,93 @@ +CallPluginResponse + */ +class CallPluginResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bytes output = 1; + */ + protected $output = ''; + /** + * Generated from protobuf field .Error error = 2; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $output + * @type \Error $error + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bytes output = 1; + * @return string + */ + public function getOutput() + { + return $this->output; + } + + /** + * Generated from protobuf field bytes output = 1; + * @param string $var + * @return $this + */ + public function setOutput($var) + { + GPBUtil::checkString($var, False); + $this->output = $var; + + return $this; + } + + /** + * Generated from protobuf field .Error error = 2; + * @return \Error|null + */ + public function getError() + { + return isset($this->error) ? $this->error : null; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .Error error = 2; + * @param \Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Error::class); + $this->error = $var; + + return $this; + } + +} + diff --git a/proto/v1/php/CreateModuleRequest.php b/proto/v1/php/CreateModuleRequest.php new file mode 100644 index 0000000..aa20da0 --- /dev/null +++ b/proto/v1/php/CreateModuleRequest.php @@ -0,0 +1,130 @@ +CreateModuleRequest + */ +class CreateModuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bytes wasm = 1; + */ + protected $wasm = ''; + /** + * Generated from protobuf field map metadata = 2; + */ + private $metadata; + /** + * a valid URL with a scheme prefix e.g. `s3://`, `file://`, `https://` + * + * Generated from protobuf field string location = 3; + */ + protected $location = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $wasm + * @type array|\Google\Protobuf\Internal\MapField $metadata + * @type string $location + * a valid URL with a scheme prefix e.g. `s3://`, `file://`, `https://` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bytes wasm = 1; + * @return string + */ + public function getWasm() + { + return $this->wasm; + } + + /** + * Generated from protobuf field bytes wasm = 1; + * @param string $var + * @return $this + */ + public function setWasm($var) + { + GPBUtil::checkString($var, False); + $this->wasm = $var; + + return $this; + } + + /** + * Generated from protobuf field map metadata = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Generated from protobuf field map metadata = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->metadata = $arr; + + return $this; + } + + /** + * a valid URL with a scheme prefix e.g. `s3://`, `file://`, `https://` + * + * Generated from protobuf field string location = 3; + * @return string + */ + public function getLocation() + { + return isset($this->location) ? $this->location : ''; + } + + public function hasLocation() + { + return isset($this->location); + } + + public function clearLocation() + { + unset($this->location); + } + + /** + * a valid URL with a scheme prefix e.g. `s3://`, `file://`, `https://` + * + * Generated from protobuf field string location = 3; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + +} + diff --git a/proto/v1/php/CreateModuleResponse.php b/proto/v1/php/CreateModuleResponse.php new file mode 100644 index 0000000..8e8d735 --- /dev/null +++ b/proto/v1/php/CreateModuleResponse.php @@ -0,0 +1,122 @@ +CreateModuleResponse + */ +class CreateModuleResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 module_id = 1; + */ + protected $module_id = 0; + /** + * Generated from protobuf field string hash = 2; + */ + protected $hash = ''; + /** + * Generated from protobuf field .Error error = 3; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $module_id + * @type string $hash + * @type \Error $error + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 module_id = 1; + * @return int|string + */ + public function getModuleId() + { + return $this->module_id; + } + + /** + * Generated from protobuf field int64 module_id = 1; + * @param int|string $var + * @return $this + */ + public function setModuleId($var) + { + GPBUtil::checkInt64($var); + $this->module_id = $var; + + return $this; + } + + /** + * Generated from protobuf field string hash = 2; + * @return string + */ + public function getHash() + { + return $this->hash; + } + + /** + * Generated from protobuf field string hash = 2; + * @param string $var + * @return $this + */ + public function setHash($var) + { + GPBUtil::checkString($var, True); + $this->hash = $var; + + return $this; + } + + /** + * Generated from protobuf field .Error error = 3; + * @return \Error|null + */ + public function getError() + { + return isset($this->error) ? $this->error : null; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .Error error = 3; + * @param \Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Error::class); + $this->error = $var; + + return $this; + } + +} + diff --git a/proto/v1/php/DeleteModulesRequest.php b/proto/v1/php/DeleteModulesRequest.php new file mode 100644 index 0000000..13f57ed --- /dev/null +++ b/proto/v1/php/DeleteModulesRequest.php @@ -0,0 +1,59 @@ +DeleteModulesRequest + */ +class DeleteModulesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated int64 module_ids = 1; + */ + private $module_ids; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int[]|string[]|\Google\Protobuf\Internal\RepeatedField $module_ids + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated int64 module_ids = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getModuleIds() + { + return $this->module_ids; + } + + /** + * Generated from protobuf field repeated int64 module_ids = 1; + * @param int[]|string[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setModuleIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64); + $this->module_ids = $arr; + + return $this; + } + +} + diff --git a/proto/v1/php/DeleteModulesResponse.php b/proto/v1/php/DeleteModulesResponse.php new file mode 100644 index 0000000..b6b3023 --- /dev/null +++ b/proto/v1/php/DeleteModulesResponse.php @@ -0,0 +1,95 @@ +DeleteModulesResponse + */ +class DeleteModulesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field map module_id_hash = 1; + */ + private $module_id_hash; + /** + * Generated from protobuf field .Error error = 2; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $module_id_hash + * @type \Error $error + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field map module_id_hash = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getModuleIdHash() + { + return $this->module_id_hash; + } + + /** + * Generated from protobuf field map module_id_hash = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setModuleIdHash($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::INT64, \Google\Protobuf\Internal\GPBType::STRING); + $this->module_id_hash = $arr; + + return $this; + } + + /** + * Generated from protobuf field .Error error = 2; + * @return \Error|null + */ + public function getError() + { + return isset($this->error) ? $this->error : null; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .Error error = 2; + * @param \Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Error::class); + $this->error = $var; + + return $this; + } + +} + diff --git a/proto/v1/php/DiffRequest.php b/proto/v1/php/DiffRequest.php new file mode 100644 index 0000000..bc5dd5d --- /dev/null +++ b/proto/v1/php/DiffRequest.php @@ -0,0 +1,140 @@ +DiffRequest + */ +class DiffRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 module1 = 1; + */ + protected $module1 = 0; + /** + * Generated from protobuf field int64 module2 = 2; + */ + protected $module2 = 0; + /** + * Generated from protobuf field bool color_terminal = 3; + */ + protected $color_terminal = false; + /** + * Generated from protobuf field bool with_context = 4; + */ + protected $with_context = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $module1 + * @type int|string $module2 + * @type bool $color_terminal + * @type bool $with_context + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 module1 = 1; + * @return int|string + */ + public function getModule1() + { + return $this->module1; + } + + /** + * Generated from protobuf field int64 module1 = 1; + * @param int|string $var + * @return $this + */ + public function setModule1($var) + { + GPBUtil::checkInt64($var); + $this->module1 = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 module2 = 2; + * @return int|string + */ + public function getModule2() + { + return $this->module2; + } + + /** + * Generated from protobuf field int64 module2 = 2; + * @param int|string $var + * @return $this + */ + public function setModule2($var) + { + GPBUtil::checkInt64($var); + $this->module2 = $var; + + return $this; + } + + /** + * Generated from protobuf field bool color_terminal = 3; + * @return bool + */ + public function getColorTerminal() + { + return $this->color_terminal; + } + + /** + * Generated from protobuf field bool color_terminal = 3; + * @param bool $var + * @return $this + */ + public function setColorTerminal($var) + { + GPBUtil::checkBool($var); + $this->color_terminal = $var; + + return $this; + } + + /** + * Generated from protobuf field bool with_context = 4; + * @return bool + */ + public function getWithContext() + { + return $this->with_context; + } + + /** + * Generated from protobuf field bool with_context = 4; + * @param bool $var + * @return $this + */ + public function setWithContext($var) + { + GPBUtil::checkBool($var); + $this->with_context = $var; + + return $this; + } + +} + diff --git a/proto/v1/php/DiffResponse.php b/proto/v1/php/DiffResponse.php new file mode 100644 index 0000000..52d418b --- /dev/null +++ b/proto/v1/php/DiffResponse.php @@ -0,0 +1,96 @@ +DiffResponse + */ +class DiffResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string diff = 1; + */ + protected $diff = ''; + /** + * Generated from protobuf field .Error error = 2; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $diff + * @type \Error $error + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string diff = 1; + * @return string + */ + public function getDiff() + { + return $this->diff; + } + + /** + * Generated from protobuf field string diff = 1; + * @param string $var + * @return $this + */ + public function setDiff($var) + { + GPBUtil::checkString($var, True); + $this->diff = $var; + + return $this; + } + + /** + * Generated from protobuf field .Error error = 2; + * @return \Error|null + */ + public function getError() + { + return isset($this->error) ? $this->error : null; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .Error error = 2; + * @param \Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Error::class); + $this->error = $var; + + return $this; + } + +} + diff --git a/proto/v1/php/Direction.php b/proto/v1/php/Direction.php new file mode 100644 index 0000000..0744ccd --- /dev/null +++ b/proto/v1/php/Direction.php @@ -0,0 +1,46 @@ +Direction + */ +class Direction +{ + /** + * Generated from protobuf enum Desc = 0; + */ + const Desc = 0; + /** + * Generated from protobuf enum Asc = 1; + */ + const Asc = 1; + + private static $valueToName = [ + self::Desc => 'Desc', + self::Asc => 'Asc', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/proto/v1/php/Error.php b/proto/v1/php/Error.php new file mode 100644 index 0000000..4278d2f --- /dev/null +++ b/proto/v1/php/Error.php @@ -0,0 +1,85 @@ +Error + */ +class Error extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int32 code = 1; + */ + protected $code = 0; + /** + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * @type string $message + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int32 code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Generated from protobuf field int32 code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkInt32($var); + $this->code = $var; + + return $this; + } + + /** + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Generated from protobuf field string message = 2; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + diff --git a/proto/v1/php/Export.php b/proto/v1/php/Export.php index 0a213b2..10c1769 100644 --- a/proto/v1/php/Export.php +++ b/proto/v1/php/Export.php @@ -1,6 +1,6 @@ .Function func = 1; - * @return \PBFunction + * @return \PBFunction|null */ public function getFunc() { - return $this->func; + return isset($this->func) ? $this->func : null; + } + + public function hasFunc() + { + return isset($this->func); + } + + public function clearFunc() + { + unset($this->func); } /** diff --git a/proto/v1/php/Field.php b/proto/v1/php/Field.php new file mode 100644 index 0000000..81239b8 --- /dev/null +++ b/proto/v1/php/Field.php @@ -0,0 +1,76 @@ +Field + */ +class Field +{ + /** + * Generated from protobuf enum CreatedAt = 0; + */ + const CreatedAt = 0; + /** + * Generated from protobuf enum Name = 1; + */ + const Name = 1; + /** + * Generated from protobuf enum Size = 2; + */ + const Size = 2; + /** + * Generated from protobuf enum Language = 3; + */ + const Language = 3; + /** + * Generated from protobuf enum ImportsCount = 4; + */ + const ImportsCount = 4; + /** + * Generated from protobuf enum ExportsCount = 5; + */ + const ExportsCount = 5; + /** + * Generated from protobuf enum Sha256 = 6; + */ + const Sha256 = 6; + /** + * Generated from protobuf enum Complexity = 7; + */ + const Complexity = 7; + + private static $valueToName = [ + self::CreatedAt => 'CreatedAt', + self::Name => 'Name', + self::Size => 'Size', + self::Language => 'Language', + self::ImportsCount => 'ImportsCount', + self::ExportsCount => 'ExportsCount', + self::Sha256 => 'Sha256', + self::Complexity => 'Complexity', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/proto/v1/php/GPBMetadata/Proto/V1/Api.php b/proto/v1/php/GPBMetadata/Proto/V1/Api.php new file mode 100644 index 0000000000000000000000000000000000000000..80d12435f61e7b7860879c5b1d7bbc1f042eb8f1 GIT binary patch literal 4950 zcmd5=OLN=S6*k2u4xfS~n^h+%f}}O0#PFDoU5^qs74@Q0JJyJf7a3(Z5P2!x7z9w@ z!j{_cu8aPLPB;AnUG;bLuXNdM&pj6aK}xEXuBwf|`#A6OopbJ2U;Af1d~ED9mj$+9 zW8>t)5NFKr15bD(&oNG-$%F;Q$ea4yVS!~BJ1>lHU%WJScMe{DgjYi^3Px;G-MIhe z!F}837F`E$?I{a=d&G?W!`^cy?6EEE<3maN_|=0i0Y;7;hQ^l9;g4Y8pC6q#d}M^e z7WnTI9uB$71-Bjk2bArpF|nPH;l0aeCy_f6+;a_i;e|V5olgx#Q=a|A_fVIo#__)A zojOd3fT|rIxPk?)?Hup0a1?M~c)=ka-P}B7A~lL!>3kZqmE`!u=qMRCH!lhK)DS_$ zvfK?LU?K|KFG+4m;9dH4oVCoNbT2vDPuNp`b91KFj0$OW?>9WwVQV~2MczYaby6mh zK|@R|NICU)9ESD-re#*xE@w4IaN`W+}pS0RyHr`px5gthq*ly=YQUUEcU zm^<>XJd~ajMIB&?k5R~6C$A&_Gdny}{85E6C;nl(fPz-LWh<5kcNlR9+r@Y%=7CetZ`y(>T!E z8gW^(l+0F=0K2XTF7*3Ql_Kj(6~4#m^J_Rrc4T&wkSa_tLfCMhzM)?#71N#gxH5ijvX zpLR*e_4`ntm%0l1*X)7}ujzFtzOkK%ku$Z;r6;-dN3e1Q9sNDmdUdD{XS(z%P#Tg3 z<~^t?>+MU0=G=}yehfW#cyb|785vJC^H)&Z4FWHaF){MSj07!8(_tco(r@ydW_|{6 zXrFSIoGkTl_>>DeUDq2>@+Omz2|8Rizk`v{X-O8C|er$nfR?wN&+%&%(Kw63_d5JPL3NTuu} z|NmsK^{Su^laM!mfYo`a!>dT-_RXShFJTj`j4n-!7Pl;GX1CT37B=RV2n!kkB zJ`?k{xJ=qSg5}JyScE%JQX-JmWNIrqGu8@Lu3`NR=+Af<^9~b7`~tvFV<9G7wKCzc zg6M$$C%;y^MNIiXn14aH&Jl}6M37M;DhSQUIL}83I>!gYPTR`@UmgU6^a@PsD*P)(*G1W#1)LOqH54Y#5W|MX_xicR?E#f^F zKuN?b)0PUChT36iHf3O{R?9TZSe!bxGlq zX6&_~F`TnUuK~58N+aqW%)jPfZNazyPx-b1t2@kL3B;%Ah9xT2f{zs*eThW*= zf+r&P=!}hCPq5#NOWB7|_9B7RTov0!w{FqR7iw`KjAhxXcC%q@{yPV&^SojMJ%=^! zV#mS9NpJ*Ac8sx|EX7A@i9S%btOIpLEg#VZWv%&qdOski)>Vj{#oqNzXkW|cdL!3l z&y+Fp4^Z9VlSxvUWZOa&_W_wUPkjt6bg3BS_1nrL|pJAfepy*MHaEZA6y>*NdJZ!Y`|LDSx{G*nEQ$@t%j9aoRq3tO#|k?T66-d2QE%|j&tZl*pnvWAb9XGa|Oq)GKhVI<(le+B&ewh zo}E^x2TVIl>GT@mxV&Tj4%Qa<%))@?CpDnmOz6+y_IEDA_>IIizlJ-PPRGnscFKU+ zq{>7chvn@X8E9>>vXZ4Fv{7tPYgNNmR!xl3LduM3xihgz%(9BblrupjFgnQ*Hw?9n z0hBS4X?`w4{@`J^bxW5YkH2W;Q${U!Pa|H+a9BvH;iuc~u!LwGb*ZjV2-AB|3qX3_`{F9Rs ey^K7(o4%QRuAXr+uRhnl_|Qr9Eb|WD0sIG#L_S0S literal 0 HcmV?d00001 diff --git a/proto/v1/php/GPBMetadata/Proto/V1/ModuleNoOption.php b/proto/v1/php/GPBMetadata/Proto/V1/ModuleNoOption.php deleted file mode 100644 index 668fae8..0000000 --- a/proto/v1/php/GPBMetadata/Proto/V1/ModuleNoOption.php +++ /dev/null @@ -1,25 +0,0 @@ -internalAddGeneratedFile(hex2bin( - "0adb060a1f70726f746f2f76312f6d6f64756c652d6e6f2d6f7074696f6e2e70726f746f224d0a0846756e6374696f6e12180a06706172616d7318012003280e32082e56616c5479706512190a07726573756c747318022003280e32082e56616c54797065120c0a046e616d6518032001280922360a06496d706f727412130a0b6d6f64756c655f6e616d6518012001280912170a0466756e6318022001280b32092e46756e6374696f6e22210a064578706f727412170a0466756e6318012001280b32092e46756e6374696f6e22a9030a064d6f64756c65120a0a026964180120012803120c0a046861736818032001280912180a07696d706f72747318042003280b32072e496d706f727412180a076578706f72747318052003280b32072e4578706f7274120c0a0473697a6518062001280412100a086c6f636174696f6e18072001280912280a0f736f757263655f6c616e677561676518082001280e320f2e536f757263654c616e677561676512270a086d6574616461746118092003280b32152e4d6f64756c652e4d65746164617461456e747279122f0a0b696e7365727465645f6174180a2001280b321a2e676f6f676c652e70726f746f6275662e54696d657374616d70120f0a07737472696e6773180b2003280912340a0f66756e6374696f6e5f686173686573180f2003280b321b2e4d6f64756c652e46756e6374696f6e486173686573456e7472791a2f0a0d4d65746164617461456e747279120b0a036b6579180120012809120d0a0576616c75651802200128093a0238011a350a1346756e6374696f6e486173686573456e747279120b0a036b6579180120012809120d0a0576616c75651802200128093a0238012a530a0756616c5479706512070a03493332100012070a03493634100112070a03463332100212070a03463634100312080a04563132381004120b0a0746756e635265661005120d0a0945787465726e52656610062a84010a0e536f757263654c616e6775616765120b0a07556e6b6e6f776e100012080a0452757374100112060a02476f100212050a0143100312070a03437070100412120a0e417373656d626c79536372697074100512090a0553776966741006120e0a0a4a6176615363726970741007120b0a074861736b656c6c100812070a035a69671009620670726f746f33" - ), true); - - static::$is_initialized = true; - } -} - diff --git a/proto/v1/php/GetModuleGraphRequest.php b/proto/v1/php/GetModuleGraphRequest.php new file mode 100644 index 0000000..d37c16a --- /dev/null +++ b/proto/v1/php/GetModuleGraphRequest.php @@ -0,0 +1,59 @@ +GetModuleGraphRequest + */ +class GetModuleGraphRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 module_id = 1; + */ + protected $module_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $module_id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 module_id = 1; + * @return int|string + */ + public function getModuleId() + { + return $this->module_id; + } + + /** + * Generated from protobuf field int64 module_id = 1; + * @param int|string $var + * @return $this + */ + public function setModuleId($var) + { + GPBUtil::checkInt64($var); + $this->module_id = $var; + + return $this; + } + +} + diff --git a/proto/v1/php/GetModuleGraphResponse.php b/proto/v1/php/GetModuleGraphResponse.php new file mode 100644 index 0000000..0a29267 --- /dev/null +++ b/proto/v1/php/GetModuleGraphResponse.php @@ -0,0 +1,105 @@ +GetModuleGraphResponse + */ +class GetModuleGraphResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .ModuleGraph module_graph = 1; + */ + protected $module_graph = null; + /** + * Generated from protobuf field .Error error = 2; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \ModuleGraph $module_graph + * @type \Error $error + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .ModuleGraph module_graph = 1; + * @return \ModuleGraph|null + */ + public function getModuleGraph() + { + return isset($this->module_graph) ? $this->module_graph : null; + } + + public function hasModuleGraph() + { + return isset($this->module_graph); + } + + public function clearModuleGraph() + { + unset($this->module_graph); + } + + /** + * Generated from protobuf field .ModuleGraph module_graph = 1; + * @param \ModuleGraph $var + * @return $this + */ + public function setModuleGraph($var) + { + GPBUtil::checkMessage($var, \ModuleGraph::class); + $this->module_graph = $var; + + return $this; + } + + /** + * Generated from protobuf field .Error error = 2; + * @return \Error|null + */ + public function getError() + { + return isset($this->error) ? $this->error : null; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .Error error = 2; + * @param \Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Error::class); + $this->error = $var; + + return $this; + } + +} + diff --git a/proto/v1/php/GetModuleRequest.php b/proto/v1/php/GetModuleRequest.php new file mode 100644 index 0000000..fadac40 --- /dev/null +++ b/proto/v1/php/GetModuleRequest.php @@ -0,0 +1,59 @@ +GetModuleRequest + */ +class GetModuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 module_id = 1; + */ + protected $module_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $module_id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 module_id = 1; + * @return int|string + */ + public function getModuleId() + { + return $this->module_id; + } + + /** + * Generated from protobuf field int64 module_id = 1; + * @param int|string $var + * @return $this + */ + public function setModuleId($var) + { + GPBUtil::checkInt64($var); + $this->module_id = $var; + + return $this; + } + +} + diff --git a/proto/v1/php/GetModuleResponse.php b/proto/v1/php/GetModuleResponse.php new file mode 100644 index 0000000..003523c --- /dev/null +++ b/proto/v1/php/GetModuleResponse.php @@ -0,0 +1,105 @@ +GetModuleResponse + */ +class GetModuleResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .Module module = 1; + */ + protected $module = null; + /** + * Generated from protobuf field .Error error = 2; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Module $module + * @type \Error $error + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .Module module = 1; + * @return \Module|null + */ + public function getModule() + { + return isset($this->module) ? $this->module : null; + } + + public function hasModule() + { + return isset($this->module); + } + + public function clearModule() + { + unset($this->module); + } + + /** + * Generated from protobuf field .Module module = 1; + * @param \Module $var + * @return $this + */ + public function setModule($var) + { + GPBUtil::checkMessage($var, \Module::class); + $this->module = $var; + + return $this; + } + + /** + * Generated from protobuf field .Error error = 2; + * @return \Error|null + */ + public function getError() + { + return isset($this->error) ? $this->error : null; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .Error error = 2; + * @param \Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Error::class); + $this->error = $var; + + return $this; + } + +} + diff --git a/proto/v1/php/Import.php b/proto/v1/php/Import.php index 077d707..76fe279 100644 --- a/proto/v1/php/Import.php +++ b/proto/v1/php/Import.php @@ -1,6 +1,6 @@ .Function func = 2; - * @return \PBFunction + * @return \PBFunction|null */ public function getFunc() { - return $this->func; + return isset($this->func) ? $this->func : null; + } + + public function hasFunc() + { + return isset($this->func); + } + + public function clearFunc() + { + unset($this->func); } /** diff --git a/proto/v1/php/InstallPluginRequest.php b/proto/v1/php/InstallPluginRequest.php new file mode 100644 index 0000000..20c1ea1 --- /dev/null +++ b/proto/v1/php/InstallPluginRequest.php @@ -0,0 +1,156 @@ +InstallPluginRequest + */ +class InstallPluginRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string identifier = 1; + */ + protected $identifier = ''; + /** + * Generated from protobuf field string name = 2; + */ + protected $name = null; + /** + * Generated from protobuf field string location = 3; + */ + protected $location = ''; + /** + * bytes config = 5; + * + * Generated from protobuf field bytes wasm = 4; + */ + protected $wasm = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $identifier + * @type string $name + * @type string $location + * @type string $wasm + * bytes config = 5; + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string identifier = 1; + * @return string + */ + public function getIdentifier() + { + return $this->identifier; + } + + /** + * Generated from protobuf field string identifier = 1; + * @param string $var + * @return $this + */ + public function setIdentifier($var) + { + GPBUtil::checkString($var, True); + $this->identifier = $var; + + return $this; + } + + /** + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return isset($this->name) ? $this->name : ''; + } + + public function hasName() + { + return isset($this->name); + } + + public function clearName() + { + unset($this->name); + } + + /** + * Generated from protobuf field string name = 2; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Generated from protobuf field string location = 3; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Generated from protobuf field string location = 3; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * bytes config = 5; + * + * Generated from protobuf field bytes wasm = 4; + * @return string + */ + public function getWasm() + { + return $this->wasm; + } + + /** + * bytes config = 5; + * + * Generated from protobuf field bytes wasm = 4; + * @param string $var + * @return $this + */ + public function setWasm($var) + { + GPBUtil::checkString($var, False); + $this->wasm = $var; + + return $this; + } + +} + diff --git a/proto/v1/php/InstallPluginResponse.php b/proto/v1/php/InstallPluginResponse.php new file mode 100644 index 0000000..bab7b8e --- /dev/null +++ b/proto/v1/php/InstallPluginResponse.php @@ -0,0 +1,93 @@ +InstallPluginResponse + */ +class InstallPluginResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string hash = 1; + */ + protected $hash = ''; + /** + * Generated from protobuf field .Error error = 2; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $hash + * @type \Error $error + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string hash = 1; + * @return string + */ + public function getHash() + { + return $this->hash; + } + + /** + * Generated from protobuf field string hash = 1; + * @param string $var + * @return $this + */ + public function setHash($var) + { + GPBUtil::checkString($var, True); + $this->hash = $var; + + return $this; + } + + /** + * Generated from protobuf field .Error error = 2; + * @return \Error|null + */ + public function getError() + { + return isset($this->error) ? $this->error : null; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .Error error = 2; + * @param \Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Error::class); + $this->error = $var; + + return $this; + } + +} + diff --git a/proto/v1/php/ListModulesRequest.php b/proto/v1/php/ListModulesRequest.php new file mode 100644 index 0000000..6fb909a --- /dev/null +++ b/proto/v1/php/ListModulesRequest.php @@ -0,0 +1,106 @@ +ListModulesRequest + */ +class ListModulesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .Pagination pagination = 1; + */ + protected $pagination = null; + /** + * Generated from protobuf field .Sort sort = 2; + */ + protected $sort = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Pagination $pagination + * @type \Sort $sort + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .Pagination pagination = 1; + * @return \Pagination|null + */ + public function getPagination() + { + return isset($this->pagination) ? $this->pagination : null; + } + + public function hasPagination() + { + return isset($this->pagination); + } + + public function clearPagination() + { + unset($this->pagination); + } + + /** + * Generated from protobuf field .Pagination pagination = 1; + * @param \Pagination $var + * @return $this + */ + public function setPagination($var) + { + GPBUtil::checkMessage($var, \Pagination::class); + $this->pagination = $var; + + return $this; + } + + /** + * Generated from protobuf field .Sort sort = 2; + * @return \Sort|null + */ + public function getSort() + { + return isset($this->sort) ? $this->sort : null; + } + + public function hasSort() + { + return isset($this->sort); + } + + public function clearSort() + { + unset($this->sort); + } + + /** + * Generated from protobuf field .Sort sort = 2; + * @param \Sort $var + * @return $this + */ + public function setSort($var) + { + GPBUtil::checkMessage($var, \Sort::class); + $this->sort = $var; + + return $this; + } + +} + diff --git a/proto/v1/php/ListModulesResponse.php b/proto/v1/php/ListModulesResponse.php new file mode 100644 index 0000000..f3783db --- /dev/null +++ b/proto/v1/php/ListModulesResponse.php @@ -0,0 +1,207 @@ +ListModulesResponse + */ +class ListModulesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .Module modules = 1; + */ + private $modules; + /** + * Generated from protobuf field .Pagination pagination = 2; + */ + protected $pagination = null; + /** + * the full count of results in the database (not the count of this message's + * `modules`). + * + * Generated from protobuf field uint64 total = 3; + */ + protected $total = 0; + /** + * Generated from protobuf field .Sort sort = 4; + */ + protected $sort = null; + /** + * Generated from protobuf field .Error error = 5; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Module[]|\Google\Protobuf\Internal\RepeatedField $modules + * @type \Pagination $pagination + * @type int|string $total + * the full count of results in the database (not the count of this message's + * `modules`). + * @type \Sort $sort + * @type \Error $error + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .Module modules = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getModules() + { + return $this->modules; + } + + /** + * Generated from protobuf field repeated .Module modules = 1; + * @param \Module[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setModules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Module::class); + $this->modules = $arr; + + return $this; + } + + /** + * Generated from protobuf field .Pagination pagination = 2; + * @return \Pagination|null + */ + public function getPagination() + { + return isset($this->pagination) ? $this->pagination : null; + } + + public function hasPagination() + { + return isset($this->pagination); + } + + public function clearPagination() + { + unset($this->pagination); + } + + /** + * Generated from protobuf field .Pagination pagination = 2; + * @param \Pagination $var + * @return $this + */ + public function setPagination($var) + { + GPBUtil::checkMessage($var, \Pagination::class); + $this->pagination = $var; + + return $this; + } + + /** + * the full count of results in the database (not the count of this message's + * `modules`). + * + * Generated from protobuf field uint64 total = 3; + * @return int|string + */ + public function getTotal() + { + return $this->total; + } + + /** + * the full count of results in the database (not the count of this message's + * `modules`). + * + * Generated from protobuf field uint64 total = 3; + * @param int|string $var + * @return $this + */ + public function setTotal($var) + { + GPBUtil::checkUint64($var); + $this->total = $var; + + return $this; + } + + /** + * Generated from protobuf field .Sort sort = 4; + * @return \Sort|null + */ + public function getSort() + { + return isset($this->sort) ? $this->sort : null; + } + + public function hasSort() + { + return isset($this->sort); + } + + public function clearSort() + { + unset($this->sort); + } + + /** + * Generated from protobuf field .Sort sort = 4; + * @param \Sort $var + * @return $this + */ + public function setSort($var) + { + GPBUtil::checkMessage($var, \Sort::class); + $this->sort = $var; + + return $this; + } + + /** + * Generated from protobuf field .Error error = 5; + * @return \Error|null + */ + public function getError() + { + return isset($this->error) ? $this->error : null; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .Error error = 5; + * @param \Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Error::class); + $this->error = $var; + + return $this; + } + +} + diff --git a/proto/v1/php/Module.php b/proto/v1/php/Module.php index 9e5f36d..6ef6028 100644 --- a/proto/v1/php/Module.php +++ b/proto/v1/php/Module.php @@ -1,6 +1,6 @@ repeated string strings = 11; */ private $strings; + /** + * the cyclomatic complexity + * () of the instructions + * + * Generated from protobuf field uint32 complexity = 13; + */ + protected $complexity = null; + /** + * the serialized graph in json format + * + * Generated from protobuf field bytes graph = 14; + */ + protected $graph = null; /** * function hashes * @@ -111,12 +124,17 @@ class Module extends \Google\Protobuf\Internal\Message * timestamp when this module was loaded and stored * @type string[]|\Google\Protobuf\Internal\RepeatedField $strings * the interned strings stored in the wasm binary (panic/abort messages, etc.) + * @type int $complexity + * the cyclomatic complexity + * () of the instructions + * @type string $graph + * the serialized graph in json format * @type array|\Google\Protobuf\Internal\MapField $function_hashes * function hashes * } */ public function __construct($data = NULL) { - \GPBMetadata\Proto\V1\ModuleNoOption::initOnce(); + \GPBMetadata\Proto\V1\Api::initOnce(); parent::__construct($data); } @@ -336,11 +354,21 @@ public function setMetadata($var) * timestamp when this module was loaded and stored * * Generated from protobuf field .google.protobuf.Timestamp inserted_at = 10; - * @return \Google\Protobuf\Timestamp + * @return \Google\Protobuf\Timestamp|null */ public function getInsertedAt() { - return $this->inserted_at; + return isset($this->inserted_at) ? $this->inserted_at : null; + } + + public function hasInsertedAt() + { + return isset($this->inserted_at); + } + + public function clearInsertedAt() + { + unset($this->inserted_at); } /** @@ -384,6 +412,80 @@ public function setStrings($var) return $this; } + /** + * the cyclomatic complexity + * () of the instructions + * + * Generated from protobuf field uint32 complexity = 13; + * @return int + */ + public function getComplexity() + { + return isset($this->complexity) ? $this->complexity : 0; + } + + public function hasComplexity() + { + return isset($this->complexity); + } + + public function clearComplexity() + { + unset($this->complexity); + } + + /** + * the cyclomatic complexity + * () of the instructions + * + * Generated from protobuf field uint32 complexity = 13; + * @param int $var + * @return $this + */ + public function setComplexity($var) + { + GPBUtil::checkUint32($var); + $this->complexity = $var; + + return $this; + } + + /** + * the serialized graph in json format + * + * Generated from protobuf field bytes graph = 14; + * @return string + */ + public function getGraph() + { + return isset($this->graph) ? $this->graph : ''; + } + + public function hasGraph() + { + return isset($this->graph); + } + + public function clearGraph() + { + unset($this->graph); + } + + /** + * the serialized graph in json format + * + * Generated from protobuf field bytes graph = 14; + * @param string $var + * @return $this + */ + public function setGraph($var) + { + GPBUtil::checkString($var, False); + $this->graph = $var; + + return $this; + } + /** * function hashes * diff --git a/proto/v1/php/ModuleGraph.php b/proto/v1/php/ModuleGraph.php new file mode 100644 index 0000000..cd92234 --- /dev/null +++ b/proto/v1/php/ModuleGraph.php @@ -0,0 +1,99 @@ +ModuleGraph + */ +class ModuleGraph extends \Google\Protobuf\Internal\Message +{ + /** + * ID for this module, generated by the database. + * + * Generated from protobuf field int64 id = 1; + */ + protected $id = 0; + /** + * the serialized graph in json format + * + * Generated from protobuf field bytes json_bytes = 2; + */ + protected $json_bytes = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $id + * ID for this module, generated by the database. + * @type string $json_bytes + * the serialized graph in json format + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * ID for this module, generated by the database. + * + * Generated from protobuf field int64 id = 1; + * @return int|string + */ + public function getId() + { + return $this->id; + } + + /** + * ID for this module, generated by the database. + * + * Generated from protobuf field int64 id = 1; + * @param int|string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkInt64($var); + $this->id = $var; + + return $this; + } + + /** + * the serialized graph in json format + * + * Generated from protobuf field bytes json_bytes = 2; + * @return string + */ + public function getJsonBytes() + { + return $this->json_bytes; + } + + /** + * the serialized graph in json format + * + * Generated from protobuf field bytes json_bytes = 2; + * @param string $var + * @return $this + */ + public function setJsonBytes($var) + { + GPBUtil::checkString($var, False); + $this->json_bytes = $var; + + return $this; + } + +} + diff --git a/proto/v1/php/PBFunction.php b/proto/v1/php/PBFunction.php index d34141d..e4fb729 100644 --- a/proto/v1/php/PBFunction.php +++ b/proto/v1/php/PBFunction.php @@ -1,6 +1,6 @@ Pagination + */ +class Pagination extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field uint32 limit = 1; + */ + protected $limit = 0; + /** + * Generated from protobuf field uint32 offset = 2; + */ + protected $offset = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $limit + * @type int $offset + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field uint32 limit = 1; + * @return int + */ + public function getLimit() + { + return $this->limit; + } + + /** + * Generated from protobuf field uint32 limit = 1; + * @param int $var + * @return $this + */ + public function setLimit($var) + { + GPBUtil::checkUint32($var); + $this->limit = $var; + + return $this; + } + + /** + * Generated from protobuf field uint32 offset = 2; + * @return int + */ + public function getOffset() + { + return $this->offset; + } + + /** + * Generated from protobuf field uint32 offset = 2; + * @param int $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkUint32($var); + $this->offset = $var; + + return $this; + } + +} + diff --git a/proto/v1/php/SearchModulesRequest.php b/proto/v1/php/SearchModulesRequest.php new file mode 100644 index 0000000..97ce36c --- /dev/null +++ b/proto/v1/php/SearchModulesRequest.php @@ -0,0 +1,696 @@ +SearchModulesRequest + */ +class SearchModulesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * ID for this module, generated by the database. + * + * Generated from protobuf field int64 id = 1; + */ + protected $id = null; + /** + * original name of the binary module file + * + * Generated from protobuf field string hash = 3; + */ + protected $hash = null; + /** + * function imports called by the module (see: + * ) + * + * Generated from protobuf field repeated .Import imports = 4; + */ + private $imports; + /** + * function exports provided by the module (see: + * ) + * + * Generated from protobuf field repeated .Export exports = 5; + */ + private $exports; + /** + * minimum size in bytes of the module + * + * Generated from protobuf field uint64 min_size = 6; + */ + protected $min_size = null; + /** + * maximum size in bytes of the module + * + * Generated from protobuf field uint64 max_size = 7; + */ + protected $max_size = null; + /** + * optional path or locator to the module (TODO: maybe this is better stored + * as metadata) + * + * Generated from protobuf field string location = 8; + */ + protected $location = null; + /** + * programming language used to produce this module + * + * Generated from protobuf field .SourceLanguage source_language = 9; + */ + protected $source_language = null; + /** + * arbitrary metadata provided by the operator of this module + * + * Generated from protobuf field map metadata = 10; + */ + private $metadata; + /** + * timestamp when this module was loaded and stored + * + * Generated from protobuf field .google.protobuf.Timestamp inserted_before = 11; + */ + protected $inserted_before = null; + /** + * timestamp when this module was loaded and stored + * + * Generated from protobuf field .google.protobuf.Timestamp inserted_after = 12; + */ + protected $inserted_after = null; + /** + * the interned strings stored in the wasm binary (panic/abort messages, etc.) + * + * Generated from protobuf field repeated string strings = 13; + */ + private $strings; + /** + * match on any function name in an import or export. + * + * Generated from protobuf field string function_name = 14; + */ + protected $function_name = null; + /** + * match on the module name e.g. `env` or `wasi_snapshot_preview1` + * + * Generated from protobuf field string module_name = 15; + */ + protected $module_name = null; + /** + * Generated from protobuf field .Pagination pagination = 16; + */ + protected $pagination = null; + /** + * Generated from protobuf field .Sort sort = 17; + */ + protected $sort = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $id + * ID for this module, generated by the database. + * @type string $hash + * original name of the binary module file + * @type \Import[]|\Google\Protobuf\Internal\RepeatedField $imports + * function imports called by the module (see: + * ) + * @type \Export[]|\Google\Protobuf\Internal\RepeatedField $exports + * function exports provided by the module (see: + * ) + * @type int|string $min_size + * minimum size in bytes of the module + * @type int|string $max_size + * maximum size in bytes of the module + * @type string $location + * optional path or locator to the module (TODO: maybe this is better stored + * as metadata) + * @type int $source_language + * programming language used to produce this module + * @type array|\Google\Protobuf\Internal\MapField $metadata + * arbitrary metadata provided by the operator of this module + * @type \Google\Protobuf\Timestamp $inserted_before + * timestamp when this module was loaded and stored + * @type \Google\Protobuf\Timestamp $inserted_after + * timestamp when this module was loaded and stored + * @type string[]|\Google\Protobuf\Internal\RepeatedField $strings + * the interned strings stored in the wasm binary (panic/abort messages, etc.) + * @type string $function_name + * match on any function name in an import or export. + * @type string $module_name + * match on the module name e.g. `env` or `wasi_snapshot_preview1` + * @type \Pagination $pagination + * @type \Sort $sort + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * ID for this module, generated by the database. + * + * Generated from protobuf field int64 id = 1; + * @return int|string + */ + public function getId() + { + return isset($this->id) ? $this->id : 0; + } + + public function hasId() + { + return isset($this->id); + } + + public function clearId() + { + unset($this->id); + } + + /** + * ID for this module, generated by the database. + * + * Generated from protobuf field int64 id = 1; + * @param int|string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkInt64($var); + $this->id = $var; + + return $this; + } + + /** + * original name of the binary module file + * + * Generated from protobuf field string hash = 3; + * @return string + */ + public function getHash() + { + return isset($this->hash) ? $this->hash : ''; + } + + public function hasHash() + { + return isset($this->hash); + } + + public function clearHash() + { + unset($this->hash); + } + + /** + * original name of the binary module file + * + * Generated from protobuf field string hash = 3; + * @param string $var + * @return $this + */ + public function setHash($var) + { + GPBUtil::checkString($var, True); + $this->hash = $var; + + return $this; + } + + /** + * function imports called by the module (see: + * ) + * + * Generated from protobuf field repeated .Import imports = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getImports() + { + return $this->imports; + } + + /** + * function imports called by the module (see: + * ) + * + * Generated from protobuf field repeated .Import imports = 4; + * @param \Import[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setImports($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Import::class); + $this->imports = $arr; + + return $this; + } + + /** + * function exports provided by the module (see: + * ) + * + * Generated from protobuf field repeated .Export exports = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExports() + { + return $this->exports; + } + + /** + * function exports provided by the module (see: + * ) + * + * Generated from protobuf field repeated .Export exports = 5; + * @param \Export[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExports($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Export::class); + $this->exports = $arr; + + return $this; + } + + /** + * minimum size in bytes of the module + * + * Generated from protobuf field uint64 min_size = 6; + * @return int|string + */ + public function getMinSize() + { + return isset($this->min_size) ? $this->min_size : 0; + } + + public function hasMinSize() + { + return isset($this->min_size); + } + + public function clearMinSize() + { + unset($this->min_size); + } + + /** + * minimum size in bytes of the module + * + * Generated from protobuf field uint64 min_size = 6; + * @param int|string $var + * @return $this + */ + public function setMinSize($var) + { + GPBUtil::checkUint64($var); + $this->min_size = $var; + + return $this; + } + + /** + * maximum size in bytes of the module + * + * Generated from protobuf field uint64 max_size = 7; + * @return int|string + */ + public function getMaxSize() + { + return isset($this->max_size) ? $this->max_size : 0; + } + + public function hasMaxSize() + { + return isset($this->max_size); + } + + public function clearMaxSize() + { + unset($this->max_size); + } + + /** + * maximum size in bytes of the module + * + * Generated from protobuf field uint64 max_size = 7; + * @param int|string $var + * @return $this + */ + public function setMaxSize($var) + { + GPBUtil::checkUint64($var); + $this->max_size = $var; + + return $this; + } + + /** + * optional path or locator to the module (TODO: maybe this is better stored + * as metadata) + * + * Generated from protobuf field string location = 8; + * @return string + */ + public function getLocation() + { + return isset($this->location) ? $this->location : ''; + } + + public function hasLocation() + { + return isset($this->location); + } + + public function clearLocation() + { + unset($this->location); + } + + /** + * optional path or locator to the module (TODO: maybe this is better stored + * as metadata) + * + * Generated from protobuf field string location = 8; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * programming language used to produce this module + * + * Generated from protobuf field .SourceLanguage source_language = 9; + * @return int + */ + public function getSourceLanguage() + { + return isset($this->source_language) ? $this->source_language : 0; + } + + public function hasSourceLanguage() + { + return isset($this->source_language); + } + + public function clearSourceLanguage() + { + unset($this->source_language); + } + + /** + * programming language used to produce this module + * + * Generated from protobuf field .SourceLanguage source_language = 9; + * @param int $var + * @return $this + */ + public function setSourceLanguage($var) + { + GPBUtil::checkEnum($var, \SourceLanguage::class); + $this->source_language = $var; + + return $this; + } + + /** + * arbitrary metadata provided by the operator of this module + * + * Generated from protobuf field map metadata = 10; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * arbitrary metadata provided by the operator of this module + * + * Generated from protobuf field map metadata = 10; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->metadata = $arr; + + return $this; + } + + /** + * timestamp when this module was loaded and stored + * + * Generated from protobuf field .google.protobuf.Timestamp inserted_before = 11; + * @return \Google\Protobuf\Timestamp|null + */ + public function getInsertedBefore() + { + return isset($this->inserted_before) ? $this->inserted_before : null; + } + + public function hasInsertedBefore() + { + return isset($this->inserted_before); + } + + public function clearInsertedBefore() + { + unset($this->inserted_before); + } + + /** + * timestamp when this module was loaded and stored + * + * Generated from protobuf field .google.protobuf.Timestamp inserted_before = 11; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setInsertedBefore($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->inserted_before = $var; + + return $this; + } + + /** + * timestamp when this module was loaded and stored + * + * Generated from protobuf field .google.protobuf.Timestamp inserted_after = 12; + * @return \Google\Protobuf\Timestamp|null + */ + public function getInsertedAfter() + { + return isset($this->inserted_after) ? $this->inserted_after : null; + } + + public function hasInsertedAfter() + { + return isset($this->inserted_after); + } + + public function clearInsertedAfter() + { + unset($this->inserted_after); + } + + /** + * timestamp when this module was loaded and stored + * + * Generated from protobuf field .google.protobuf.Timestamp inserted_after = 12; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setInsertedAfter($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->inserted_after = $var; + + return $this; + } + + /** + * the interned strings stored in the wasm binary (panic/abort messages, etc.) + * + * Generated from protobuf field repeated string strings = 13; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStrings() + { + return $this->strings; + } + + /** + * the interned strings stored in the wasm binary (panic/abort messages, etc.) + * + * Generated from protobuf field repeated string strings = 13; + * @param string[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStrings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->strings = $arr; + + return $this; + } + + /** + * match on any function name in an import or export. + * + * Generated from protobuf field string function_name = 14; + * @return string + */ + public function getFunctionName() + { + return isset($this->function_name) ? $this->function_name : ''; + } + + public function hasFunctionName() + { + return isset($this->function_name); + } + + public function clearFunctionName() + { + unset($this->function_name); + } + + /** + * match on any function name in an import or export. + * + * Generated from protobuf field string function_name = 14; + * @param string $var + * @return $this + */ + public function setFunctionName($var) + { + GPBUtil::checkString($var, True); + $this->function_name = $var; + + return $this; + } + + /** + * match on the module name e.g. `env` or `wasi_snapshot_preview1` + * + * Generated from protobuf field string module_name = 15; + * @return string + */ + public function getModuleName() + { + return isset($this->module_name) ? $this->module_name : ''; + } + + public function hasModuleName() + { + return isset($this->module_name); + } + + public function clearModuleName() + { + unset($this->module_name); + } + + /** + * match on the module name e.g. `env` or `wasi_snapshot_preview1` + * + * Generated from protobuf field string module_name = 15; + * @param string $var + * @return $this + */ + public function setModuleName($var) + { + GPBUtil::checkString($var, True); + $this->module_name = $var; + + return $this; + } + + /** + * Generated from protobuf field .Pagination pagination = 16; + * @return \Pagination|null + */ + public function getPagination() + { + return isset($this->pagination) ? $this->pagination : null; + } + + public function hasPagination() + { + return isset($this->pagination); + } + + public function clearPagination() + { + unset($this->pagination); + } + + /** + * Generated from protobuf field .Pagination pagination = 16; + * @param \Pagination $var + * @return $this + */ + public function setPagination($var) + { + GPBUtil::checkMessage($var, \Pagination::class); + $this->pagination = $var; + + return $this; + } + + /** + * Generated from protobuf field .Sort sort = 17; + * @return \Sort|null + */ + public function getSort() + { + return isset($this->sort) ? $this->sort : null; + } + + public function hasSort() + { + return isset($this->sort); + } + + public function clearSort() + { + unset($this->sort); + } + + /** + * Generated from protobuf field .Sort sort = 17; + * @param \Sort $var + * @return $this + */ + public function setSort($var) + { + GPBUtil::checkMessage($var, \Sort::class); + $this->sort = $var; + + return $this; + } + +} + diff --git a/proto/v1/php/SearchModulesResponse.php b/proto/v1/php/SearchModulesResponse.php new file mode 100644 index 0000000..2a88691 --- /dev/null +++ b/proto/v1/php/SearchModulesResponse.php @@ -0,0 +1,207 @@ +SearchModulesResponse + */ +class SearchModulesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .Module modules = 1; + */ + private $modules; + /** + * Generated from protobuf field .Pagination pagination = 2; + */ + protected $pagination = null; + /** + * the full count of results in the database (not the count of this message's + * `modules`). + * + * Generated from protobuf field uint64 total = 3; + */ + protected $total = 0; + /** + * Generated from protobuf field .Sort sort = 4; + */ + protected $sort = null; + /** + * Generated from protobuf field .Error error = 5; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Module[]|\Google\Protobuf\Internal\RepeatedField $modules + * @type \Pagination $pagination + * @type int|string $total + * the full count of results in the database (not the count of this message's + * `modules`). + * @type \Sort $sort + * @type \Error $error + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .Module modules = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getModules() + { + return $this->modules; + } + + /** + * Generated from protobuf field repeated .Module modules = 1; + * @param \Module[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setModules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Module::class); + $this->modules = $arr; + + return $this; + } + + /** + * Generated from protobuf field .Pagination pagination = 2; + * @return \Pagination|null + */ + public function getPagination() + { + return isset($this->pagination) ? $this->pagination : null; + } + + public function hasPagination() + { + return isset($this->pagination); + } + + public function clearPagination() + { + unset($this->pagination); + } + + /** + * Generated from protobuf field .Pagination pagination = 2; + * @param \Pagination $var + * @return $this + */ + public function setPagination($var) + { + GPBUtil::checkMessage($var, \Pagination::class); + $this->pagination = $var; + + return $this; + } + + /** + * the full count of results in the database (not the count of this message's + * `modules`). + * + * Generated from protobuf field uint64 total = 3; + * @return int|string + */ + public function getTotal() + { + return $this->total; + } + + /** + * the full count of results in the database (not the count of this message's + * `modules`). + * + * Generated from protobuf field uint64 total = 3; + * @param int|string $var + * @return $this + */ + public function setTotal($var) + { + GPBUtil::checkUint64($var); + $this->total = $var; + + return $this; + } + + /** + * Generated from protobuf field .Sort sort = 4; + * @return \Sort|null + */ + public function getSort() + { + return isset($this->sort) ? $this->sort : null; + } + + public function hasSort() + { + return isset($this->sort); + } + + public function clearSort() + { + unset($this->sort); + } + + /** + * Generated from protobuf field .Sort sort = 4; + * @param \Sort $var + * @return $this + */ + public function setSort($var) + { + GPBUtil::checkMessage($var, \Sort::class); + $this->sort = $var; + + return $this; + } + + /** + * Generated from protobuf field .Error error = 5; + * @return \Error|null + */ + public function getError() + { + return isset($this->error) ? $this->error : null; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .Error error = 5; + * @param \Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Error::class); + $this->error = $var; + + return $this; + } + +} + diff --git a/proto/v1/php/Sort.php b/proto/v1/php/Sort.php new file mode 100644 index 0000000..90f9e28 --- /dev/null +++ b/proto/v1/php/Sort.php @@ -0,0 +1,85 @@ +Sort + */ +class Sort extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .Direction direction = 1; + */ + protected $direction = 0; + /** + * Generated from protobuf field .Field field = 2; + */ + protected $field = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $direction + * @type int $field + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .Direction direction = 1; + * @return int + */ + public function getDirection() + { + return $this->direction; + } + + /** + * Generated from protobuf field .Direction direction = 1; + * @param int $var + * @return $this + */ + public function setDirection($var) + { + GPBUtil::checkEnum($var, \Direction::class); + $this->direction = $var; + + return $this; + } + + /** + * Generated from protobuf field .Field field = 2; + * @return int + */ + public function getField() + { + return $this->field; + } + + /** + * Generated from protobuf field .Field field = 2; + * @param int $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkEnum($var, \Field::class); + $this->field = $var; + + return $this; + } + +} + diff --git a/proto/v1/php/SourceLanguage.php b/proto/v1/php/SourceLanguage.php index c6e610d..cf09ff3 100644 --- a/proto/v1/php/SourceLanguage.php +++ b/proto/v1/php/SourceLanguage.php @@ -1,6 +1,6 @@ UninstallPluginRequest + */ +class UninstallPluginRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string identifier = 1; + */ + protected $identifier = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $identifier + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string identifier = 1; + * @return string + */ + public function getIdentifier() + { + return $this->identifier; + } + + /** + * Generated from protobuf field string identifier = 1; + * @param string $var + * @return $this + */ + public function setIdentifier($var) + { + GPBUtil::checkString($var, True); + $this->identifier = $var; + + return $this; + } + +} + diff --git a/proto/v1/php/UninstallPluginResponse.php b/proto/v1/php/UninstallPluginResponse.php new file mode 100644 index 0000000..8ed3536 --- /dev/null +++ b/proto/v1/php/UninstallPluginResponse.php @@ -0,0 +1,66 @@ +UninstallPluginResponse + */ +class UninstallPluginResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .Error error = 1; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Error $error + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .Error error = 1; + * @return \Error|null + */ + public function getError() + { + return isset($this->error) ? $this->error : null; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .Error error = 1; + * @param \Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Error::class); + $this->error = $var; + + return $this; + } + +} + diff --git a/proto/v1/php/ValType.php b/proto/v1/php/ValType.php index 813cbd5..2768de4 100644 --- a/proto/v1/php/ValType.php +++ b/proto/v1/php/ValType.php @@ -1,6 +1,6 @@ ValidateModuleRequest + */ +class ValidateModuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * the YAML checkfile (e.g. mod.yaml) bytes + * + * Generated from protobuf field bytes checkfile = 1; + */ + protected $checkfile = ''; + protected $module_input; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $checkfile + * the YAML checkfile (e.g. mod.yaml) bytes + * @type string $module + * @type int|string $module_id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * the YAML checkfile (e.g. mod.yaml) bytes + * + * Generated from protobuf field bytes checkfile = 1; + * @return string + */ + public function getCheckfile() + { + return $this->checkfile; + } + + /** + * the YAML checkfile (e.g. mod.yaml) bytes + * + * Generated from protobuf field bytes checkfile = 1; + * @param string $var + * @return $this + */ + public function setCheckfile($var) + { + GPBUtil::checkString($var, False); + $this->checkfile = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes module = 2; + * @return string + */ + public function getModule() + { + return $this->readOneof(2); + } + + public function hasModule() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field bytes module = 2; + * @param string $var + * @return $this + */ + public function setModule($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Generated from protobuf field int64 module_id = 3; + * @return int|string + */ + public function getModuleId() + { + return $this->readOneof(3); + } + + public function hasModuleId() + { + return $this->hasOneof(3); + } + + /** + * Generated from protobuf field int64 module_id = 3; + * @param int|string $var + * @return $this + */ + public function setModuleId($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getModuleInput() + { + return $this->whichOneof("module_input"); + } + +} + diff --git a/proto/v1/php/ValidateModuleResponse.php b/proto/v1/php/ValidateModuleResponse.php new file mode 100644 index 0000000..517147d --- /dev/null +++ b/proto/v1/php/ValidateModuleResponse.php @@ -0,0 +1,95 @@ +ValidateModuleResponse + */ +class ValidateModuleResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bytes invalid_module_report = 1; + */ + protected $invalid_module_report = ''; + /** + * Generated from protobuf field .Error error = 2; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $invalid_module_report + * @type \Error $error + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\V1\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bytes invalid_module_report = 1; + * @return string + */ + public function getInvalidModuleReport() + { + return $this->invalid_module_report; + } + + /** + * Generated from protobuf field bytes invalid_module_report = 1; + * @param string $var + * @return $this + */ + public function setInvalidModuleReport($var) + { + GPBUtil::checkString($var, False); + $this->invalid_module_report = $var; + + return $this; + } + + /** + * Generated from protobuf field .Error error = 2; + * @return \Error|null + */ + public function getError() + { + return isset($this->error) ? $this->error : null; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .Error error = 2; + * @param \Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Error::class); + $this->error = $var; + + return $this; + } + +} +