CreateRoleRequest.cc 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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/ram/model/CreateRoleRequest.h>
  17. using AlibabaCloud::Ram::Model::CreateRoleRequest;
  18. CreateRoleRequest::CreateRoleRequest() :
  19. RpcServiceRequest("ram", "2015-05-01", "CreateRole")
  20. {
  21. setMethod(HttpRequest::Method::Post);
  22. }
  23. CreateRoleRequest::~CreateRoleRequest()
  24. {}
  25. long CreateRoleRequest::getMaxSessionDuration()const
  26. {
  27. return maxSessionDuration_;
  28. }
  29. void CreateRoleRequest::setMaxSessionDuration(long maxSessionDuration)
  30. {
  31. maxSessionDuration_ = maxSessionDuration;
  32. setParameter("MaxSessionDuration", std::to_string(maxSessionDuration));
  33. }
  34. std::string CreateRoleRequest::getRoleName()const
  35. {
  36. return roleName_;
  37. }
  38. void CreateRoleRequest::setRoleName(const std::string& roleName)
  39. {
  40. roleName_ = roleName;
  41. setParameter("RoleName", roleName);
  42. }
  43. std::string CreateRoleRequest::getDescription()const
  44. {
  45. return description_;
  46. }
  47. void CreateRoleRequest::setDescription(const std::string& description)
  48. {
  49. description_ = description;
  50. setParameter("Description", description);
  51. }
  52. std::string CreateRoleRequest::getAssumeRolePolicyDocument()const
  53. {
  54. return assumeRolePolicyDocument_;
  55. }
  56. void CreateRoleRequest::setAssumeRolePolicyDocument(const std::string& assumeRolePolicyDocument)
  57. {
  58. assumeRolePolicyDocument_ = assumeRolePolicyDocument;
  59. setParameter("AssumeRolePolicyDocument", assumeRolePolicyDocument);
  60. }