avm99963 | 99bb77c | 2020-01-27 03:15:08 +0100 | [diff] [blame^] | 1 | <?php |
| 2 | # Generated by the protocol buffer compiler. DO NOT EDIT! |
| 3 | # source: google/protobuf/type.proto |
| 4 | |
| 5 | namespace Google\Protobuf; |
| 6 | |
| 7 | use Google\Protobuf\Internal\GPBType; |
| 8 | use Google\Protobuf\Internal\RepeatedField; |
| 9 | use Google\Protobuf\Internal\GPBUtil; |
| 10 | |
| 11 | /** |
| 12 | * A protocol buffer option, which can be attached to a message, field, |
| 13 | * enumeration, etc. |
| 14 | * |
| 15 | * Generated from protobuf message <code>google.protobuf.Option</code> |
| 16 | */ |
| 17 | class Option extends \Google\Protobuf\Internal\Message |
| 18 | { |
| 19 | /** |
| 20 | * The option's name. For protobuf built-in options (options defined in |
| 21 | * descriptor.proto), this is the short name. For example, `"map_entry"`. |
| 22 | * For custom options, it should be the fully-qualified name. For example, |
| 23 | * `"google.api.http"`. |
| 24 | * |
| 25 | * Generated from protobuf field <code>string name = 1;</code> |
| 26 | */ |
| 27 | private $name = ''; |
| 28 | /** |
| 29 | * The option's value packed in an Any message. If the value is a primitive, |
| 30 | * the corresponding wrapper type defined in google/protobuf/wrappers.proto |
| 31 | * should be used. If the value is an enum, it should be stored as an int32 |
| 32 | * value using the google.protobuf.Int32Value type. |
| 33 | * |
| 34 | * Generated from protobuf field <code>.google.protobuf.Any value = 2;</code> |
| 35 | */ |
| 36 | private $value = null; |
| 37 | |
| 38 | /** |
| 39 | * Constructor. |
| 40 | * |
| 41 | * @param array $data { |
| 42 | * Optional. Data for populating the Message object. |
| 43 | * |
| 44 | * @type string $name |
| 45 | * The option's name. For protobuf built-in options (options defined in |
| 46 | * descriptor.proto), this is the short name. For example, `"map_entry"`. |
| 47 | * For custom options, it should be the fully-qualified name. For example, |
| 48 | * `"google.api.http"`. |
| 49 | * @type \Google\Protobuf\Any $value |
| 50 | * The option's value packed in an Any message. If the value is a primitive, |
| 51 | * the corresponding wrapper type defined in google/protobuf/wrappers.proto |
| 52 | * should be used. If the value is an enum, it should be stored as an int32 |
| 53 | * value using the google.protobuf.Int32Value type. |
| 54 | * } |
| 55 | */ |
| 56 | public function __construct($data = NULL) { |
| 57 | \GPBMetadata\Google\Protobuf\Type::initOnce(); |
| 58 | parent::__construct($data); |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * The option's name. For protobuf built-in options (options defined in |
| 63 | * descriptor.proto), this is the short name. For example, `"map_entry"`. |
| 64 | * For custom options, it should be the fully-qualified name. For example, |
| 65 | * `"google.api.http"`. |
| 66 | * |
| 67 | * Generated from protobuf field <code>string name = 1;</code> |
| 68 | * @return string |
| 69 | */ |
| 70 | public function getName() |
| 71 | { |
| 72 | return $this->name; |
| 73 | } |
| 74 | |
| 75 | /** |
| 76 | * The option's name. For protobuf built-in options (options defined in |
| 77 | * descriptor.proto), this is the short name. For example, `"map_entry"`. |
| 78 | * For custom options, it should be the fully-qualified name. For example, |
| 79 | * `"google.api.http"`. |
| 80 | * |
| 81 | * Generated from protobuf field <code>string name = 1;</code> |
| 82 | * @param string $var |
| 83 | * @return $this |
| 84 | */ |
| 85 | public function setName($var) |
| 86 | { |
| 87 | GPBUtil::checkString($var, True); |
| 88 | $this->name = $var; |
| 89 | |
| 90 | return $this; |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * The option's value packed in an Any message. If the value is a primitive, |
| 95 | * the corresponding wrapper type defined in google/protobuf/wrappers.proto |
| 96 | * should be used. If the value is an enum, it should be stored as an int32 |
| 97 | * value using the google.protobuf.Int32Value type. |
| 98 | * |
| 99 | * Generated from protobuf field <code>.google.protobuf.Any value = 2;</code> |
| 100 | * @return \Google\Protobuf\Any |
| 101 | */ |
| 102 | public function getValue() |
| 103 | { |
| 104 | return $this->value; |
| 105 | } |
| 106 | |
| 107 | /** |
| 108 | * The option's value packed in an Any message. If the value is a primitive, |
| 109 | * the corresponding wrapper type defined in google/protobuf/wrappers.proto |
| 110 | * should be used. If the value is an enum, it should be stored as an int32 |
| 111 | * value using the google.protobuf.Int32Value type. |
| 112 | * |
| 113 | * Generated from protobuf field <code>.google.protobuf.Any value = 2;</code> |
| 114 | * @param \Google\Protobuf\Any $var |
| 115 | * @return $this |
| 116 | */ |
| 117 | public function setValue($var) |
| 118 | { |
| 119 | GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); |
| 120 | $this->value = $var; |
| 121 | |
| 122 | return $this; |
| 123 | } |
| 124 | |
| 125 | } |
| 126 | |