RefreshBackupListResult.cc 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. /*
  2. * Copyright 2009-2017 Alibaba Cloud All rights reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #include <alibabacloud/emr/model/RefreshBackupListResult.h>
  17. #include <json/json.h>
  18. using namespace AlibabaCloud::Emr;
  19. using namespace AlibabaCloud::Emr::Model;
  20. RefreshBackupListResult::RefreshBackupListResult() :
  21. ServiceResult()
  22. {}
  23. RefreshBackupListResult::RefreshBackupListResult(const std::string &payload) :
  24. ServiceResult()
  25. {
  26. parse(payload);
  27. }
  28. RefreshBackupListResult::~RefreshBackupListResult()
  29. {}
  30. void RefreshBackupListResult::parse(const std::string &payload)
  31. {
  32. Json::Reader reader;
  33. Json::Value value;
  34. reader.parse(payload, value);
  35. setRequestId(value["RequestId"].asString());
  36. if(!value["BizId"].isNull())
  37. bizId_ = value["BizId"].asString();
  38. if(!value["DataSourceId"].isNull())
  39. dataSourceId_ = std::stol(value["DataSourceId"].asString());
  40. if(!value["TaskType"].isNull())
  41. taskType_ = value["TaskType"].asString();
  42. if(!value["TaskStatus"].isNull())
  43. taskStatus_ = value["TaskStatus"].asString();
  44. if(!value["StartTime"].isNull())
  45. startTime_ = std::stol(value["StartTime"].asString());
  46. if(!value["EndTime"].isNull())
  47. endTime_ = std::stol(value["EndTime"].asString());
  48. if(!value["TaskDetail"].isNull())
  49. taskDetail_ = value["TaskDetail"].asString();
  50. if(!value["TaskResultDetail"].isNull())
  51. taskResultDetail_ = value["TaskResultDetail"].asString();
  52. if(!value["TaskProcess"].isNull())
  53. taskProcess_ = std::stoi(value["TaskProcess"].asString());
  54. if(!value["TriggerUser"].isNull())
  55. triggerUser_ = value["TriggerUser"].asString();
  56. if(!value["TriggerType"].isNull())
  57. triggerType_ = value["TriggerType"].asString();
  58. if(!value["GmtCreate"].isNull())
  59. gmtCreate_ = std::stol(value["GmtCreate"].asString());
  60. if(!value["GmtModified"].isNull())
  61. gmtModified_ = std::stol(value["GmtModified"].asString());
  62. if(!value["ClusterBizId"].isNull())
  63. clusterBizId_ = value["ClusterBizId"].asString();
  64. if(!value["HostName"].isNull())
  65. hostName_ = value["HostName"].asString();
  66. if(!value["EcmTaskId"].isNull())
  67. ecmTaskId_ = std::stol(value["EcmTaskId"].asString());
  68. }
  69. std::string RefreshBackupListResult::getTriggerType()const
  70. {
  71. return triggerType_;
  72. }
  73. long RefreshBackupListResult::getEndTime()const
  74. {
  75. return endTime_;
  76. }
  77. long RefreshBackupListResult::getStartTime()const
  78. {
  79. return startTime_;
  80. }
  81. long RefreshBackupListResult::getGmtModified()const
  82. {
  83. return gmtModified_;
  84. }
  85. std::string RefreshBackupListResult::getTaskStatus()const
  86. {
  87. return taskStatus_;
  88. }
  89. std::string RefreshBackupListResult::getTaskDetail()const
  90. {
  91. return taskDetail_;
  92. }
  93. std::string RefreshBackupListResult::getTriggerUser()const
  94. {
  95. return triggerUser_;
  96. }
  97. long RefreshBackupListResult::getGmtCreate()const
  98. {
  99. return gmtCreate_;
  100. }
  101. int RefreshBackupListResult::getTaskProcess()const
  102. {
  103. return taskProcess_;
  104. }
  105. std::string RefreshBackupListResult::getClusterBizId()const
  106. {
  107. return clusterBizId_;
  108. }
  109. std::string RefreshBackupListResult::getTaskType()const
  110. {
  111. return taskType_;
  112. }
  113. std::string RefreshBackupListResult::getBizId()const
  114. {
  115. return bizId_;
  116. }
  117. long RefreshBackupListResult::getDataSourceId()const
  118. {
  119. return dataSourceId_;
  120. }
  121. std::string RefreshBackupListResult::getHostName()const
  122. {
  123. return hostName_;
  124. }
  125. long RefreshBackupListResult::getEcmTaskId()const
  126. {
  127. return ecmTaskId_;
  128. }
  129. std::string RefreshBackupListResult::getTaskResultDetail()const
  130. {
  131. return taskResultDetail_;
  132. }