/wp-content/plugins/google-listings-and-ads/vendor/google/common-protos/src/Api/Expr/V1beta1/Expr/Comprehension.php

https://gitlab.com/remyvianne/krowkaramel · PHP · 310 lines · 90 code · 28 blank · 192 comment · 0 complexity · 00ba88af81f1cc3be97e25fc3cc39301 MD5 · raw file

  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: google/api/expr/v1beta1/expr.proto
  4. namespace Google\Api\Expr\V1beta1\Expr;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * A comprehension expression applied to a list or map.
  10. * Comprehensions are not part of the core syntax, but enabled with macros.
  11. * A macro matches a specific call signature within a parsed AST and replaces
  12. * the call with an alternate AST block. Macro expansion happens at parse
  13. * time.
  14. * The following macros are supported within CEL:
  15. * Aggregate type macros may be applied to all elements in a list or all keys
  16. * in a map:
  17. * * `all`, `exists`, `exists_one` - test a predicate expression against
  18. * the inputs and return `true` if the predicate is satisfied for all,
  19. * any, or only one value `list.all(x, x < 10)`.
  20. * * `filter` - test a predicate expression against the inputs and return
  21. * the subset of elements which satisfy the predicate:
  22. * `payments.filter(p, p > 1000)`.
  23. * * `map` - apply an expression to all elements in the input and return the
  24. * output aggregate type: `[1, 2, 3].map(i, i * i)`.
  25. * The `has(m.x)` macro tests whether the property `x` is present in struct
  26. * `m`. The semantics of this macro depend on the type of `m`. For proto2
  27. * messages `has(m.x)` is defined as 'defined, but not set`. For proto3, the
  28. * macro tests whether the property is set to its default. For map and struct
  29. * types, the macro tests whether the property `x` is defined on `m`.
  30. *
  31. * Generated from protobuf message <code>google.api.expr.v1beta1.Expr.Comprehension</code>
  32. */
  33. class Comprehension extends \Google\Protobuf\Internal\Message
  34. {
  35. /**
  36. * The name of the iteration variable.
  37. *
  38. * Generated from protobuf field <code>string iter_var = 1;</code>
  39. */
  40. private $iter_var = '';
  41. /**
  42. * The range over which var iterates.
  43. *
  44. * Generated from protobuf field <code>.google.api.expr.v1beta1.Expr iter_range = 2;</code>
  45. */
  46. private $iter_range = null;
  47. /**
  48. * The name of the variable used for accumulation of the result.
  49. *
  50. * Generated from protobuf field <code>string accu_var = 3;</code>
  51. */
  52. private $accu_var = '';
  53. /**
  54. * The initial value of the accumulator.
  55. *
  56. * Generated from protobuf field <code>.google.api.expr.v1beta1.Expr accu_init = 4;</code>
  57. */
  58. private $accu_init = null;
  59. /**
  60. * An expression which can contain iter_var and accu_var.
  61. * Returns false when the result has been computed and may be used as
  62. * a hint to short-circuit the remainder of the comprehension.
  63. *
  64. * Generated from protobuf field <code>.google.api.expr.v1beta1.Expr loop_condition = 5;</code>
  65. */
  66. private $loop_condition = null;
  67. /**
  68. * An expression which can contain iter_var and accu_var.
  69. * Computes the next value of accu_var.
  70. *
  71. * Generated from protobuf field <code>.google.api.expr.v1beta1.Expr loop_step = 6;</code>
  72. */
  73. private $loop_step = null;
  74. /**
  75. * An expression which can contain accu_var.
  76. * Computes the result.
  77. *
  78. * Generated from protobuf field <code>.google.api.expr.v1beta1.Expr result = 7;</code>
  79. */
  80. private $result = null;
  81. /**
  82. * Constructor.
  83. *
  84. * @param array $data {
  85. * Optional. Data for populating the Message object.
  86. *
  87. * @type string $iter_var
  88. * The name of the iteration variable.
  89. * @type \Google\Api\Expr\V1beta1\Expr $iter_range
  90. * The range over which var iterates.
  91. * @type string $accu_var
  92. * The name of the variable used for accumulation of the result.
  93. * @type \Google\Api\Expr\V1beta1\Expr $accu_init
  94. * The initial value of the accumulator.
  95. * @type \Google\Api\Expr\V1beta1\Expr $loop_condition
  96. * An expression which can contain iter_var and accu_var.
  97. * Returns false when the result has been computed and may be used as
  98. * a hint to short-circuit the remainder of the comprehension.
  99. * @type \Google\Api\Expr\V1beta1\Expr $loop_step
  100. * An expression which can contain iter_var and accu_var.
  101. * Computes the next value of accu_var.
  102. * @type \Google\Api\Expr\V1beta1\Expr $result
  103. * An expression which can contain accu_var.
  104. * Computes the result.
  105. * }
  106. */
  107. public function __construct($data = NULL) {
  108. \GPBMetadata\Google\Api\Expr\V1Beta1\Expr::initOnce();
  109. parent::__construct($data);
  110. }
  111. /**
  112. * The name of the iteration variable.
  113. *
  114. * Generated from protobuf field <code>string iter_var = 1;</code>
  115. * @return string
  116. */
  117. public function getIterVar()
  118. {
  119. return $this->iter_var;
  120. }
  121. /**
  122. * The name of the iteration variable.
  123. *
  124. * Generated from protobuf field <code>string iter_var = 1;</code>
  125. * @param string $var
  126. * @return $this
  127. */
  128. public function setIterVar($var)
  129. {
  130. GPBUtil::checkString($var, True);
  131. $this->iter_var = $var;
  132. return $this;
  133. }
  134. /**
  135. * The range over which var iterates.
  136. *
  137. * Generated from protobuf field <code>.google.api.expr.v1beta1.Expr iter_range = 2;</code>
  138. * @return \Google\Api\Expr\V1beta1\Expr
  139. */
  140. public function getIterRange()
  141. {
  142. return $this->iter_range;
  143. }
  144. /**
  145. * The range over which var iterates.
  146. *
  147. * Generated from protobuf field <code>.google.api.expr.v1beta1.Expr iter_range = 2;</code>
  148. * @param \Google\Api\Expr\V1beta1\Expr $var
  149. * @return $this
  150. */
  151. public function setIterRange($var)
  152. {
  153. GPBUtil::checkMessage($var, \Google\Api\Expr\V1beta1\Expr::class);
  154. $this->iter_range = $var;
  155. return $this;
  156. }
  157. /**
  158. * The name of the variable used for accumulation of the result.
  159. *
  160. * Generated from protobuf field <code>string accu_var = 3;</code>
  161. * @return string
  162. */
  163. public function getAccuVar()
  164. {
  165. return $this->accu_var;
  166. }
  167. /**
  168. * The name of the variable used for accumulation of the result.
  169. *
  170. * Generated from protobuf field <code>string accu_var = 3;</code>
  171. * @param string $var
  172. * @return $this
  173. */
  174. public function setAccuVar($var)
  175. {
  176. GPBUtil::checkString($var, True);
  177. $this->accu_var = $var;
  178. return $this;
  179. }
  180. /**
  181. * The initial value of the accumulator.
  182. *
  183. * Generated from protobuf field <code>.google.api.expr.v1beta1.Expr accu_init = 4;</code>
  184. * @return \Google\Api\Expr\V1beta1\Expr
  185. */
  186. public function getAccuInit()
  187. {
  188. return $this->accu_init;
  189. }
  190. /**
  191. * The initial value of the accumulator.
  192. *
  193. * Generated from protobuf field <code>.google.api.expr.v1beta1.Expr accu_init = 4;</code>
  194. * @param \Google\Api\Expr\V1beta1\Expr $var
  195. * @return $this
  196. */
  197. public function setAccuInit($var)
  198. {
  199. GPBUtil::checkMessage($var, \Google\Api\Expr\V1beta1\Expr::class);
  200. $this->accu_init = $var;
  201. return $this;
  202. }
  203. /**
  204. * An expression which can contain iter_var and accu_var.
  205. * Returns false when the result has been computed and may be used as
  206. * a hint to short-circuit the remainder of the comprehension.
  207. *
  208. * Generated from protobuf field <code>.google.api.expr.v1beta1.Expr loop_condition = 5;</code>
  209. * @return \Google\Api\Expr\V1beta1\Expr
  210. */
  211. public function getLoopCondition()
  212. {
  213. return $this->loop_condition;
  214. }
  215. /**
  216. * An expression which can contain iter_var and accu_var.
  217. * Returns false when the result has been computed and may be used as
  218. * a hint to short-circuit the remainder of the comprehension.
  219. *
  220. * Generated from protobuf field <code>.google.api.expr.v1beta1.Expr loop_condition = 5;</code>
  221. * @param \Google\Api\Expr\V1beta1\Expr $var
  222. * @return $this
  223. */
  224. public function setLoopCondition($var)
  225. {
  226. GPBUtil::checkMessage($var, \Google\Api\Expr\V1beta1\Expr::class);
  227. $this->loop_condition = $var;
  228. return $this;
  229. }
  230. /**
  231. * An expression which can contain iter_var and accu_var.
  232. * Computes the next value of accu_var.
  233. *
  234. * Generated from protobuf field <code>.google.api.expr.v1beta1.Expr loop_step = 6;</code>
  235. * @return \Google\Api\Expr\V1beta1\Expr
  236. */
  237. public function getLoopStep()
  238. {
  239. return $this->loop_step;
  240. }
  241. /**
  242. * An expression which can contain iter_var and accu_var.
  243. * Computes the next value of accu_var.
  244. *
  245. * Generated from protobuf field <code>.google.api.expr.v1beta1.Expr loop_step = 6;</code>
  246. * @param \Google\Api\Expr\V1beta1\Expr $var
  247. * @return $this
  248. */
  249. public function setLoopStep($var)
  250. {
  251. GPBUtil::checkMessage($var, \Google\Api\Expr\V1beta1\Expr::class);
  252. $this->loop_step = $var;
  253. return $this;
  254. }
  255. /**
  256. * An expression which can contain accu_var.
  257. * Computes the result.
  258. *
  259. * Generated from protobuf field <code>.google.api.expr.v1beta1.Expr result = 7;</code>
  260. * @return \Google\Api\Expr\V1beta1\Expr
  261. */
  262. public function getResult()
  263. {
  264. return $this->result;
  265. }
  266. /**
  267. * An expression which can contain accu_var.
  268. * Computes the result.
  269. *
  270. * Generated from protobuf field <code>.google.api.expr.v1beta1.Expr result = 7;</code>
  271. * @param \Google\Api\Expr\V1beta1\Expr $var
  272. * @return $this
  273. */
  274. public function setResult($var)
  275. {
  276. GPBUtil::checkMessage($var, \Google\Api\Expr\V1beta1\Expr::class);
  277. $this->result = $var;
  278. return $this;
  279. }
  280. }
  281. // Adding a class alias for backwards compatibility with the previous class name.
  282. class_alias(Comprehension::class, \Google\Api\Expr\V1beta1\Expr_Comprehension::class);