MetastoreUpdateTableRequest.cc 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. #include <alibabacloud/emr/model/MetastoreUpdateTableRequest.h>
  17. using AlibabaCloud::Emr::Model::MetastoreUpdateTableRequest;
  18. MetastoreUpdateTableRequest::MetastoreUpdateTableRequest() :
  19. RpcServiceRequest("emr", "2016-04-08", "MetastoreUpdateTable")
  20. {}
  21. MetastoreUpdateTableRequest::~MetastoreUpdateTableRequest()
  22. {}
  23. long MetastoreUpdateTableRequest::getResourceOwnerId()const
  24. {
  25. return resourceOwnerId_;
  26. }
  27. void MetastoreUpdateTableRequest::setResourceOwnerId(long resourceOwnerId)
  28. {
  29. resourceOwnerId_ = resourceOwnerId;
  30. setCoreParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
  31. }
  32. std::string MetastoreUpdateTableRequest::getRegionId()const
  33. {
  34. return regionId_;
  35. }
  36. void MetastoreUpdateTableRequest::setRegionId(const std::string& regionId)
  37. {
  38. regionId_ = regionId;
  39. setCoreParameter("RegionId", regionId);
  40. }
  41. std::vector<MetastoreUpdateTableRequest::AddColumn> MetastoreUpdateTableRequest::getAddColumn()const
  42. {
  43. return addColumn_;
  44. }
  45. void MetastoreUpdateTableRequest::setAddColumn(const std::vector<AddColumn>& addColumn)
  46. {
  47. addColumn_ = addColumn;
  48. int i = 0;
  49. for(int i = 0; i!= addColumn.size(); i++) {
  50. auto obj = addColumn.at(i);
  51. std::string str ="AddColumn."+ std::to_string(i);
  52. setCoreParameter(str + ".Name", obj.name);
  53. setCoreParameter(str + ".Comment", obj.comment);
  54. setCoreParameter(str + ".Type", obj.type);
  55. }
  56. }
  57. std::vector<MetastoreUpdateTableRequest::AddPartition> MetastoreUpdateTableRequest::getAddPartition()const
  58. {
  59. return addPartition_;
  60. }
  61. void MetastoreUpdateTableRequest::setAddPartition(const std::vector<AddPartition>& addPartition)
  62. {
  63. addPartition_ = addPartition;
  64. int i = 0;
  65. for(int i = 0; i!= addPartition.size(); i++) {
  66. auto obj = addPartition.at(i);
  67. std::string str ="AddPartition."+ std::to_string(i);
  68. setCoreParameter(str + ".Name", obj.name);
  69. setCoreParameter(str + ".Comment", obj.comment);
  70. setCoreParameter(str + ".Type", obj.type);
  71. }
  72. }
  73. std::vector<std::string> MetastoreUpdateTableRequest::getDeleteColumnName()const
  74. {
  75. return deleteColumnName_;
  76. }
  77. void MetastoreUpdateTableRequest::setDeleteColumnName(const std::vector<std::string>& deleteColumnName)
  78. {
  79. deleteColumnName_ = deleteColumnName;
  80. for(int i = 0; i!= deleteColumnName.size(); i++)
  81. setCoreParameter("DeleteColumnName."+ std::to_string(i), deleteColumnName.at(i));
  82. }
  83. std::string MetastoreUpdateTableRequest::getTableId()const
  84. {
  85. return tableId_;
  86. }
  87. void MetastoreUpdateTableRequest::setTableId(const std::string& tableId)
  88. {
  89. tableId_ = tableId;
  90. setCoreParameter("TableId", tableId);
  91. }
  92. std::vector<std::string> MetastoreUpdateTableRequest::getDeletePartitionName()const
  93. {
  94. return deletePartitionName_;
  95. }
  96. void MetastoreUpdateTableRequest::setDeletePartitionName(const std::vector<std::string>& deletePartitionName)
  97. {
  98. deletePartitionName_ = deletePartitionName;
  99. for(int i = 0; i!= deletePartitionName.size(); i++)
  100. setCoreParameter("DeletePartitionName."+ std::to_string(i), deletePartitionName.at(i));
  101. }
  102. std::string MetastoreUpdateTableRequest::getAccessKeyId()const
  103. {
  104. return accessKeyId_;
  105. }
  106. void MetastoreUpdateTableRequest::setAccessKeyId(const std::string& accessKeyId)
  107. {
  108. accessKeyId_ = accessKeyId;
  109. setCoreParameter("AccessKeyId", accessKeyId);
  110. }