ReleaseCallResult.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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_RELEASECALLRESULT_H_
  17. #define ALIBABACLOUD_CCC_MODEL_RELEASECALLRESULT_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 ReleaseCallResult : 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 releaseReason;
  41. std::string releaseInitiator;
  42. std::string originator;
  43. std::string userId;
  44. std::string callType;
  45. std::string userExtension;
  46. std::string associatedData;
  47. std::string channelId;
  48. long timestamp;
  49. std::string jobId;
  50. };
  51. std::string instanceId;
  52. std::string jobId;
  53. std::vector<ChannelContext> channelContexts;
  54. };
  55. struct UserContext
  56. {
  57. std::string extension;
  58. std::string userState;
  59. std::string instanceId;
  60. std::string deviceId;
  61. std::string userId;
  62. std::string breakCode;
  63. bool outboundScenario;
  64. std::string workMode;
  65. std::string jobId;
  66. std::vector<std::string> signedSkillGroupIdList;
  67. };
  68. UserContext userContext;
  69. CallContext callContext;
  70. };
  71. ReleaseCallResult();
  72. explicit ReleaseCallResult(const std::string &payload);
  73. ~ReleaseCallResult();
  74. std::string getMessage()const;
  75. int getHttpStatusCode()const;
  76. std::vector<std::string> getParams()const;
  77. Data getData()const;
  78. std::string getCode()const;
  79. protected:
  80. void parse(const std::string &payload);
  81. private:
  82. std::string message_;
  83. int httpStatusCode_;
  84. std::vector<std::string> params_;
  85. Data data_;
  86. std::string code_;
  87. };
  88. }
  89. }
  90. }
  91. #endif // !ALIBABACLOUD_CCC_MODEL_RELEASECALLRESULT_H_