Operation.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\AsynchronousOperations\Model;
  7. use Magento\AsynchronousOperations\Api\Data\OperationInterface;
  8. use Magento\Framework\DataObject;
  9. /**
  10. * Class Operation
  11. */
  12. class Operation extends DataObject implements OperationInterface
  13. {
  14. /**
  15. * @inheritDoc
  16. */
  17. public function getId()
  18. {
  19. return $this->getData(self::ID);
  20. }
  21. /**
  22. * @inheritDoc
  23. */
  24. public function setId($id)
  25. {
  26. return $this->setData(self::ID, $id);
  27. }
  28. /**
  29. * @inheritDoc
  30. */
  31. public function getBulkUuid()
  32. {
  33. return $this->getData(self::BULK_ID);
  34. }
  35. /**
  36. * @inheritDoc
  37. */
  38. public function setBulkUuid($bulkId)
  39. {
  40. return $this->setData(self::BULK_ID, $bulkId);
  41. }
  42. /**
  43. * @inheritDoc
  44. */
  45. public function getTopicName()
  46. {
  47. return $this->getData(self::TOPIC_NAME);
  48. }
  49. /**
  50. * @inheritDoc
  51. */
  52. public function setTopicName($topic)
  53. {
  54. return $this->setData(self::TOPIC_NAME, $topic);
  55. }
  56. /**
  57. * @inheritDoc
  58. */
  59. public function getSerializedData()
  60. {
  61. return $this->getData(self::SERIALIZED_DATA);
  62. }
  63. /**
  64. * @inheritDoc
  65. */
  66. public function setSerializedData($serializedData)
  67. {
  68. return $this->setData(self::SERIALIZED_DATA, $serializedData);
  69. }
  70. /**
  71. * @inheritDoc
  72. */
  73. public function getResultSerializedData()
  74. {
  75. return $this->getData(self::RESULT_SERIALIZED_DATA);
  76. }
  77. /**
  78. * @inheritDoc
  79. */
  80. public function setResultSerializedData($resultSerializedData)
  81. {
  82. return $this->setData(self::RESULT_SERIALIZED_DATA, $resultSerializedData);
  83. }
  84. /**
  85. * @inheritDoc
  86. */
  87. public function getStatus()
  88. {
  89. return $this->getData(self::STATUS);
  90. }
  91. /**
  92. * @inheritDoc
  93. */
  94. public function setStatus($status)
  95. {
  96. return $this->setData(self::STATUS, $status);
  97. }
  98. /**
  99. * @inheritDoc
  100. */
  101. public function getResultMessage()
  102. {
  103. return $this->getData(self::RESULT_MESSAGE);
  104. }
  105. /**
  106. * @inheritDoc
  107. */
  108. public function setResultMessage($resultMessage)
  109. {
  110. return $this->setData(self::RESULT_MESSAGE, $resultMessage);
  111. }
  112. /**
  113. * @inheritDoc
  114. */
  115. public function getErrorCode()
  116. {
  117. return $this->getData(self::ERROR_CODE);
  118. }
  119. /**
  120. * @inheritDoc
  121. */
  122. public function setErrorCode($errorCode)
  123. {
  124. return $this->setData(self::ERROR_CODE, $errorCode);
  125. }
  126. /**
  127. * Retrieve existing extension attributes object.
  128. *
  129. * @return \Magento\AsynchronousOperations\Api\Data\OperationExtensionInterface|null
  130. */
  131. public function getExtensionAttributes()
  132. {
  133. return $this->getData(self::EXTENSION_ATTRIBUTES_KEY);
  134. }
  135. /**
  136. * Set an extension attributes object.
  137. *
  138. * @param \Magento\AsynchronousOperations\Api\Data\OperationExtensionInterface $extensionAttributes
  139. * @return $this
  140. */
  141. public function setExtensionAttributes(
  142. \Magento\AsynchronousOperations\Api\Data\OperationExtensionInterface $extensionAttributes
  143. ) {
  144. return $this->setData(self::EXTENSION_ATTRIBUTES_KEY, $extensionAttributes);
  145. }
  146. }