DescribeProcessStatsCompositionResult.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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_OCEANBASEPRO_MODEL_DESCRIBEPROCESSSTATSCOMPOSITIONRESULT_H_
  17. #define ALIBABACLOUD_OCEANBASEPRO_MODEL_DESCRIBEPROCESSSTATSCOMPOSITIONRESULT_H_
  18. #include <string>
  19. #include <vector>
  20. #include <utility>
  21. #include <alibabacloud/core/ServiceResult.h>
  22. #include <alibabacloud/oceanbasepro/OceanBaseProExport.h>
  23. namespace AlibabaCloud
  24. {
  25. namespace OceanBasePro
  26. {
  27. namespace Model
  28. {
  29. class ALIBABACLOUD_OCEANBASEPRO_EXPORT DescribeProcessStatsCompositionResult : public ServiceResult
  30. {
  31. public:
  32. struct Data
  33. {
  34. struct SessionStatistics
  35. {
  36. struct UserStatisticsItem
  37. {
  38. std::string metricValue;
  39. long totalCount;
  40. std::string type;
  41. long activeCount;
  42. };
  43. struct SourceStatisticsItem
  44. {
  45. std::string metricValue;
  46. long totalCount;
  47. std::string type;
  48. long activeCount;
  49. };
  50. struct DataBaseStatisticsItem
  51. {
  52. std::string metricValue;
  53. long totalCount;
  54. std::string type;
  55. long activeCount;
  56. };
  57. std::vector<UserStatisticsItem> userStatistics;
  58. std::vector<DataBaseStatisticsItem> dataBaseStatistics;
  59. std::vector<SourceStatisticsItem> sourceStatistics;
  60. };
  61. struct AllProcessListItem
  62. {
  63. std::string status;
  64. std::string user;
  65. long executeTime;
  66. std::string proxySessId;
  67. std::string serverIp;
  68. std::string planId;
  69. std::string sqlText;
  70. long cpuTime;
  71. std::string clientIp;
  72. std::string sqlId;
  73. std::string tenantId;
  74. std::string command;
  75. std::string database;
  76. std::string traceId;
  77. long sessionId;
  78. };
  79. SessionStatistics sessionStatistics;
  80. int totalSessionCount;
  81. int activeSessionCount;
  82. int idleSessionCount;
  83. std::string obVersion;
  84. std::vector<AllProcessListItem> allProcessList;
  85. };
  86. DescribeProcessStatsCompositionResult();
  87. explicit DescribeProcessStatsCompositionResult(const std::string &payload);
  88. ~DescribeProcessStatsCompositionResult();
  89. Data getData()const;
  90. protected:
  91. void parse(const std::string &payload);
  92. private:
  93. Data data_;
  94. };
  95. }
  96. }
  97. }
  98. #endif // !ALIBABACLOUD_OCEANBASEPRO_MODEL_DESCRIBEPROCESSSTATSCOMPOSITIONRESULT_H_