xref: /aosp_15_r20/external/grpc-grpc/examples/php/route_guide/Routeguide/Rectangle.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 latitude-longitude rectangle, represented as two diagonally opposite
13 * points "lo" and "hi".
14 *
15 * Generated from protobuf message <code>routeguide.Rectangle</code>
16 */
17class Rectangle extends \Google\Protobuf\Internal\Message
18{
19    /**
20     * One corner of the rectangle.
21     *
22     * Generated from protobuf field <code>.routeguide.Point lo = 1;</code>
23     */
24    protected $lo = null;
25    /**
26     * The other corner of the rectangle.
27     *
28     * Generated from protobuf field <code>.routeguide.Point hi = 2;</code>
29     */
30    protected $hi = null;
31
32    /**
33     * Constructor.
34     *
35     * @param array $data {
36     *     Optional. Data for populating the Message object.
37     *
38     *     @type \Routeguide\Point $lo
39     *           One corner of the rectangle.
40     *     @type \Routeguide\Point $hi
41     *           The other corner of the rectangle.
42     * }
43     */
44    public function __construct($data = NULL) {
45        \GPBMetadata\RouteGuide::initOnce();
46        parent::__construct($data);
47    }
48
49    /**
50     * One corner of the rectangle.
51     *
52     * Generated from protobuf field <code>.routeguide.Point lo = 1;</code>
53     * @return \Routeguide\Point|null
54     */
55    public function getLo()
56    {
57        return isset($this->lo) ? $this->lo : null;
58    }
59
60    public function hasLo()
61    {
62        return isset($this->lo);
63    }
64
65    public function clearLo()
66    {
67        unset($this->lo);
68    }
69
70    /**
71     * One corner of the rectangle.
72     *
73     * Generated from protobuf field <code>.routeguide.Point lo = 1;</code>
74     * @param \Routeguide\Point $var
75     * @return $this
76     */
77    public function setLo($var)
78    {
79        GPBUtil::checkMessage($var, \Routeguide\Point::class);
80        $this->lo = $var;
81
82        return $this;
83    }
84
85    /**
86     * The other corner of the rectangle.
87     *
88     * Generated from protobuf field <code>.routeguide.Point hi = 2;</code>
89     * @return \Routeguide\Point|null
90     */
91    public function getHi()
92    {
93        return isset($this->hi) ? $this->hi : null;
94    }
95
96    public function hasHi()
97    {
98        return isset($this->hi);
99    }
100
101    public function clearHi()
102    {
103        unset($this->hi);
104    }
105
106    /**
107     * The other corner of the rectangle.
108     *
109     * Generated from protobuf field <code>.routeguide.Point hi = 2;</code>
110     * @param \Routeguide\Point $var
111     * @return $this
112     */
113    public function setHi($var)
114    {
115        GPBUtil::checkMessage($var, \Routeguide\Point::class);
116        $this->hi = $var;
117
118        return $this;
119    }
120
121}
122
123