InsertInstanceRequest.cc 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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/ots/model/InsertInstanceRequest.h>
  17. using AlibabaCloud::Ots::Model::InsertInstanceRequest;
  18. InsertInstanceRequest::InsertInstanceRequest() :
  19. RpcServiceRequest("ots", "2016-06-20", "InsertInstance")
  20. {}
  21. InsertInstanceRequest::~InsertInstanceRequest()
  22. {}
  23. std::string InsertInstanceRequest::getAccess_key_id()const
  24. {
  25. return access_key_id_;
  26. }
  27. void InsertInstanceRequest::setAccess_key_id(const std::string& access_key_id)
  28. {
  29. access_key_id_ = access_key_id;
  30. setCoreParameter("Access_key_id", access_key_id);
  31. }
  32. long InsertInstanceRequest::getResourceOwnerId()const
  33. {
  34. return resourceOwnerId_;
  35. }
  36. void InsertInstanceRequest::setResourceOwnerId(long resourceOwnerId)
  37. {
  38. resourceOwnerId_ = resourceOwnerId;
  39. setCoreParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
  40. }
  41. std::string InsertInstanceRequest::getDescription()const
  42. {
  43. return description_;
  44. }
  45. void InsertInstanceRequest::setDescription(const std::string& description)
  46. {
  47. description_ = description;
  48. setCoreParameter("Description", description);
  49. }
  50. std::string InsertInstanceRequest::getNetwork()const
  51. {
  52. return network_;
  53. }
  54. void InsertInstanceRequest::setNetwork(const std::string& network)
  55. {
  56. network_ = network;
  57. setCoreParameter("Network", network);
  58. }
  59. std::string InsertInstanceRequest::getClusterType()const
  60. {
  61. return clusterType_;
  62. }
  63. void InsertInstanceRequest::setClusterType(const std::string& clusterType)
  64. {
  65. clusterType_ = clusterType;
  66. setCoreParameter("ClusterType", clusterType);
  67. }
  68. std::string InsertInstanceRequest::getInstanceName()const
  69. {
  70. return instanceName_;
  71. }
  72. void InsertInstanceRequest::setInstanceName(const std::string& instanceName)
  73. {
  74. instanceName_ = instanceName;
  75. setCoreParameter("InstanceName", instanceName);
  76. }
  77. std::vector<InsertInstanceRequest::TagInfo> InsertInstanceRequest::getTagInfo()const
  78. {
  79. return tagInfo_;
  80. }
  81. void InsertInstanceRequest::setTagInfo(const std::vector<TagInfo>& tagInfo)
  82. {
  83. tagInfo_ = tagInfo;
  84. int i = 0;
  85. for(int i = 0; i!= tagInfo.size(); i++) {
  86. auto obj = tagInfo.at(i);
  87. std::string str ="TagInfo."+ std::to_string(i);
  88. setCoreParameter(str + ".TagValue", obj.tagValue);
  89. setCoreParameter(str + ".TagKey", obj.tagKey);
  90. }
  91. }