HuichengTestGrayThirdRequest.cc 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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/amptest/model/HuichengTestGrayThirdRequest.h>
  17. using AlibabaCloud::AmpTest::Model::HuichengTestGrayThirdRequest;
  18. HuichengTestGrayThirdRequest::HuichengTestGrayThirdRequest()
  19. : RpcServiceRequest("amptest", "2020-12-30", "HuichengTestGrayThird") {
  20. setMethod(HttpRequest::Method::Post);
  21. }
  22. HuichengTestGrayThirdRequest::~HuichengTestGrayThirdRequest() {}
  23. HuichengTestGrayThirdRequest::Home HuichengTestGrayThirdRequest::getHome() const {
  24. return home_;
  25. }
  26. void HuichengTestGrayThirdRequest::setHome(const HuichengTestGrayThirdRequest::Home &home) {
  27. home_ = home;
  28. setParameter(std::string("Home") + ".Address.T.Class", home.address.t._class);
  29. setParameter(std::string("Home") + ".Address.Location.Late", std::to_string(home.address.location.late));
  30. setParameter(std::string("Home") + ".Address.Location.Lon", std::to_string(home.address.location.lon));
  31. setParameter(std::string("Home") + ".Address.Detail", home.address.detail);
  32. setParameter(std::string("Home") + ".T.Class", home.t._class);
  33. for(int dep1 = 0; dep1 != home.phoneNumbers.size(); dep1++) {
  34. setParameter(std::string("Home") + ".PhoneNumbers." + std::to_string(dep1 + 1), home.phoneNumbers[dep1]);
  35. }
  36. for(auto const &iter1 : home.dMap) {
  37. setParameter(std::string("Home") + ".DMap." + iter1.first + ".Location.Late", std::to_string(iter1.second.location.late));
  38. setParameter(std::string("Home") + ".DMap." + iter1.first + ".Location.Lon", std::to_string(iter1.second.location.lon));
  39. setParameter(std::string("Home") + ".DMap." + iter1.first + ".Detail", iter1.second.detail);
  40. }
  41. for(auto const &iter1 : home.nameToAge) {
  42. setParameter(std::string("Home") + ".NameToAge." + iter1.first, std::to_string(iter1.second));
  43. }
  44. for(int dep1 = 0; dep1 != home.locations.size(); dep1++) {
  45. setParameter(std::string("Home") + ".Locations." + std::to_string(dep1 + 1) + ".Late", std::to_string(home.locations[dep1].late));
  46. setParameter(std::string("Home") + ".Locations." + std::to_string(dep1 + 1) + ".Lon", std::to_string(home.locations[dep1].lon));
  47. }
  48. }