diff options
Diffstat (limited to 'php/src/Google/Protobuf/Internal/EnumDescriptorProto.php')
-rw-r--r-- | php/src/Google/Protobuf/Internal/EnumDescriptorProto.php | 87 |
1 files changed, 87 insertions, 0 deletions
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; + } + } |