123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: protos/ydb_value.proto
- namespace Ydb;
- use Google\Protobuf\Internal\GPBType;
- use Google\Protobuf\Internal\RepeatedField;
- use Google\Protobuf\Internal\GPBUtil;
- /**
- * Generated from protobuf message <code>Ydb.Type</code>
- */
- class Type extends \Google\Protobuf\Internal\Message
- {
- protected $type;
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int $type_id
- * Data types
- * @type \Ydb\DecimalType $decimal_type
- * @type \Ydb\OptionalType $optional_type
- * Container types
- * @type \Ydb\ListType $list_type
- * @type \Ydb\TupleType $tuple_type
- * @type \Ydb\StructType $struct_type
- * @type \Ydb\DictType $dict_type
- * @type \Ydb\VariantType $variant_type
- * @type \Ydb\TaggedType $tagged_type
- * @type int $void_type
- * Special types
- * @type int $null_type
- * @type int $empty_list_type
- * @type int $empty_dict_type
- * @type \Ydb\PgType $pg_type
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Protos\YdbValue::initOnce();
- parent::__construct($data);
- }
- /**
- * Data types
- *
- * Generated from protobuf field <code>.Ydb.Type.PrimitiveTypeId type_id = 1;</code>
- * @return int
- */
- public function getTypeId()
- {
- return $this->readOneof(1);
- }
- public function hasTypeId()
- {
- return $this->hasOneof(1);
- }
- /**
- * Data types
- *
- * Generated from protobuf field <code>.Ydb.Type.PrimitiveTypeId type_id = 1;</code>
- * @param int $var
- * @return $this
- */
- public function setTypeId($var)
- {
- GPBUtil::checkEnum($var, \Ydb\Type\PrimitiveTypeId::class);
- $this->writeOneof(1, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>.Ydb.DecimalType decimal_type = 2;</code>
- * @return \Ydb\DecimalType|null
- */
- public function getDecimalType()
- {
- return $this->readOneof(2);
- }
- public function hasDecimalType()
- {
- return $this->hasOneof(2);
- }
- /**
- * Generated from protobuf field <code>.Ydb.DecimalType decimal_type = 2;</code>
- * @param \Ydb\DecimalType $var
- * @return $this
- */
- public function setDecimalType($var)
- {
- GPBUtil::checkMessage($var, \Ydb\DecimalType::class);
- $this->writeOneof(2, $var);
- return $this;
- }
- /**
- * Container types
- *
- * Generated from protobuf field <code>.Ydb.OptionalType optional_type = 101;</code>
- * @return \Ydb\OptionalType|null
- */
- public function getOptionalType()
- {
- return $this->readOneof(101);
- }
- public function hasOptionalType()
- {
- return $this->hasOneof(101);
- }
- /**
- * Container types
- *
- * Generated from protobuf field <code>.Ydb.OptionalType optional_type = 101;</code>
- * @param \Ydb\OptionalType $var
- * @return $this
- */
- public function setOptionalType($var)
- {
- GPBUtil::checkMessage($var, \Ydb\OptionalType::class);
- $this->writeOneof(101, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>.Ydb.ListType list_type = 102;</code>
- * @return \Ydb\ListType|null
- */
- public function getListType()
- {
- return $this->readOneof(102);
- }
- public function hasListType()
- {
- return $this->hasOneof(102);
- }
- /**
- * Generated from protobuf field <code>.Ydb.ListType list_type = 102;</code>
- * @param \Ydb\ListType $var
- * @return $this
- */
- public function setListType($var)
- {
- GPBUtil::checkMessage($var, \Ydb\ListType::class);
- $this->writeOneof(102, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>.Ydb.TupleType tuple_type = 103;</code>
- * @return \Ydb\TupleType|null
- */
- public function getTupleType()
- {
- return $this->readOneof(103);
- }
- public function hasTupleType()
- {
- return $this->hasOneof(103);
- }
- /**
- * Generated from protobuf field <code>.Ydb.TupleType tuple_type = 103;</code>
- * @param \Ydb\TupleType $var
- * @return $this
- */
- public function setTupleType($var)
- {
- GPBUtil::checkMessage($var, \Ydb\TupleType::class);
- $this->writeOneof(103, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>.Ydb.StructType struct_type = 104;</code>
- * @return \Ydb\StructType|null
- */
- public function getStructType()
- {
- return $this->readOneof(104);
- }
- public function hasStructType()
- {
- return $this->hasOneof(104);
- }
- /**
- * Generated from protobuf field <code>.Ydb.StructType struct_type = 104;</code>
- * @param \Ydb\StructType $var
- * @return $this
- */
- public function setStructType($var)
- {
- GPBUtil::checkMessage($var, \Ydb\StructType::class);
- $this->writeOneof(104, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>.Ydb.DictType dict_type = 105;</code>
- * @return \Ydb\DictType|null
- */
- public function getDictType()
- {
- return $this->readOneof(105);
- }
- public function hasDictType()
- {
- return $this->hasOneof(105);
- }
- /**
- * Generated from protobuf field <code>.Ydb.DictType dict_type = 105;</code>
- * @param \Ydb\DictType $var
- * @return $this
- */
- public function setDictType($var)
- {
- GPBUtil::checkMessage($var, \Ydb\DictType::class);
- $this->writeOneof(105, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>.Ydb.VariantType variant_type = 106;</code>
- * @return \Ydb\VariantType|null
- */
- public function getVariantType()
- {
- return $this->readOneof(106);
- }
- public function hasVariantType()
- {
- return $this->hasOneof(106);
- }
- /**
- * Generated from protobuf field <code>.Ydb.VariantType variant_type = 106;</code>
- * @param \Ydb\VariantType $var
- * @return $this
- */
- public function setVariantType($var)
- {
- GPBUtil::checkMessage($var, \Ydb\VariantType::class);
- $this->writeOneof(106, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>.Ydb.TaggedType tagged_type = 107;</code>
- * @return \Ydb\TaggedType|null
- */
- public function getTaggedType()
- {
- return $this->readOneof(107);
- }
- public function hasTaggedType()
- {
- return $this->hasOneof(107);
- }
- /**
- * Generated from protobuf field <code>.Ydb.TaggedType tagged_type = 107;</code>
- * @param \Ydb\TaggedType $var
- * @return $this
- */
- public function setTaggedType($var)
- {
- GPBUtil::checkMessage($var, \Ydb\TaggedType::class);
- $this->writeOneof(107, $var);
- return $this;
- }
- /**
- * Special types
- *
- * Generated from protobuf field <code>.google.protobuf.NullValue void_type = 201;</code>
- * @return int
- */
- public function getVoidType()
- {
- return $this->readOneof(201);
- }
- public function hasVoidType()
- {
- return $this->hasOneof(201);
- }
- /**
- * Special types
- *
- * Generated from protobuf field <code>.google.protobuf.NullValue void_type = 201;</code>
- * @param int $var
- * @return $this
- */
- public function setVoidType($var)
- {
- GPBUtil::checkEnum($var, \Google\Protobuf\NullValue::class);
- $this->writeOneof(201, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>.google.protobuf.NullValue null_type = 202;</code>
- * @return int
- */
- public function getNullType()
- {
- return $this->readOneof(202);
- }
- public function hasNullType()
- {
- return $this->hasOneof(202);
- }
- /**
- * Generated from protobuf field <code>.google.protobuf.NullValue null_type = 202;</code>
- * @param int $var
- * @return $this
- */
- public function setNullType($var)
- {
- GPBUtil::checkEnum($var, \Google\Protobuf\NullValue::class);
- $this->writeOneof(202, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>.google.protobuf.NullValue empty_list_type = 203;</code>
- * @return int
- */
- public function getEmptyListType()
- {
- return $this->readOneof(203);
- }
- public function hasEmptyListType()
- {
- return $this->hasOneof(203);
- }
- /**
- * Generated from protobuf field <code>.google.protobuf.NullValue empty_list_type = 203;</code>
- * @param int $var
- * @return $this
- */
- public function setEmptyListType($var)
- {
- GPBUtil::checkEnum($var, \Google\Protobuf\NullValue::class);
- $this->writeOneof(203, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>.google.protobuf.NullValue empty_dict_type = 204;</code>
- * @return int
- */
- public function getEmptyDictType()
- {
- return $this->readOneof(204);
- }
- public function hasEmptyDictType()
- {
- return $this->hasOneof(204);
- }
- /**
- * Generated from protobuf field <code>.google.protobuf.NullValue empty_dict_type = 204;</code>
- * @param int $var
- * @return $this
- */
- public function setEmptyDictType($var)
- {
- GPBUtil::checkEnum($var, \Google\Protobuf\NullValue::class);
- $this->writeOneof(204, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>.Ydb.PgType pg_type = 205;</code>
- * @return \Ydb\PgType|null
- */
- public function getPgType()
- {
- return $this->readOneof(205);
- }
- public function hasPgType()
- {
- return $this->hasOneof(205);
- }
- /**
- * Generated from protobuf field <code>.Ydb.PgType pg_type = 205;</code>
- * @param \Ydb\PgType $var
- * @return $this
- */
- public function setPgType($var)
- {
- GPBUtil::checkMessage($var, \Ydb\PgType::class);
- $this->writeOneof(205, $var);
- return $this;
- }
- /**
- * @return string
- */
- public function getType()
- {
- return $this->whichOneof("type");
- }
- }
|