CreatePrivateAccessApplicationRequest.cc 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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/CreatePrivateAccessApplicationRequest.h>
  17. using AlibabaCloud::Csas::Model::CreatePrivateAccessApplicationRequest;
  18. CreatePrivateAccessApplicationRequest::CreatePrivateAccessApplicationRequest()
  19. : RpcServiceRequest("csas", "2023-01-20", "CreatePrivateAccessApplication") {
  20. setMethod(HttpRequest::Method::Post);
  21. }
  22. CreatePrivateAccessApplicationRequest::~CreatePrivateAccessApplicationRequest() {}
  23. std::vector<CreatePrivateAccessApplicationRequest::std::string> CreatePrivateAccessApplicationRequest::getAddresses() const {
  24. return addresses_;
  25. }
  26. void CreatePrivateAccessApplicationRequest::setAddresses(const std::vector<CreatePrivateAccessApplicationRequest::std::string> &addresses) {
  27. addresses_ = addresses;
  28. for(int dep1 = 0; dep1 != addresses.size(); dep1++) {
  29. setBodyParameter(std::string("Addresses") + "." + std::to_string(dep1 + 1), addresses[dep1]);
  30. }
  31. }
  32. std::string CreatePrivateAccessApplicationRequest::getDescription() const {
  33. return description_;
  34. }
  35. void CreatePrivateAccessApplicationRequest::setDescription(const std::string &description) {
  36. description_ = description;
  37. setBodyParameter(std::string("Description"), description);
  38. }
  39. std::string CreatePrivateAccessApplicationRequest::getProtocol() const {
  40. return protocol_;
  41. }
  42. void CreatePrivateAccessApplicationRequest::setProtocol(const std::string &protocol) {
  43. protocol_ = protocol;
  44. setBodyParameter(std::string("Protocol"), protocol);
  45. }
  46. std::string CreatePrivateAccessApplicationRequest::getSourceIp() const {
  47. return sourceIp_;
  48. }
  49. void CreatePrivateAccessApplicationRequest::setSourceIp(const std::string &sourceIp) {
  50. sourceIp_ = sourceIp;
  51. setParameter(std::string("SourceIp"), sourceIp);
  52. }
  53. std::vector<CreatePrivateAccessApplicationRequest::std::string> CreatePrivateAccessApplicationRequest::getTagIds() const {
  54. return tagIds_;
  55. }
  56. void CreatePrivateAccessApplicationRequest::setTagIds(const std::vector<CreatePrivateAccessApplicationRequest::std::string> &tagIds) {
  57. tagIds_ = tagIds;
  58. for(int dep1 = 0; dep1 != tagIds.size(); dep1++) {
  59. setBodyParameter(std::string("TagIds") + "." + std::to_string(dep1 + 1), tagIds[dep1]);
  60. }
  61. }
  62. std::vector<CreatePrivateAccessApplicationRequest::PortRanges> CreatePrivateAccessApplicationRequest::getPortRanges() const {
  63. return portRanges_;
  64. }
  65. void CreatePrivateAccessApplicationRequest::setPortRanges(const std::vector<CreatePrivateAccessApplicationRequest::PortRanges> &portRanges) {
  66. portRanges_ = portRanges;
  67. for(int dep1 = 0; dep1 != portRanges.size(); dep1++) {
  68. setBodyParameter(std::string("PortRanges") + "." + std::to_string(dep1 + 1) + ".End", std::to_string(portRanges[dep1].end));
  69. setBodyParameter(std::string("PortRanges") + "." + std::to_string(dep1 + 1) + ".Begin", std::to_string(portRanges[dep1].begin));
  70. }
  71. }
  72. std::string CreatePrivateAccessApplicationRequest::getName() const {
  73. return name_;
  74. }
  75. void CreatePrivateAccessApplicationRequest::setName(const std::string &name) {
  76. name_ = name;
  77. setBodyParameter(std::string("Name"), name);
  78. }
  79. std::string CreatePrivateAccessApplicationRequest::getStatus() const {
  80. return status_;
  81. }
  82. void CreatePrivateAccessApplicationRequest::setStatus(const std::string &status) {
  83. status_ = status;
  84. setBodyParameter(std::string("Status"), status);
  85. }