UnsubscribeTopicRequest.cc 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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/iot/model/UnsubscribeTopicRequest.h>
  17. using AlibabaCloud::Iot::Model::UnsubscribeTopicRequest;
  18. UnsubscribeTopicRequest::UnsubscribeTopicRequest() :
  19. RpcServiceRequest("iot", "2018-01-20", "UnsubscribeTopic")
  20. {
  21. setMethod(HttpRequest::Method::Post);
  22. }
  23. UnsubscribeTopicRequest::~UnsubscribeTopicRequest()
  24. {}
  25. std::string UnsubscribeTopicRequest::getIotInstanceId()const
  26. {
  27. return iotInstanceId_;
  28. }
  29. void UnsubscribeTopicRequest::setIotInstanceId(const std::string& iotInstanceId)
  30. {
  31. iotInstanceId_ = iotInstanceId;
  32. setParameter("IotInstanceId", iotInstanceId);
  33. }
  34. std::string UnsubscribeTopicRequest::getProductKey()const
  35. {
  36. return productKey_;
  37. }
  38. void UnsubscribeTopicRequest::setProductKey(const std::string& productKey)
  39. {
  40. productKey_ = productKey;
  41. setParameter("ProductKey", productKey);
  42. }
  43. std::string UnsubscribeTopicRequest::getApiProduct()const
  44. {
  45. return apiProduct_;
  46. }
  47. void UnsubscribeTopicRequest::setApiProduct(const std::string& apiProduct)
  48. {
  49. apiProduct_ = apiProduct;
  50. setBodyParameter("ApiProduct", apiProduct);
  51. }
  52. std::vector<std::string> UnsubscribeTopicRequest::getTopic()const
  53. {
  54. return topic_;
  55. }
  56. void UnsubscribeTopicRequest::setTopic(const std::vector<std::string>& topic)
  57. {
  58. topic_ = topic;
  59. for(int dep1 = 0; dep1!= topic.size(); dep1++) {
  60. setParameter("Topic."+ std::to_string(dep1), topic.at(dep1));
  61. }
  62. }
  63. std::string UnsubscribeTopicRequest::getApiRevision()const
  64. {
  65. return apiRevision_;
  66. }
  67. void UnsubscribeTopicRequest::setApiRevision(const std::string& apiRevision)
  68. {
  69. apiRevision_ = apiRevision;
  70. setBodyParameter("ApiRevision", apiRevision);
  71. }
  72. std::string UnsubscribeTopicRequest::getDeviceName()const
  73. {
  74. return deviceName_;
  75. }
  76. void UnsubscribeTopicRequest::setDeviceName(const std::string& deviceName)
  77. {
  78. deviceName_ = deviceName;
  79. setParameter("DeviceName", deviceName);
  80. }