blob: 0dd3072f184a221cfe66b3094eebac46c70ed289 [file]
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>grpc.testing.ClientConfig</code>
*/
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 <code>repeated string server_targets = 1;</code>
*/
private $server_targets;
/**
* Generated from protobuf field <code>.grpc.testing.ClientType client_type = 2;</code>
*/
private $client_type = 0;
/**
* Generated from protobuf field <code>.grpc.testing.SecurityParams security_params = 3;</code>
*/
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 <code>int32 outstanding_rpcs_per_channel = 4;</code>
*/
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 <code>int32 client_channels = 5;</code>
*/
private $client_channels = 0;
/**
* Only for async client. Number of threads to use to start/manage RPCs.
*
* Generated from protobuf field <code>int32 async_client_threads = 7;</code>
*/
private $async_client_threads = 0;
/**
* Generated from protobuf field <code>.grpc.testing.RpcType rpc_type = 8;</code>
*/
private $rpc_type = 0;
/**
* The requested load for the entire client (aggregated over all the threads).
*
* Generated from protobuf field <code>.grpc.testing.LoadParams load_params = 10;</code>
*/
private $load_params = null;
/**
* Generated from protobuf field <code>.grpc.testing.PayloadConfig payload_config = 11;</code>
*/
private $payload_config = null;
/**
* Generated from protobuf field <code>.grpc.testing.HistogramParams histogram_params = 12;</code>
*/
private $histogram_params = null;
/**
* Specify the cores we should run the client on, if desired
*
* Generated from protobuf field <code>repeated int32 core_list = 13;</code>
*/
private $core_list;
/**
* Generated from protobuf field <code>int32 core_limit = 14;</code>
*/
private $core_limit = 0;
/**
* If we use an OTHER_CLIENT client_type, this string gives more detail
*
* Generated from protobuf field <code>string other_client_api = 15;</code>
*/
private $other_client_api = '';
/**
* Generated from protobuf field <code>repeated .grpc.testing.ChannelArg channel_args = 16;</code>
*/
private $channel_args;
/**
* Number of threads that share each completion queue
*
* Generated from protobuf field <code>int32 threads_per_cq = 17;</code>
*/
private $threads_per_cq = 0;
/**
* Number of messages on a stream before it gets finished/restarted
*
* Generated from protobuf field <code>int32 messages_per_stream = 18;</code>
*/
private $messages_per_stream = 0;
/**
* Use coalescing API when possible.
*
* Generated from protobuf field <code>bool use_coalesce_api = 19;</code>
*/
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 <code>repeated string server_targets = 1;</code>
* @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 <code>repeated string server_targets = 1;</code>
* @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 <code>.grpc.testing.ClientType client_type = 2;</code>
* @return int
*/
public function getClientType()
{
return $this->client_type;
}
/**
* Generated from protobuf field <code>.grpc.testing.ClientType client_type = 2;</code>
* @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 <code>.grpc.testing.SecurityParams security_params = 3;</code>
* @return \Grpc\Testing\SecurityParams
*/
public function getSecurityParams()
{
return $this->security_params;
}
/**
* Generated from protobuf field <code>.grpc.testing.SecurityParams security_params = 3;</code>
* @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 <code>int32 outstanding_rpcs_per_channel = 4;</code>
* @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 <code>int32 outstanding_rpcs_per_channel = 4;</code>
* @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 <code>int32 client_channels = 5;</code>
* @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 <code>int32 client_channels = 5;</code>
* @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 <code>int32 async_client_threads = 7;</code>
* @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 <code>int32 async_client_threads = 7;</code>
* @param int $var
* @return $this
*/
public function setAsyncClientThreads($var)
{
GPBUtil::checkInt32($var);
$this->async_client_threads = $var;
return $this;
}
/**
* Generated from protobuf field <code>.grpc.testing.RpcType rpc_type = 8;</code>
* @return int
*/
public function getRpcType()
{
return $this->rpc_type;
}
/**
* Generated from protobuf field <code>.grpc.testing.RpcType rpc_type = 8;</code>
* @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 <code>.grpc.testing.LoadParams load_params = 10;</code>
* @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 <code>.grpc.testing.LoadParams load_params = 10;</code>
* @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 <code>.grpc.testing.PayloadConfig payload_config = 11;</code>
* @return \Grpc\Testing\PayloadConfig
*/
public function getPayloadConfig()
{
return $this->payload_config;
}
/**
* Generated from protobuf field <code>.grpc.testing.PayloadConfig payload_config = 11;</code>
* @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 <code>.grpc.testing.HistogramParams histogram_params = 12;</code>
* @return \Grpc\Testing\HistogramParams
*/
public function getHistogramParams()
{
return $this->histogram_params;
}
/**
* Generated from protobuf field <code>.grpc.testing.HistogramParams histogram_params = 12;</code>
* @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 <code>repeated int32 core_list = 13;</code>
* @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 <code>repeated int32 core_list = 13;</code>
* @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 <code>int32 core_limit = 14;</code>
* @return int
*/
public function getCoreLimit()
{
return $this->core_limit;
}
/**
* Generated from protobuf field <code>int32 core_limit = 14;</code>
* @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 <code>string other_client_api = 15;</code>
* @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 <code>string other_client_api = 15;</code>
* @param string $var
* @return $this
*/
public function setOtherClientApi($var)
{
GPBUtil::checkString($var, True);
$this->other_client_api = $var;
return $this;
}
/**
* Generated from protobuf field <code>repeated .grpc.testing.ChannelArg channel_args = 16;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getChannelArgs()
{
return $this->channel_args;
}
/**
* Generated from protobuf field <code>repeated .grpc.testing.ChannelArg channel_args = 16;</code>
* @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 <code>int32 threads_per_cq = 17;</code>
* @return int
*/
public function getThreadsPerCq()
{
return $this->threads_per_cq;
}
/**
* Number of threads that share each completion queue
*
* Generated from protobuf field <code>int32 threads_per_cq = 17;</code>
* @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 <code>int32 messages_per_stream = 18;</code>
* @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 <code>int32 messages_per_stream = 18;</code>
* @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 <code>bool use_coalesce_api = 19;</code>
* @return bool
*/
public function getUseCoalesceApi()
{
return $this->use_coalesce_api;
}
/**
* Use coalescing API when possible.
*
* Generated from protobuf field <code>bool use_coalesce_api = 19;</code>
* @param bool $var
* @return $this
*/
public function setUseCoalesceApi($var)
{
GPBUtil::checkBool($var);
$this->use_coalesce_api = $var;
return $this;
}
}