CreateAppRequest.cc 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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/cloudapi/model/CreateAppRequest.h>
  17. using AlibabaCloud::CloudAPI::Model::CreateAppRequest;
  18. CreateAppRequest::CreateAppRequest()
  19. : RpcServiceRequest("cloudapi", "2016-07-14", "CreateApp") {
  20. setMethod(HttpRequest::Method::Post);
  21. }
  22. CreateAppRequest::~CreateAppRequest() {}
  23. std::string CreateAppRequest::getDescription() const {
  24. return description_;
  25. }
  26. void CreateAppRequest::setDescription(const std::string &description) {
  27. description_ = description;
  28. setParameter(std::string("Description"), description);
  29. }
  30. long CreateAppRequest::getAppOwnerUserId() const {
  31. return appOwnerUserId_;
  32. }
  33. void CreateAppRequest::setAppOwnerUserId(long appOwnerUserId) {
  34. appOwnerUserId_ = appOwnerUserId;
  35. setParameter(std::string("AppOwnerUserId"), std::to_string(appOwnerUserId));
  36. }
  37. std::string CreateAppRequest::getSource() const {
  38. return source_;
  39. }
  40. void CreateAppRequest::setSource(const std::string &source) {
  41. source_ = source;
  42. setParameter(std::string("Source"), source);
  43. }
  44. std::string CreateAppRequest::getAccessKeyId() const {
  45. return accessKeyId_;
  46. }
  47. void CreateAppRequest::setAccessKeyId(const std::string &accessKeyId) {
  48. accessKeyId_ = accessKeyId;
  49. setParameter(std::string("AccessKeyId"), accessKeyId);
  50. }
  51. std::string CreateAppRequest::getAppName() const {
  52. return appName_;
  53. }
  54. void CreateAppRequest::setAppName(const std::string &appName) {
  55. appName_ = appName;
  56. setParameter(std::string("AppName"), appName);
  57. }
  58. std::string CreateAppRequest::getSecurityToken() const {
  59. return securityToken_;
  60. }
  61. void CreateAppRequest::setSecurityToken(const std::string &securityToken) {
  62. securityToken_ = securityToken;
  63. setParameter(std::string("SecurityToken"), securityToken);
  64. }
  65. std::string CreateAppRequest::getAppSecret() const {
  66. return appSecret_;
  67. }
  68. void CreateAppRequest::setAppSecret(const std::string &appSecret) {
  69. appSecret_ = appSecret;
  70. setParameter(std::string("AppSecret"), appSecret);
  71. }
  72. std::string CreateAppRequest::getAppKey() const {
  73. return appKey_;
  74. }
  75. void CreateAppRequest::setAppKey(const std::string &appKey) {
  76. appKey_ = appKey;
  77. setParameter(std::string("AppKey"), appKey);
  78. }
  79. std::string CreateAppRequest::getAppCode() const {
  80. return appCode_;
  81. }
  82. void CreateAppRequest::setAppCode(const std::string &appCode) {
  83. appCode_ = appCode;
  84. setParameter(std::string("AppCode"), appCode);
  85. }
  86. std::vector<CreateAppRequest::Tag> CreateAppRequest::getTag() const {
  87. return tag_;
  88. }
  89. void CreateAppRequest::setTag(const std::vector<CreateAppRequest::Tag> &tag) {
  90. tag_ = tag;
  91. for(int dep1 = 0; dep1 != tag.size(); dep1++) {
  92. auto tagObj = tag.at(dep1);
  93. std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1);
  94. setParameter(tagObjStr + ".Value", tagObj.value);
  95. setParameter(tagObjStr + ".Key", tagObj.key);
  96. }
  97. }