TemplateStatusManageRequest.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. class TemplateStatusManageRequest extends SdkRequest {
  3. const REQUEST_URL = "/v2/template/status";
  4. private $templateId;
  5. private $operate;
  6. public function __construct() {
  7. $count = func_num_args();
  8. $args=func_get_args();
  9. if (method_exists($this,$f='__construct'.$count)) {
  10. call_user_func_array(array($this,$f),$args);
  11. }
  12. }
  13. public function __construct0() {
  14. }
  15. public function __construct2($templateId, $operate) {
  16. $this->templateId = $templateId;
  17. $this->operate = $operate;
  18. }
  19. public function getUrl() {
  20. return self::REQUEST_URL;
  21. }
  22. public function getHttpParamers() {
  23. $paramSwitcher = ParamSwitcher::instanceParam();
  24. $paramSwitcher->addParam('templateId', $this->templateId);
  25. $paramSwitcher->addParam('operate', $this->operate);
  26. $httpParameters = HttpParameter::httpPostParamer();
  27. $httpParameters->setJsonParams(json_encode($paramSwitcher->getParams()));
  28. return $httpParameters;
  29. }
  30. /**
  31. * @return mixed
  32. */
  33. public function getTemplateId()
  34. {
  35. return $this->templateId;
  36. }
  37. /**
  38. * @param mixed $templateId
  39. */
  40. public function setTemplateId($templateId)
  41. {
  42. $this->templateId = $templateId;
  43. }
  44. /**
  45. * @return mixed
  46. */
  47. public function getOperate()
  48. {
  49. return $this->operate;
  50. }
  51. /**
  52. * @param mixed $operate
  53. */
  54. public function setOperate($operate)
  55. {
  56. $this->operate = $operate;
  57. }
  58. }