Commit 12acbc26 authored by Brent Shaffer's avatar Brent Shaffer Committed by Paul Yang

adds PHPDoc @return and @param for getters and setters respectively (#3131)

* adds PHPDoc @return and @param for getters and setters respectively

* addresses changes in PR review

* adds documentation tests

* Update php_generator:

- Prepend \ to names where required
- Remove <pre> tags
- Update protobuf field comments

* Updates class files with the protobuf changes

* Addresses review comments

* removes Protobuf Type line from PHP generated classes

* fixes phpdoc test

* adds array types to phpdoc
parent 097bfb53
......@@ -658,6 +658,7 @@ php_EXTRA_DIST= \
php/tests/encode_decode_test.php \
php/tests/gdb_test.sh \
php/tests/generated_class_test.php \
php/tests/generated_phpdoc_test.php \
php/tests/map_field_test.php \
php/tests/memory_leak_test.php \
php/tests/php_implementation_test.php \
......
......@@ -7,6 +7,7 @@
<file>tests/array_test.php</file>
<file>tests/encode_decode_test.php</file>
<file>tests/generated_class_test.php</file>
<file>tests/generated_phpdoc_test.php</file>
<file>tests/map_field_test.php</file>
<file>tests/well_known_test.php</file>
</testsuite>
......
......@@ -12,17 +12,17 @@ use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>google.protobuf.DescriptorProto.ExtensionRange</code>
* Generated from protobuf message <code>google.protobuf.DescriptorProto.ExtensionRange</code>
*/
class DescriptorProto_ExtensionRange extends \Google\Protobuf\Internal\Message
{
/**
* <code>optional int32 start = 1;</code>
* Generated from protobuf field <code>optional int32 start = 1;</code>
*/
private $start = 0;
private $has_start = false;
/**
* <code>optional int32 end = 2;</code>
* Generated from protobuf field <code>optional int32 end = 2;</code>
*/
private $end = 0;
private $has_end = false;
......@@ -33,7 +33,8 @@ class DescriptorProto_ExtensionRange extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional int32 start = 1;</code>
* Generated from protobuf field <code>optional int32 start = 1;</code>
* @return int
*/
public function getStart()
{
......@@ -41,7 +42,9 @@ class DescriptorProto_ExtensionRange extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional int32 start = 1;</code>
* Generated from protobuf field <code>optional int32 start = 1;</code>
* @param int $var
* @return $this
*/
public function setStart($var)
{
......@@ -58,7 +61,8 @@ class DescriptorProto_ExtensionRange extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional int32 end = 2;</code>
* Generated from protobuf field <code>optional int32 end = 2;</code>
* @return int
*/
public function getEnd()
{
......@@ -66,7 +70,9 @@ class DescriptorProto_ExtensionRange extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional int32 end = 2;</code>
* Generated from protobuf field <code>optional int32 end = 2;</code>
* @param int $var
* @return $this
*/
public function setEnd($var)
{
......
......@@ -12,31 +12,25 @@ use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* Range of reserved tag numbers. Reserved tag numbers may not be used by
* fields or extension ranges in the same message. Reserved ranges may
* not overlap.
* </pre>
*
* Protobuf type <code>google.protobuf.DescriptorProto.ReservedRange</code>
* Generated from protobuf message <code>google.protobuf.DescriptorProto.ReservedRange</code>
*/
class DescriptorProto_ReservedRange extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* Inclusive.
* </pre>
*
* <code>optional int32 start = 1;</code>
* Generated from protobuf field <code>optional int32 start = 1;</code>
*/
private $start = 0;
private $has_start = false;
/**
* <pre>
* Exclusive.
* </pre>
*
* <code>optional int32 end = 2;</code>
* Generated from protobuf field <code>optional int32 end = 2;</code>
*/
private $end = 0;
private $has_end = false;
......@@ -47,11 +41,10 @@ class DescriptorProto_ReservedRange extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Inclusive.
* </pre>
*
* <code>optional int32 start = 1;</code>
* Generated from protobuf field <code>optional int32 start = 1;</code>
* @return int
*/
public function getStart()
{
......@@ -59,11 +52,11 @@ class DescriptorProto_ReservedRange extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Inclusive.
* </pre>
*
* <code>optional int32 start = 1;</code>
* Generated from protobuf field <code>optional int32 start = 1;</code>
* @param int $var
* @return $this
*/
public function setStart($var)
{
......@@ -80,11 +73,10 @@ class DescriptorProto_ReservedRange extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Exclusive.
* </pre>
*
* <code>optional int32 end = 2;</code>
* Generated from protobuf field <code>optional int32 end = 2;</code>
* @return int
*/
public function getEnd()
{
......@@ -92,11 +84,11 @@ class DescriptorProto_ReservedRange extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Exclusive.
* </pre>
*
* <code>optional int32 end = 2;</code>
* Generated from protobuf field <code>optional int32 end = 2;</code>
* @param int $var
* @return $this
*/
public function setEnd($var)
{
......
......@@ -12,26 +12,24 @@ use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* Describes an enum type.
* </pre>
*
* Protobuf type <code>google.protobuf.EnumDescriptorProto</code>
* Generated from protobuf message <code>google.protobuf.EnumDescriptorProto</code>
*/
class EnumDescriptorProto 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.EnumValueDescriptorProto value = 2;</code>
* Generated from protobuf field <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code>
*/
private $value;
private $has_value = false;
/**
* <code>optional .google.protobuf.EnumOptions options = 3;</code>
* Generated from protobuf field <code>optional .google.protobuf.EnumOptions options = 3;</code>
*/
private $options = null;
private $has_options = false;
......@@ -42,7 +40,8 @@ class EnumDescriptorProto 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()
{
......@@ -50,7 +49,9 @@ class EnumDescriptorProto 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)
{
......@@ -67,7 +68,8 @@ class EnumDescriptorProto extends \Google\Protobuf\Internal\Message
}
/**
* <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code>
* Generated from protobuf field <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getValue()
{
......@@ -75,7 +77,9 @@ class EnumDescriptorProto extends \Google\Protobuf\Internal\Message
}
/**
* <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code>
* Generated from protobuf field <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code>
* @param \Google\Protobuf\Internal\EnumValueDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setValue(&$var)
{
......@@ -92,7 +96,8 @@ class EnumDescriptorProto extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional .google.protobuf.EnumOptions options = 3;</code>
* Generated from protobuf field <code>optional .google.protobuf.EnumOptions options = 3;</code>
* @return \Google\Protobuf\Internal\EnumOptions
*/
public function getOptions()
{
......@@ -100,7 +105,9 @@ class EnumDescriptorProto extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional .google.protobuf.EnumOptions options = 3;</code>
* Generated from protobuf field <code>optional .google.protobuf.EnumOptions options = 3;</code>
* @param \Google\Protobuf\Internal\EnumOptions $var
* @return $this
*/
public function setOptions(&$var)
{
......
......@@ -12,38 +12,32 @@ use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>google.protobuf.EnumOptions</code>
* Generated from protobuf message <code>google.protobuf.EnumOptions</code>
*/
class EnumOptions extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* Set this option to true to allow mapping different tag names to the same
* value.
* </pre>
*
* <code>optional bool allow_alias = 2;</code>
* Generated from protobuf field <code>optional bool allow_alias = 2;</code>
*/
private $allow_alias = false;
private $has_allow_alias = false;
/**
* <pre>
* Is this enum deprecated?
* Depending on the target platform, this can emit Deprecated annotations
* for the enum, or it will be completely ignored; in the very least, this
* is a formalization for deprecating enums.
* </pre>
*
* <code>optional bool deprecated = 3 [default = false];</code>
* Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
*/
private $deprecated = false;
private $has_deprecated = false;
/**
* <pre>
* The parser stores options it doesn't recognize here. See above.
* </pre>
*
* <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
*/
private $uninterpreted_option;
private $has_uninterpreted_option = false;
......@@ -54,12 +48,11 @@ class EnumOptions extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Set this option to true to allow mapping different tag names to the same
* value.
* </pre>
*
* <code>optional bool allow_alias = 2;</code>
* Generated from protobuf field <code>optional bool allow_alias = 2;</code>
* @return bool
*/
public function getAllowAlias()
{
......@@ -67,12 +60,12 @@ class EnumOptions extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Set this option to true to allow mapping different tag names to the same
* value.
* </pre>
*
* <code>optional bool allow_alias = 2;</code>
* Generated from protobuf field <code>optional bool allow_alias = 2;</code>
* @param bool $var
* @return $this
*/
public function setAllowAlias($var)
{
......@@ -89,14 +82,13 @@ class EnumOptions extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Is this enum deprecated?
* Depending on the target platform, this can emit Deprecated annotations
* for the enum, or it will be completely ignored; in the very least, this
* is a formalization for deprecating enums.
* </pre>
*
* <code>optional bool deprecated = 3 [default = false];</code>
* Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
* @return bool
*/
public function getDeprecated()
{
......@@ -104,14 +96,14 @@ class EnumOptions extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Is this enum deprecated?
* Depending on the target platform, this can emit Deprecated annotations
* for the enum, or it will be completely ignored; in the very least, this
* is a formalization for deprecating enums.
* </pre>
*
* <code>optional bool deprecated = 3 [default = false];</code>
* Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
* @param bool $var
* @return $this
*/
public function setDeprecated($var)
{
......@@ -128,11 +120,10 @@ class EnumOptions extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* The parser stores options it doesn't recognize here. See above.
* </pre>
*
* <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getUninterpretedOption()
{
......@@ -140,11 +131,11 @@ class EnumOptions extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* The parser stores options it doesn't recognize here. See above.
* </pre>
*
* <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* @param \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setUninterpretedOption(&$var)
{
......
......@@ -12,26 +12,24 @@ use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* Describes a value within an enum.
* </pre>
*
* Protobuf type <code>google.protobuf.EnumValueDescriptorProto</code>
* Generated from protobuf message <code>google.protobuf.EnumValueDescriptorProto</code>
*/
class EnumValueDescriptorProto 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>optional int32 number = 2;</code>
* Generated from protobuf field <code>optional int32 number = 2;</code>
*/
private $number = 0;
private $has_number = false;
/**
* <code>optional .google.protobuf.EnumValueOptions options = 3;</code>
* Generated from protobuf field <code>optional .google.protobuf.EnumValueOptions options = 3;</code>
*/
private $options = null;
private $has_options = false;
......@@ -42,7 +40,8 @@ class EnumValueDescriptorProto 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()
{
......@@ -50,7 +49,9 @@ class EnumValueDescriptorProto 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)
{
......@@ -67,7 +68,8 @@ class EnumValueDescriptorProto extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional int32 number = 2;</code>
* Generated from protobuf field <code>optional int32 number = 2;</code>
* @return int
*/
public function getNumber()
{
......@@ -75,7 +77,9 @@ class EnumValueDescriptorProto extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional int32 number = 2;</code>
* Generated from protobuf field <code>optional int32 number = 2;</code>
* @param int $var
* @return $this
*/
public function setNumber($var)
{
......@@ -92,7 +96,8 @@ class EnumValueDescriptorProto extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional .google.protobuf.EnumValueOptions options = 3;</code>
* Generated from protobuf field <code>optional .google.protobuf.EnumValueOptions options = 3;</code>
* @return \Google\Protobuf\Internal\EnumValueOptions
*/
public function getOptions()
{
......@@ -100,7 +105,9 @@ class EnumValueDescriptorProto extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional .google.protobuf.EnumValueOptions options = 3;</code>
* Generated from protobuf field <code>optional .google.protobuf.EnumValueOptions options = 3;</code>
* @param \Google\Protobuf\Internal\EnumValueOptions $var
* @return $this
*/
public function setOptions(&$var)
{
......
......@@ -12,28 +12,24 @@ use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>google.protobuf.EnumValueOptions</code>
* Generated from protobuf message <code>google.protobuf.EnumValueOptions</code>
*/
class EnumValueOptions extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* Is this enum value deprecated?
* Depending on the target platform, this can emit Deprecated annotations
* for the enum value, or it will be completely ignored; in the very least,
* this is a formalization for deprecating enum values.
* </pre>
*
* <code>optional bool deprecated = 1 [default = false];</code>
* Generated from protobuf field <code>optional bool deprecated = 1 [default = false];</code>
*/
private $deprecated = false;
private $has_deprecated = false;
/**
* <pre>
* The parser stores options it doesn't recognize here. See above.
* </pre>
*
* <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
*/
private $uninterpreted_option;
private $has_uninterpreted_option = false;
......@@ -44,14 +40,13 @@ class EnumValueOptions extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Is this enum value deprecated?
* Depending on the target platform, this can emit Deprecated annotations
* for the enum value, or it will be completely ignored; in the very least,
* this is a formalization for deprecating enum values.
* </pre>
*
* <code>optional bool deprecated = 1 [default = false];</code>
* Generated from protobuf field <code>optional bool deprecated = 1 [default = false];</code>
* @return bool
*/
public function getDeprecated()
{
......@@ -59,14 +54,14 @@ class EnumValueOptions extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Is this enum value deprecated?
* Depending on the target platform, this can emit Deprecated annotations
* for the enum value, or it will be completely ignored; in the very least,
* this is a formalization for deprecating enum values.
* </pre>
*
* <code>optional bool deprecated = 1 [default = false];</code>
* Generated from protobuf field <code>optional bool deprecated = 1 [default = false];</code>
* @param bool $var
* @return $this
*/
public function setDeprecated($var)
{
......@@ -83,11 +78,10 @@ class EnumValueOptions extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* The parser stores options it doesn't recognize here. See above.
* </pre>
*
* <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getUninterpretedOption()
{
......@@ -95,11 +89,11 @@ class EnumValueOptions extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* The parser stores options it doesn't recognize here. See above.
* </pre>
*
* <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* @param \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setUninterpretedOption(&$var)
{
......
......@@ -5,24 +5,22 @@
namespace Google\Protobuf\Internal;
/**
* Protobuf enum <code>google.protobuf.FieldDescriptorProto.Label</code>
* Protobuf enum <code>Google\Protobuf\Internal</code>
*/
class FieldDescriptorProto_Label
{
/**
* <pre>
* 0 is reserved for errors
* </pre>
*
* <code>LABEL_OPTIONAL = 1;</code>
* Generated from protobuf enum <code>LABEL_OPTIONAL = 1;</code>
*/
const LABEL_OPTIONAL = 1;
/**
* <code>LABEL_REQUIRED = 2;</code>
* Generated from protobuf enum <code>LABEL_REQUIRED = 2;</code>
*/
const LABEL_REQUIRED = 2;
/**
* <code>LABEL_REPEATED = 3;</code>
* Generated from protobuf enum <code>LABEL_REPEATED = 3;</code>
*/
const LABEL_REPEATED = 3;
}
......
......@@ -5,118 +5,102 @@
namespace Google\Protobuf\Internal;
/**
* Protobuf enum <code>google.protobuf.FieldDescriptorProto.Type</code>
* Protobuf enum <code>Google\Protobuf\Internal</code>
*/
class FieldDescriptorProto_Type
{
/**
* <pre>
* 0 is reserved for errors.
* Order is weird for historical reasons.
* </pre>
*
* <code>TYPE_DOUBLE = 1;</code>
* Generated from protobuf enum <code>TYPE_DOUBLE = 1;</code>
*/
const TYPE_DOUBLE = 1;
/**
* <code>TYPE_FLOAT = 2;</code>
* Generated from protobuf enum <code>TYPE_FLOAT = 2;</code>
*/
const TYPE_FLOAT = 2;
/**
* <pre>
* Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
* negative values are likely.
* </pre>
*
* <code>TYPE_INT64 = 3;</code>
* Generated from protobuf enum <code>TYPE_INT64 = 3;</code>
*/
const TYPE_INT64 = 3;
/**
* <code>TYPE_UINT64 = 4;</code>
* Generated from protobuf enum <code>TYPE_UINT64 = 4;</code>
*/
const TYPE_UINT64 = 4;
/**
* <pre>
* Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
* negative values are likely.
* </pre>
*
* <code>TYPE_INT32 = 5;</code>
* Generated from protobuf enum <code>TYPE_INT32 = 5;</code>
*/
const TYPE_INT32 = 5;
/**
* <code>TYPE_FIXED64 = 6;</code>
* Generated from protobuf enum <code>TYPE_FIXED64 = 6;</code>
*/
const TYPE_FIXED64 = 6;
/**
* <code>TYPE_FIXED32 = 7;</code>
* Generated from protobuf enum <code>TYPE_FIXED32 = 7;</code>
*/
const TYPE_FIXED32 = 7;
/**
* <code>TYPE_BOOL = 8;</code>
* Generated from protobuf enum <code>TYPE_BOOL = 8;</code>
*/
const TYPE_BOOL = 8;
/**
* <code>TYPE_STRING = 9;</code>
* Generated from protobuf enum <code>TYPE_STRING = 9;</code>
*/
const TYPE_STRING = 9;
/**
* <pre>
* Tag-delimited aggregate.
* Group type is deprecated and not supported in proto3. However, Proto3
* implementations should still be able to parse the group wire format and
* treat group fields as unknown fields.
* </pre>
*
* <code>TYPE_GROUP = 10;</code>
* Generated from protobuf enum <code>TYPE_GROUP = 10;</code>
*/
const TYPE_GROUP = 10;
/**
* <pre>
* Length-delimited aggregate.
* </pre>
*
* <code>TYPE_MESSAGE = 11;</code>
* Generated from protobuf enum <code>TYPE_MESSAGE = 11;</code>
*/
const TYPE_MESSAGE = 11;
/**
* <pre>
* New in version 2.
* </pre>
*
* <code>TYPE_BYTES = 12;</code>
* Generated from protobuf enum <code>TYPE_BYTES = 12;</code>
*/
const TYPE_BYTES = 12;
/**
* <code>TYPE_UINT32 = 13;</code>
* Generated from protobuf enum <code>TYPE_UINT32 = 13;</code>
*/
const TYPE_UINT32 = 13;
/**
* <code>TYPE_ENUM = 14;</code>
* Generated from protobuf enum <code>TYPE_ENUM = 14;</code>
*/
const TYPE_ENUM = 14;
/**
* <code>TYPE_SFIXED32 = 15;</code>
* Generated from protobuf enum <code>TYPE_SFIXED32 = 15;</code>
*/
const TYPE_SFIXED32 = 15;
/**
* <code>TYPE_SFIXED64 = 16;</code>
* Generated from protobuf enum <code>TYPE_SFIXED64 = 16;</code>
*/
const TYPE_SFIXED64 = 16;
/**
* <pre>
* Uses ZigZag encoding.
* </pre>
*
* <code>TYPE_SINT32 = 17;</code>
* Generated from protobuf enum <code>TYPE_SINT32 = 17;</code>
*/
const TYPE_SINT32 = 17;
/**
* <pre>
* Uses ZigZag encoding.
* </pre>
*
* <code>TYPE_SINT64 = 18;</code>
* Generated from protobuf enum <code>TYPE_SINT64 = 18;</code>
*/
const TYPE_SINT64 = 18;
}
......
......@@ -5,24 +5,22 @@
namespace Google\Protobuf\Internal;
/**
* Protobuf enum <code>google.protobuf.FieldOptions.CType</code>
* Protobuf enum <code>Google\Protobuf\Internal</code>
*/
class FieldOptions_CType
{
/**
* <pre>
* Default mode.
* </pre>
*
* <code>STRING = 0;</code>
* Generated from protobuf enum <code>STRING = 0;</code>
*/
const STRING = 0;
/**
* <code>CORD = 1;</code>
* Generated from protobuf enum <code>CORD = 1;</code>
*/
const CORD = 1;
/**
* <code>STRING_PIECE = 2;</code>
* Generated from protobuf enum <code>STRING_PIECE = 2;</code>
*/
const STRING_PIECE = 2;
}
......
......@@ -5,32 +5,26 @@
namespace Google\Protobuf\Internal;
/**
* Protobuf enum <code>google.protobuf.FieldOptions.JSType</code>
* Protobuf enum <code>Google\Protobuf\Internal</code>
*/
class FieldOptions_JSType
{
/**
* <pre>
* Use the default type.
* </pre>
*
* <code>JS_NORMAL = 0;</code>
* Generated from protobuf enum <code>JS_NORMAL = 0;</code>
*/
const JS_NORMAL = 0;
/**
* <pre>
* Use JavaScript strings.
* </pre>
*
* <code>JS_STRING = 1;</code>
* Generated from protobuf enum <code>JS_STRING = 1;</code>
*/
const JS_STRING = 1;
/**
* <pre>
* Use JavaScript numbers.
* </pre>
*
* <code>JS_NUMBER = 2;</code>
* Generated from protobuf enum <code>JS_NUMBER = 2;</code>
*/
const JS_NUMBER = 2;
}
......
......@@ -12,17 +12,15 @@ use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* The protocol compiler can output a FileDescriptorSet containing the .proto
* files it parses.
* </pre>
*
* Protobuf type <code>google.protobuf.FileDescriptorSet</code>
* Generated from protobuf message <code>google.protobuf.FileDescriptorSet</code>
*/
class FileDescriptorSet extends \Google\Protobuf\Internal\Message
{
/**
* <code>repeated .google.protobuf.FileDescriptorProto file = 1;</code>
* Generated from protobuf field <code>repeated .google.protobuf.FileDescriptorProto file = 1;</code>
*/
private $file;
private $has_file = false;
......@@ -33,7 +31,8 @@ class FileDescriptorSet extends \Google\Protobuf\Internal\Message
}
/**
* <code>repeated .google.protobuf.FileDescriptorProto file = 1;</code>
* Generated from protobuf field <code>repeated .google.protobuf.FileDescriptorProto file = 1;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getFile()
{
......@@ -41,7 +40,9 @@ class FileDescriptorSet extends \Google\Protobuf\Internal\Message
}
/**
* <code>repeated .google.protobuf.FileDescriptorProto file = 1;</code>
* Generated from protobuf field <code>repeated .google.protobuf.FileDescriptorProto file = 1;</code>
* @param \Google\Protobuf\Internal\FileDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setFile(&$var)
{
......
......@@ -5,36 +5,28 @@
namespace Google\Protobuf\Internal;
/**
* <pre>
* Generated classes can be optimized for speed or code size.
* </pre>
*
* Protobuf enum <code>google.protobuf.FileOptions.OptimizeMode</code>
* Protobuf enum <code>Google\Protobuf\Internal</code>
*/
class FileOptions_OptimizeMode
{
/**
* <pre>
* Generate complete code for parsing, serialization,
* </pre>
*
* <code>SPEED = 1;</code>
* Generated from protobuf enum <code>SPEED = 1;</code>
*/
const SPEED = 1;
/**
* <pre>
* etc.
* </pre>
*
* <code>CODE_SIZE = 2;</code>
* Generated from protobuf enum <code>CODE_SIZE = 2;</code>
*/
const CODE_SIZE = 2;
/**
* <pre>
* Generate code using MessageLite and the lite runtime.
* </pre>
*
* <code>LITE_RUNTIME = 3;</code>
* Generated from protobuf enum <code>LITE_RUNTIME = 3;</code>
*/
const LITE_RUNTIME = 3;
}
......
......@@ -12,23 +12,19 @@ use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* Describes the relationship between generated code and its original source
* file. A GeneratedCodeInfo message is associated with only one generated
* source file, but may contain references to different source .proto files.
* </pre>
*
* Protobuf type <code>google.protobuf.GeneratedCodeInfo</code>
* Generated from protobuf message <code>google.protobuf.GeneratedCodeInfo</code>
*/
class GeneratedCodeInfo extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* An Annotation connects some span of text in generated code to an element
* of its generating .proto file.
* </pre>
*
* <code>repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;</code>
* Generated from protobuf field <code>repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;</code>
*/
private $annotation;
private $has_annotation = false;
......@@ -39,12 +35,11 @@ class GeneratedCodeInfo extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* An Annotation connects some span of text in generated code to an element
* of its generating .proto file.
* </pre>
*
* <code>repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;</code>
* Generated from protobuf field <code>repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getAnnotation()
{
......@@ -52,12 +47,12 @@ class GeneratedCodeInfo extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* An Annotation connects some span of text in generated code to an element
* of its generating .proto file.
* </pre>
*
* <code>repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;</code>
* Generated from protobuf field <code>repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;</code>
* @param \Google\Protobuf\Internal\GeneratedCodeInfo_Annotation[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setAnnotation(&$var)
{
......
......@@ -12,47 +12,39 @@ use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>google.protobuf.GeneratedCodeInfo.Annotation</code>
* Generated from protobuf message <code>google.protobuf.GeneratedCodeInfo.Annotation</code>
*/
class GeneratedCodeInfo_Annotation extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* Identifies the element in the original source .proto file. This field
* is formatted the same as SourceCodeInfo.Location.path.
* </pre>
*
* <code>repeated int32 path = 1 [packed = true];</code>
* Generated from protobuf field <code>repeated int32 path = 1 [packed = true];</code>
*/
private $path;
private $has_path = false;
/**
* <pre>
* Identifies the filesystem path to the original source .proto.
* </pre>
*
* <code>optional string source_file = 2;</code>
* Generated from protobuf field <code>optional string source_file = 2;</code>
*/
private $source_file = '';
private $has_source_file = false;
/**
* <pre>
* Identifies the starting offset in bytes in the generated code
* that relates to the identified object.
* </pre>
*
* <code>optional int32 begin = 3;</code>
* Generated from protobuf field <code>optional int32 begin = 3;</code>
*/
private $begin = 0;
private $has_begin = false;
/**
* <pre>
* Identifies the ending offset in bytes in the generated code that
* relates to the identified offset. The end offset should be one past
* the last relevant byte (so the length of the text = end - begin).
* </pre>
*
* <code>optional int32 end = 4;</code>
* Generated from protobuf field <code>optional int32 end = 4;</code>
*/
private $end = 0;
private $has_end = false;
......@@ -63,12 +55,11 @@ class GeneratedCodeInfo_Annotation extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Identifies the element in the original source .proto file. This field
* is formatted the same as SourceCodeInfo.Location.path.
* </pre>
*
* <code>repeated int32 path = 1 [packed = true];</code>
* Generated from protobuf field <code>repeated int32 path = 1 [packed = true];</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getPath()
{
......@@ -76,12 +67,12 @@ class GeneratedCodeInfo_Annotation extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Identifies the element in the original source .proto file. This field
* is formatted the same as SourceCodeInfo.Location.path.
* </pre>
*
* <code>repeated int32 path = 1 [packed = true];</code>
* Generated from protobuf field <code>repeated int32 path = 1 [packed = true];</code>
* @param int[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setPath(&$var)
{
......@@ -98,11 +89,10 @@ class GeneratedCodeInfo_Annotation extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Identifies the filesystem path to the original source .proto.
* </pre>
*
* <code>optional string source_file = 2;</code>
* Generated from protobuf field <code>optional string source_file = 2;</code>
* @return string
*/
public function getSourceFile()
{
......@@ -110,11 +100,11 @@ class GeneratedCodeInfo_Annotation extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Identifies the filesystem path to the original source .proto.
* </pre>
*
* <code>optional string source_file = 2;</code>
* Generated from protobuf field <code>optional string source_file = 2;</code>
* @param string $var
* @return $this
*/
public function setSourceFile($var)
{
......@@ -131,12 +121,11 @@ class GeneratedCodeInfo_Annotation extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Identifies the starting offset in bytes in the generated code
* that relates to the identified object.
* </pre>
*
* <code>optional int32 begin = 3;</code>
* Generated from protobuf field <code>optional int32 begin = 3;</code>
* @return int
*/
public function getBegin()
{
......@@ -144,12 +133,12 @@ class GeneratedCodeInfo_Annotation extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Identifies the starting offset in bytes in the generated code
* that relates to the identified object.
* </pre>
*
* <code>optional int32 begin = 3;</code>
* Generated from protobuf field <code>optional int32 begin = 3;</code>
* @param int $var
* @return $this
*/
public function setBegin($var)
{
......@@ -166,13 +155,12 @@ class GeneratedCodeInfo_Annotation extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Identifies the ending offset in bytes in the generated code that
* relates to the identified offset. The end offset should be one past
* the last relevant byte (so the length of the text = end - begin).
* </pre>
*
* <code>optional int32 end = 4;</code>
* Generated from protobuf field <code>optional int32 end = 4;</code>
* @return int
*/
public function getEnd()
{
......@@ -180,13 +168,13 @@ class GeneratedCodeInfo_Annotation extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Identifies the ending offset in bytes in the generated code that
* relates to the identified offset. The end offset should be one past
* the last relevant byte (so the length of the text = end - begin).
* </pre>
*
* <code>optional int32 end = 4;</code>
* Generated from protobuf field <code>optional int32 end = 4;</code>
* @param int $var
* @return $this
*/
public function setEnd($var)
{
......
......@@ -12,54 +12,46 @@ use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* Describes a method of a service.
* </pre>
*
* Protobuf type <code>google.protobuf.MethodDescriptorProto</code>
* Generated from protobuf message <code>google.protobuf.MethodDescriptorProto</code>
*/
class MethodDescriptorProto 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;
/**
* <pre>
* Input and output type names. These are resolved in the same way as
* FieldDescriptorProto.type_name, but must refer to a message type.
* </pre>
*
* <code>optional string input_type = 2;</code>
* Generated from protobuf field <code>optional string input_type = 2;</code>
*/
private $input_type = '';
private $has_input_type = false;
/**
* <code>optional string output_type = 3;</code>
* Generated from protobuf field <code>optional string output_type = 3;</code>
*/
private $output_type = '';
private $has_output_type = false;
/**
* <code>optional .google.protobuf.MethodOptions options = 4;</code>
* Generated from protobuf field <code>optional .google.protobuf.MethodOptions options = 4;</code>
*/
private $options = null;
private $has_options = false;
/**
* <pre>
* Identifies if client streams multiple client messages
* </pre>
*
* <code>optional bool client_streaming = 5 [default = false];</code>
* Generated from protobuf field <code>optional bool client_streaming = 5 [default = false];</code>
*/
private $client_streaming = false;
private $has_client_streaming = false;
/**
* <pre>
* Identifies if server streams multiple server messages
* </pre>
*
* <code>optional bool server_streaming = 6 [default = false];</code>
* Generated from protobuf field <code>optional bool server_streaming = 6 [default = false];</code>
*/
private $server_streaming = false;
private $has_server_streaming = false;
......@@ -70,7 +62,8 @@ class MethodDescriptorProto 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()
{
......@@ -78,7 +71,9 @@ class MethodDescriptorProto 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)
{
......@@ -95,12 +90,11 @@ class MethodDescriptorProto extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Input and output type names. These are resolved in the same way as
* FieldDescriptorProto.type_name, but must refer to a message type.
* </pre>
*
* <code>optional string input_type = 2;</code>
* Generated from protobuf field <code>optional string input_type = 2;</code>
* @return string
*/
public function getInputType()
{
......@@ -108,12 +102,12 @@ class MethodDescriptorProto extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Input and output type names. These are resolved in the same way as
* FieldDescriptorProto.type_name, but must refer to a message type.
* </pre>
*
* <code>optional string input_type = 2;</code>
* Generated from protobuf field <code>optional string input_type = 2;</code>
* @param string $var
* @return $this
*/
public function setInputType($var)
{
......@@ -130,7 +124,8 @@ class MethodDescriptorProto extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional string output_type = 3;</code>
* Generated from protobuf field <code>optional string output_type = 3;</code>
* @return string
*/
public function getOutputType()
{
......@@ -138,7 +133,9 @@ class MethodDescriptorProto extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional string output_type = 3;</code>
* Generated from protobuf field <code>optional string output_type = 3;</code>
* @param string $var
* @return $this
*/
public function setOutputType($var)
{
......@@ -155,7 +152,8 @@ class MethodDescriptorProto extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional .google.protobuf.MethodOptions options = 4;</code>
* Generated from protobuf field <code>optional .google.protobuf.MethodOptions options = 4;</code>
* @return \Google\Protobuf\Internal\MethodOptions
*/
public function getOptions()
{
......@@ -163,7 +161,9 @@ class MethodDescriptorProto extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional .google.protobuf.MethodOptions options = 4;</code>
* Generated from protobuf field <code>optional .google.protobuf.MethodOptions options = 4;</code>
* @param \Google\Protobuf\Internal\MethodOptions $var
* @return $this
*/
public function setOptions(&$var)
{
......@@ -180,11 +180,10 @@ class MethodDescriptorProto extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Identifies if client streams multiple client messages
* </pre>
*
* <code>optional bool client_streaming = 5 [default = false];</code>
* Generated from protobuf field <code>optional bool client_streaming = 5 [default = false];</code>
* @return bool
*/
public function getClientStreaming()
{
......@@ -192,11 +191,11 @@ class MethodDescriptorProto extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Identifies if client streams multiple client messages
* </pre>
*
* <code>optional bool client_streaming = 5 [default = false];</code>
* Generated from protobuf field <code>optional bool client_streaming = 5 [default = false];</code>
* @param bool $var
* @return $this
*/
public function setClientStreaming($var)
{
......@@ -213,11 +212,10 @@ class MethodDescriptorProto extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Identifies if server streams multiple server messages
* </pre>
*
* <code>optional bool server_streaming = 6 [default = false];</code>
* Generated from protobuf field <code>optional bool server_streaming = 6 [default = false];</code>
* @return bool
*/
public function getServerStreaming()
{
......@@ -225,11 +223,11 @@ class MethodDescriptorProto extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Identifies if server streams multiple server messages
* </pre>
*
* <code>optional bool server_streaming = 6 [default = false];</code>
* Generated from protobuf field <code>optional bool server_streaming = 6 [default = false];</code>
* @param bool $var
* @return $this
*/
public function setServerStreaming($var)
{
......
......@@ -12,33 +12,29 @@ use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>google.protobuf.MethodOptions</code>
* Generated from protobuf message <code>google.protobuf.MethodOptions</code>
*/
class MethodOptions extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* Is this method deprecated?
* Depending on the target platform, this can emit Deprecated annotations
* for the method, or it will be completely ignored; in the very least,
* this is a formalization for deprecating methods.
* </pre>
*
* <code>optional bool deprecated = 33 [default = false];</code>
* Generated from protobuf field <code>optional bool deprecated = 33 [default = false];</code>
*/
private $deprecated = false;
private $has_deprecated = false;
/**
* <code>optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];</code>
* Generated from protobuf field <code>optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];</code>
*/
private $idempotency_level = 0;
private $has_idempotency_level = false;
/**
* <pre>
* The parser stores options it doesn't recognize here. See above.
* </pre>
*
* <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
*/
private $uninterpreted_option;
private $has_uninterpreted_option = false;
......@@ -49,14 +45,13 @@ class MethodOptions extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Is this method deprecated?
* Depending on the target platform, this can emit Deprecated annotations
* for the method, or it will be completely ignored; in the very least,
* this is a formalization for deprecating methods.
* </pre>
*
* <code>optional bool deprecated = 33 [default = false];</code>
* Generated from protobuf field <code>optional bool deprecated = 33 [default = false];</code>
* @return bool
*/
public function getDeprecated()
{
......@@ -64,14 +59,14 @@ class MethodOptions extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Is this method deprecated?
* Depending on the target platform, this can emit Deprecated annotations
* for the method, or it will be completely ignored; in the very least,
* this is a formalization for deprecating methods.
* </pre>
*
* <code>optional bool deprecated = 33 [default = false];</code>
* Generated from protobuf field <code>optional bool deprecated = 33 [default = false];</code>
* @param bool $var
* @return $this
*/
public function setDeprecated($var)
{
......@@ -88,7 +83,8 @@ class MethodOptions extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];</code>
* Generated from protobuf field <code>optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];</code>
* @return int
*/
public function getIdempotencyLevel()
{
......@@ -96,7 +92,9 @@ class MethodOptions extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];</code>
* Generated from protobuf field <code>optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];</code>
* @param int $var
* @return $this
*/
public function setIdempotencyLevel($var)
{
......@@ -113,11 +111,10 @@ class MethodOptions extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* The parser stores options it doesn't recognize here. See above.
* </pre>
*
* <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getUninterpretedOption()
{
......@@ -125,11 +122,11 @@ class MethodOptions extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* The parser stores options it doesn't recognize here. See above.
* </pre>
*
* <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* @param \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setUninterpretedOption(&$var)
{
......
......@@ -5,34 +5,28 @@
namespace Google\Protobuf\Internal;
/**
* <pre>
* Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
* or neither? HTTP based RPC implementation may choose GET verb for safe
* methods, and PUT verb for idempotent methods instead of the default POST.
* </pre>
*
* Protobuf enum <code>google.protobuf.MethodOptions.IdempotencyLevel</code>
* Protobuf enum <code>Google\Protobuf\Internal</code>
*/
class MethodOptions_IdempotencyLevel
{
/**
* <code>IDEMPOTENCY_UNKNOWN = 0;</code>
* Generated from protobuf enum <code>IDEMPOTENCY_UNKNOWN = 0;</code>
*/
const IDEMPOTENCY_UNKNOWN = 0;
/**
* <pre>
* implies idempotent
* </pre>
*
* <code>NO_SIDE_EFFECTS = 1;</code>
* Generated from protobuf enum <code>NO_SIDE_EFFECTS = 1;</code>
*/
const NO_SIDE_EFFECTS = 1;
/**
* <pre>
* idempotent, but may have side effects
* </pre>
*
* <code>IDEMPOTENT = 2;</code>
* Generated from protobuf enum <code>IDEMPOTENT = 2;</code>
*/
const IDEMPOTENT = 2;
}
......
......@@ -12,21 +12,19 @@ use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* Describes a oneof.
* </pre>
*
* Protobuf type <code>google.protobuf.OneofDescriptorProto</code>
* Generated from protobuf message <code>google.protobuf.OneofDescriptorProto</code>
*/
class OneofDescriptorProto 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>optional .google.protobuf.OneofOptions options = 2;</code>
* Generated from protobuf field <code>optional .google.protobuf.OneofOptions options = 2;</code>
*/
private $options = null;
private $has_options = false;
......@@ -37,7 +35,8 @@ class OneofDescriptorProto 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()
{
......@@ -45,7 +44,9 @@ class OneofDescriptorProto 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)
{
......@@ -62,7 +63,8 @@ class OneofDescriptorProto extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional .google.protobuf.OneofOptions options = 2;</code>
* Generated from protobuf field <code>optional .google.protobuf.OneofOptions options = 2;</code>
* @return \Google\Protobuf\Internal\OneofOptions
*/
public function getOptions()
{
......@@ -70,7 +72,9 @@ class OneofDescriptorProto extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional .google.protobuf.OneofOptions options = 2;</code>
* Generated from protobuf field <code>optional .google.protobuf.OneofOptions options = 2;</code>
* @param \Google\Protobuf\Internal\OneofOptions $var
* @return $this
*/
public function setOptions(&$var)
{
......
......@@ -12,16 +12,14 @@ use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>google.protobuf.OneofOptions</code>
* Generated from protobuf message <code>google.protobuf.OneofOptions</code>
*/
class OneofOptions extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* The parser stores options it doesn't recognize here. See above.
* </pre>
*
* <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
*/
private $uninterpreted_option;
private $has_uninterpreted_option = false;
......@@ -32,11 +30,10 @@ class OneofOptions extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* The parser stores options it doesn't recognize here. See above.
* </pre>
*
* <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getUninterpretedOption()
{
......@@ -44,11 +41,11 @@ class OneofOptions extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* The parser stores options it doesn't recognize here. See above.
* </pre>
*
* <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* @param \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setUninterpretedOption(&$var)
{
......
......@@ -12,26 +12,24 @@ use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* Describes a service.
* </pre>
*
* Protobuf type <code>google.protobuf.ServiceDescriptorProto</code>
* Generated from protobuf message <code>google.protobuf.ServiceDescriptorProto</code>
*/
class ServiceDescriptorProto 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.MethodDescriptorProto method = 2;</code>
* Generated from protobuf field <code>repeated .google.protobuf.MethodDescriptorProto method = 2;</code>
*/
private $method;
private $has_method = false;
/**
* <code>optional .google.protobuf.ServiceOptions options = 3;</code>
* Generated from protobuf field <code>optional .google.protobuf.ServiceOptions options = 3;</code>
*/
private $options = null;
private $has_options = false;
......@@ -42,7 +40,8 @@ class ServiceDescriptorProto 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()
{
......@@ -50,7 +49,9 @@ class ServiceDescriptorProto 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)
{
......@@ -67,7 +68,8 @@ class ServiceDescriptorProto extends \Google\Protobuf\Internal\Message
}
/**
* <code>repeated .google.protobuf.MethodDescriptorProto method = 2;</code>
* Generated from protobuf field <code>repeated .google.protobuf.MethodDescriptorProto method = 2;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getMethod()
{
......@@ -75,7 +77,9 @@ class ServiceDescriptorProto extends \Google\Protobuf\Internal\Message
}
/**
* <code>repeated .google.protobuf.MethodDescriptorProto method = 2;</code>
* Generated from protobuf field <code>repeated .google.protobuf.MethodDescriptorProto method = 2;</code>
* @param \Google\Protobuf\Internal\MethodDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setMethod(&$var)
{
......@@ -92,7 +96,8 @@ class ServiceDescriptorProto extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional .google.protobuf.ServiceOptions options = 3;</code>
* Generated from protobuf field <code>optional .google.protobuf.ServiceOptions options = 3;</code>
* @return \Google\Protobuf\Internal\ServiceOptions
*/
public function getOptions()
{
......@@ -100,7 +105,9 @@ class ServiceDescriptorProto extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional .google.protobuf.ServiceOptions options = 3;</code>
* Generated from protobuf field <code>optional .google.protobuf.ServiceOptions options = 3;</code>
* @param \Google\Protobuf\Internal\ServiceOptions $var
* @return $this
*/
public function setOptions(&$var)
{
......
......@@ -12,28 +12,24 @@ use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>google.protobuf.ServiceOptions</code>
* Generated from protobuf message <code>google.protobuf.ServiceOptions</code>
*/
class ServiceOptions extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* Is this service deprecated?
* Depending on the target platform, this can emit Deprecated annotations
* for the service, or it will be completely ignored; in the very least,
* this is a formalization for deprecating services.
* </pre>
*
* <code>optional bool deprecated = 33 [default = false];</code>
* Generated from protobuf field <code>optional bool deprecated = 33 [default = false];</code>
*/
private $deprecated = false;
private $has_deprecated = false;
/**
* <pre>
* The parser stores options it doesn't recognize here. See above.
* </pre>
*
* <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
*/
private $uninterpreted_option;
private $has_uninterpreted_option = false;
......@@ -44,14 +40,13 @@ class ServiceOptions extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Is this service deprecated?
* Depending on the target platform, this can emit Deprecated annotations
* for the service, or it will be completely ignored; in the very least,
* this is a formalization for deprecating services.
* </pre>
*
* <code>optional bool deprecated = 33 [default = false];</code>
* Generated from protobuf field <code>optional bool deprecated = 33 [default = false];</code>
* @return bool
*/
public function getDeprecated()
{
......@@ -59,14 +54,14 @@ class ServiceOptions extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Is this service deprecated?
* Depending on the target platform, this can emit Deprecated annotations
* for the service, or it will be completely ignored; in the very least,
* this is a formalization for deprecating services.
* </pre>
*
* <code>optional bool deprecated = 33 [default = false];</code>
* Generated from protobuf field <code>optional bool deprecated = 33 [default = false];</code>
* @param bool $var
* @return $this
*/
public function setDeprecated($var)
{
......@@ -83,11 +78,10 @@ class ServiceOptions extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* The parser stores options it doesn't recognize here. See above.
* </pre>
*
* <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getUninterpretedOption()
{
......@@ -95,11 +89,11 @@ class ServiceOptions extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* The parser stores options it doesn't recognize here. See above.
* </pre>
*
* <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* @param \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setUninterpretedOption(&$var)
{
......
......@@ -12,17 +12,14 @@ use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* Encapsulates information about the original source file from which a
* FileDescriptorProto was generated.
* </pre>
*
* Protobuf type <code>google.protobuf.SourceCodeInfo</code>
* Generated from protobuf message <code>google.protobuf.SourceCodeInfo</code>
*/
class SourceCodeInfo extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* A Location identifies a piece of source code in a .proto file which
* corresponds to a particular definition. This information is intended
* to be useful to IDEs, code indexers, documentation generators, and similar
......@@ -64,9 +61,8 @@ class SourceCodeInfo extends \Google\Protobuf\Internal\Message
* - Code which tries to interpret locations should probably be designed to
* ignore those that it doesn't understand, as more types of locations could
* be recorded in the future.
* </pre>
*
* <code>repeated .google.protobuf.SourceCodeInfo.Location location = 1;</code>
* Generated from protobuf field <code>repeated .google.protobuf.SourceCodeInfo.Location location = 1;</code>
*/
private $location;
private $has_location = false;
......@@ -77,7 +73,6 @@ class SourceCodeInfo extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* A Location identifies a piece of source code in a .proto file which
* corresponds to a particular definition. This information is intended
* to be useful to IDEs, code indexers, documentation generators, and similar
......@@ -119,9 +114,9 @@ class SourceCodeInfo extends \Google\Protobuf\Internal\Message
* - Code which tries to interpret locations should probably be designed to
* ignore those that it doesn't understand, as more types of locations could
* be recorded in the future.
* </pre>
*
* <code>repeated .google.protobuf.SourceCodeInfo.Location location = 1;</code>
* Generated from protobuf field <code>repeated .google.protobuf.SourceCodeInfo.Location location = 1;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getLocation()
{
......@@ -129,7 +124,6 @@ class SourceCodeInfo extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* A Location identifies a piece of source code in a .proto file which
* corresponds to a particular definition. This information is intended
* to be useful to IDEs, code indexers, documentation generators, and similar
......@@ -171,9 +165,10 @@ class SourceCodeInfo extends \Google\Protobuf\Internal\Message
* - Code which tries to interpret locations should probably be designed to
* ignore those that it doesn't understand, as more types of locations could
* be recorded in the future.
* </pre>
*
* <code>repeated .google.protobuf.SourceCodeInfo.Location location = 1;</code>
* Generated from protobuf field <code>repeated .google.protobuf.SourceCodeInfo.Location location = 1;</code>
* @param \Google\Protobuf\Internal\SourceCodeInfo_Location[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setLocation(&$var)
{
......
......@@ -12,12 +12,11 @@ use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>google.protobuf.SourceCodeInfo.Location</code>
* Generated from protobuf message <code>google.protobuf.SourceCodeInfo.Location</code>
*/
class SourceCodeInfo_Location extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* Identifies which part of the FileDescriptorProto was defined at this
* location.
* Each element is a field number or an index. They form a path from
......@@ -39,27 +38,23 @@ class SourceCodeInfo_Location extends \Google\Protobuf\Internal\Message
* [ 4, 3, 2, 7 ]
* this path refers to the whole field declaration (from the beginning
* of the label to the terminating semicolon).
* </pre>
*
* <code>repeated int32 path = 1 [packed = true];</code>
* Generated from protobuf field <code>repeated int32 path = 1 [packed = true];</code>
*/
private $path;
private $has_path = false;
/**
* <pre>
* Always has exactly three or four elements: start line, start column,
* end line (optional, otherwise assumed same as start line), end column.
* These are packed into a single field for efficiency. Note that line
* and column numbers are zero-based -- typically you will want to add
* 1 to each before displaying to a user.
* </pre>
*
* <code>repeated int32 span = 2 [packed = true];</code>
* Generated from protobuf field <code>repeated int32 span = 2 [packed = true];</code>
*/
private $span;
private $has_span = false;
/**
* <pre>
* If this SourceCodeInfo represents a complete declaration, these are any
* comments appearing before and after the declaration which appear to be
* attached to the declaration.
......@@ -96,19 +91,18 @@ class SourceCodeInfo_Location extends \Google\Protobuf\Internal\Message
* * grault. *&#47;
* optional int32 grault = 6;
* // ignored detached comments.
* </pre>
*
* <code>optional string leading_comments = 3;</code>
* Generated from protobuf field <code>optional string leading_comments = 3;</code>
*/
private $leading_comments = '';
private $has_leading_comments = false;
/**
* <code>optional string trailing_comments = 4;</code>
* Generated from protobuf field <code>optional string trailing_comments = 4;</code>
*/
private $trailing_comments = '';
private $has_trailing_comments = false;
/**
* <code>repeated string leading_detached_comments = 6;</code>
* Generated from protobuf field <code>repeated string leading_detached_comments = 6;</code>
*/
private $leading_detached_comments;
private $has_leading_detached_comments = false;
......@@ -119,7 +113,6 @@ class SourceCodeInfo_Location extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Identifies which part of the FileDescriptorProto was defined at this
* location.
* Each element is a field number or an index. They form a path from
......@@ -141,9 +134,9 @@ class SourceCodeInfo_Location extends \Google\Protobuf\Internal\Message
* [ 4, 3, 2, 7 ]
* this path refers to the whole field declaration (from the beginning
* of the label to the terminating semicolon).
* </pre>
*
* <code>repeated int32 path = 1 [packed = true];</code>
* Generated from protobuf field <code>repeated int32 path = 1 [packed = true];</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getPath()
{
......@@ -151,7 +144,6 @@ class SourceCodeInfo_Location extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Identifies which part of the FileDescriptorProto was defined at this
* location.
* Each element is a field number or an index. They form a path from
......@@ -173,9 +165,10 @@ class SourceCodeInfo_Location extends \Google\Protobuf\Internal\Message
* [ 4, 3, 2, 7 ]
* this path refers to the whole field declaration (from the beginning
* of the label to the terminating semicolon).
* </pre>
*
* <code>repeated int32 path = 1 [packed = true];</code>
* Generated from protobuf field <code>repeated int32 path = 1 [packed = true];</code>
* @param int[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setPath(&$var)
{
......@@ -192,15 +185,14 @@ class SourceCodeInfo_Location extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Always has exactly three or four elements: start line, start column,
* end line (optional, otherwise assumed same as start line), end column.
* These are packed into a single field for efficiency. Note that line
* and column numbers are zero-based -- typically you will want to add
* 1 to each before displaying to a user.
* </pre>
*
* <code>repeated int32 span = 2 [packed = true];</code>
* Generated from protobuf field <code>repeated int32 span = 2 [packed = true];</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getSpan()
{
......@@ -208,15 +200,15 @@ class SourceCodeInfo_Location extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* Always has exactly three or four elements: start line, start column,
* end line (optional, otherwise assumed same as start line), end column.
* These are packed into a single field for efficiency. Note that line
* and column numbers are zero-based -- typically you will want to add
* 1 to each before displaying to a user.
* </pre>
*
* <code>repeated int32 span = 2 [packed = true];</code>
* Generated from protobuf field <code>repeated int32 span = 2 [packed = true];</code>
* @param int[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setSpan(&$var)
{
......@@ -233,7 +225,6 @@ class SourceCodeInfo_Location extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* If this SourceCodeInfo represents a complete declaration, these are any
* comments appearing before and after the declaration which appear to be
* attached to the declaration.
......@@ -270,9 +261,9 @@ class SourceCodeInfo_Location extends \Google\Protobuf\Internal\Message
* * grault. *&#47;
* optional int32 grault = 6;
* // ignored detached comments.
* </pre>
*
* <code>optional string leading_comments = 3;</code>
* Generated from protobuf field <code>optional string leading_comments = 3;</code>
* @return string
*/
public function getLeadingComments()
{
......@@ -280,7 +271,6 @@ class SourceCodeInfo_Location extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* If this SourceCodeInfo represents a complete declaration, these are any
* comments appearing before and after the declaration which appear to be
* attached to the declaration.
......@@ -317,9 +307,10 @@ class SourceCodeInfo_Location extends \Google\Protobuf\Internal\Message
* * grault. *&#47;
* optional int32 grault = 6;
* // ignored detached comments.
* </pre>
*
* <code>optional string leading_comments = 3;</code>
* Generated from protobuf field <code>optional string leading_comments = 3;</code>
* @param string $var
* @return $this
*/
public function setLeadingComments($var)
{
......@@ -336,7 +327,8 @@ class SourceCodeInfo_Location extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional string trailing_comments = 4;</code>
* Generated from protobuf field <code>optional string trailing_comments = 4;</code>
* @return string
*/
public function getTrailingComments()
{
......@@ -344,7 +336,9 @@ class SourceCodeInfo_Location extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional string trailing_comments = 4;</code>
* Generated from protobuf field <code>optional string trailing_comments = 4;</code>
* @param string $var
* @return $this
*/
public function setTrailingComments($var)
{
......@@ -361,7 +355,8 @@ class SourceCodeInfo_Location extends \Google\Protobuf\Internal\Message
}
/**
* <code>repeated string leading_detached_comments = 6;</code>
* Generated from protobuf field <code>repeated string leading_detached_comments = 6;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getLeadingDetachedComments()
{
......@@ -369,7 +364,9 @@ class SourceCodeInfo_Location extends \Google\Protobuf\Internal\Message
}
/**
* <code>repeated string leading_detached_comments = 6;</code>
* Generated from protobuf field <code>repeated string leading_detached_comments = 6;</code>
* @param string[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setLeadingDetachedComments(&$var)
{
......
......@@ -12,56 +12,52 @@ use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* A message representing a option the parser does not recognize. This only
* appears in options protos created by the compiler::Parser class.
* DescriptorPool resolves these when building Descriptor objects. Therefore,
* options protos in descriptor objects (e.g. returned by Descriptor::options(),
* or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
* in them.
* </pre>
*
* Protobuf type <code>google.protobuf.UninterpretedOption</code>
* Generated from protobuf message <code>google.protobuf.UninterpretedOption</code>
*/
class UninterpretedOption extends \Google\Protobuf\Internal\Message
{
/**
* <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
*/
private $name;
private $has_name = false;
/**
* <pre>
* The value of the uninterpreted option, in whatever type the tokenizer
* identified it as during parsing. Exactly one of these should be set.
* </pre>
*
* <code>optional string identifier_value = 3;</code>
* Generated from protobuf field <code>optional string identifier_value = 3;</code>
*/
private $identifier_value = '';
private $has_identifier_value = false;
/**
* <code>optional uint64 positive_int_value = 4;</code>
* Generated from protobuf field <code>optional uint64 positive_int_value = 4;</code>
*/
private $positive_int_value = 0;
private $has_positive_int_value = false;
/**
* <code>optional int64 negative_int_value = 5;</code>
* Generated from protobuf field <code>optional int64 negative_int_value = 5;</code>
*/
private $negative_int_value = 0;
private $has_negative_int_value = false;
/**
* <code>optional double double_value = 6;</code>
* Generated from protobuf field <code>optional double double_value = 6;</code>
*/
private $double_value = 0.0;
private $has_double_value = false;
/**
* <code>optional bytes string_value = 7;</code>
* Generated from protobuf field <code>optional bytes string_value = 7;</code>
*/
private $string_value = '';
private $has_string_value = false;
/**
* <code>optional string aggregate_value = 8;</code>
* Generated from protobuf field <code>optional string aggregate_value = 8;</code>
*/
private $aggregate_value = '';
private $has_aggregate_value = false;
......@@ -72,7 +68,8 @@ class UninterpretedOption extends \Google\Protobuf\Internal\Message
}
/**
* <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getName()
{
......@@ -80,7 +77,9 @@ class UninterpretedOption extends \Google\Protobuf\Internal\Message
}
/**
* <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
* @param \Google\Protobuf\Internal\UninterpretedOption_NamePart[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setName(&$var)
{
......@@ -97,12 +96,11 @@ class UninterpretedOption extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* The value of the uninterpreted option, in whatever type the tokenizer
* identified it as during parsing. Exactly one of these should be set.
* </pre>
*
* <code>optional string identifier_value = 3;</code>
* Generated from protobuf field <code>optional string identifier_value = 3;</code>
* @return string
*/
public function getIdentifierValue()
{
......@@ -110,12 +108,12 @@ class UninterpretedOption extends \Google\Protobuf\Internal\Message
}
/**
* <pre>
* The value of the uninterpreted option, in whatever type the tokenizer
* identified it as during parsing. Exactly one of these should be set.
* </pre>
*
* <code>optional string identifier_value = 3;</code>
* Generated from protobuf field <code>optional string identifier_value = 3;</code>
* @param string $var
* @return $this
*/
public function setIdentifierValue($var)
{
......@@ -132,7 +130,8 @@ class UninterpretedOption extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional uint64 positive_int_value = 4;</code>
* Generated from protobuf field <code>optional uint64 positive_int_value = 4;</code>
* @return int|string
*/
public function getPositiveIntValue()
{
......@@ -140,7 +139,9 @@ class UninterpretedOption extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional uint64 positive_int_value = 4;</code>
* Generated from protobuf field <code>optional uint64 positive_int_value = 4;</code>
* @param int|string $var
* @return $this
*/
public function setPositiveIntValue($var)
{
......@@ -157,7 +158,8 @@ class UninterpretedOption extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional int64 negative_int_value = 5;</code>
* Generated from protobuf field <code>optional int64 negative_int_value = 5;</code>
* @return int|string
*/
public function getNegativeIntValue()
{
......@@ -165,7 +167,9 @@ class UninterpretedOption extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional int64 negative_int_value = 5;</code>
* Generated from protobuf field <code>optional int64 negative_int_value = 5;</code>
* @param int|string $var
* @return $this
*/
public function setNegativeIntValue($var)
{
......@@ -182,7 +186,8 @@ class UninterpretedOption extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional double double_value = 6;</code>
* Generated from protobuf field <code>optional double double_value = 6;</code>
* @return float
*/
public function getDoubleValue()
{
......@@ -190,7 +195,9 @@ class UninterpretedOption extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional double double_value = 6;</code>
* Generated from protobuf field <code>optional double double_value = 6;</code>
* @param float $var
* @return $this
*/
public function setDoubleValue($var)
{
......@@ -207,7 +214,8 @@ class UninterpretedOption extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional bytes string_value = 7;</code>
* Generated from protobuf field <code>optional bytes string_value = 7;</code>
* @return string
*/
public function getStringValue()
{
......@@ -215,7 +223,9 @@ class UninterpretedOption extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional bytes string_value = 7;</code>
* Generated from protobuf field <code>optional bytes string_value = 7;</code>
* @param string $var
* @return $this
*/
public function setStringValue($var)
{
......@@ -232,7 +242,8 @@ class UninterpretedOption extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional string aggregate_value = 8;</code>
* Generated from protobuf field <code>optional string aggregate_value = 8;</code>
* @return string
*/
public function getAggregateValue()
{
......@@ -240,7 +251,9 @@ class UninterpretedOption extends \Google\Protobuf\Internal\Message
}
/**
* <code>optional string aggregate_value = 8;</code>
* Generated from protobuf field <code>optional string aggregate_value = 8;</code>
* @param string $var
* @return $this
*/
public function setAggregateValue($var)
{
......
......@@ -12,25 +12,23 @@ use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* The name of the uninterpreted option. Each string represents a segment in
* a dot-separated name. is_extension is true iff a segment represents an
* extension (denoted with parentheses in options specs in .proto files).
* E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
* "foo.(bar.baz).qux".
* </pre>
*
* Protobuf type <code>google.protobuf.UninterpretedOption.NamePart</code>
* Generated from protobuf message <code>google.protobuf.UninterpretedOption.NamePart</code>
*/
class UninterpretedOption_NamePart extends \Google\Protobuf\Internal\Message
{
/**
* <code>required string name_part = 1;</code>
* Generated from protobuf field <code>required string name_part = 1;</code>
*/
private $name_part = '';
private $has_name_part = false;
/**
* <code>required bool is_extension = 2;</code>
* Generated from protobuf field <code>required bool is_extension = 2;</code>
*/
private $is_extension = false;
private $has_is_extension = false;
......@@ -41,7 +39,8 @@ class UninterpretedOption_NamePart extends \Google\Protobuf\Internal\Message
}
/**
* <code>required string name_part = 1;</code>
* Generated from protobuf field <code>required string name_part = 1;</code>
* @return string
*/
public function getNamePart()
{
......@@ -49,7 +48,9 @@ class UninterpretedOption_NamePart extends \Google\Protobuf\Internal\Message
}
/**
* <code>required string name_part = 1;</code>
* Generated from protobuf field <code>required string name_part = 1;</code>
* @param string $var
* @return $this
*/
public function setNamePart($var)
{
......@@ -66,7 +67,8 @@ class UninterpretedOption_NamePart extends \Google\Protobuf\Internal\Message
}
/**
* <code>required bool is_extension = 2;</code>
* Generated from protobuf field <code>required bool is_extension = 2;</code>
* @return bool
*/
public function getIsExtension()
{
......@@ -74,7 +76,9 @@ class UninterpretedOption_NamePart extends \Google\Protobuf\Internal\Message
}
/**
* <code>required bool is_extension = 2;</code>
* Generated from protobuf field <code>required bool is_extension = 2;</code>
* @param bool $var
* @return $this
*/
public function setIsExtension($var)
{
......
This diff is collapsed.
......@@ -8,7 +8,7 @@ set -e
phpize && ./configure CFLAGS='-g -O0' && make
popd
tests=( array_test.php encode_decode_test.php generated_class_test.php map_field_test.php well_known_test.php )
tests=( array_test.php encode_decode_test.php generated_class_test.php generated_phpdoc_test.php map_field_test.php well_known_test.php )
for t in "${tests[@]}"
do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment