grpc.testing.ClientConfig
*/
class ClientConfig extends \Google\Protobuf\Internal\Message
{
/**
* List of targets to connect to. At least one target needs to be specified.
*
* Generated from protobuf field repeated string server_targets = 1;
*/
private $server_targets;
/**
* Generated from protobuf field .grpc.testing.ClientType client_type = 2;
*/
private $client_type = 0;
/**
* Generated from protobuf field .grpc.testing.SecurityParams security_params = 3;
*/
private $security_params = null;
/**
* How many concurrent RPCs to start for each channel.
* For synchronous client, use a separate thread for each outstanding RPC.
*
* Generated from protobuf field int32 outstanding_rpcs_per_channel = 4;
*/
private $outstanding_rpcs_per_channel = 0;
/**
* Number of independent client channels to create.
* i-th channel will connect to server_target[i % server_targets.size()]
*
* Generated from protobuf field int32 client_channels = 5;
*/
private $client_channels = 0;
/**
* Only for async client. Number of threads to use to start/manage RPCs.
*
* Generated from protobuf field int32 async_client_threads = 7;
*/
private $async_client_threads = 0;
/**
* Generated from protobuf field .grpc.testing.RpcType rpc_type = 8;
*/
private $rpc_type = 0;
/**
* The requested load for the entire client (aggregated over all the threads).
*
* Generated from protobuf field .grpc.testing.LoadParams load_params = 10;
*/
private $load_params = null;
/**
* Generated from protobuf field .grpc.testing.PayloadConfig payload_config = 11;
*/
private $payload_config = null;
/**
* Generated from protobuf field .grpc.testing.HistogramParams histogram_params = 12;
*/
private $histogram_params = null;
/**
* Specify the cores we should run the client on, if desired
*
* Generated from protobuf field repeated int32 core_list = 13;
*/
private $core_list;
/**
* Generated from protobuf field int32 core_limit = 14;
*/
private $core_limit = 0;
/**
* If we use an OTHER_CLIENT client_type, this string gives more detail
*
* Generated from protobuf field string other_client_api = 15;
*/
private $other_client_api = '';
/**
* Generated from protobuf field repeated .grpc.testing.ChannelArg channel_args = 16;
*/
private $channel_args;
/**
* Number of threads that share each completion queue
*
* Generated from protobuf field int32 threads_per_cq = 17;
*/
private $threads_per_cq = 0;
/**
* Number of messages on a stream before it gets finished/restarted
*
* Generated from protobuf field int32 messages_per_stream = 18;
*/
private $messages_per_stream = 0;
/**
* Use coalescing API when possible.
*
* Generated from protobuf field bool use_coalesce_api = 19;
*/
private $use_coalesce_api = false;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
/**
* List of targets to connect to. At least one target needs to be specified.
*
* Generated from protobuf field repeated string server_targets = 1;
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getServerTargets()
{
return $this->server_targets;
}
/**
* List of targets to connect to. At least one target needs to be specified.
*
* Generated from protobuf field repeated string server_targets = 1;
* @param string[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setServerTargets($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->server_targets = $arr;
return $this;
}
/**
* Generated from protobuf field .grpc.testing.ClientType client_type = 2;
* @return int
*/
public function getClientType()
{
return $this->client_type;
}
/**
* Generated from protobuf field .grpc.testing.ClientType client_type = 2;
* @param int $var
* @return $this
*/
public function setClientType($var)
{
GPBUtil::checkEnum($var, \Grpc\Testing\ClientType::class);
$this->client_type = $var;
return $this;
}
/**
* Generated from protobuf field .grpc.testing.SecurityParams security_params = 3;
* @return \Grpc\Testing\SecurityParams
*/
public function getSecurityParams()
{
return $this->security_params;
}
/**
* Generated from protobuf field .grpc.testing.SecurityParams security_params = 3;
* @param \Grpc\Testing\SecurityParams $var
* @return $this
*/
public function setSecurityParams($var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\SecurityParams::class);
$this->security_params = $var;
return $this;
}
/**
* How many concurrent RPCs to start for each channel.
* For synchronous client, use a separate thread for each outstanding RPC.
*
* Generated from protobuf field int32 outstanding_rpcs_per_channel = 4;
* @return int
*/
public function getOutstandingRpcsPerChannel()
{
return $this->outstanding_rpcs_per_channel;
}
/**
* How many concurrent RPCs to start for each channel.
* For synchronous client, use a separate thread for each outstanding RPC.
*
* Generated from protobuf field int32 outstanding_rpcs_per_channel = 4;
* @param int $var
* @return $this
*/
public function setOutstandingRpcsPerChannel($var)
{
GPBUtil::checkInt32($var);
$this->outstanding_rpcs_per_channel = $var;
return $this;
}
/**
* Number of independent client channels to create.
* i-th channel will connect to server_target[i % server_targets.size()]
*
* Generated from protobuf field int32 client_channels = 5;
* @return int
*/
public function getClientChannels()
{
return $this->client_channels;
}
/**
* Number of independent client channels to create.
* i-th channel will connect to server_target[i % server_targets.size()]
*
* Generated from protobuf field int32 client_channels = 5;
* @param int $var
* @return $this
*/
public function setClientChannels($var)
{
GPBUtil::checkInt32($var);
$this->client_channels = $var;
return $this;
}
/**
* Only for async client. Number of threads to use to start/manage RPCs.
*
* Generated from protobuf field int32 async_client_threads = 7;
* @return int
*/
public function getAsyncClientThreads()
{
return $this->async_client_threads;
}
/**
* Only for async client. Number of threads to use to start/manage RPCs.
*
* Generated from protobuf field int32 async_client_threads = 7;
* @param int $var
* @return $this
*/
public function setAsyncClientThreads($var)
{
GPBUtil::checkInt32($var);
$this->async_client_threads = $var;
return $this;
}
/**
* Generated from protobuf field .grpc.testing.RpcType rpc_type = 8;
* @return int
*/
public function getRpcType()
{
return $this->rpc_type;
}
/**
* Generated from protobuf field .grpc.testing.RpcType rpc_type = 8;
* @param int $var
* @return $this
*/
public function setRpcType($var)
{
GPBUtil::checkEnum($var, \Grpc\Testing\RpcType::class);
$this->rpc_type = $var;
return $this;
}
/**
* The requested load for the entire client (aggregated over all the threads).
*
* Generated from protobuf field .grpc.testing.LoadParams load_params = 10;
* @return \Grpc\Testing\LoadParams
*/
public function getLoadParams()
{
return $this->load_params;
}
/**
* The requested load for the entire client (aggregated over all the threads).
*
* Generated from protobuf field .grpc.testing.LoadParams load_params = 10;
* @param \Grpc\Testing\LoadParams $var
* @return $this
*/
public function setLoadParams($var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\LoadParams::class);
$this->load_params = $var;
return $this;
}
/**
* Generated from protobuf field .grpc.testing.PayloadConfig payload_config = 11;
* @return \Grpc\Testing\PayloadConfig
*/
public function getPayloadConfig()
{
return $this->payload_config;
}
/**
* Generated from protobuf field .grpc.testing.PayloadConfig payload_config = 11;
* @param \Grpc\Testing\PayloadConfig $var
* @return $this
*/
public function setPayloadConfig($var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\PayloadConfig::class);
$this->payload_config = $var;
return $this;
}
/**
* Generated from protobuf field .grpc.testing.HistogramParams histogram_params = 12;
* @return \Grpc\Testing\HistogramParams
*/
public function getHistogramParams()
{
return $this->histogram_params;
}
/**
* Generated from protobuf field .grpc.testing.HistogramParams histogram_params = 12;
* @param \Grpc\Testing\HistogramParams $var
* @return $this
*/
public function setHistogramParams($var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\HistogramParams::class);
$this->histogram_params = $var;
return $this;
}
/**
* Specify the cores we should run the client on, if desired
*
* Generated from protobuf field repeated int32 core_list = 13;
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getCoreList()
{
return $this->core_list;
}
/**
* Specify the cores we should run the client on, if desired
*
* Generated from protobuf field repeated int32 core_list = 13;
* @param int[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setCoreList($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
$this->core_list = $arr;
return $this;
}
/**
* Generated from protobuf field int32 core_limit = 14;
* @return int
*/
public function getCoreLimit()
{
return $this->core_limit;
}
/**
* Generated from protobuf field int32 core_limit = 14;
* @param int $var
* @return $this
*/
public function setCoreLimit($var)
{
GPBUtil::checkInt32($var);
$this->core_limit = $var;
return $this;
}
/**
* If we use an OTHER_CLIENT client_type, this string gives more detail
*
* Generated from protobuf field string other_client_api = 15;
* @return string
*/
public function getOtherClientApi()
{
return $this->other_client_api;
}
/**
* If we use an OTHER_CLIENT client_type, this string gives more detail
*
* Generated from protobuf field string other_client_api = 15;
* @param string $var
* @return $this
*/
public function setOtherClientApi($var)
{
GPBUtil::checkString($var, True);
$this->other_client_api = $var;
return $this;
}
/**
* Generated from protobuf field repeated .grpc.testing.ChannelArg channel_args = 16;
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getChannelArgs()
{
return $this->channel_args;
}
/**
* Generated from protobuf field repeated .grpc.testing.ChannelArg channel_args = 16;
* @param \Grpc\Testing\ChannelArg[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setChannelArgs($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ChannelArg::class);
$this->channel_args = $arr;
return $this;
}
/**
* Number of threads that share each completion queue
*
* Generated from protobuf field int32 threads_per_cq = 17;
* @return int
*/
public function getThreadsPerCq()
{
return $this->threads_per_cq;
}
/**
* Number of threads that share each completion queue
*
* Generated from protobuf field int32 threads_per_cq = 17;
* @param int $var
* @return $this
*/
public function setThreadsPerCq($var)
{
GPBUtil::checkInt32($var);
$this->threads_per_cq = $var;
return $this;
}
/**
* Number of messages on a stream before it gets finished/restarted
*
* Generated from protobuf field int32 messages_per_stream = 18;
* @return int
*/
public function getMessagesPerStream()
{
return $this->messages_per_stream;
}
/**
* Number of messages on a stream before it gets finished/restarted
*
* Generated from protobuf field int32 messages_per_stream = 18;
* @param int $var
* @return $this
*/
public function setMessagesPerStream($var)
{
GPBUtil::checkInt32($var);
$this->messages_per_stream = $var;
return $this;
}
/**
* Use coalescing API when possible.
*
* Generated from protobuf field bool use_coalesce_api = 19;
* @return bool
*/
public function getUseCoalesceApi()
{
return $this->use_coalesce_api;
}
/**
* Use coalescing API when possible.
*
* Generated from protobuf field bool use_coalesce_api = 19;
* @param bool $var
* @return $this
*/
public function setUseCoalesceApi($var)
{
GPBUtil::checkBool($var);
$this->use_coalesce_api = $var;
return $this;
}
}