StringValue.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: google/protobuf/wrappers.proto
  4. namespace Google\Protobuf;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * Wrapper message for `string`.
  10. * The JSON representation for `StringValue` is JSON string.
  11. *
  12. * Generated from protobuf message <code>google.protobuf.StringValue</code>
  13. */
  14. class StringValue extends \Google\Protobuf\Internal\Message
  15. {
  16. /**
  17. * The string value.
  18. *
  19. * Generated from protobuf field <code>string value = 1;</code>
  20. */
  21. protected $value = '';
  22. /**
  23. * Constructor.
  24. *
  25. * @param array $data {
  26. * Optional. Data for populating the Message object.
  27. *
  28. * @type string $value
  29. * The string value.
  30. * }
  31. */
  32. public function __construct($data = NULL) {
  33. \GPBMetadata\Google\Protobuf\Wrappers::initOnce();
  34. parent::__construct($data);
  35. }
  36. /**
  37. * The string value.
  38. *
  39. * Generated from protobuf field <code>string value = 1;</code>
  40. * @return string
  41. */
  42. public function getValue()
  43. {
  44. return $this->value;
  45. }
  46. /**
  47. * The string value.
  48. *
  49. * Generated from protobuf field <code>string value = 1;</code>
  50. * @param string $var
  51. * @return $this
  52. */
  53. public function setValue($var)
  54. {
  55. GPBUtil::checkString($var, True);
  56. $this->value = $var;
  57. return $this;
  58. }
  59. }