xref: /aosp_15_r20/external/grpc-grpc/examples/php/route_guide/Routeguide/RouteSummary.php (revision cc02d7e222339f7a4f6ba5f422e6413f4bd931f2)
1<?php
2# Generated by the protocol buffer compiler.  DO NOT EDIT!
3# source: route_guide.proto
4
5namespace Routeguide;
6
7use Google\Protobuf\Internal\GPBType;
8use Google\Protobuf\Internal\RepeatedField;
9use Google\Protobuf\Internal\GPBUtil;
10
11/**
12 * A RouteSummary is received in response to a RecordRoute rpc.
13 * It contains the number of individual points received, the number of
14 * detected features, and the total distance covered as the cumulative sum of
15 * the distance between each point.
16 *
17 * Generated from protobuf message <code>routeguide.RouteSummary</code>
18 */
19class RouteSummary extends \Google\Protobuf\Internal\Message
20{
21    /**
22     * The number of points received.
23     *
24     * Generated from protobuf field <code>int32 point_count = 1;</code>
25     */
26    protected $point_count = 0;
27    /**
28     * The number of known features passed while traversing the route.
29     *
30     * Generated from protobuf field <code>int32 feature_count = 2;</code>
31     */
32    protected $feature_count = 0;
33    /**
34     * The distance covered in metres.
35     *
36     * Generated from protobuf field <code>int32 distance = 3;</code>
37     */
38    protected $distance = 0;
39    /**
40     * The duration of the traversal in seconds.
41     *
42     * Generated from protobuf field <code>int32 elapsed_time = 4;</code>
43     */
44    protected $elapsed_time = 0;
45
46    /**
47     * Constructor.
48     *
49     * @param array $data {
50     *     Optional. Data for populating the Message object.
51     *
52     *     @type int $point_count
53     *           The number of points received.
54     *     @type int $feature_count
55     *           The number of known features passed while traversing the route.
56     *     @type int $distance
57     *           The distance covered in metres.
58     *     @type int $elapsed_time
59     *           The duration of the traversal in seconds.
60     * }
61     */
62    public function __construct($data = NULL) {
63        \GPBMetadata\RouteGuide::initOnce();
64        parent::__construct($data);
65    }
66
67    /**
68     * The number of points received.
69     *
70     * Generated from protobuf field <code>int32 point_count = 1;</code>
71     * @return int
72     */
73    public function getPointCount()
74    {
75        return $this->point_count;
76    }
77
78    /**
79     * The number of points received.
80     *
81     * Generated from protobuf field <code>int32 point_count = 1;</code>
82     * @param int $var
83     * @return $this
84     */
85    public function setPointCount($var)
86    {
87        GPBUtil::checkInt32($var);
88        $this->point_count = $var;
89
90        return $this;
91    }
92
93    /**
94     * The number of known features passed while traversing the route.
95     *
96     * Generated from protobuf field <code>int32 feature_count = 2;</code>
97     * @return int
98     */
99    public function getFeatureCount()
100    {
101        return $this->feature_count;
102    }
103
104    /**
105     * The number of known features passed while traversing the route.
106     *
107     * Generated from protobuf field <code>int32 feature_count = 2;</code>
108     * @param int $var
109     * @return $this
110     */
111    public function setFeatureCount($var)
112    {
113        GPBUtil::checkInt32($var);
114        $this->feature_count = $var;
115
116        return $this;
117    }
118
119    /**
120     * The distance covered in metres.
121     *
122     * Generated from protobuf field <code>int32 distance = 3;</code>
123     * @return int
124     */
125    public function getDistance()
126    {
127        return $this->distance;
128    }
129
130    /**
131     * The distance covered in metres.
132     *
133     * Generated from protobuf field <code>int32 distance = 3;</code>
134     * @param int $var
135     * @return $this
136     */
137    public function setDistance($var)
138    {
139        GPBUtil::checkInt32($var);
140        $this->distance = $var;
141
142        return $this;
143    }
144
145    /**
146     * The duration of the traversal in seconds.
147     *
148     * Generated from protobuf field <code>int32 elapsed_time = 4;</code>
149     * @return int
150     */
151    public function getElapsedTime()
152    {
153        return $this->elapsed_time;
154    }
155
156    /**
157     * The duration of the traversal in seconds.
158     *
159     * Generated from protobuf field <code>int32 elapsed_time = 4;</code>
160     * @param int $var
161     * @return $this
162     */
163    public function setElapsedTime($var)
164    {
165        GPBUtil::checkInt32($var);
166        $this->elapsed_time = $var;
167
168        return $this;
169    }
170
171}
172
173