Home | History | Annotate | Download | only in Testing
      1 <?php
      2 # Generated by the protocol buffer compiler.  DO NOT EDIT!
      3 # source: src/proto/grpc/testing/control.proto
      4 
      5 namespace Grpc\Testing;
      6 
      7 use Google\Protobuf\Internal\GPBType;
      8 use Google\Protobuf\Internal\RepeatedField;
      9 use Google\Protobuf\Internal\GPBUtil;
     10 
     11 /**
     12  * A single performance scenario: input to qps_json_driver
     13  *
     14  * Generated from protobuf message <code>grpc.testing.Scenario</code>
     15  */
     16 class Scenario extends \Google\Protobuf\Internal\Message
     17 {
     18     /**
     19      * Human readable name for this scenario
     20      *
     21      * Generated from protobuf field <code>string name = 1;</code>
     22      */
     23     private $name = '';
     24     /**
     25      * Client configuration
     26      *
     27      * Generated from protobuf field <code>.grpc.testing.ClientConfig client_config = 2;</code>
     28      */
     29     private $client_config = null;
     30     /**
     31      * Number of clients to start for the test
     32      *
     33      * Generated from protobuf field <code>int32 num_clients = 3;</code>
     34      */
     35     private $num_clients = 0;
     36     /**
     37      * Server configuration
     38      *
     39      * Generated from protobuf field <code>.grpc.testing.ServerConfig server_config = 4;</code>
     40      */
     41     private $server_config = null;
     42     /**
     43      * Number of servers to start for the test
     44      *
     45      * Generated from protobuf field <code>int32 num_servers = 5;</code>
     46      */
     47     private $num_servers = 0;
     48     /**
     49      * Warmup period, in seconds
     50      *
     51      * Generated from protobuf field <code>int32 warmup_seconds = 6;</code>
     52      */
     53     private $warmup_seconds = 0;
     54     /**
     55      * Benchmark time, in seconds
     56      *
     57      * Generated from protobuf field <code>int32 benchmark_seconds = 7;</code>
     58      */
     59     private $benchmark_seconds = 0;
     60     /**
     61      * Number of workers to spawn locally (usually zero)
     62      *
     63      * Generated from protobuf field <code>int32 spawn_local_worker_count = 8;</code>
     64      */
     65     private $spawn_local_worker_count = 0;
     66 
     67     public function __construct() {
     68         \GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
     69         parent::__construct();
     70     }
     71 
     72     /**
     73      * Human readable name for this scenario
     74      *
     75      * Generated from protobuf field <code>string name = 1;</code>
     76      * @return string
     77      */
     78     public function getName()
     79     {
     80         return $this->name;
     81     }
     82 
     83     /**
     84      * Human readable name for this scenario
     85      *
     86      * Generated from protobuf field <code>string name = 1;</code>
     87      * @param string $var
     88      * @return $this
     89      */
     90     public function setName($var)
     91     {
     92         GPBUtil::checkString($var, True);
     93         $this->name = $var;
     94 
     95         return $this;
     96     }
     97 
     98     /**
     99      * Client configuration
    100      *
    101      * Generated from protobuf field <code>.grpc.testing.ClientConfig client_config = 2;</code>
    102      * @return \Grpc\Testing\ClientConfig
    103      */
    104     public function getClientConfig()
    105     {
    106         return $this->client_config;
    107     }
    108 
    109     /**
    110      * Client configuration
    111      *
    112      * Generated from protobuf field <code>.grpc.testing.ClientConfig client_config = 2;</code>
    113      * @param \Grpc\Testing\ClientConfig $var
    114      * @return $this
    115      */
    116     public function setClientConfig($var)
    117     {
    118         GPBUtil::checkMessage($var, \Grpc\Testing\ClientConfig::class);
    119         $this->client_config = $var;
    120 
    121         return $this;
    122     }
    123 
    124     /**
    125      * Number of clients to start for the test
    126      *
    127      * Generated from protobuf field <code>int32 num_clients = 3;</code>
    128      * @return int
    129      */
    130     public function getNumClients()
    131     {
    132         return $this->num_clients;
    133     }
    134 
    135     /**
    136      * Number of clients to start for the test
    137      *
    138      * Generated from protobuf field <code>int32 num_clients = 3;</code>
    139      * @param int $var
    140      * @return $this
    141      */
    142     public function setNumClients($var)
    143     {
    144         GPBUtil::checkInt32($var);
    145         $this->num_clients = $var;
    146 
    147         return $this;
    148     }
    149 
    150     /**
    151      * Server configuration
    152      *
    153      * Generated from protobuf field <code>.grpc.testing.ServerConfig server_config = 4;</code>
    154      * @return \Grpc\Testing\ServerConfig
    155      */
    156     public function getServerConfig()
    157     {
    158         return $this->server_config;
    159     }
    160 
    161     /**
    162      * Server configuration
    163      *
    164      * Generated from protobuf field <code>.grpc.testing.ServerConfig server_config = 4;</code>
    165      * @param \Grpc\Testing\ServerConfig $var
    166      * @return $this
    167      */
    168     public function setServerConfig($var)
    169     {
    170         GPBUtil::checkMessage($var, \Grpc\Testing\ServerConfig::class);
    171         $this->server_config = $var;
    172 
    173         return $this;
    174     }
    175 
    176     /**
    177      * Number of servers to start for the test
    178      *
    179      * Generated from protobuf field <code>int32 num_servers = 5;</code>
    180      * @return int
    181      */
    182     public function getNumServers()
    183     {
    184         return $this->num_servers;
    185     }
    186 
    187     /**
    188      * Number of servers to start for the test
    189      *
    190      * Generated from protobuf field <code>int32 num_servers = 5;</code>
    191      * @param int $var
    192      * @return $this
    193      */
    194     public function setNumServers($var)
    195     {
    196         GPBUtil::checkInt32($var);
    197         $this->num_servers = $var;
    198 
    199         return $this;
    200     }
    201 
    202     /**
    203      * Warmup period, in seconds
    204      *
    205      * Generated from protobuf field <code>int32 warmup_seconds = 6;</code>
    206      * @return int
    207      */
    208     public function getWarmupSeconds()
    209     {
    210         return $this->warmup_seconds;
    211     }
    212 
    213     /**
    214      * Warmup period, in seconds
    215      *
    216      * Generated from protobuf field <code>int32 warmup_seconds = 6;</code>
    217      * @param int $var
    218      * @return $this
    219      */
    220     public function setWarmupSeconds($var)
    221     {
    222         GPBUtil::checkInt32($var);
    223         $this->warmup_seconds = $var;
    224 
    225         return $this;
    226     }
    227 
    228     /**
    229      * Benchmark time, in seconds
    230      *
    231      * Generated from protobuf field <code>int32 benchmark_seconds = 7;</code>
    232      * @return int
    233      */
    234     public function getBenchmarkSeconds()
    235     {
    236         return $this->benchmark_seconds;
    237     }
    238 
    239     /**
    240      * Benchmark time, in seconds
    241      *
    242      * Generated from protobuf field <code>int32 benchmark_seconds = 7;</code>
    243      * @param int $var
    244      * @return $this
    245      */
    246     public function setBenchmarkSeconds($var)
    247     {
    248         GPBUtil::checkInt32($var);
    249         $this->benchmark_seconds = $var;
    250 
    251         return $this;
    252     }
    253 
    254     /**
    255      * Number of workers to spawn locally (usually zero)
    256      *
    257      * Generated from protobuf field <code>int32 spawn_local_worker_count = 8;</code>
    258      * @return int
    259      */
    260     public function getSpawnLocalWorkerCount()
    261     {
    262         return $this->spawn_local_worker_count;
    263     }
    264 
    265     /**
    266      * Number of workers to spawn locally (usually zero)
    267      *
    268      * Generated from protobuf field <code>int32 spawn_local_worker_count = 8;</code>
    269      * @param int $var
    270      * @return $this
    271      */
    272     public function setSpawnLocalWorkerCount($var)
    273     {
    274         GPBUtil::checkInt32($var);
    275         $this->spawn_local_worker_count = $var;
    276 
    277         return $this;
    278     }
    279 
    280 }
    281 
    282