SetSecurityPreferenceRequest.cc 3.4 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/ram/model/SetSecurityPreferenceRequest.h>
  17. using AlibabaCloud::Ram::Model::SetSecurityPreferenceRequest;
  18. SetSecurityPreferenceRequest::SetSecurityPreferenceRequest() :
  19. RpcServiceRequest("ram", "2015-05-01", "SetSecurityPreference")
  20. {
  21. setMethod(HttpRequest::Method::Post);
  22. }
  23. SetSecurityPreferenceRequest::~SetSecurityPreferenceRequest()
  24. {}
  25. bool SetSecurityPreferenceRequest::getEnableSaveMFATicket()const
  26. {
  27. return enableSaveMFATicket_;
  28. }
  29. void SetSecurityPreferenceRequest::setEnableSaveMFATicket(bool enableSaveMFATicket)
  30. {
  31. enableSaveMFATicket_ = enableSaveMFATicket;
  32. setParameter("EnableSaveMFATicket", enableSaveMFATicket ? "true" : "false");
  33. }
  34. std::string SetSecurityPreferenceRequest::getLoginNetworkMasks()const
  35. {
  36. return loginNetworkMasks_;
  37. }
  38. void SetSecurityPreferenceRequest::setLoginNetworkMasks(const std::string& loginNetworkMasks)
  39. {
  40. loginNetworkMasks_ = loginNetworkMasks;
  41. setParameter("LoginNetworkMasks", loginNetworkMasks);
  42. }
  43. bool SetSecurityPreferenceRequest::getAllowUserToChangePassword()const
  44. {
  45. return allowUserToChangePassword_;
  46. }
  47. void SetSecurityPreferenceRequest::setAllowUserToChangePassword(bool allowUserToChangePassword)
  48. {
  49. allowUserToChangePassword_ = allowUserToChangePassword;
  50. setParameter("AllowUserToChangePassword", allowUserToChangePassword ? "true" : "false");
  51. }
  52. bool SetSecurityPreferenceRequest::getAllowUserToManagePublicKeys()const
  53. {
  54. return allowUserToManagePublicKeys_;
  55. }
  56. void SetSecurityPreferenceRequest::setAllowUserToManagePublicKeys(bool allowUserToManagePublicKeys)
  57. {
  58. allowUserToManagePublicKeys_ = allowUserToManagePublicKeys;
  59. setParameter("AllowUserToManagePublicKeys", allowUserToManagePublicKeys ? "true" : "false");
  60. }
  61. int SetSecurityPreferenceRequest::getLoginSessionDuration()const
  62. {
  63. return loginSessionDuration_;
  64. }
  65. void SetSecurityPreferenceRequest::setLoginSessionDuration(int loginSessionDuration)
  66. {
  67. loginSessionDuration_ = loginSessionDuration;
  68. setParameter("LoginSessionDuration", std::to_string(loginSessionDuration));
  69. }
  70. bool SetSecurityPreferenceRequest::getAllowUserToManageAccessKeys()const
  71. {
  72. return allowUserToManageAccessKeys_;
  73. }
  74. void SetSecurityPreferenceRequest::setAllowUserToManageAccessKeys(bool allowUserToManageAccessKeys)
  75. {
  76. allowUserToManageAccessKeys_ = allowUserToManageAccessKeys;
  77. setParameter("AllowUserToManageAccessKeys", allowUserToManageAccessKeys ? "true" : "false");
  78. }
  79. bool SetSecurityPreferenceRequest::getAllowUserToManageMFADevices()const
  80. {
  81. return allowUserToManageMFADevices_;
  82. }
  83. void SetSecurityPreferenceRequest::setAllowUserToManageMFADevices(bool allowUserToManageMFADevices)
  84. {
  85. allowUserToManageMFADevices_ = allowUserToManageMFADevices;
  86. setParameter("AllowUserToManageMFADevices", allowUserToManageMFADevices ? "true" : "false");
  87. }