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;
*/
protected $client_type = 0;
/**
* Generated from protobuf field .grpc.testing.SecurityParams security_params = 3;
*/
protected $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;
*/
protected $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;
*/
protected $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;
*/
protected $async_client_threads = 0;
/**
* Generated from protobuf field .grpc.testing.RpcType rpc_type = 8;
*/
protected $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;
*/
protected $load_params = null;
/**
* Generated from protobuf field .grpc.testing.PayloadConfig payload_config = 11;
*/
protected $payload_config = null;
/**
* Generated from protobuf field .grpc.testing.HistogramParams histogram_params = 12;
*/
protected $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;
*/
protected $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;
*/
protected $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;
*/
protected $threads_per_cq = 0;
/**
* Number of messages on a stream before it gets finished/restarted
*
* Generated from protobuf field int32 messages_per_stream = 18;
*/
protected $messages_per_stream = 0;
/**
* Use coalescing API when possible.
*
* Generated from protobuf field bool use_coalesce_api = 19;
*/
protected $use_coalesce_api = false;
/**
* If 0, disabled. Else, specifies the period between gathering latency
* medians in milliseconds.
*
* Generated from protobuf field int32 median_latency_collection_interval_millis = 20;
*/
protected $median_latency_collection_interval_millis = 0;
/**
* Number of client processes. 0 indicates no restriction.
*
* Generated from protobuf field int32 client_processes = 21;
*/
protected $client_processes = 0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string[]|\Google\Protobuf\Internal\RepeatedField $server_targets
* List of targets to connect to. At least one target needs to be specified.
* @type int $client_type
* @type \Grpc\Testing\SecurityParams $security_params
* @type int $outstanding_rpcs_per_channel
* How many concurrent RPCs to start for each channel.
* For synchronous client, use a separate thread for each outstanding RPC.
* @type int $client_channels
* Number of independent client channels to create.
* i-th channel will connect to server_target[i % server_targets.size()]
* @type int $async_client_threads
* Only for async client. Number of threads to use to start/manage RPCs.
* @type int $rpc_type
* @type \Grpc\Testing\LoadParams $load_params
* The requested load for the entire client (aggregated over all the threads).
* @type \Grpc\Testing\PayloadConfig $payload_config
* @type \Grpc\Testing\HistogramParams $histogram_params
* @type int[]|\Google\Protobuf\Internal\RepeatedField $core_list
* Specify the cores we should run the client on, if desired
* @type int $core_limit
* @type string $other_client_api
* If we use an OTHER_CLIENT client_type, this string gives more detail
* @type \Grpc\Testing\ChannelArg[]|\Google\Protobuf\Internal\RepeatedField $channel_args
* @type int $threads_per_cq
* Number of threads that share each completion queue
* @type int $messages_per_stream
* Number of messages on a stream before it gets finished/restarted
* @type bool $use_coalesce_api
* Use coalescing API when possible.
* @type int $median_latency_collection_interval_millis
* If 0, disabled. Else, specifies the period between gathering latency
* medians in milliseconds.
* @type int $client_processes
* Number of client processes. 0 indicates no restriction.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct($data);
}
/**
* 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;
}
/**
* If 0, disabled. Else, specifies the period between gathering latency
* medians in milliseconds.
*
* Generated from protobuf field int32 median_latency_collection_interval_millis = 20;
* @return int
*/
public function getMedianLatencyCollectionIntervalMillis()
{
return $this->median_latency_collection_interval_millis;
}
/**
* If 0, disabled. Else, specifies the period between gathering latency
* medians in milliseconds.
*
* Generated from protobuf field int32 median_latency_collection_interval_millis = 20;
* @param int $var
* @return $this
*/
public function setMedianLatencyCollectionIntervalMillis($var)
{
GPBUtil::checkInt32($var);
$this->median_latency_collection_interval_millis = $var;
return $this;
}
/**
* Number of client processes. 0 indicates no restriction.
*
* Generated from protobuf field int32 client_processes = 21;
* @return int
*/
public function getClientProcesses()
{
return $this->client_processes;
}
/**
* Number of client processes. 0 indicates no restriction.
*
* Generated from protobuf field int32 client_processes = 21;
* @param int $var
* @return $this
*/
public function setClientProcesses($var)
{
GPBUtil::checkInt32($var);
$this->client_processes = $var;
return $this;
}
}