Debian Codegraph @

src/php/tests/qps/generated_code/Grpc/Testing/TestServiceClient.php

raw
1 <?php
2 // GENERATED CODE -- DO NOT EDIT!
3
4 // Original file comments:
5 // Copyright 2015-2016 gRPC authors.
6 //
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 // http://www.apache.org/licenses/LICENSE-2.0
12 //
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
18 //
19 // An integration test service that covers all the method signature permutations
20 // of unary/streaming requests/responses.
21 //
22 namespace Grpc\Testing;
23
24 /**
25 * A simple service to test the various types of RPCs and experiment with
26 * performance with various types of payload.
27 */
28 class TestServiceClient extends \Grpc\BaseStub {
29
30 /**
31 * @param string $hostname hostname
32 * @param array $opts channel options
33 * @param \Grpc\Channel $channel (optional) re-use channel object
34 */
35 public function __construct($hostname, $opts, $channel = null) {
36 parent::__construct($hostname, $opts, $channel);
37 }
38
39 /**
40 * One empty request followed by one empty response.
41 * @param \Grpc\Testing\EmptyMessage $argument input argument
42 * @param array $metadata metadata
43 * @param array $options call options
44 * @return \Grpc\Testing\EmptyMessage
45 */
46 public function EmptyCall(\Grpc\Testing\EmptyMessage $argument,
47 $metadata = [], $options = []) {
48 return $this->_simpleRequest('/grpc.testing.TestService/EmptyCall',
49 $argument,
50 ['\Grpc\Testing\EmptyMessage', 'decode'],
51 $metadata, $options);
52 }
53
54 /**
55 * One request followed by one response.
56 * @param \Grpc\Testing\SimpleRequest $argument input argument
57 * @param array $metadata metadata
58 * @param array $options call options
59 * @return \Grpc\Testing\SimpleResponse
60 */
61 public function UnaryCall(\Grpc\Testing\SimpleRequest $argument,
62 $metadata = [], $options = []) {
63 return $this->_simpleRequest('/grpc.testing.TestService/UnaryCall',
64 $argument,
65 ['\Grpc\Testing\SimpleResponse', 'decode'],
66 $metadata, $options);
67 }
68
69 /**
70 * One request followed by one response. Response has cache control
71 * headers set such that a caching HTTP proxy (such as GFE) can
72 * satisfy subsequent requests.
73 * @param \Grpc\Testing\SimpleRequest $argument input argument
74 * @param array $metadata metadata
75 * @param array $options call options
76 * @return \Grpc\Testing\SimpleResponse
77 */
78 public function CacheableUnaryCall(\Grpc\Testing\SimpleRequest $argument,
79 $metadata = [], $options = []) {
80 return $this->_simpleRequest('/grpc.testing.TestService/CacheableUnaryCall',
81 $argument,
82 ['\Grpc\Testing\SimpleResponse', 'decode'],
83 $metadata, $options);
84 }
85
86 /**
87 * One request followed by a sequence of responses (streamed download).
88 * The server returns the payload with client desired type and sizes.
89 * @param \Grpc\Testing\StreamingOutputCallRequest $argument input argument
90 * @param array $metadata metadata
91 * @param array $options call options
92 * @return \Grpc\Testing\StreamingOutputCallResponse
93 */
94 public function StreamingOutputCall(\Grpc\Testing\StreamingOutputCallRequest $argument,
95 $metadata = [], $options = []) {
96 return $this->_serverStreamRequest('/grpc.testing.TestService/StreamingOutputCall',
97 $argument,
98 ['\Grpc\Testing\StreamingOutputCallResponse', 'decode'],
99 $metadata, $options);
100 }
101
102 /**
103 * A sequence of requests followed by one response (streamed upload).
104 * The server returns the aggregated size of client payload as the result.
105 * @param array $metadata metadata
106 * @param array $options call options
107 * @return \Grpc\Testing\StreamingInputCallResponse
108 */
109 public function StreamingInputCall($metadata = [], $options = []) {
110 return $this->_clientStreamRequest('/grpc.testing.TestService/StreamingInputCall',
111 ['\Grpc\Testing\StreamingInputCallResponse','decode'],
112 $metadata, $options);
113 }
114
115 /**
116 * A sequence of requests with each request served by the server immediately.
117 * As one request could lead to multiple responses, this interface
118 * demonstrates the idea of full duplexing.
119 * @param array $metadata metadata
120 * @param array $options call options
121 * @return \Grpc\Testing\StreamingOutputCallResponse
122 */
123 public function FullDuplexCall($metadata = [], $options = []) {
124 return $this->_bidiRequest('/grpc.testing.TestService/FullDuplexCall',
125 ['\Grpc\Testing\StreamingOutputCallResponse','decode'],
126 $metadata, $options);
127 }
128
129 /**
130 * A sequence of requests followed by a sequence of responses.
131 * The server buffers all the client requests and then serves them in order. A
132 * stream of responses are returned to the client when the server starts with
133 * first request.
134 * @param array $metadata metadata
135 * @param array $options call options
136 * @return \Grpc\Testing\StreamingOutputCallResponse
137 */
138 public function HalfDuplexCall($metadata = [], $options = []) {
139 return $this->_bidiRequest('/grpc.testing.TestService/HalfDuplexCall',
140 ['\Grpc\Testing\StreamingOutputCallResponse','decode'],
141 $metadata, $options);
142 }
143
144 /**
145 * The test server will not implement this method. It will be used
146 * to test the behavior when clients call unimplemented methods.
147 * @param \Grpc\Testing\EmptyMessage $argument input argument
148 * @param array $metadata metadata
149 * @param array $options call options
150 * @return \Grpc\Testing\EmptyMessage
151 */
152 public function UnimplementedCall(\Grpc\Testing\EmptyMessage $argument,
153 $metadata = [], $options = []) {
154 return $this->_simpleRequest('/grpc.testing.TestService/UnimplementedCall',
155 $argument,
156 ['\Grpc\Testing\EmptyMessage', 'decode'],
157 $metadata, $options);
158 }
159
160 }