CreatePrivateAccessPolicyRequest.cc 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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/csas/model/CreatePrivateAccessPolicyRequest.h>
  17. using AlibabaCloud::Csas::Model::CreatePrivateAccessPolicyRequest;
  18. CreatePrivateAccessPolicyRequest::CreatePrivateAccessPolicyRequest()
  19. : RpcServiceRequest("csas", "2023-01-20", "CreatePrivateAccessPolicy") {
  20. setMethod(HttpRequest::Method::Post);
  21. }
  22. CreatePrivateAccessPolicyRequest::~CreatePrivateAccessPolicyRequest() {}
  23. std::string CreatePrivateAccessPolicyRequest::getDescription() const {
  24. return description_;
  25. }
  26. void CreatePrivateAccessPolicyRequest::setDescription(const std::string &description) {
  27. description_ = description;
  28. setBodyParameter(std::string("Description"), description);
  29. }
  30. std::string CreatePrivateAccessPolicyRequest::getSourceIp() const {
  31. return sourceIp_;
  32. }
  33. void CreatePrivateAccessPolicyRequest::setSourceIp(const std::string &sourceIp) {
  34. sourceIp_ = sourceIp;
  35. setParameter(std::string("SourceIp"), sourceIp);
  36. }
  37. std::vector<CreatePrivateAccessPolicyRequest::CustomUserAttributes> CreatePrivateAccessPolicyRequest::getCustomUserAttributes() const {
  38. return customUserAttributes_;
  39. }
  40. void CreatePrivateAccessPolicyRequest::setCustomUserAttributes(const std::vector<CreatePrivateAccessPolicyRequest::CustomUserAttributes> &customUserAttributes) {
  41. customUserAttributes_ = customUserAttributes;
  42. for(int dep1 = 0; dep1 != customUserAttributes.size(); dep1++) {
  43. setBodyParameter(std::string("CustomUserAttributes") + "." + std::to_string(dep1 + 1) + ".UserGroupType", customUserAttributes[dep1].userGroupType);
  44. setBodyParameter(std::string("CustomUserAttributes") + "." + std::to_string(dep1 + 1) + ".IdpId", std::to_string(customUserAttributes[dep1].idpId));
  45. setBodyParameter(std::string("CustomUserAttributes") + "." + std::to_string(dep1 + 1) + ".Value", customUserAttributes[dep1].value);
  46. setBodyParameter(std::string("CustomUserAttributes") + "." + std::to_string(dep1 + 1) + ".Relation", customUserAttributes[dep1].relation);
  47. }
  48. }
  49. std::vector<CreatePrivateAccessPolicyRequest::std::string> CreatePrivateAccessPolicyRequest::getTagIds() const {
  50. return tagIds_;
  51. }
  52. void CreatePrivateAccessPolicyRequest::setTagIds(const std::vector<CreatePrivateAccessPolicyRequest::std::string> &tagIds) {
  53. tagIds_ = tagIds;
  54. for(int dep1 = 0; dep1 != tagIds.size(); dep1++) {
  55. setBodyParameter(std::string("TagIds") + "." + std::to_string(dep1 + 1), tagIds[dep1]);
  56. }
  57. }
  58. std::vector<CreatePrivateAccessPolicyRequest::std::string> CreatePrivateAccessPolicyRequest::getUserGroupIds() const {
  59. return userGroupIds_;
  60. }
  61. void CreatePrivateAccessPolicyRequest::setUserGroupIds(const std::vector<CreatePrivateAccessPolicyRequest::std::string> &userGroupIds) {
  62. userGroupIds_ = userGroupIds;
  63. for(int dep1 = 0; dep1 != userGroupIds.size(); dep1++) {
  64. setBodyParameter(std::string("UserGroupIds") + "." + std::to_string(dep1 + 1), userGroupIds[dep1]);
  65. }
  66. }
  67. std::string CreatePrivateAccessPolicyRequest::getPolicyAction() const {
  68. return policyAction_;
  69. }
  70. void CreatePrivateAccessPolicyRequest::setPolicyAction(const std::string &policyAction) {
  71. policyAction_ = policyAction;
  72. setBodyParameter(std::string("PolicyAction"), policyAction);
  73. }
  74. int CreatePrivateAccessPolicyRequest::getPriority() const {
  75. return priority_;
  76. }
  77. void CreatePrivateAccessPolicyRequest::setPriority(int priority) {
  78. priority_ = priority;
  79. setBodyParameter(std::string("Priority"), std::to_string(priority));
  80. }
  81. std::vector<CreatePrivateAccessPolicyRequest::std::string> CreatePrivateAccessPolicyRequest::getApplicationIds() const {
  82. return applicationIds_;
  83. }
  84. void CreatePrivateAccessPolicyRequest::setApplicationIds(const std::vector<CreatePrivateAccessPolicyRequest::std::string> &applicationIds) {
  85. applicationIds_ = applicationIds;
  86. for(int dep1 = 0; dep1 != applicationIds.size(); dep1++) {
  87. setBodyParameter(std::string("ApplicationIds") + "." + std::to_string(dep1 + 1), applicationIds[dep1]);
  88. }
  89. }
  90. std::string CreatePrivateAccessPolicyRequest::getUserGroupMode() const {
  91. return userGroupMode_;
  92. }
  93. void CreatePrivateAccessPolicyRequest::setUserGroupMode(const std::string &userGroupMode) {
  94. userGroupMode_ = userGroupMode;
  95. setBodyParameter(std::string("UserGroupMode"), userGroupMode);
  96. }
  97. std::string CreatePrivateAccessPolicyRequest::getName() const {
  98. return name_;
  99. }
  100. void CreatePrivateAccessPolicyRequest::setName(const std::string &name) {
  101. name_ = name;
  102. setBodyParameter(std::string("Name"), name);
  103. }
  104. std::string CreatePrivateAccessPolicyRequest::getApplicationType() const {
  105. return applicationType_;
  106. }
  107. void CreatePrivateAccessPolicyRequest::setApplicationType(const std::string &applicationType) {
  108. applicationType_ = applicationType;
  109. setBodyParameter(std::string("ApplicationType"), applicationType);
  110. }
  111. std::string CreatePrivateAccessPolicyRequest::getStatus() const {
  112. return status_;
  113. }
  114. void CreatePrivateAccessPolicyRequest::setStatus(const std::string &status) {
  115. status_ = status;
  116. setBodyParameter(std::string("Status"), status);
  117. }