| 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 message type. |
| 13 |
* |
| 14 |
* Generated from protobuf message <code>google.protobuf.Type</code> |
| 15 |
*/ |
| 16 |
class Type extends \Google\Protobuf\Internal\Message |
| 17 |
{ |
| 18 |
/** |
| 19 |
* The fully qualified message name. |
| 20 |
* |
| 21 |
* Generated from protobuf field <code>string name = 1;</code> |
| 22 |
*/ |
| 23 |
protected $name = ''; |
| 24 |
/** |
| 25 |
* The list of fields. |
| 26 |
* |
| 27 |
* Generated from protobuf field <code>repeated .google.protobuf.Field fields = 2;</code> |
| 28 |
*/ |
| 29 |
private $fields; |
| 30 |
/** |
| 31 |
* The list of types appearing in `oneof` definitions in this type. |
| 32 |
* |
| 33 |
* Generated from protobuf field <code>repeated string oneofs = 3;</code> |
| 34 |
*/ |
| 35 |
private $oneofs; |
| 36 |
/** |
| 37 |
* The protocol buffer options. |
| 38 |
* |
| 39 |
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 4;</code> |
| 40 |
*/ |
| 41 |
private $options; |
| 42 |
/** |
| 43 |
* The source context. |
| 44 |
* |
| 45 |
* Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 5;</code> |
| 46 |
*/ |
| 47 |
protected $source_context = null; |
| 48 |
/** |
| 49 |
* The source syntax. |
| 50 |
* |
| 51 |
* Generated from protobuf field <code>.google.protobuf.Syntax syntax = 6;</code> |
| 52 |
*/ |
| 53 |
protected $syntax = 0; |
| 54 |
|
| 55 |
/** |
| 56 |
* Constructor. |
| 57 |
* |
| 58 |
* @param array $data { |
| 59 |
* Optional. Data for populating the Message object. |
| 60 |
* |
| 61 |
* @type string $name |
| 62 |
* The fully qualified message name. |
| 63 |
* @type array<\Google\Protobuf\Field>|\Google\Protobuf\Internal\RepeatedField $fields |
| 64 |
* The list of fields. |
| 65 |
* @type array<string>|\Google\Protobuf\Internal\RepeatedField $oneofs |
| 66 |
* The list of types appearing in `oneof` definitions in this type. |
| 67 |
* @type array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $options |
| 68 |
* The protocol buffer options. |
| 69 |
* @type \Google\Protobuf\SourceContext $source_context |
| 70 |
* The source context. |
| 71 |
* @type int $syntax |
| 72 |
* The source syntax. |
| 73 |
* } |
| 74 |
*/ |
| 75 |
public function __construct($data = NULL) { |
| 76 |
\GPBMetadata\Google\Protobuf\Type::initOnce(); |
| 77 |
parent::__construct($data); |
| 78 |
} |
| 79 |
|
| 80 |
/** |
| 81 |
* The fully qualified message name. |
| 82 |
* |
| 83 |
* Generated from protobuf field <code>string name = 1;</code> |
| 84 |
* @return string |
| 85 |
*/ |
| 86 |
public function getName() |
| 87 |
{ |
| 88 |
return $this->name; |
| 89 |
} |
| 90 |
|
| 91 |
/** |
| 92 |
* The fully qualified message name. |
| 93 |
* |
| 94 |
* Generated from protobuf field <code>string name = 1;</code> |
| 95 |
* @param string $var |
| 96 |
* @return $this |
| 97 |
*/ |
| 98 |
public function setName($var) |
| 99 |
{ |
| 100 |
GPBUtil::checkString($var, True); |
| 101 |
$this->name = $var; |
| 102 |
|
| 103 |
return $this; |
| 104 |
} |
| 105 |
|
| 106 |
/** |
| 107 |
* The list of fields. |
| 108 |
* |
| 109 |
* Generated from protobuf field <code>repeated .google.protobuf.Field fields = 2;</code> |
| 110 |
* @return \Google\Protobuf\Internal\RepeatedField |
| 111 |
*/ |
| 112 |
public function getFields() |
| 113 |
{ |
| 114 |
return $this->fields; |
| 115 |
} |
| 116 |
|
| 117 |
/** |
| 118 |
* The list of fields. |
| 119 |
* |
| 120 |
* Generated from protobuf field <code>repeated .google.protobuf.Field fields = 2;</code> |
| 121 |
* @param array<\Google\Protobuf\Field>|\Google\Protobuf\Internal\RepeatedField $var |
| 122 |
* @return $this |
| 123 |
*/ |
| 124 |
public function setFields($var) |
| 125 |
{ |
| 126 |
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Field::class); |
| 127 |
$this->fields = $arr; |
| 128 |
|
| 129 |
return $this; |
| 130 |
} |
| 131 |
|
| 132 |
/** |
| 133 |
* The list of types appearing in `oneof` definitions in this type. |
| 134 |
* |
| 135 |
* Generated from protobuf field <code>repeated string oneofs = 3;</code> |
| 136 |
* @return \Google\Protobuf\Internal\RepeatedField |
| 137 |
*/ |
| 138 |
public function getOneofs() |
| 139 |
{ |
| 140 |
return $this->oneofs; |
| 141 |
} |
| 142 |
|
| 143 |
/** |
| 144 |
* The list of types appearing in `oneof` definitions in this type. |
| 145 |
* |
| 146 |
* Generated from protobuf field <code>repeated string oneofs = 3;</code> |
| 147 |
* @param array<string>|\Google\Protobuf\Internal\RepeatedField $var |
| 148 |
* @return $this |
| 149 |
*/ |
| 150 |
public function setOneofs($var) |
| 151 |
{ |
| 152 |
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); |
| 153 |
$this->oneofs = $arr; |
| 154 |
|
| 155 |
return $this; |
| 156 |
} |
| 157 |
|
| 158 |
/** |
| 159 |
* The protocol buffer options. |
| 160 |
* |
| 161 |
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 4;</code> |
| 162 |
* @return \Google\Protobuf\Internal\RepeatedField |
| 163 |
*/ |
| 164 |
public function getOptions() |
| 165 |
{ |
| 166 |
return $this->options; |
| 167 |
} |
| 168 |
|
| 169 |
/** |
| 170 |
* The protocol buffer options. |
| 171 |
* |
| 172 |
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 4;</code> |
| 173 |
* @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var |
| 174 |
* @return $this |
| 175 |
*/ |
| 176 |
public function setOptions($var) |
| 177 |
{ |
| 178 |
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class); |
| 179 |
$this->options = $arr; |
| 180 |
|
| 181 |
return $this; |
| 182 |
} |
| 183 |
|
| 184 |
/** |
| 185 |
* The source context. |
| 186 |
* |
| 187 |
* Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 5;</code> |
| 188 |
* @return \Google\Protobuf\SourceContext|null |
| 189 |
*/ |
| 190 |
public function getSourceContext() |
| 191 |
{ |
| 192 |
return $this->source_context; |
| 193 |
} |
| 194 |
|
| 195 |
public function hasSourceContext() |
| 196 |
{ |
| 197 |
return isset($this->source_context); |
| 198 |
} |
| 199 |
|
| 200 |
public function clearSourceContext() |
| 201 |
{ |
| 202 |
unset($this->source_context); |
| 203 |
} |
| 204 |
|
| 205 |
/** |
| 206 |
* The source context. |
| 207 |
* |
| 208 |
* Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 5;</code> |
| 209 |
* @param \Google\Protobuf\SourceContext $var |
| 210 |
* @return $this |
| 211 |
*/ |
| 212 |
public function setSourceContext($var) |
| 213 |
{ |
| 214 |
GPBUtil::checkMessage($var, \Google\Protobuf\SourceContext::class); |
| 215 |
$this->source_context = $var; |
| 216 |
|
| 217 |
return $this; |
| 218 |
} |
| 219 |
|
| 220 |
/** |
| 221 |
* The source syntax. |
| 222 |
* |
| 223 |
* Generated from protobuf field <code>.google.protobuf.Syntax syntax = 6;</code> |
| 224 |
* @return int |
| 225 |
*/ |
| 226 |
public function getSyntax() |
| 227 |
{ |
| 228 |
return $this->syntax; |
| 229 |
} |
| 230 |
|
| 231 |
/** |
| 232 |
* The source syntax. |
| 233 |
* |
| 234 |
* Generated from protobuf field <code>.google.protobuf.Syntax syntax = 6;</code> |
| 235 |
* @param int $var |
| 236 |
* @return $this |
| 237 |
*/ |
| 238 |
public function setSyntax($var) |
| 239 |
{ |
| 240 |
GPBUtil::checkEnum($var, \Google\Protobuf\Syntax::class); |
| 241 |
$this->syntax = $var; |
| 242 |
|
| 243 |
return $this; |
| 244 |
} |
| 245 |
|
| 246 |
} |
| 247 |
|