Debian Codegraph @

examples/php/route_guide/Routeguide/RouteNote.php

raw
1 <?php
2 # Generated by the protocol buffer compiler. DO NOT EDIT!
3 # source: route_guide.proto
4
5 namespace Routeguide;
6
7 use Google\Protobuf\Internal\GPBType;
8 use Google\Protobuf\Internal\RepeatedField;
9 use Google\Protobuf\Internal\GPBUtil;
10
11 /**
12 * A RouteNote is a message sent while at a given point.
13 *
14 * Generated from protobuf message <code>routeguide.RouteNote</code>
15 */
16 class RouteNote extends \Google\Protobuf\Internal\Message
17 {
18 /**
19 * The location from which the message is sent.
20 *
21 * Generated from protobuf field <code>.routeguide.Point location = 1;</code>
22 */
23 protected $location = null;
24 /**
25 * The message to be sent.
26 *
27 * Generated from protobuf field <code>string message = 2;</code>
28 */
29 protected $message = '';
30
31 /**
32 * Constructor.
33 *
34 * @param array $data {
35 * Optional. Data for populating the Message object.
36 *
37 * @type \Routeguide\Point $location
38 * The location from which the message is sent.
39 * @type string $message
40 * The message to be sent.
41 * }
42 */
43 public function __construct($data = NULL) {
44 \GPBMetadata\RouteGuide::initOnce();
45 parent::__construct($data);
46 }
47
48 /**
49 * The location from which the message is sent.
50 *
51 * Generated from protobuf field <code>.routeguide.Point location = 1;</code>
52 * @return \Routeguide\Point|null
53 */
54 public function getLocation()
55 {
56 return isset($this->location) ? $this->location : null;
57 }
58
59 public function hasLocation()
60 {
61 return isset($this->location);
62 }
63
64 public function clearLocation()
65 {
66 unset($this->location);
67 }
68
69 /**
70 * The location from which the message is sent.
71 *
72 * Generated from protobuf field <code>.routeguide.Point location = 1;</code>
73 * @param \Routeguide\Point $var
74 * @return $this
75 */
76 public function setLocation($var)
77 {
78 GPBUtil::checkMessage($var, \Routeguide\Point::class);
79 $this->location = $var;
80
81 return $this;
82 }
83
84 /**
85 * The message to be sent.
86 *
87 * Generated from protobuf field <code>string message = 2;</code>
88 * @return string
89 */
90 public function getMessage()
91 {
92 return $this->message;
93 }
94
95 /**
96 * The message to be sent.
97 *
98 * Generated from protobuf field <code>string message = 2;</code>
99 * @param string $var
100 * @return $this
101 */
102 public function setMessage($var)
103 {
104 GPBUtil::checkString($var, True);
105 $this->message = $var;
106
107 return $this;
108 }
109
110 }
111