xref: /aosp_15_r20/external/grpc-grpc/examples/php/route_guide/Routeguide/Point.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 * Points are represented as latitude-longitude pairs in the E7 representation
13 * (degrees multiplied by 10**7 and rounded to the nearest integer).
14 * Latitudes should be in the range +/- 90 degrees and longitude should be in
15 * the range +/- 180 degrees (inclusive).
16 *
17 * Generated from protobuf message <code>routeguide.Point</code>
18 */
19class Point extends \Google\Protobuf\Internal\Message
20{
21    /**
22     * Generated from protobuf field <code>int32 latitude = 1;</code>
23     */
24    protected $latitude = 0;
25    /**
26     * Generated from protobuf field <code>int32 longitude = 2;</code>
27     */
28    protected $longitude = 0;
29
30    /**
31     * Constructor.
32     *
33     * @param array $data {
34     *     Optional. Data for populating the Message object.
35     *
36     *     @type int $latitude
37     *     @type int $longitude
38     * }
39     */
40    public function __construct($data = NULL) {
41        \GPBMetadata\RouteGuide::initOnce();
42        parent::__construct($data);
43    }
44
45    /**
46     * Generated from protobuf field <code>int32 latitude = 1;</code>
47     * @return int
48     */
49    public function getLatitude()
50    {
51        return $this->latitude;
52    }
53
54    /**
55     * Generated from protobuf field <code>int32 latitude = 1;</code>
56     * @param int $var
57     * @return $this
58     */
59    public function setLatitude($var)
60    {
61        GPBUtil::checkInt32($var);
62        $this->latitude = $var;
63
64        return $this;
65    }
66
67    /**
68     * Generated from protobuf field <code>int32 longitude = 2;</code>
69     * @return int
70     */
71    public function getLongitude()
72    {
73        return $this->longitude;
74    }
75
76    /**
77     * Generated from protobuf field <code>int32 longitude = 2;</code>
78     * @param int $var
79     * @return $this
80     */
81    public function setLongitude($var)
82    {
83        GPBUtil::checkInt32($var);
84        $this->longitude = $var;
85
86        return $this;
87    }
88
89}
90
91