CoachCallResult.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. #ifndef ALIBABACLOUD_CCC_MODEL_COACHCALLRESULT_H_
  17. #define ALIBABACLOUD_CCC_MODEL_COACHCALLRESULT_H_
  18. #include <string>
  19. #include <vector>
  20. #include <utility>
  21. #include <alibabacloud/core/ServiceResult.h>
  22. #include <alibabacloud/ccc/CCCExport.h>
  23. namespace AlibabaCloud
  24. {
  25. namespace CCC
  26. {
  27. namespace Model
  28. {
  29. class ALIBABACLOUD_CCC_EXPORT CoachCallResult : public ServiceResult
  30. {
  31. public:
  32. struct Data
  33. {
  34. struct CallContext
  35. {
  36. struct ChannelContext
  37. {
  38. std::string destination;
  39. std::string channelState;
  40. std::string releaseInitiator;
  41. std::string callType;
  42. int index;
  43. std::string associatedData;
  44. std::string skillGroupId;
  45. std::string channelId;
  46. long timestamp;
  47. std::string releaseReason;
  48. std::string channelFlags;
  49. std::string originator;
  50. std::string userId;
  51. std::string userExtension;
  52. std::string jobId;
  53. };
  54. std::string instanceId;
  55. std::string callType;
  56. std::string jobId;
  57. std::vector<ChannelContext> channelContexts;
  58. };
  59. struct UserContext
  60. {
  61. std::string userState;
  62. std::string instanceId;
  63. std::string breakCode;
  64. std::string deviceId;
  65. bool outboundScenario;
  66. std::string mobile;
  67. std::string uri;
  68. std::vector<std::string> signedSkillGroupIdList;
  69. std::string extension;
  70. std::string deviceState;
  71. std::string userId;
  72. long heartbeat;
  73. std::string jobId;
  74. std::string workMode;
  75. long reserved;
  76. };
  77. UserContext userContext;
  78. CallContext callContext;
  79. };
  80. CoachCallResult();
  81. explicit CoachCallResult(const std::string &payload);
  82. ~CoachCallResult();
  83. std::string getMessage()const;
  84. int getHttpStatusCode()const;
  85. std::vector<std::string> getParams()const;
  86. Data getData()const;
  87. std::string getCode()const;
  88. protected:
  89. void parse(const std::string &payload);
  90. private:
  91. std::string message_;
  92. int httpStatusCode_;
  93. std::vector<std::string> params_;
  94. Data data_;
  95. std::string code_;
  96. };
  97. }
  98. }
  99. }
  100. #endif // !ALIBABACLOUD_CCC_MODEL_COACHCALLRESULT_H_