diff options
author | Adam Cozzette <acozzette@google.com> | 2017-09-12 10:32:01 -0700 |
---|---|---|
committer | Adam Cozzette <acozzette@google.com> | 2017-09-14 10:03:57 -0700 |
commit | 13fd045dbb2b4dacea32be162a41d5a4b0d1802f (patch) | |
tree | c219e7eb18b82523e36c6748861c403a14ea66ae /php/src | |
parent | d1bc27caef8377a710370189675cb0958443e8f1 (diff) |
Integrated internal changes from Google
Diffstat (limited to 'php/src')
-rw-r--r-- | php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php | 9 | ||||
-rw-r--r-- | php/src/Google/Protobuf/Internal/EnumDescriptorProto.php | 87 | ||||
-rw-r--r-- | php/src/Google/Protobuf/Internal/FileOptions.php | 6 |
3 files changed, 98 insertions, 4 deletions
diff --git a/php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php b/php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php index 60722d00..b0ca8da0 100644 --- a/php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php +++ b/php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php @@ -110,6 +110,13 @@ class Descriptor ->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1) ->repeated('value', \Google\Protobuf\Internal\GPBType::MESSAGE, 2, 'google.protobuf.internal.EnumValueDescriptorProto') ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 3, 'google.protobuf.internal.EnumOptions') + ->repeated('reserved_range', \Google\Protobuf\Internal\GPBType::MESSAGE, 4, 'google.protobuf.internal.EnumDescriptorProto.EnumReservedRange') + ->repeated('reserved_name', \Google\Protobuf\Internal\GPBType::STRING, 5) + ->finalizeToPool(); + + $pool->addMessage('google.protobuf.internal.EnumDescriptorProto.EnumReservedRange', \Google\Protobuf\Internal\EnumDescriptorProto_EnumReservedRange::class) + ->optional('start', \Google\Protobuf\Internal\GPBType::INT32, 1) + ->optional('end', \Google\Protobuf\Internal\GPBType::INT32, 2) ->finalizeToPool(); $pool->addMessage('google.protobuf.internal.EnumValueDescriptorProto', \Google\Protobuf\Internal\EnumValueDescriptorProto::class) @@ -144,7 +151,7 @@ class Descriptor ->optional('cc_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 16) ->optional('java_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 17) ->optional('py_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 18) - ->optional('php_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 19) + ->optional('php_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 42) ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 23) ->optional('cc_enable_arenas', \Google\Protobuf\Internal\GPBType::BOOL, 31) ->optional('objc_class_prefix', \Google\Protobuf\Internal\GPBType::STRING, 36) diff --git a/php/src/Google/Protobuf/Internal/EnumDescriptorProto.php b/php/src/Google/Protobuf/Internal/EnumDescriptorProto.php index 816fbae5..930f26ef 100644 --- a/php/src/Google/Protobuf/Internal/EnumDescriptorProto.php +++ b/php/src/Google/Protobuf/Internal/EnumDescriptorProto.php @@ -32,6 +32,23 @@ class EnumDescriptorProto extends \Google\Protobuf\Internal\Message */ private $options = null; private $has_options = false; + /** + * Range of reserved numeric values. Reserved numeric values may not be used + * by enum values in the same enum declaration. Reserved ranges may not + * overlap. + * + * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;</code> + */ + private $reserved_range; + private $has_reserved_range = false; + /** + * Reserved enum value names, which may not be reused. A given name may only + * be reserved once. + * + * Generated from protobuf field <code>repeated string reserved_name = 5;</code> + */ + private $reserved_name; + private $has_reserved_name = false; public function __construct() { \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce(); @@ -122,5 +139,75 @@ class EnumDescriptorProto extends \Google\Protobuf\Internal\Message return $this->has_options; } + /** + * Range of reserved numeric values. Reserved numeric values may not be used + * by enum values in the same enum declaration. Reserved ranges may not + * overlap. + * + * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;</code> + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReservedRange() + { + return $this->reserved_range; + } + + /** + * Range of reserved numeric values. Reserved numeric values may not be used + * by enum values in the same enum declaration. Reserved ranges may not + * overlap. + * + * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;</code> + * @param \Google\Protobuf\Internal\EnumDescriptorProto_EnumReservedRange[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReservedRange($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumDescriptorProto_EnumReservedRange::class); + $this->reserved_range = $arr; + $this->has_reserved_range = true; + + return $this; + } + + public function hasReservedRange() + { + return $this->has_reserved_range; + } + + /** + * Reserved enum value names, which may not be reused. A given name may only + * be reserved once. + * + * Generated from protobuf field <code>repeated string reserved_name = 5;</code> + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReservedName() + { + return $this->reserved_name; + } + + /** + * Reserved enum value names, which may not be reused. A given name may only + * be reserved once. + * + * Generated from protobuf field <code>repeated string reserved_name = 5;</code> + * @param string[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReservedName($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->reserved_name = $arr; + $this->has_reserved_name = true; + + return $this; + } + + public function hasReservedName() + { + return $this->has_reserved_name; + } + } diff --git a/php/src/Google/Protobuf/Internal/FileOptions.php b/php/src/Google/Protobuf/Internal/FileOptions.php index c2dd5e08..ee64e4e0 100644 --- a/php/src/Google/Protobuf/Internal/FileOptions.php +++ b/php/src/Google/Protobuf/Internal/FileOptions.php @@ -109,7 +109,7 @@ class FileOptions extends \Google\Protobuf\Internal\Message private $py_generic_services = false; private $has_py_generic_services = false; /** - * Generated from protobuf field <code>optional bool php_generic_services = 19 [default = false];</code> + * Generated from protobuf field <code>optional bool php_generic_services = 42 [default = false];</code> */ private $php_generic_services = false; private $has_php_generic_services = false; @@ -553,7 +553,7 @@ class FileOptions extends \Google\Protobuf\Internal\Message } /** - * Generated from protobuf field <code>optional bool php_generic_services = 19 [default = false];</code> + * Generated from protobuf field <code>optional bool php_generic_services = 42 [default = false];</code> * @return bool */ public function getPhpGenericServices() @@ -562,7 +562,7 @@ class FileOptions extends \Google\Protobuf\Internal\Message } /** - * Generated from protobuf field <code>optional bool php_generic_services = 19 [default = false];</code> + * Generated from protobuf field <code>optional bool php_generic_services = 42 [default = false];</code> * @param bool $var * @return $this */ |