QueriedLog.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. /**
  3. * Copyright (C) Alibaba Cloud Computing
  4. * All rights reserved
  5. */
  6. /**
  7. * The QueriedLog is a log of the Aliyun_Log_Models_GetLogsResponse which obtained from the log.
  8. *
  9. * @author log service dev
  10. */
  11. class Aliyun_Log_Models_QueriedLog {
  12. /**
  13. * @var integer log timestamp
  14. */
  15. private $time;
  16. /**
  17. * @var string log source
  18. */
  19. private $source;
  20. /**
  21. * @var array log contents, content many key/value pair
  22. */
  23. private $contents;
  24. /**
  25. * Aliyun_Log_Models_QueriedLog constructor
  26. *
  27. * @param integer $time
  28. * log time stamp
  29. * @param string $source
  30. * log source
  31. * @param array $contents
  32. * log contents, content many key/value pair
  33. */
  34. public function __construct($time, $source, $contents) {
  35. $this->time = $time;
  36. $this->source = $source;
  37. $this->contents = $contents; // deep copy
  38. }
  39. /**
  40. * Get log source
  41. *
  42. * @return string log source
  43. */
  44. public function getSource() {
  45. return $this->source;
  46. }
  47. /**
  48. * Get log time
  49. *
  50. * @return integer log time
  51. */
  52. public function getTime() {
  53. return $this->time;
  54. }
  55. /**
  56. * Get log contents, content many key/value pair.
  57. *
  58. * @return array log contents
  59. */
  60. public function getContents() {
  61. return $this->contents;
  62. }
  63. }