QueryContactInfoResult.cc 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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/domain/model/QueryContactInfoResult.h>
  17. #include <json/json.h>
  18. using namespace AlibabaCloud::Domain;
  19. using namespace AlibabaCloud::Domain::Model;
  20. QueryContactInfoResult::QueryContactInfoResult() :
  21. ServiceResult()
  22. {}
  23. QueryContactInfoResult::QueryContactInfoResult(const std::string &payload) :
  24. ServiceResult()
  25. {
  26. parse(payload);
  27. }
  28. QueryContactInfoResult::~QueryContactInfoResult()
  29. {}
  30. void QueryContactInfoResult::parse(const std::string &payload)
  31. {
  32. Json::Reader reader;
  33. Json::Value value;
  34. reader.parse(payload, value);
  35. setRequestId(value["RequestId"].asString());
  36. if(!value["CreateDate"].isNull())
  37. createDate_ = value["CreateDate"].asString();
  38. if(!value["RegistrantName"].isNull())
  39. registrantName_ = value["RegistrantName"].asString();
  40. if(!value["RegistrantOrganization"].isNull())
  41. registrantOrganization_ = value["RegistrantOrganization"].asString();
  42. if(!value["Country"].isNull())
  43. country_ = value["Country"].asString();
  44. if(!value["Province"].isNull())
  45. province_ = value["Province"].asString();
  46. if(!value["City"].isNull())
  47. city_ = value["City"].asString();
  48. if(!value["Address"].isNull())
  49. address_ = value["Address"].asString();
  50. if(!value["Email"].isNull())
  51. email_ = value["Email"].asString();
  52. if(!value["PostalCode"].isNull())
  53. postalCode_ = value["PostalCode"].asString();
  54. if(!value["TelArea"].isNull())
  55. telArea_ = value["TelArea"].asString();
  56. if(!value["Telephone"].isNull())
  57. telephone_ = value["Telephone"].asString();
  58. if(!value["TelExt"].isNull())
  59. telExt_ = value["TelExt"].asString();
  60. if(!value["ZhRegistrantName"].isNull())
  61. zhRegistrantName_ = value["ZhRegistrantName"].asString();
  62. if(!value["ZhRegistrantOrganization"].isNull())
  63. zhRegistrantOrganization_ = value["ZhRegistrantOrganization"].asString();
  64. if(!value["ZhProvince"].isNull())
  65. zhProvince_ = value["ZhProvince"].asString();
  66. if(!value["ZhCity"].isNull())
  67. zhCity_ = value["ZhCity"].asString();
  68. if(!value["ZhAddress"].isNull())
  69. zhAddress_ = value["ZhAddress"].asString();
  70. }
  71. std::string QueryContactInfoResult::getEmail()const
  72. {
  73. return email_;
  74. }
  75. std::string QueryContactInfoResult::getZhProvince()const
  76. {
  77. return zhProvince_;
  78. }
  79. std::string QueryContactInfoResult::getAddress()const
  80. {
  81. return address_;
  82. }
  83. std::string QueryContactInfoResult::getTelephone()const
  84. {
  85. return telephone_;
  86. }
  87. std::string QueryContactInfoResult::getPostalCode()const
  88. {
  89. return postalCode_;
  90. }
  91. std::string QueryContactInfoResult::getZhRegistrantName()const
  92. {
  93. return zhRegistrantName_;
  94. }
  95. std::string QueryContactInfoResult::getCity()const
  96. {
  97. return city_;
  98. }
  99. std::string QueryContactInfoResult::getCreateDate()const
  100. {
  101. return createDate_;
  102. }
  103. std::string QueryContactInfoResult::getProvince()const
  104. {
  105. return province_;
  106. }
  107. std::string QueryContactInfoResult::getRegistrantName()const
  108. {
  109. return registrantName_;
  110. }
  111. std::string QueryContactInfoResult::getZhCity()const
  112. {
  113. return zhCity_;
  114. }
  115. std::string QueryContactInfoResult::getCountry()const
  116. {
  117. return country_;
  118. }
  119. std::string QueryContactInfoResult::getZhRegistrantOrganization()const
  120. {
  121. return zhRegistrantOrganization_;
  122. }
  123. std::string QueryContactInfoResult::getRegistrantOrganization()const
  124. {
  125. return registrantOrganization_;
  126. }
  127. std::string QueryContactInfoResult::getTelArea()const
  128. {
  129. return telArea_;
  130. }
  131. std::string QueryContactInfoResult::getTelExt()const
  132. {
  133. return telExt_;
  134. }
  135. std::string QueryContactInfoResult::getZhAddress()const
  136. {
  137. return zhAddress_;
  138. }