PushNotification.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * @copyright Copyright (c) 2023, Thomas Citharel <nextcloud@tcit.fr>
  5. *
  6. * @author Thomas Citharel <nextcloud@tcit.fr>
  7. *
  8. * @license AGPL-3.0
  9. *
  10. * This code is free software: you can redistribute it and/or modify
  11. * it under the terms of the GNU Affero General Public License, version 3,
  12. * as published by the Free Software Foundation.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU Affero General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Affero General Public License, version 3,
  20. * along with this program. If not, see <http://www.gnu.org/licenses/>
  21. *
  22. */
  23. namespace OC\Push;
  24. use OCP\Push\IPushNotification;
  25. /**
  26. * @since 28.0.0
  27. */
  28. class PushNotification implements IPushNotification {
  29. private string $endpoint;
  30. private string $publicKey;
  31. private string $authToken;
  32. private string $payload;
  33. public function getEndpoint(): string {
  34. return $this->endpoint;
  35. }
  36. public function setEndpoint(string $endpoint): PushNotification {
  37. $this->endpoint = $endpoint;
  38. return $this;
  39. }
  40. public function getPublicKey(): string {
  41. return $this->publicKey;
  42. }
  43. public function setPublicKey(string $publicKey): PushNotification {
  44. $this->publicKey = $publicKey;
  45. return $this;
  46. }
  47. public function getAuthToken(): string {
  48. return $this->authToken;
  49. }
  50. public function setAuthToken(string $authToken): PushNotification {
  51. $this->authToken = $authToken;
  52. return $this;
  53. }
  54. public function getPayload(): string {
  55. return $this->payload;
  56. }
  57. public function setPayload(string $payload): PushNotification {
  58. $this->payload = $payload;
  59. return $this;
  60. }
  61. }