media-cloud-sync
/
includes
/
sdk
/
google
/
google
/
protobuf
/
src
/
Google
/
Protobuf
/
Field.php
Field.php in Media Cloud Sync 1.2.8, at includes/sdk/google/google/protobuf/src/Google/Protobuf/Field.php
| 1 | <?php |
| 2 | |
| 3 | # Generated by the protocol buffer compiler. DO NOT EDIT! |
| 4 | # source: google/protobuf/type.proto |
| 5 | namespace Dudlewebs\WPMCS\Google\Protobuf; |
| 6 | |
| 7 | use Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBType; |
| 8 | use Dudlewebs\WPMCS\Google\Protobuf\Internal\RepeatedField; |
| 9 | use Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBUtil; |
| 10 | /** |
| 11 | * A single field of a message type. |
| 12 | * |
| 13 | * Generated from protobuf message <code>google.protobuf.Field</code> |
| 14 | */ |
| 15 | class Field extends \Dudlewebs\WPMCS\Google\Protobuf\Internal\Message |
| 16 | { |
| 17 | /** |
| 18 | * The field type. |
| 19 | * |
| 20 | * Generated from protobuf field <code>.google.protobuf.Field.Kind kind = 1;</code> |
| 21 | */ |
| 22 | protected $kind = 0; |
| 23 | /** |
| 24 | * The field cardinality. |
| 25 | * |
| 26 | * Generated from protobuf field <code>.google.protobuf.Field.Cardinality cardinality = 2;</code> |
| 27 | */ |
| 28 | protected $cardinality = 0; |
| 29 | /** |
| 30 | * The field number. |
| 31 | * |
| 32 | * Generated from protobuf field <code>int32 number = 3;</code> |
| 33 | */ |
| 34 | protected $number = 0; |
| 35 | /** |
| 36 | * The field name. |
| 37 | * |
| 38 | * Generated from protobuf field <code>string name = 4;</code> |
| 39 | */ |
| 40 | protected $name = ''; |
| 41 | /** |
| 42 | * The field type URL, without the scheme, for message or enumeration |
| 43 | * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. |
| 44 | * |
| 45 | * Generated from protobuf field <code>string type_url = 6;</code> |
| 46 | */ |
| 47 | protected $type_url = ''; |
| 48 | /** |
| 49 | * The index of the field type in `Type.oneofs`, for message or enumeration |
| 50 | * types. The first type has index 1; zero means the type is not in the list. |
| 51 | * |
| 52 | * Generated from protobuf field <code>int32 oneof_index = 7;</code> |
| 53 | */ |
| 54 | protected $oneof_index = 0; |
| 55 | /** |
| 56 | * Whether to use alternative packed wire representation. |
| 57 | * |
| 58 | * Generated from protobuf field <code>bool packed = 8;</code> |
| 59 | */ |
| 60 | protected $packed = \false; |
| 61 | /** |
| 62 | * The protocol buffer options. |
| 63 | * |
| 64 | * Generated from protobuf field <code>repeated .google.protobuf.Option options = 9;</code> |
| 65 | */ |
| 66 | private $options; |
| 67 | /** |
| 68 | * The field JSON name. |
| 69 | * |
| 70 | * Generated from protobuf field <code>string json_name = 10;</code> |
| 71 | */ |
| 72 | protected $json_name = ''; |
| 73 | /** |
| 74 | * The string value of the default value of this field. Proto2 syntax only. |
| 75 | * |
| 76 | * Generated from protobuf field <code>string default_value = 11;</code> |
| 77 | */ |
| 78 | protected $default_value = ''; |
| 79 | /** |
| 80 | * Constructor. |
| 81 | * |
| 82 | * @param array $data { |
| 83 | * Optional. Data for populating the Message object. |
| 84 | * |
| 85 | * @type int $kind |
| 86 | * The field type. |
| 87 | * @type int $cardinality |
| 88 | * The field cardinality. |
| 89 | * @type int $number |
| 90 | * The field number. |
| 91 | * @type string $name |
| 92 | * The field name. |
| 93 | * @type string $type_url |
| 94 | * The field type URL, without the scheme, for message or enumeration |
| 95 | * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. |
| 96 | * @type int $oneof_index |
| 97 | * The index of the field type in `Type.oneofs`, for message or enumeration |
| 98 | * types. The first type has index 1; zero means the type is not in the list. |
| 99 | * @type bool $packed |
| 100 | * Whether to use alternative packed wire representation. |
| 101 | * @type array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $options |
| 102 | * The protocol buffer options. |
| 103 | * @type string $json_name |
| 104 | * The field JSON name. |
| 105 | * @type string $default_value |
| 106 | * The string value of the default value of this field. Proto2 syntax only. |
| 107 | * } |
| 108 | */ |
| 109 | public function __construct($data = NULL) |
| 110 | { |
| 111 | \Dudlewebs\WPMCS\GPBMetadata\Google\Protobuf\Type::initOnce(); |
| 112 | parent::__construct($data); |
| 113 | } |
| 114 | /** |
| 115 | * The field type. |
| 116 | * |
| 117 | * Generated from protobuf field <code>.google.protobuf.Field.Kind kind = 1;</code> |
| 118 | * @return int |
| 119 | */ |
| 120 | public function getKind() |
| 121 | { |
| 122 | return $this->kind; |
| 123 | } |
| 124 | /** |
| 125 | * The field type. |
| 126 | * |
| 127 | * Generated from protobuf field <code>.google.protobuf.Field.Kind kind = 1;</code> |
| 128 | * @param int $var |
| 129 | * @return $this |
| 130 | */ |
| 131 | public function setKind($var) |
| 132 | { |
| 133 | GPBUtil::checkEnum($var, \Dudlewebs\WPMCS\Google\Protobuf\Field\Kind::class); |
| 134 | $this->kind = $var; |
| 135 | return $this; |
| 136 | } |
| 137 | /** |
| 138 | * The field cardinality. |
| 139 | * |
| 140 | * Generated from protobuf field <code>.google.protobuf.Field.Cardinality cardinality = 2;</code> |
| 141 | * @return int |
| 142 | */ |
| 143 | public function getCardinality() |
| 144 | { |
| 145 | return $this->cardinality; |
| 146 | } |
| 147 | /** |
| 148 | * The field cardinality. |
| 149 | * |
| 150 | * Generated from protobuf field <code>.google.protobuf.Field.Cardinality cardinality = 2;</code> |
| 151 | * @param int $var |
| 152 | * @return $this |
| 153 | */ |
| 154 | public function setCardinality($var) |
| 155 | { |
| 156 | GPBUtil::checkEnum($var, \Dudlewebs\WPMCS\Google\Protobuf\Field\Cardinality::class); |
| 157 | $this->cardinality = $var; |
| 158 | return $this; |
| 159 | } |
| 160 | /** |
| 161 | * The field number. |
| 162 | * |
| 163 | * Generated from protobuf field <code>int32 number = 3;</code> |
| 164 | * @return int |
| 165 | */ |
| 166 | public function getNumber() |
| 167 | { |
| 168 | return $this->number; |
| 169 | } |
| 170 | /** |
| 171 | * The field number. |
| 172 | * |
| 173 | * Generated from protobuf field <code>int32 number = 3;</code> |
| 174 | * @param int $var |
| 175 | * @return $this |
| 176 | */ |
| 177 | public function setNumber($var) |
| 178 | { |
| 179 | GPBUtil::checkInt32($var); |
| 180 | $this->number = $var; |
| 181 | return $this; |
| 182 | } |
| 183 | /** |
| 184 | * The field name. |
| 185 | * |
| 186 | * Generated from protobuf field <code>string name = 4;</code> |
| 187 | * @return string |
| 188 | */ |
| 189 | public function getName() |
| 190 | { |
| 191 | return $this->name; |
| 192 | } |
| 193 | /** |
| 194 | * The field name. |
| 195 | * |
| 196 | * Generated from protobuf field <code>string name = 4;</code> |
| 197 | * @param string $var |
| 198 | * @return $this |
| 199 | */ |
| 200 | public function setName($var) |
| 201 | { |
| 202 | GPBUtil::checkString($var, True); |
| 203 | $this->name = $var; |
| 204 | return $this; |
| 205 | } |
| 206 | /** |
| 207 | * The field type URL, without the scheme, for message or enumeration |
| 208 | * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. |
| 209 | * |
| 210 | * Generated from protobuf field <code>string type_url = 6;</code> |
| 211 | * @return string |
| 212 | */ |
| 213 | public function getTypeUrl() |
| 214 | { |
| 215 | return $this->type_url; |
| 216 | } |
| 217 | /** |
| 218 | * The field type URL, without the scheme, for message or enumeration |
| 219 | * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. |
| 220 | * |
| 221 | * Generated from protobuf field <code>string type_url = 6;</code> |
| 222 | * @param string $var |
| 223 | * @return $this |
| 224 | */ |
| 225 | public function setTypeUrl($var) |
| 226 | { |
| 227 | GPBUtil::checkString($var, True); |
| 228 | $this->type_url = $var; |
| 229 | return $this; |
| 230 | } |
| 231 | /** |
| 232 | * The index of the field type in `Type.oneofs`, for message or enumeration |
| 233 | * types. The first type has index 1; zero means the type is not in the list. |
| 234 | * |
| 235 | * Generated from protobuf field <code>int32 oneof_index = 7;</code> |
| 236 | * @return int |
| 237 | */ |
| 238 | public function getOneofIndex() |
| 239 | { |
| 240 | return $this->oneof_index; |
| 241 | } |
| 242 | /** |
| 243 | * The index of the field type in `Type.oneofs`, for message or enumeration |
| 244 | * types. The first type has index 1; zero means the type is not in the list. |
| 245 | * |
| 246 | * Generated from protobuf field <code>int32 oneof_index = 7;</code> |
| 247 | * @param int $var |
| 248 | * @return $this |
| 249 | */ |
| 250 | public function setOneofIndex($var) |
| 251 | { |
| 252 | GPBUtil::checkInt32($var); |
| 253 | $this->oneof_index = $var; |
| 254 | return $this; |
| 255 | } |
| 256 | /** |
| 257 | * Whether to use alternative packed wire representation. |
| 258 | * |
| 259 | * Generated from protobuf field <code>bool packed = 8;</code> |
| 260 | * @return bool |
| 261 | */ |
| 262 | public function getPacked() |
| 263 | { |
| 264 | return $this->packed; |
| 265 | } |
| 266 | /** |
| 267 | * Whether to use alternative packed wire representation. |
| 268 | * |
| 269 | * Generated from protobuf field <code>bool packed = 8;</code> |
| 270 | * @param bool $var |
| 271 | * @return $this |
| 272 | */ |
| 273 | public function setPacked($var) |
| 274 | { |
| 275 | GPBUtil::checkBool($var); |
| 276 | $this->packed = $var; |
| 277 | return $this; |
| 278 | } |
| 279 | /** |
| 280 | * The protocol buffer options. |
| 281 | * |
| 282 | * Generated from protobuf field <code>repeated .google.protobuf.Option options = 9;</code> |
| 283 | * @return \Google\Protobuf\Internal\RepeatedField |
| 284 | */ |
| 285 | public function getOptions() |
| 286 | { |
| 287 | return $this->options; |
| 288 | } |
| 289 | /** |
| 290 | * The protocol buffer options. |
| 291 | * |
| 292 | * Generated from protobuf field <code>repeated .google.protobuf.Option options = 9;</code> |
| 293 | * @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var |
| 294 | * @return $this |
| 295 | */ |
| 296 | public function setOptions($var) |
| 297 | { |
| 298 | $arr = GPBUtil::checkRepeatedField($var, \Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBType::MESSAGE, \Dudlewebs\WPMCS\Google\Protobuf\Option::class); |
| 299 | $this->options = $arr; |
| 300 | return $this; |
| 301 | } |
| 302 | /** |
| 303 | * The field JSON name. |
| 304 | * |
| 305 | * Generated from protobuf field <code>string json_name = 10;</code> |
| 306 | * @return string |
| 307 | */ |
| 308 | public function getJsonName() |
| 309 | { |
| 310 | return $this->json_name; |
| 311 | } |
| 312 | /** |
| 313 | * The field JSON name. |
| 314 | * |
| 315 | * Generated from protobuf field <code>string json_name = 10;</code> |
| 316 | * @param string $var |
| 317 | * @return $this |
| 318 | */ |
| 319 | public function setJsonName($var) |
| 320 | { |
| 321 | GPBUtil::checkString($var, True); |
| 322 | $this->json_name = $var; |
| 323 | return $this; |
| 324 | } |
| 325 | /** |
| 326 | * The string value of the default value of this field. Proto2 syntax only. |
| 327 | * |
| 328 | * Generated from protobuf field <code>string default_value = 11;</code> |
| 329 | * @return string |
| 330 | */ |
| 331 | public function getDefaultValue() |
| 332 | { |
| 333 | return $this->default_value; |
| 334 | } |
| 335 | /** |
| 336 | * The string value of the default value of this field. Proto2 syntax only. |
| 337 | * |
| 338 | * Generated from protobuf field <code>string default_value = 11;</code> |
| 339 | * @param string $var |
| 340 | * @return $this |
| 341 | */ |
| 342 | public function setDefaultValue($var) |
| 343 | { |
| 344 | GPBUtil::checkString($var, True); |
| 345 | $this->default_value = $var; |
| 346 | return $this; |
| 347 | } |
| 348 | } |
| 349 |