Ydb.Type
*/
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 .Ydb.Type.PrimitiveTypeId type_id = 1;
* @return int
*/
public function getTypeId()
{
return $this->readOneof(1);
}
public function hasTypeId()
{
return $this->hasOneof(1);
}
/**
* Data types
*
* Generated from protobuf field .Ydb.Type.PrimitiveTypeId type_id = 1;
* @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 .Ydb.DecimalType decimal_type = 2;
* @return \Ydb\DecimalType|null
*/
public function getDecimalType()
{
return $this->readOneof(2);
}
public function hasDecimalType()
{
return $this->hasOneof(2);
}
/**
* Generated from protobuf field .Ydb.DecimalType decimal_type = 2;
* @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 .Ydb.OptionalType optional_type = 101;
* @return \Ydb\OptionalType|null
*/
public function getOptionalType()
{
return $this->readOneof(101);
}
public function hasOptionalType()
{
return $this->hasOneof(101);
}
/**
* Container types
*
* Generated from protobuf field .Ydb.OptionalType optional_type = 101;
* @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 .Ydb.ListType list_type = 102;
* @return \Ydb\ListType|null
*/
public function getListType()
{
return $this->readOneof(102);
}
public function hasListType()
{
return $this->hasOneof(102);
}
/**
* Generated from protobuf field .Ydb.ListType list_type = 102;
* @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 .Ydb.TupleType tuple_type = 103;
* @return \Ydb\TupleType|null
*/
public function getTupleType()
{
return $this->readOneof(103);
}
public function hasTupleType()
{
return $this->hasOneof(103);
}
/**
* Generated from protobuf field .Ydb.TupleType tuple_type = 103;
* @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 .Ydb.StructType struct_type = 104;
* @return \Ydb\StructType|null
*/
public function getStructType()
{
return $this->readOneof(104);
}
public function hasStructType()
{
return $this->hasOneof(104);
}
/**
* Generated from protobuf field .Ydb.StructType struct_type = 104;
* @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 .Ydb.DictType dict_type = 105;
* @return \Ydb\DictType|null
*/
public function getDictType()
{
return $this->readOneof(105);
}
public function hasDictType()
{
return $this->hasOneof(105);
}
/**
* Generated from protobuf field .Ydb.DictType dict_type = 105;
* @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 .Ydb.VariantType variant_type = 106;
* @return \Ydb\VariantType|null
*/
public function getVariantType()
{
return $this->readOneof(106);
}
public function hasVariantType()
{
return $this->hasOneof(106);
}
/**
* Generated from protobuf field .Ydb.VariantType variant_type = 106;
* @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 .Ydb.TaggedType tagged_type = 107;
* @return \Ydb\TaggedType|null
*/
public function getTaggedType()
{
return $this->readOneof(107);
}
public function hasTaggedType()
{
return $this->hasOneof(107);
}
/**
* Generated from protobuf field .Ydb.TaggedType tagged_type = 107;
* @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 .google.protobuf.NullValue void_type = 201;
* @return int
*/
public function getVoidType()
{
return $this->readOneof(201);
}
public function hasVoidType()
{
return $this->hasOneof(201);
}
/**
* Special types
*
* Generated from protobuf field .google.protobuf.NullValue void_type = 201;
* @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 .google.protobuf.NullValue null_type = 202;
* @return int
*/
public function getNullType()
{
return $this->readOneof(202);
}
public function hasNullType()
{
return $this->hasOneof(202);
}
/**
* Generated from protobuf field .google.protobuf.NullValue null_type = 202;
* @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 .google.protobuf.NullValue empty_list_type = 203;
* @return int
*/
public function getEmptyListType()
{
return $this->readOneof(203);
}
public function hasEmptyListType()
{
return $this->hasOneof(203);
}
/**
* Generated from protobuf field .google.protobuf.NullValue empty_list_type = 203;
* @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 .google.protobuf.NullValue empty_dict_type = 204;
* @return int
*/
public function getEmptyDictType()
{
return $this->readOneof(204);
}
public function hasEmptyDictType()
{
return $this->hasOneof(204);
}
/**
* Generated from protobuf field .google.protobuf.NullValue empty_dict_type = 204;
* @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 .Ydb.PgType pg_type = 205;
* @return \Ydb\PgType|null
*/
public function getPgType()
{
return $this->readOneof(205);
}
public function hasPgType()
{
return $this->hasOneof(205);
}
/**
* Generated from protobuf field .Ydb.PgType pg_type = 205;
* @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");
}
}