ListServerGroupsResult.h 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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_GWLB_MODEL_LISTSERVERGROUPSRESULT_H_
  17. #define ALIBABACLOUD_GWLB_MODEL_LISTSERVERGROUPSRESULT_H_
  18. #include <string>
  19. #include <vector>
  20. #include <utility>
  21. #include <alibabacloud/core/ServiceResult.h>
  22. #include <alibabacloud/gwlb/GwlbExport.h>
  23. namespace AlibabaCloud
  24. {
  25. namespace Gwlb
  26. {
  27. namespace Model
  28. {
  29. class ALIBABACLOUD_GWLB_EXPORT ListServerGroupsResult : public ServiceResult
  30. {
  31. public:
  32. struct ServerGroup
  33. {
  34. struct ConnectionDrainConfig
  35. {
  36. bool connectionDrainEnabled;
  37. int connectionDrainTimeout;
  38. };
  39. struct HealthCheckConfig
  40. {
  41. int healthCheckInterval;
  42. int healthCheckConnectPort;
  43. int unhealthyThreshold;
  44. std::string healthCheckPath;
  45. int healthyThreshold;
  46. int healthCheckConnectTimeout;
  47. std::string healthCheckProtocol;
  48. std::string healthCheckDomain;
  49. bool healthCheckEnabled;
  50. std::vector<std::string> healthCheckHttpCode;
  51. };
  52. struct TagModel
  53. {
  54. std::string value;
  55. std::string key;
  56. };
  57. ConnectionDrainConfig connectionDrainConfig;
  58. std::vector<std::string> relatedLoadBalancerIds;
  59. std::string resourceGroupId;
  60. std::string scheduler;
  61. std::string createTime;
  62. int serverCount;
  63. std::string serverGroupId;
  64. std::string serverGroupType;
  65. std::string serverGroupStatus;
  66. std::string vpcId;
  67. HealthCheckConfig healthCheckConfig;
  68. std::string protocol;
  69. std::vector<ServerGroup::TagModel> tags;
  70. std::string serverGroupName;
  71. };
  72. ListServerGroupsResult();
  73. explicit ListServerGroupsResult(const std::string &payload);
  74. ~ListServerGroupsResult();
  75. int getTotalCount()const;
  76. std::string getNextToken()const;
  77. std::vector<ServerGroup> getServerGroups()const;
  78. int getMaxResults()const;
  79. protected:
  80. void parse(const std::string &payload);
  81. private:
  82. int totalCount_;
  83. std::string nextToken_;
  84. std::vector<ServerGroup> serverGroups_;
  85. int maxResults_;
  86. };
  87. }
  88. }
  89. }
  90. #endif // !ALIBABACLOUD_GWLB_MODEL_LISTSERVERGROUPSRESULT_H_