GetHotlineRecordResult.cc 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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/ccs/model/GetHotlineRecordResult.h>
  17. #include <json/json.h>
  18. using namespace AlibabaCloud::Ccs;
  19. using namespace AlibabaCloud::Ccs::Model;
  20. GetHotlineRecordResult::GetHotlineRecordResult() :
  21. ServiceResult()
  22. {}
  23. GetHotlineRecordResult::GetHotlineRecordResult(const std::string &payload) :
  24. ServiceResult()
  25. {
  26. parse(payload);
  27. }
  28. GetHotlineRecordResult::~GetHotlineRecordResult()
  29. {}
  30. void GetHotlineRecordResult::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["Id"].isNull())
  37. id_ = value["Id"].asString();
  38. if(!value["CallType"].isNull())
  39. callType_ = value["CallType"].asString();
  40. if(!value["VisitorId"].isNull())
  41. visitorId_ = value["VisitorId"].asString();
  42. if(!value["VisitorPhone"].isNull())
  43. visitorPhone_ = value["VisitorPhone"].asString();
  44. if(!value["VisitorProvince"].isNull())
  45. visitorProvince_ = value["VisitorProvince"].asString();
  46. if(!value["SceneId"].isNull())
  47. sceneId_ = value["SceneId"].asString();
  48. if(!value["AgentId"].isNull())
  49. agentId_ = value["AgentId"].asString();
  50. if(!value["AgentName"].isNull())
  51. agentName_ = value["AgentName"].asString();
  52. if(!value["CreateTime"].isNull())
  53. createTime_ = value["CreateTime"].asString();
  54. if(!value["FinishTime"].isNull())
  55. finishTime_ = value["FinishTime"].asString();
  56. if(!value["Status"].isNull())
  57. status_ = value["Status"].asString();
  58. if(!value["Memo"].isNull())
  59. memo_ = value["Memo"].asString();
  60. if(!value["HangupType"].isNull())
  61. hangupType_ = value["HangupType"].asString();
  62. if(!value["Satisfaction"].isNull())
  63. satisfaction_ = value["Satisfaction"].asString();
  64. if(!value["OutboundTaskId"].isNull())
  65. outboundTaskId_ = value["OutboundTaskId"].asString();
  66. if(!value["Categories"].isNull())
  67. categories_ = value["Categories"].asString();
  68. if(!value["CcsInstanceId"].isNull())
  69. ccsInstanceId_ = value["CcsInstanceId"].asString();
  70. if(!value["TalkDuration"].isNull())
  71. talkDuration_ = std::stol(value["TalkDuration"].asString());
  72. if(!value["GroupId"].isNull())
  73. groupId_ = value["GroupId"].asString();
  74. if(!value["GroupName"].isNull())
  75. groupName_ = value["GroupName"].asString();
  76. }
  77. std::string GetHotlineRecordResult::getStatus()const
  78. {
  79. return status_;
  80. }
  81. std::string GetHotlineRecordResult::getGroupName()const
  82. {
  83. return groupName_;
  84. }
  85. std::string GetHotlineRecordResult::getVisitorId()const
  86. {
  87. return visitorId_;
  88. }
  89. std::string GetHotlineRecordResult::getOutboundTaskId()const
  90. {
  91. return outboundTaskId_;
  92. }
  93. std::string GetHotlineRecordResult::getCategories()const
  94. {
  95. return categories_;
  96. }
  97. long GetHotlineRecordResult::getTalkDuration()const
  98. {
  99. return talkDuration_;
  100. }
  101. std::string GetHotlineRecordResult::getVisitorPhone()const
  102. {
  103. return visitorPhone_;
  104. }
  105. std::string GetHotlineRecordResult::getCreateTime()const
  106. {
  107. return createTime_;
  108. }
  109. std::string GetHotlineRecordResult::getSatisfaction()const
  110. {
  111. return satisfaction_;
  112. }
  113. std::string GetHotlineRecordResult::getCallType()const
  114. {
  115. return callType_;
  116. }
  117. std::string GetHotlineRecordResult::getVisitorProvince()const
  118. {
  119. return visitorProvince_;
  120. }
  121. std::string GetHotlineRecordResult::getCcsInstanceId()const
  122. {
  123. return ccsInstanceId_;
  124. }
  125. std::string GetHotlineRecordResult::getGroupId()const
  126. {
  127. return groupId_;
  128. }
  129. std::string GetHotlineRecordResult::getSceneId()const
  130. {
  131. return sceneId_;
  132. }
  133. std::string GetHotlineRecordResult::getFinishTime()const
  134. {
  135. return finishTime_;
  136. }
  137. std::string GetHotlineRecordResult::getHangupType()const
  138. {
  139. return hangupType_;
  140. }
  141. std::string GetHotlineRecordResult::getId()const
  142. {
  143. return id_;
  144. }
  145. std::string GetHotlineRecordResult::getAgentId()const
  146. {
  147. return agentId_;
  148. }
  149. std::string GetHotlineRecordResult::getAgentName()const
  150. {
  151. return agentName_;
  152. }
  153. std::string GetHotlineRecordResult::getMemo()const
  154. {
  155. return memo_;
  156. }