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 * Unary response, as configured by the request.
13 *
14 * Generated from protobuf message <code>grpc.testing.SimpleResponse</code>
15 */
16class SimpleResponse extends \Google\Protobuf\Internal\Message
17{
18    /**
19     * Payload to increase message size.
20     *
21     * Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code>
22     */
23    private $payload = null;
24    /**
25     * The user the request came from, for verifying authentication was
26     * successful when the client expected it.
27     *
28     * Generated from protobuf field <code>string username = 2;</code>
29     */
30    private $username = '';
31    /**
32     * OAuth scope.
33     *
34     * Generated from protobuf field <code>string oauth_scope = 3;</code>
35     */
36    private $oauth_scope = '';
37
38    public function __construct() {
39        \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
40        parent::__construct();
41    }
42
43    /**
44     * Payload to increase message size.
45     *
46     * Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code>
47     * @return \Grpc\Testing\Payload
48     */
49    public function getPayload()
50    {
51        return $this->payload;
52    }
53
54    /**
55     * Payload to increase message size.
56     *
57     * Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code>
58     * @param \Grpc\Testing\Payload $var
59     * @return $this
60     */
61    public function setPayload($var)
62    {
63        GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class);
64        $this->payload = $var;
65
66        return $this;
67    }
68
69    /**
70     * The user the request came from, for verifying authentication was
71     * successful when the client expected it.
72     *
73     * Generated from protobuf field <code>string username = 2;</code>
74     * @return string
75     */
76    public function getUsername()
77    {
78        return $this->username;
79    }
80
81    /**
82     * The user the request came from, for verifying authentication was
83     * successful when the client expected it.
84     *
85     * Generated from protobuf field <code>string username = 2;</code>
86     * @param string $var
87     * @return $this
88     */
89    public function setUsername($var)
90    {
91        GPBUtil::checkString($var, True);
92        $this->username = $var;
93
94        return $this;
95    }
96
97    /**
98     * OAuth scope.
99     *
100     * Generated from protobuf field <code>string oauth_scope = 3;</code>
101     * @return string
102     */
103    public function getOauthScope()
104    {
105        return $this->oauth_scope;
106    }
107
108    /**
109     * OAuth scope.
110     *
111     * Generated from protobuf field <code>string oauth_scope = 3;</code>
112     * @param string $var
113     * @return $this
114     */
115    public function setOauthScope($var)
116    {
117        GPBUtil::checkString($var, True);
118        $this->oauth_scope = $var;
119
120        return $this;
121    }
122
123}
124
125