Ydb.Table.TransactionSettings
*/
class TransactionSettings extends \Google\Protobuf\Internal\Message
{
protected $tx_mode;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Ydb\Table\SerializableModeSettings $serializable_read_write
* @type \Ydb\Table\OnlineModeSettings $online_read_only
* @type \Ydb\Table\StaleModeSettings $stale_read_only
* @type \Ydb\Table\SnapshotModeSettings $snapshot_read_only
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Protos\YdbTable::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field .Ydb.Table.SerializableModeSettings serializable_read_write = 1;
* @return \Ydb\Table\SerializableModeSettings|null
*/
public function getSerializableReadWrite()
{
return $this->readOneof(1);
}
public function hasSerializableReadWrite()
{
return $this->hasOneof(1);
}
/**
* Generated from protobuf field .Ydb.Table.SerializableModeSettings serializable_read_write = 1;
* @param \Ydb\Table\SerializableModeSettings $var
* @return $this
*/
public function setSerializableReadWrite($var)
{
GPBUtil::checkMessage($var, \Ydb\Table\SerializableModeSettings::class);
$this->writeOneof(1, $var);
return $this;
}
/**
* Generated from protobuf field .Ydb.Table.OnlineModeSettings online_read_only = 2;
* @return \Ydb\Table\OnlineModeSettings|null
*/
public function getOnlineReadOnly()
{
return $this->readOneof(2);
}
public function hasOnlineReadOnly()
{
return $this->hasOneof(2);
}
/**
* Generated from protobuf field .Ydb.Table.OnlineModeSettings online_read_only = 2;
* @param \Ydb\Table\OnlineModeSettings $var
* @return $this
*/
public function setOnlineReadOnly($var)
{
GPBUtil::checkMessage($var, \Ydb\Table\OnlineModeSettings::class);
$this->writeOneof(2, $var);
return $this;
}
/**
* Generated from protobuf field .Ydb.Table.StaleModeSettings stale_read_only = 3;
* @return \Ydb\Table\StaleModeSettings|null
*/
public function getStaleReadOnly()
{
return $this->readOneof(3);
}
public function hasStaleReadOnly()
{
return $this->hasOneof(3);
}
/**
* Generated from protobuf field .Ydb.Table.StaleModeSettings stale_read_only = 3;
* @param \Ydb\Table\StaleModeSettings $var
* @return $this
*/
public function setStaleReadOnly($var)
{
GPBUtil::checkMessage($var, \Ydb\Table\StaleModeSettings::class);
$this->writeOneof(3, $var);
return $this;
}
/**
* Generated from protobuf field .Ydb.Table.SnapshotModeSettings snapshot_read_only = 4;
* @return \Ydb\Table\SnapshotModeSettings|null
*/
public function getSnapshotReadOnly()
{
return $this->readOneof(4);
}
public function hasSnapshotReadOnly()
{
return $this->hasOneof(4);
}
/**
* Generated from protobuf field .Ydb.Table.SnapshotModeSettings snapshot_read_only = 4;
* @param \Ydb\Table\SnapshotModeSettings $var
* @return $this
*/
public function setSnapshotReadOnly($var)
{
GPBUtil::checkMessage($var, \Ydb\Table\SnapshotModeSettings::class);
$this->writeOneof(4, $var);
return $this;
}
/**
* @return string
*/
public function getTxMode()
{
return $this->whichOneof("tx_mode");
}
}