diff options
Diffstat (limited to 'php/src/Google/Protobuf/Internal/DescriptorProto.php')
-rw-r--r-- | php/src/Google/Protobuf/Internal/DescriptorProto.php | 139 |
1 files changed, 90 insertions, 49 deletions
diff --git a/php/src/Google/Protobuf/Internal/DescriptorProto.php b/php/src/Google/Protobuf/Internal/DescriptorProto.php index 948c5876..1d6959b7 100644 --- a/php/src/Google/Protobuf/Internal/DescriptorProto.php +++ b/php/src/Google/Protobuf/Internal/DescriptorProto.php @@ -8,70 +8,65 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; - use Google\Protobuf\Internal\GPBUtil; /** - * <pre> * Describes a message type. - * </pre> * - * Protobuf type <code>google.protobuf.DescriptorProto</code> + * Generated from protobuf message <code>google.protobuf.DescriptorProto</code> */ class DescriptorProto extends \Google\Protobuf\Internal\Message { /** - * <code>optional string name = 1;</code> + * Generated from protobuf field <code>optional string name = 1;</code> */ private $name = ''; private $has_name = false; /** - * <code>repeated .google.protobuf.FieldDescriptorProto field = 2;</code> + * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto field = 2;</code> */ private $field; private $has_field = false; /** - * <code>repeated .google.protobuf.FieldDescriptorProto extension = 6;</code> + * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 6;</code> */ private $extension; private $has_extension = false; /** - * <code>repeated .google.protobuf.DescriptorProto nested_type = 3;</code> + * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto nested_type = 3;</code> */ private $nested_type; private $has_nested_type = false; /** - * <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 4;</code> + * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 4;</code> */ private $enum_type; private $has_enum_type = false; /** - * <code>repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;</code> + * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;</code> */ private $extension_range; private $has_extension_range = false; /** - * <code>repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;</code> + * Generated from protobuf field <code>repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;</code> */ private $oneof_decl; private $has_oneof_decl = false; /** - * <code>optional .google.protobuf.MessageOptions options = 7;</code> + * Generated from protobuf field <code>optional .google.protobuf.MessageOptions options = 7;</code> */ private $options = null; private $has_options = false; /** - * <code>repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;</code> + * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;</code> */ private $reserved_range; private $has_reserved_range = false; /** - * <pre> * Reserved field names, which may not be used by fields in the same message. * A given name may only be reserved once. - * </pre> * - * <code>repeated string reserved_name = 10;</code> + * Generated from protobuf field <code>repeated string reserved_name = 10;</code> */ private $reserved_name; private $has_reserved_name = false; @@ -82,7 +77,8 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message } /** - * <code>optional string name = 1;</code> + * Generated from protobuf field <code>optional string name = 1;</code> + * @return string */ public function getName() { @@ -90,13 +86,17 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message } /** - * <code>optional string name = 1;</code> + * Generated from protobuf field <code>optional string name = 1;</code> + * @param string $var + * @return $this */ public function setName($var) { GPBUtil::checkString($var, True); $this->name = $var; $this->has_name = true; + + return $this; } public function hasName() @@ -105,7 +105,8 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message } /** - * <code>repeated .google.protobuf.FieldDescriptorProto field = 2;</code> + * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto field = 2;</code> + * @return \Google\Protobuf\Internal\RepeatedField */ public function getField() { @@ -113,13 +114,17 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message } /** - * <code>repeated .google.protobuf.FieldDescriptorProto field = 2;</code> + * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto field = 2;</code> + * @param \Google\Protobuf\Internal\FieldDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this */ - public function setField(&$var) + public function setField($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class); $this->field = $arr; $this->has_field = true; + + return $this; } public function hasField() @@ -128,7 +133,8 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message } /** - * <code>repeated .google.protobuf.FieldDescriptorProto extension = 6;</code> + * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 6;</code> + * @return \Google\Protobuf\Internal\RepeatedField */ public function getExtension() { @@ -136,13 +142,17 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message } /** - * <code>repeated .google.protobuf.FieldDescriptorProto extension = 6;</code> + * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 6;</code> + * @param \Google\Protobuf\Internal\FieldDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this */ - public function setExtension(&$var) + public function setExtension($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class); $this->extension = $arr; $this->has_extension = true; + + return $this; } public function hasExtension() @@ -151,7 +161,8 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message } /** - * <code>repeated .google.protobuf.DescriptorProto nested_type = 3;</code> + * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto nested_type = 3;</code> + * @return \Google\Protobuf\Internal\RepeatedField */ public function getNestedType() { @@ -159,13 +170,17 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message } /** - * <code>repeated .google.protobuf.DescriptorProto nested_type = 3;</code> + * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto nested_type = 3;</code> + * @param \Google\Protobuf\Internal\DescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this */ - public function setNestedType(&$var) + public function setNestedType($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto::class); $this->nested_type = $arr; $this->has_nested_type = true; + + return $this; } public function hasNestedType() @@ -174,7 +189,8 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message } /** - * <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 4;</code> + * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 4;</code> + * @return \Google\Protobuf\Internal\RepeatedField */ public function getEnumType() { @@ -182,13 +198,17 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message } /** - * <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 4;</code> + * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 4;</code> + * @param \Google\Protobuf\Internal\EnumDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this */ - public function setEnumType(&$var) + public function setEnumType($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumDescriptorProto::class); $this->enum_type = $arr; $this->has_enum_type = true; + + return $this; } public function hasEnumType() @@ -197,7 +217,8 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message } /** - * <code>repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;</code> + * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;</code> + * @return \Google\Protobuf\Internal\RepeatedField */ public function getExtensionRange() { @@ -205,13 +226,17 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message } /** - * <code>repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;</code> + * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;</code> + * @param \Google\Protobuf\Internal\DescriptorProto_ExtensionRange[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this */ - public function setExtensionRange(&$var) + public function setExtensionRange($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto_ExtensionRange::class); $this->extension_range = $arr; $this->has_extension_range = true; + + return $this; } public function hasExtensionRange() @@ -220,7 +245,8 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message } /** - * <code>repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;</code> + * Generated from protobuf field <code>repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;</code> + * @return \Google\Protobuf\Internal\RepeatedField */ public function getOneofDecl() { @@ -228,13 +254,17 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message } /** - * <code>repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;</code> + * Generated from protobuf field <code>repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;</code> + * @param \Google\Protobuf\Internal\OneofDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this */ - public function setOneofDecl(&$var) + public function setOneofDecl($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\OneofDescriptorProto::class); $this->oneof_decl = $arr; $this->has_oneof_decl = true; + + return $this; } public function hasOneofDecl() @@ -243,7 +273,8 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message } /** - * <code>optional .google.protobuf.MessageOptions options = 7;</code> + * Generated from protobuf field <code>optional .google.protobuf.MessageOptions options = 7;</code> + * @return \Google\Protobuf\Internal\MessageOptions */ public function getOptions() { @@ -251,13 +282,17 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message } /** - * <code>optional .google.protobuf.MessageOptions options = 7;</code> + * Generated from protobuf field <code>optional .google.protobuf.MessageOptions options = 7;</code> + * @param \Google\Protobuf\Internal\MessageOptions $var + * @return $this */ - public function setOptions(&$var) + public function setOptions($var) { GPBUtil::checkMessage($var, \Google\Protobuf\Internal\MessageOptions::class); $this->options = $var; $this->has_options = true; + + return $this; } public function hasOptions() @@ -266,7 +301,8 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message } /** - * <code>repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;</code> + * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;</code> + * @return \Google\Protobuf\Internal\RepeatedField */ public function getReservedRange() { @@ -274,13 +310,17 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message } /** - * <code>repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;</code> + * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;</code> + * @param \Google\Protobuf\Internal\DescriptorProto_ReservedRange[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this */ - public function setReservedRange(&$var) + public function setReservedRange($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto_ReservedRange::class); $this->reserved_range = $arr; $this->has_reserved_range = true; + + return $this; } public function hasReservedRange() @@ -289,12 +329,11 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message } /** - * <pre> * Reserved field names, which may not be used by fields in the same message. * A given name may only be reserved once. - * </pre> * - * <code>repeated string reserved_name = 10;</code> + * Generated from protobuf field <code>repeated string reserved_name = 10;</code> + * @return \Google\Protobuf\Internal\RepeatedField */ public function getReservedName() { @@ -302,18 +341,20 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message } /** - * <pre> * Reserved field names, which may not be used by fields in the same message. * A given name may only be reserved once. - * </pre> * - * <code>repeated string reserved_name = 10;</code> + * Generated from protobuf field <code>repeated string reserved_name = 10;</code> + * @param string[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this */ - public function setReservedName(&$var) + 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() |