Debian Codegraph @

src/php/tests/interop/Grpc/Testing/ClientConfigureRequest.php

raw
1 <?php
2 # Generated by the protocol buffer compiler. DO NOT EDIT!
3 # source: src/proto/grpc/testing/messages.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 * Configurations for a test client.
13 *
14 * Generated from protobuf message <code>grpc.testing.ClientConfigureRequest</code>
15 */
16 class ClientConfigureRequest extends \Google\Protobuf\Internal\Message
17 {
18 /**
19 * The types of RPCs the client sends.
20 *
21 * Generated from protobuf field <code>repeated .grpc.testing.ClientConfigureRequest.RpcType types = 1;</code>
22 */
23 private $types;
24 /**
25 * The collection of custom metadata to be attached to RPCs sent by the client.
26 *
27 * Generated from protobuf field <code>repeated .grpc.testing.ClientConfigureRequest.Metadata metadata = 2;</code>
28 */
29 private $metadata;
30 /**
31 * The deadline to use, in seconds, for all RPCs. If unset or zero, the
32 * client will use the default from the command-line.
33 *
34 * Generated from protobuf field <code>int32 timeout_sec = 3;</code>
35 */
36 protected $timeout_sec = 0;
37
38 /**
39 * Constructor.
40 *
41 * @param array $data {
42 * Optional. Data for populating the Message object.
43 *
44 * @type array<int>|\Google\Protobuf\Internal\RepeatedField $types
45 * The types of RPCs the client sends.
46 * @type array<\Grpc\Testing\ClientConfigureRequest\Metadata>|\Google\Protobuf\Internal\RepeatedField $metadata
47 * The collection of custom metadata to be attached to RPCs sent by the client.
48 * @type int $timeout_sec
49 * The deadline to use, in seconds, for all RPCs. If unset or zero, the
50 * client will use the default from the command-line.
51 * }
52 */
53 public function __construct($data = NULL) {
54 \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
55 parent::__construct($data);
56 }
57
58 /**
59 * The types of RPCs the client sends.
60 *
61 * Generated from protobuf field <code>repeated .grpc.testing.ClientConfigureRequest.RpcType types = 1;</code>
62 * @return \Google\Protobuf\Internal\RepeatedField
63 */
64 public function getTypes()
65 {
66 return $this->types;
67 }
68
69 /**
70 * The types of RPCs the client sends.
71 *
72 * Generated from protobuf field <code>repeated .grpc.testing.ClientConfigureRequest.RpcType types = 1;</code>
73 * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
74 * @return $this
75 */
76 public function setTypes($var)
77 {
78 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Grpc\Testing\ClientConfigureRequest\RpcType::class);
79 $this->types = $arr;
80
81 return $this;
82 }
83
84 /**
85 * The collection of custom metadata to be attached to RPCs sent by the client.
86 *
87 * Generated from protobuf field <code>repeated .grpc.testing.ClientConfigureRequest.Metadata metadata = 2;</code>
88 * @return \Google\Protobuf\Internal\RepeatedField
89 */
90 public function getMetadata()
91 {
92 return $this->metadata;
93 }
94
95 /**
96 * The collection of custom metadata to be attached to RPCs sent by the client.
97 *
98 * Generated from protobuf field <code>repeated .grpc.testing.ClientConfigureRequest.Metadata metadata = 2;</code>
99 * @param array<\Grpc\Testing\ClientConfigureRequest\Metadata>|\Google\Protobuf\Internal\RepeatedField $var
100 * @return $this
101 */
102 public function setMetadata($var)
103 {
104 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ClientConfigureRequest\Metadata::class);
105 $this->metadata = $arr;
106
107 return $this;
108 }
109
110 /**
111 * The deadline to use, in seconds, for all RPCs. If unset or zero, the
112 * client will use the default from the command-line.
113 *
114 * Generated from protobuf field <code>int32 timeout_sec = 3;</code>
115 * @return int
116 */
117 public function getTimeoutSec()
118 {
119 return $this->timeout_sec;
120 }
121
122 /**
123 * The deadline to use, in seconds, for all RPCs. If unset or zero, the
124 * client will use the default from the command-line.
125 *
126 * Generated from protobuf field <code>int32 timeout_sec = 3;</code>
127 * @param int $var
128 * @return $this
129 */
130 public function setTimeoutSec($var)
131 {
132 GPBUtil::checkInt32($var);
133 $this->timeout_sec = $var;
134
135 return $this;
136 }
137
138 }
139