Draft.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. /*
  3. * Copyright 2014 Google Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6. * use this file except in compliance with the License. You may obtain a copy of
  7. * the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  14. * License for the specific language governing permissions and limitations under
  15. * the License.
  16. */
  17. namespace Google\Service\Gmail;
  18. class Draft extends \Google\Model
  19. {
  20. /**
  21. * The immutable ID of the draft.
  22. *
  23. * @var string
  24. */
  25. public $id;
  26. protected $messageType = Message::class;
  27. protected $messageDataType = '';
  28. /**
  29. * The immutable ID of the draft.
  30. *
  31. * @param string $id
  32. */
  33. public function setId($id)
  34. {
  35. $this->id = $id;
  36. }
  37. /**
  38. * @return string
  39. */
  40. public function getId()
  41. {
  42. return $this->id;
  43. }
  44. /**
  45. * The message content of the draft.
  46. *
  47. * @param Message $message
  48. */
  49. public function setMessage(Message $message)
  50. {
  51. $this->message = $message;
  52. }
  53. /**
  54. * @return Message
  55. */
  56. public function getMessage()
  57. {
  58. return $this->message;
  59. }
  60. }
  61. // Adding a class alias for backwards compatibility with the previous class name.
  62. class_alias(Draft::class, 'Google_Service_Gmail_Draft');