CreateDeviceRequest.cc 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  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/vs/model/CreateDeviceRequest.h>
  17. using AlibabaCloud::Vs::Model::CreateDeviceRequest;
  18. CreateDeviceRequest::CreateDeviceRequest() :
  19. RpcServiceRequest("vs", "2018-12-12", "CreateDevice")
  20. {
  21. setMethod(HttpRequest::Method::Post);
  22. }
  23. CreateDeviceRequest::~CreateDeviceRequest()
  24. {}
  25. std::string CreateDeviceRequest::getGbId()const
  26. {
  27. return gbId_;
  28. }
  29. void CreateDeviceRequest::setGbId(const std::string& gbId)
  30. {
  31. gbId_ = gbId;
  32. setParameter("GbId", gbId);
  33. }
  34. std::string CreateDeviceRequest::getLatitude()const
  35. {
  36. return latitude_;
  37. }
  38. void CreateDeviceRequest::setLatitude(const std::string& latitude)
  39. {
  40. latitude_ = latitude;
  41. setParameter("Latitude", latitude);
  42. }
  43. std::string CreateDeviceRequest::getDescription()const
  44. {
  45. return description_;
  46. }
  47. void CreateDeviceRequest::setDescription(const std::string& description)
  48. {
  49. description_ = description;
  50. setParameter("Description", description);
  51. }
  52. std::string CreateDeviceRequest::getType()const
  53. {
  54. return type_;
  55. }
  56. void CreateDeviceRequest::setType(const std::string& type)
  57. {
  58. type_ = type;
  59. setParameter("Type", type);
  60. }
  61. bool CreateDeviceRequest::getAutoStart()const
  62. {
  63. return autoStart_;
  64. }
  65. void CreateDeviceRequest::setAutoStart(bool autoStart)
  66. {
  67. autoStart_ = autoStart;
  68. setParameter("AutoStart", autoStart ? "true" : "false");
  69. }
  70. std::string CreateDeviceRequest::getParentId()const
  71. {
  72. return parentId_;
  73. }
  74. void CreateDeviceRequest::setParentId(const std::string& parentId)
  75. {
  76. parentId_ = parentId;
  77. setParameter("ParentId", parentId);
  78. }
  79. std::string CreateDeviceRequest::getPassword()const
  80. {
  81. return password_;
  82. }
  83. void CreateDeviceRequest::setPassword(const std::string& password)
  84. {
  85. password_ = password;
  86. setParameter("Password", password);
  87. }
  88. std::string CreateDeviceRequest::getVendor()const
  89. {
  90. return vendor_;
  91. }
  92. void CreateDeviceRequest::setVendor(const std::string& vendor)
  93. {
  94. vendor_ = vendor;
  95. setParameter("Vendor", vendor);
  96. }
  97. std::string CreateDeviceRequest::getAlarmMethod()const
  98. {
  99. return alarmMethod_;
  100. }
  101. void CreateDeviceRequest::setAlarmMethod(const std::string& alarmMethod)
  102. {
  103. alarmMethod_ = alarmMethod;
  104. setParameter("AlarmMethod", alarmMethod);
  105. }
  106. std::string CreateDeviceRequest::getDirectoryId()const
  107. {
  108. return directoryId_;
  109. }
  110. void CreateDeviceRequest::setDirectoryId(const std::string& directoryId)
  111. {
  112. directoryId_ = directoryId;
  113. setParameter("DirectoryId", directoryId);
  114. }
  115. std::string CreateDeviceRequest::getShowLog()const
  116. {
  117. return showLog_;
  118. }
  119. void CreateDeviceRequest::setShowLog(const std::string& showLog)
  120. {
  121. showLog_ = showLog;
  122. setParameter("ShowLog", showLog);
  123. }
  124. std::string CreateDeviceRequest::getLongitude()const
  125. {
  126. return longitude_;
  127. }
  128. void CreateDeviceRequest::setLongitude(const std::string& longitude)
  129. {
  130. longitude_ = longitude;
  131. setParameter("Longitude", longitude);
  132. }
  133. std::string CreateDeviceRequest::getGroupId()const
  134. {
  135. return groupId_;
  136. }
  137. void CreateDeviceRequest::setGroupId(const std::string& groupId)
  138. {
  139. groupId_ = groupId;
  140. setParameter("GroupId", groupId);
  141. }
  142. std::string CreateDeviceRequest::getIp()const
  143. {
  144. return ip_;
  145. }
  146. void CreateDeviceRequest::setIp(const std::string& ip)
  147. {
  148. ip_ = ip;
  149. setParameter("Ip", ip);
  150. }
  151. long CreateDeviceRequest::getOwnerId()const
  152. {
  153. return ownerId_;
  154. }
  155. void CreateDeviceRequest::setOwnerId(long ownerId)
  156. {
  157. ownerId_ = ownerId;
  158. setParameter("OwnerId", std::to_string(ownerId));
  159. }
  160. std::string CreateDeviceRequest::getParams()const
  161. {
  162. return params_;
  163. }
  164. void CreateDeviceRequest::setParams(const std::string& params)
  165. {
  166. params_ = params;
  167. setParameter("Params", params);
  168. }
  169. std::string CreateDeviceRequest::getUrl()const
  170. {
  171. return url_;
  172. }
  173. void CreateDeviceRequest::setUrl(const std::string& url)
  174. {
  175. url_ = url;
  176. setParameter("Url", url);
  177. }
  178. long CreateDeviceRequest::getPort()const
  179. {
  180. return port_;
  181. }
  182. void CreateDeviceRequest::setPort(long port)
  183. {
  184. port_ = port;
  185. setParameter("Port", std::to_string(port));
  186. }
  187. std::string CreateDeviceRequest::getName()const
  188. {
  189. return name_;
  190. }
  191. void CreateDeviceRequest::setName(const std::string& name)
  192. {
  193. name_ = name;
  194. setParameter("Name", name);
  195. }
  196. long CreateDeviceRequest::getPosInterval()const
  197. {
  198. return posInterval_;
  199. }
  200. void CreateDeviceRequest::setPosInterval(long posInterval)
  201. {
  202. posInterval_ = posInterval;
  203. setParameter("PosInterval", std::to_string(posInterval));
  204. }
  205. std::string CreateDeviceRequest::getDsn()const
  206. {
  207. return dsn_;
  208. }
  209. void CreateDeviceRequest::setDsn(const std::string& dsn)
  210. {
  211. dsn_ = dsn;
  212. setParameter("Dsn", dsn);
  213. }
  214. std::string CreateDeviceRequest::getUsername()const
  215. {
  216. return username_;
  217. }
  218. void CreateDeviceRequest::setUsername(const std::string& username)
  219. {
  220. username_ = username;
  221. setParameter("Username", username);
  222. }
  223. bool CreateDeviceRequest::getAutoPos()const
  224. {
  225. return autoPos_;
  226. }
  227. void CreateDeviceRequest::setAutoPos(bool autoPos)
  228. {
  229. autoPos_ = autoPos;
  230. setParameter("AutoPos", autoPos ? "true" : "false");
  231. }