GetEditingProjectResult.cc 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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/ice/model/GetEditingProjectResult.h>
  17. #include <json/json.h>
  18. using namespace AlibabaCloud::ICE;
  19. using namespace AlibabaCloud::ICE::Model;
  20. GetEditingProjectResult::GetEditingProjectResult() :
  21. ServiceResult()
  22. {}
  23. GetEditingProjectResult::GetEditingProjectResult(const std::string &payload) :
  24. ServiceResult()
  25. {
  26. parse(payload);
  27. }
  28. GetEditingProjectResult::~GetEditingProjectResult()
  29. {}
  30. void GetEditingProjectResult::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 projectNode = value["Project"];
  37. if(!projectNode["ProjectId"].isNull())
  38. project_.projectId = projectNode["ProjectId"].asString();
  39. if(!projectNode["Title"].isNull())
  40. project_.title = projectNode["Title"].asString();
  41. if(!projectNode["Timeline"].isNull())
  42. project_.timeline = projectNode["Timeline"].asString();
  43. if(!projectNode["TemplateId"].isNull())
  44. project_.templateId = projectNode["TemplateId"].asString();
  45. if(!projectNode["ClipsParam"].isNull())
  46. project_.clipsParam = projectNode["ClipsParam"].asString();
  47. if(!projectNode["Description"].isNull())
  48. project_.description = projectNode["Description"].asString();
  49. if(!projectNode["CoverURL"].isNull())
  50. project_.coverURL = projectNode["CoverURL"].asString();
  51. if(!projectNode["CreateTime"].isNull())
  52. project_.createTime = projectNode["CreateTime"].asString();
  53. if(!projectNode["ModifiedTime"].isNull())
  54. project_.modifiedTime = projectNode["ModifiedTime"].asString();
  55. if(!projectNode["Duration"].isNull())
  56. project_.duration = std::stol(projectNode["Duration"].asString());
  57. if(!projectNode["Status"].isNull())
  58. project_.status = projectNode["Status"].asString();
  59. if(!projectNode["CreateSource"].isNull())
  60. project_.createSource = projectNode["CreateSource"].asString();
  61. if(!projectNode["TemplateType"].isNull())
  62. project_.templateType = projectNode["TemplateType"].asString();
  63. if(!projectNode["FEExtend"].isNull())
  64. project_.fEExtend = projectNode["FEExtend"].asString();
  65. if(!projectNode["ModifiedSource"].isNull())
  66. project_.modifiedSource = projectNode["ModifiedSource"].asString();
  67. if(!projectNode["ProjectType"].isNull())
  68. project_.projectType = projectNode["ProjectType"].asString();
  69. if(!projectNode["BusinessConfig"].isNull())
  70. project_.businessConfig = projectNode["BusinessConfig"].asString();
  71. if(!projectNode["BusinessStatus"].isNull())
  72. project_.businessStatus = projectNode["BusinessStatus"].asString();
  73. if(!projectNode["TimelineConvertStatus"].isNull())
  74. project_.timelineConvertStatus = projectNode["TimelineConvertStatus"].asString();
  75. if(!projectNode["TimelineConvertErrorMessage"].isNull())
  76. project_.timelineConvertErrorMessage = projectNode["TimelineConvertErrorMessage"].asString();
  77. }
  78. GetEditingProjectResult::Project GetEditingProjectResult::getProject()const
  79. {
  80. return project_;
  81. }