You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

IOCMResource.php 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * @copyright Copyright (c) 2023 Maxence Lange <maxence@artificial-owl.com>
  5. *
  6. * @author Maxence Lange <maxence@artificial-owl.com>
  7. *
  8. * @license GNU AGPL version 3 or any later version
  9. *
  10. * This program is free software: you can redistribute it and/or modify
  11. * it under the terms of the GNU Affero General Public License as
  12. * published by the Free Software Foundation, either version 3 of the
  13. * License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU Affero General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Affero General Public License
  21. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  22. *
  23. */
  24. namespace OCP\OCM;
  25. /**
  26. * Model based on the Open Cloud Mesh Discovery API
  27. *
  28. * @link https://github.com/cs3org/OCM-API/
  29. * @since 28.0.0
  30. */
  31. interface IOCMResource {
  32. /**
  33. * set name of the resource
  34. *
  35. * @param string $name
  36. *
  37. * @return self
  38. * @since 28.0.0
  39. */
  40. public function setName(string $name): self;
  41. /**
  42. * get name of the resource
  43. *
  44. * @return string
  45. * @since 28.0.0
  46. */
  47. public function getName(): string;
  48. /**
  49. * set share types
  50. *
  51. * @param string[] $shareTypes
  52. *
  53. * @return self
  54. * @since 28.0.0
  55. */
  56. public function setShareTypes(array $shareTypes): self;
  57. /**
  58. * get share types
  59. *
  60. * @return string[]
  61. * @since 28.0.0
  62. */
  63. public function getShareTypes(): array;
  64. /**
  65. * set available protocols
  66. *
  67. * @param array<string, string> $protocols
  68. *
  69. * @return self
  70. * @since 28.0.0
  71. */
  72. public function setProtocols(array $protocols): self;
  73. /**
  74. * get configured protocols
  75. *
  76. * @return array<string, string>
  77. * @since 28.0.0
  78. */
  79. public function getProtocols(): array;
  80. /**
  81. * import data from an array
  82. *
  83. * @param array $data
  84. *
  85. * @return self
  86. * @since 28.0.0
  87. */
  88. public function import(array $data): self;
  89. }