DeployGatewayRequest.cc 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. #include <alibabacloud/sgw/model/DeployGatewayRequest.h>
  17. using AlibabaCloud::Sgw::Model::DeployGatewayRequest;
  18. DeployGatewayRequest::DeployGatewayRequest() :
  19. RpcServiceRequest("sgw", "2018-05-11", "DeployGateway")
  20. {
  21. setMethod(HttpRequest::Method::Post);
  22. }
  23. DeployGatewayRequest::~DeployGatewayRequest()
  24. {}
  25. std::string DeployGatewayRequest::getGatewayClass()const
  26. {
  27. return gatewayClass_;
  28. }
  29. void DeployGatewayRequest::setGatewayClass(const std::string& gatewayClass)
  30. {
  31. gatewayClass_ = gatewayClass;
  32. setParameter("GatewayClass", gatewayClass);
  33. }
  34. std::string DeployGatewayRequest::getGatewayVersion()const
  35. {
  36. return gatewayVersion_;
  37. }
  38. void DeployGatewayRequest::setGatewayVersion(const std::string& gatewayVersion)
  39. {
  40. gatewayVersion_ = gatewayVersion;
  41. setParameter("GatewayVersion", gatewayVersion);
  42. }
  43. std::vector<DeployGatewayRequest::DataDisk> DeployGatewayRequest::getDataDisk()const
  44. {
  45. return dataDisk_;
  46. }
  47. void DeployGatewayRequest::setDataDisk(const std::vector<DataDisk>& dataDisk)
  48. {
  49. dataDisk_ = dataDisk;
  50. for(int dep1 = 0; dep1!= dataDisk.size(); dep1++) {
  51. auto dataDiskObj = dataDisk.at(dep1);
  52. std::string dataDiskObjStr = "DataDisk." + std::to_string(dep1 + 1);
  53. setParameter(dataDiskObjStr + ".Size", std::to_string(dataDiskObj.size));
  54. setParameter(dataDiskObjStr + ".Category", dataDiskObj.category);
  55. setParameter(dataDiskObjStr + ".CacheConfig", dataDiskObj.cacheConfig);
  56. }
  57. }
  58. std::string DeployGatewayRequest::getAccessKeyId()const
  59. {
  60. return accessKeyId_;
  61. }
  62. void DeployGatewayRequest::setAccessKeyId(const std::string& accessKeyId)
  63. {
  64. accessKeyId_ = accessKeyId;
  65. setParameter("AccessKeyId", accessKeyId);
  66. }
  67. std::string DeployGatewayRequest::getVSwitchId()const
  68. {
  69. return vSwitchId_;
  70. }
  71. void DeployGatewayRequest::setVSwitchId(const std::string& vSwitchId)
  72. {
  73. vSwitchId_ = vSwitchId;
  74. setParameter("VSwitchId", vSwitchId);
  75. }
  76. std::string DeployGatewayRequest::getSecurityToken()const
  77. {
  78. return securityToken_;
  79. }
  80. void DeployGatewayRequest::setSecurityToken(const std::string& securityToken)
  81. {
  82. securityToken_ = securityToken;
  83. setParameter("SecurityToken", securityToken);
  84. }
  85. std::string DeployGatewayRequest::getGatewayId()const
  86. {
  87. return gatewayId_;
  88. }
  89. void DeployGatewayRequest::setGatewayId(const std::string& gatewayId)
  90. {
  91. gatewayId_ = gatewayId;
  92. setParameter("GatewayId", gatewayId);
  93. }