1<?php
2# Generated by the protocol buffer compiler.  DO NOT EDIT!
3# source: src/proto/grpc/testing/messages.proto
4
5namespace Grpc\Testing;
6
7use Google\Protobuf\Internal\GPBType;
8use Google\Protobuf\Internal\RepeatedField;
9use Google\Protobuf\Internal\GPBUtil;
10
11/**
12 * Configuration for a particular response.
13 *
14 * Generated from protobuf message <code>grpc.testing.ResponseParameters</code>
15 */
16class ResponseParameters extends \Google\Protobuf\Internal\Message
17{
18    /**
19     * Desired payload sizes in responses from the server.
20     *
21     * Generated from protobuf field <code>int32 size = 1;</code>
22     */
23    private $size = 0;
24    /**
25     * Desired interval between consecutive responses in the response stream in
26     * microseconds.
27     *
28     * Generated from protobuf field <code>int32 interval_us = 2;</code>
29     */
30    private $interval_us = 0;
31    /**
32     * Whether to request the server to compress the response. This field is
33     * "nullable" in order to interoperate seamlessly with clients not able to
34     * implement the full compression tests by introspecting the call to verify
35     * the response's compression status.
36     *
37     * Generated from protobuf field <code>.grpc.testing.BoolValue compressed = 3;</code>
38     */
39    private $compressed = null;
40
41    public function __construct() {
42        \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
43        parent::__construct();
44    }
45
46    /**
47     * Desired payload sizes in responses from the server.
48     *
49     * Generated from protobuf field <code>int32 size = 1;</code>
50     * @return int
51     */
52    public function getSize()
53    {
54        return $this->size;
55    }
56
57    /**
58     * Desired payload sizes in responses from the server.
59     *
60     * Generated from protobuf field <code>int32 size = 1;</code>
61     * @param int $var
62     * @return $this
63     */
64    public function setSize($var)
65    {
66        GPBUtil::checkInt32($var);
67        $this->size = $var;
68
69        return $this;
70    }
71
72    /**
73     * Desired interval between consecutive responses in the response stream in
74     * microseconds.
75     *
76     * Generated from protobuf field <code>int32 interval_us = 2;</code>
77     * @return int
78     */
79    public function getIntervalUs()
80    {
81        return $this->interval_us;
82    }
83
84    /**
85     * Desired interval between consecutive responses in the response stream in
86     * microseconds.
87     *
88     * Generated from protobuf field <code>int32 interval_us = 2;</code>
89     * @param int $var
90     * @return $this
91     */
92    public function setIntervalUs($var)
93    {
94        GPBUtil::checkInt32($var);
95        $this->interval_us = $var;
96
97        return $this;
98    }
99
100    /**
101     * Whether to request the server to compress the response. This field is
102     * "nullable" in order to interoperate seamlessly with clients not able to
103     * implement the full compression tests by introspecting the call to verify
104     * the response's compression status.
105     *
106     * Generated from protobuf field <code>.grpc.testing.BoolValue compressed = 3;</code>
107     * @return \Grpc\Testing\BoolValue
108     */
109    public function getCompressed()
110    {
111        return $this->compressed;
112    }
113
114    /**
115     * Whether to request the server to compress the response. This field is
116     * "nullable" in order to interoperate seamlessly with clients not able to
117     * implement the full compression tests by introspecting the call to verify
118     * the response's compression status.
119     *
120     * Generated from protobuf field <code>.grpc.testing.BoolValue compressed = 3;</code>
121     * @param \Grpc\Testing\BoolValue $var
122     * @return $this
123     */
124    public function setCompressed($var)
125    {
126        GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class);
127        $this->compressed = $var;
128
129        return $this;
130    }
131
132}
133
134