GetAutoScaleConfigResult.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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_EHPC_MODEL_GETAUTOSCALECONFIGRESULT_H_
  17. #define ALIBABACLOUD_EHPC_MODEL_GETAUTOSCALECONFIGRESULT_H_
  18. #include <string>
  19. #include <vector>
  20. #include <utility>
  21. #include <alibabacloud/core/ServiceResult.h>
  22. #include <alibabacloud/ehpc/EHPCExport.h>
  23. namespace AlibabaCloud
  24. {
  25. namespace EHPC
  26. {
  27. namespace Model
  28. {
  29. class ALIBABACLOUD_EHPC_EXPORT GetAutoScaleConfigResult : public ServiceResult
  30. {
  31. public:
  32. struct QueueInfo
  33. {
  34. struct InstanceTypeInfo
  35. {
  36. std::string spotInterruptionBehavior;
  37. std::string zoneId;
  38. std::string vSwitchId;
  39. std::string hostNamePrefix;
  40. float spotPriceLimit;
  41. int spotDuration;
  42. std::string instanceType;
  43. std::string spotStrategy;
  44. };
  45. struct DataDisksInfo
  46. {
  47. std::string dataDiskPerformanceLevel;
  48. std::string dataDiskKMSKeyId;
  49. bool dataDiskDeleteWithInstance;
  50. bool dataDiskEncrypted;
  51. int dataDiskSize;
  52. std::string dataDiskCategory;
  53. };
  54. std::string hostNameSuffix;
  55. int minNodesInQueue;
  56. int maxNodesInQueue;
  57. bool sortedByInventory;
  58. std::vector<QueueInfo::DataDisksInfo> dataDisks;
  59. bool enableAutoGrow;
  60. std::string resourceGroupId;
  61. std::string queueImageId;
  62. int systemDiskSize;
  63. std::string systemDiskLevel;
  64. long minNodesPerCycle;
  65. long maxNodesPerCycle;
  66. bool enableAutoShrink;
  67. std::string systemDiskCategory;
  68. bool autoMinNodesPerCycle;
  69. std::string hostNamePrefix;
  70. float spotPriceLimit;
  71. std::vector<QueueInfo::InstanceTypeInfo> instanceTypes;
  72. std::string instanceType;
  73. std::string queueName;
  74. std::string spotStrategy;
  75. };
  76. GetAutoScaleConfigResult();
  77. explicit GetAutoScaleConfigResult(const std::string &payload);
  78. ~GetAutoScaleConfigResult();
  79. int getExtraNodesGrowRatio()const;
  80. bool getEnableAutoGrow()const;
  81. bool getComputeEnableHt()const;
  82. std::string getClusterId()const;
  83. int getMaxNodesInCluster()const;
  84. int getShrinkIdleTimes()const;
  85. bool getEnableAutoShrink()const;
  86. std::string getClusterType()const;
  87. int getGrowRatio()const;
  88. int getGrowIntervalInMinutes()const;
  89. std::string getUid()const;
  90. int getGrowTimeoutInMinutes()const;
  91. std::string getDnsConfig()const;
  92. std::string getImageId()const;
  93. int getShrinkIntervalInMinutes()const;
  94. float getSpotPriceLimit()const;
  95. std::vector<QueueInfo> getQueues()const;
  96. std::string getExcludeNodes()const;
  97. std::string getSpotStrategy()const;
  98. protected:
  99. void parse(const std::string &payload);
  100. private:
  101. int extraNodesGrowRatio_;
  102. bool enableAutoGrow_;
  103. bool computeEnableHt_;
  104. std::string clusterId_;
  105. int maxNodesInCluster_;
  106. int shrinkIdleTimes_;
  107. bool enableAutoShrink_;
  108. std::string clusterType_;
  109. int growRatio_;
  110. int growIntervalInMinutes_;
  111. std::string uid_;
  112. int growTimeoutInMinutes_;
  113. std::string dnsConfig_;
  114. std::string imageId_;
  115. int shrinkIntervalInMinutes_;
  116. float spotPriceLimit_;
  117. std::vector<QueueInfo> queues_;
  118. std::string excludeNodes_;
  119. std::string spotStrategy_;
  120. };
  121. }
  122. }
  123. }
  124. #endif // !ALIBABACLOUD_EHPC_MODEL_GETAUTOSCALECONFIGRESULT_H_