CreateQueueRequest.cc 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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/mns-open/model/CreateQueueRequest.h>
  17. using AlibabaCloud::Mns_open::Model::CreateQueueRequest;
  18. CreateQueueRequest::CreateQueueRequest()
  19. : RpcServiceRequest("mns-open", "2022-01-19", "CreateQueue") {
  20. setMethod(HttpRequest::Method::Post);
  21. }
  22. CreateQueueRequest::~CreateQueueRequest() {}
  23. std::string CreateQueueRequest::getQueueName() const {
  24. return queueName_;
  25. }
  26. void CreateQueueRequest::setQueueName(const std::string &queueName) {
  27. queueName_ = queueName;
  28. setParameter(std::string("QueueName"), queueName);
  29. }
  30. long CreateQueueRequest::getMessageRetentionPeriod() const {
  31. return messageRetentionPeriod_;
  32. }
  33. void CreateQueueRequest::setMessageRetentionPeriod(long messageRetentionPeriod) {
  34. messageRetentionPeriod_ = messageRetentionPeriod;
  35. setParameter(std::string("MessageRetentionPeriod"), std::to_string(messageRetentionPeriod));
  36. }
  37. bool CreateQueueRequest::getEnableLogging() const {
  38. return enableLogging_;
  39. }
  40. void CreateQueueRequest::setEnableLogging(bool enableLogging) {
  41. enableLogging_ = enableLogging;
  42. setParameter(std::string("EnableLogging"), enableLogging ? "true" : "false");
  43. }
  44. long CreateQueueRequest::getVisibilityTimeout() const {
  45. return visibilityTimeout_;
  46. }
  47. void CreateQueueRequest::setVisibilityTimeout(long visibilityTimeout) {
  48. visibilityTimeout_ = visibilityTimeout;
  49. setParameter(std::string("VisibilityTimeout"), std::to_string(visibilityTimeout));
  50. }
  51. long CreateQueueRequest::getMaximumMessageSize() const {
  52. return maximumMessageSize_;
  53. }
  54. void CreateQueueRequest::setMaximumMessageSize(long maximumMessageSize) {
  55. maximumMessageSize_ = maximumMessageSize;
  56. setParameter(std::string("MaximumMessageSize"), std::to_string(maximumMessageSize));
  57. }
  58. long CreateQueueRequest::getDelaySeconds() const {
  59. return delaySeconds_;
  60. }
  61. void CreateQueueRequest::setDelaySeconds(long delaySeconds) {
  62. delaySeconds_ = delaySeconds;
  63. setParameter(std::string("DelaySeconds"), std::to_string(delaySeconds));
  64. }
  65. long CreateQueueRequest::getPollingWaitSeconds() const {
  66. return pollingWaitSeconds_;
  67. }
  68. void CreateQueueRequest::setPollingWaitSeconds(long pollingWaitSeconds) {
  69. pollingWaitSeconds_ = pollingWaitSeconds;
  70. setParameter(std::string("PollingWaitSeconds"), std::to_string(pollingWaitSeconds));
  71. }