DeleteCommonGroupResult.cc 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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/devops-rdc/model/DeleteCommonGroupResult.h>
  17. #include <json/json.h>
  18. using namespace AlibabaCloud::Devops_rdc;
  19. using namespace AlibabaCloud::Devops_rdc::Model;
  20. DeleteCommonGroupResult::DeleteCommonGroupResult() :
  21. ServiceResult()
  22. {}
  23. DeleteCommonGroupResult::DeleteCommonGroupResult(const std::string &payload) :
  24. ServiceResult()
  25. {
  26. parse(payload);
  27. }
  28. DeleteCommonGroupResult::~DeleteCommonGroupResult()
  29. {}
  30. void DeleteCommonGroupResult::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. auto objectNode = value["Object"];
  37. if(!objectNode["Id"].isNull())
  38. object_.id = objectNode["Id"].asString();
  39. if(!value["Successful"].isNull())
  40. successful_ = value["Successful"].asString() == "true";
  41. if(!value["ErrorCode"].isNull())
  42. errorCode_ = value["ErrorCode"].asString();
  43. if(!value["ErrorMsg"].isNull())
  44. errorMsg_ = value["ErrorMsg"].asString();
  45. }
  46. std::string DeleteCommonGroupResult::getErrorMsg()const
  47. {
  48. return errorMsg_;
  49. }
  50. DeleteCommonGroupResult::Object DeleteCommonGroupResult::getObject()const
  51. {
  52. return object_;
  53. }
  54. std::string DeleteCommonGroupResult::getErrorCode()const
  55. {
  56. return errorCode_;
  57. }
  58. bool DeleteCommonGroupResult::getSuccessful()const
  59. {
  60. return successful_;
  61. }