xref: /aosp_15_r20/external/grpc-grpc/src/php/tests/qps/generated_code/Grpc/Testing/BenchmarkServiceClient.php (revision cc02d7e222339f7a4f6ba5f422e6413f4bd931f2)
1<?php
2// GENERATED CODE -- DO NOT EDIT!
3
4// Original file comments:
5// Copyright 2015 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.
21namespace Grpc\Testing;
22
23/**
24 */
25class BenchmarkServiceClient extends \Grpc\BaseStub {
26
27    /**
28     * @param string $hostname hostname
29     * @param array $opts channel options
30     * @param \Grpc\Channel $channel (optional) re-use channel object
31     */
32    public function __construct($hostname, $opts, $channel = null) {
33        parent::__construct($hostname, $opts, $channel);
34    }
35
36    /**
37     * One request followed by one response.
38     * The server returns the client payload as-is.
39     * @param \Grpc\Testing\SimpleRequest $argument input argument
40     * @param array $metadata metadata
41     * @param array $options call options
42     * @return \Grpc\Testing\SimpleResponse
43     */
44    public function UnaryCall(\Grpc\Testing\SimpleRequest $argument,
45      $metadata = [], $options = []) {
46        return $this->_simpleRequest('/grpc.testing.BenchmarkService/UnaryCall',
47        $argument,
48        ['\Grpc\Testing\SimpleResponse', 'decode'],
49        $metadata, $options);
50    }
51
52    /**
53     * Repeated sequence of one request followed by one response.
54     * Should be called streaming ping-pong
55     * The server returns the client payload as-is on each response
56     * @param array $metadata metadata
57     * @param array $options call options
58     * @return \Grpc\Testing\SimpleResponse
59     */
60    public function StreamingCall($metadata = [], $options = []) {
61        return $this->_bidiRequest('/grpc.testing.BenchmarkService/StreamingCall',
62        ['\Grpc\Testing\SimpleResponse','decode'],
63        $metadata, $options);
64    }
65
66    /**
67     * Single-sided unbounded streaming from client to server
68     * The server returns the client payload as-is once the client does WritesDone
69     * @param array $metadata metadata
70     * @param array $options call options
71     * @return \Grpc\Testing\SimpleResponse
72     */
73    public function StreamingFromClient($metadata = [], $options = []) {
74        return $this->_clientStreamRequest('/grpc.testing.BenchmarkService/StreamingFromClient',
75        ['\Grpc\Testing\SimpleResponse','decode'],
76        $metadata, $options);
77    }
78
79    /**
80     * Single-sided unbounded streaming from server to client
81     * The server repeatedly returns the client payload as-is
82     * @param \Grpc\Testing\SimpleRequest $argument input argument
83     * @param array $metadata metadata
84     * @param array $options call options
85     * @return \Grpc\Testing\SimpleResponse
86     */
87    public function StreamingFromServer(\Grpc\Testing\SimpleRequest $argument,
88      $metadata = [], $options = []) {
89        return $this->_serverStreamRequest('/grpc.testing.BenchmarkService/StreamingFromServer',
90        $argument,
91        ['\Grpc\Testing\SimpleResponse', 'decode'],
92        $metadata, $options);
93    }
94
95    /**
96     * Two-sided unbounded streaming between server to client
97     * Both sides send the content of their own choice to the other
98     * @param array $metadata metadata
99     * @param array $options call options
100     * @return \Grpc\Testing\SimpleResponse
101     */
102    public function StreamingBothWays($metadata = [], $options = []) {
103        return $this->_bidiRequest('/grpc.testing.BenchmarkService/StreamingBothWays',
104        ['\Grpc\Testing\SimpleResponse','decode'],
105        $metadata, $options);
106    }
107
108}
109