Debian Codegraph @

php/src/Google/Protobuf/Internal/ServiceOptions.php

raw
1 <?php
2 # Generated by the protocol buffer compiler. DO NOT EDIT!
3 # source: google/protobuf/descriptor.proto
4
5 namespace Google\Protobuf\Internal;
6
7 use Google\Protobuf\Internal\GPBType;
8 use Google\Protobuf\Internal\GPBWire;
9 use Google\Protobuf\Internal\RepeatedField;
10 use Google\Protobuf\Internal\InputStream;
11 use Google\Protobuf\Internal\GPBUtil;
12
13 /**
14 * Generated from protobuf message <code>google.protobuf.ServiceOptions</code>
15 */
16 class ServiceOptions extends \Google\Protobuf\Internal\Message
17 {
18 /**
19 * Is this service deprecated?
20 * Depending on the target platform, this can emit Deprecated annotations
21 * for the service, or it will be completely ignored; in the very least,
22 * this is a formalization for deprecating services.
23 *
24 * Generated from protobuf field <code>optional bool deprecated = 33 [default = false];</code>
25 */
26 protected $deprecated = null;
27 /**
28 * The parser stores options it doesn't recognize here. See above.
29 *
30 * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
31 */
32 private $uninterpreted_option;
33
34 /**
35 * Constructor.
36 *
37 * @param array $data {
38 * Optional. Data for populating the Message object.
39 *
40 * @type bool $deprecated
41 * Is this service deprecated?
42 * Depending on the target platform, this can emit Deprecated annotations
43 * for the service, or it will be completely ignored; in the very least,
44 * this is a formalization for deprecating services.
45 * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
46 * The parser stores options it doesn't recognize here. See above.
47 * }
48 */
49 public function __construct($data = NULL) {
50 \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
51 parent::__construct($data);
52 }
53
54 /**
55 * Is this service deprecated?
56 * Depending on the target platform, this can emit Deprecated annotations
57 * for the service, or it will be completely ignored; in the very least,
58 * this is a formalization for deprecating services.
59 *
60 * Generated from protobuf field <code>optional bool deprecated = 33 [default = false];</code>
61 * @return bool
62 */
63 public function getDeprecated()
64 {
65 return isset($this->deprecated) ? $this->deprecated : false;
66 }
67
68 public function hasDeprecated()
69 {
70 return isset($this->deprecated);
71 }
72
73 public function clearDeprecated()
74 {
75 unset($this->deprecated);
76 }
77
78 /**
79 * Is this service deprecated?
80 * Depending on the target platform, this can emit Deprecated annotations
81 * for the service, or it will be completely ignored; in the very least,
82 * this is a formalization for deprecating services.
83 *
84 * Generated from protobuf field <code>optional bool deprecated = 33 [default = false];</code>
85 * @param bool $var
86 * @return $this
87 */
88 public function setDeprecated($var)
89 {
90 GPBUtil::checkBool($var);
91 $this->deprecated = $var;
92
93 return $this;
94 }
95
96 /**
97 * The parser stores options it doesn't recognize here. See above.
98 *
99 * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
100 * @return \Google\Protobuf\Internal\RepeatedField
101 */
102 public function getUninterpretedOption()
103 {
104 return $this->uninterpreted_option;
105 }
106
107 /**
108 * The parser stores options it doesn't recognize here. See above.
109 *
110 * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
111 * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var
112 * @return $this
113 */
114 public function setUninterpretedOption($var)
115 {
116 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
117 $this->uninterpreted_option = $arr;
118
119 return $this;
120 }
121
122 }
123