• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 * Server-streaming request.
13 *
14 * Generated from protobuf message <code>grpc.testing.StreamingOutputCallRequest</code>
15 */
16class StreamingOutputCallRequest extends \Google\Protobuf\Internal\Message
17{
18    /**
19     * Desired payload type in the response from the server.
20     * If response_type is RANDOM, the payload from each response in the stream
21     * might be of different types. This is to simulate a mixed type of payload
22     * stream.
23     *
24     * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code>
25     */
26    protected $response_type = 0;
27    /**
28     * Configuration for each expected response message.
29     *
30     * Generated from protobuf field <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
31     */
32    private $response_parameters;
33    /**
34     * Optional input payload sent along with the request.
35     *
36     * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code>
37     */
38    protected $payload = null;
39    /**
40     * Whether server should return a given status
41     *
42     * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code>
43     */
44    protected $response_status = null;
45
46    /**
47     * Constructor.
48     *
49     * @param array $data {
50     *     Optional. Data for populating the Message object.
51     *
52     *     @type int $response_type
53     *           Desired payload type in the response from the server.
54     *           If response_type is RANDOM, the payload from each response in the stream
55     *           might be of different types. This is to simulate a mixed type of payload
56     *           stream.
57     *     @type \Grpc\Testing\ResponseParameters[]|\Google\Protobuf\Internal\RepeatedField $response_parameters
58     *           Configuration for each expected response message.
59     *     @type \Grpc\Testing\Payload $payload
60     *           Optional input payload sent along with the request.
61     *     @type \Grpc\Testing\EchoStatus $response_status
62     *           Whether server should return a given status
63     * }
64     */
65    public function __construct($data = NULL) {
66        \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
67        parent::__construct($data);
68    }
69
70    /**
71     * Desired payload type in the response from the server.
72     * If response_type is RANDOM, the payload from each response in the stream
73     * might be of different types. This is to simulate a mixed type of payload
74     * stream.
75     *
76     * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code>
77     * @return int
78     */
79    public function getResponseType()
80    {
81        return $this->response_type;
82    }
83
84    /**
85     * Desired payload type in the response from the server.
86     * If response_type is RANDOM, the payload from each response in the stream
87     * might be of different types. This is to simulate a mixed type of payload
88     * stream.
89     *
90     * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code>
91     * @param int $var
92     * @return $this
93     */
94    public function setResponseType($var)
95    {
96        GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class);
97        $this->response_type = $var;
98
99        return $this;
100    }
101
102    /**
103     * Configuration for each expected response message.
104     *
105     * Generated from protobuf field <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
106     * @return \Google\Protobuf\Internal\RepeatedField
107     */
108    public function getResponseParameters()
109    {
110        return $this->response_parameters;
111    }
112
113    /**
114     * Configuration for each expected response message.
115     *
116     * Generated from protobuf field <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
117     * @param \Grpc\Testing\ResponseParameters[]|\Google\Protobuf\Internal\RepeatedField $var
118     * @return $this
119     */
120    public function setResponseParameters($var)
121    {
122        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ResponseParameters::class);
123        $this->response_parameters = $arr;
124
125        return $this;
126    }
127
128    /**
129     * Optional input payload sent along with the request.
130     *
131     * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code>
132     * @return \Grpc\Testing\Payload
133     */
134    public function getPayload()
135    {
136        return $this->payload;
137    }
138
139    /**
140     * Optional input payload sent along with the request.
141     *
142     * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code>
143     * @param \Grpc\Testing\Payload $var
144     * @return $this
145     */
146    public function setPayload($var)
147    {
148        GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class);
149        $this->payload = $var;
150
151        return $this;
152    }
153
154    /**
155     * Whether server should return a given status
156     *
157     * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code>
158     * @return \Grpc\Testing\EchoStatus
159     */
160    public function getResponseStatus()
161    {
162        return $this->response_status;
163    }
164
165    /**
166     * Whether server should return a given status
167     *
168     * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code>
169     * @param \Grpc\Testing\EchoStatus $var
170     * @return $this
171     */
172    public function setResponseStatus($var)
173    {
174        GPBUtil::checkMessage($var, \Grpc\Testing\EchoStatus::class);
175        $this->response_status = $var;
176
177        return $this;
178    }
179
180}
181
182