text: /*
   * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *    http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  #include <tencentcloud/vod/v20180717/model/AiReviewTaskPoliticalOcrResult.h>
  
  using TencentCloud::CoreInternalOutcome;
  using namespace TencentCloud::Vod::V20180717::Model;
  using namespace std;
  
  AiReviewTaskPoliticalOcrResult::AiReviewTaskPoliticalOcrResult() :
      m_statusHasBeenSet(false),
      m_errCodeExtHasBeenSet(false),
      m_errCodeHasBeenSet(false),
      m_messageHasBeenSet(false),
      m_inputHasBeenSet(false),
      m_outputHasBeenSet(false)
  {
  }
  
  CoreInternalOutcome AiReviewTaskPoliticalOcrResult::Deserialize(const rapidjson::Value &value)
  {
      string requestId = "";
  
  
      if (value.HasMember("Status") && !value["Status"].IsNull())
      {
          if (!value["Status"].IsString())
          {
              return CoreInternalOutcome(Core::Error("response `AiReviewTaskPoliticalOcrResult.Status` IsString=false incorrectly").SetRequestId(requestId));
          }
          m_status = string(value["Status"].GetString());
          m_statusHasBeenSet = true;
      }
  
      if (value.HasMember("ErrCodeExt") && !value["ErrCodeExt"].IsNull())
      {
          if (!value["ErrCodeExt"].IsString())
          {
              return CoreInternalOutcome(Core::Error("response `AiReviewTaskPoliticalOcrResult.ErrCodeExt` IsString=false incorrectly").SetRequestId(requestId));
          }
          m_errCodeExt = string(value["ErrCodeExt"].GetString());
          m_errCodeExtHasBeenSet = true;
      }
  
      if (value.HasMember("ErrCode") && !value["ErrCode"].IsNull())
      {
          if (!value["ErrCode"].IsInt64())
          {
              return CoreInternalOutcome(Core::Error("response `AiReviewTaskPoliticalOcrResult.ErrCode` IsInt64=false incorrectly").SetRequestId(requestId));
          }
          m_errCode = value["ErrCode"].GetInt64();
          m_errCodeHasBeenSet = true;
      }
  
      if (value.HasMember("Message") && !value["Message"].IsNull())
      {
          if (!value["Message"].IsString())
          {
              return CoreInternalOutcome(Core::Error("response `AiReviewTaskPoliticalOcrResult.Message` IsString=false incorrectly").SetRequestId(requestId));
          }
          m_message = string(value["Message"].GetString());
          m_messageHasBeenSet = true;
      }
  
      if (value.HasMember("Input") && !value["Input"].IsNull())
      {
          if (!value["Input"].IsObject())
          {
              return CoreInternalOutcome(Core::Error("response `AiReviewTaskPoliticalOcrResult.Input` is not object type").SetRequestId(requestId));
          }
  
          CoreInternalOutcome outcome = m_input.Deserialize(value["Input"]);
          if (!outcome.IsSuccess())
          {
              outcome.GetError().SetRequestId(requestId);
              return outcome;
          }
  
          m_inputHasBeenSet = true;
      }
  
      if (value.HasMember("Output") && !value["Output"].IsNull())
      {
          if (!value["Output"].IsObject())
          {
              return CoreInternalOutcome(Core::Error("response `AiReviewTaskPoliticalOcrResult.Output` is not object type").SetRequestId(requestId));
          }
  
          CoreInternalOutcome outcome = m_output.Deserialize(value["Output"]);
          if (!outcome.IsSuccess())
          {
              outcome.GetError().SetRequestId(requestId);
              return outcome;
          }
  
          m_outputHasBeenSet = true;
      }
  
  
      return CoreInternalOutcome(true);
  }
  
  void AiReviewTaskPoliticalOcrResult::ToJsonObject(rapidjson::Value &value, rapidjson::Document::AllocatorType& allocator) const
  {
  
      if (m_statusHasBeenSet)
      {
          rapidjson::Value iKey(rapidjson::kStringType);
          string key = "Status";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, rapidjson::Value(m_status.c_str(), allocator).Move(), allocator);
      }
  
      if (m_errCodeExtHasBeenSet)
      {
          rapidjson::Value iKey(rapidjson::kStringType);
          string key = "ErrCodeExt";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, rapidjson::Value(m_errCodeExt.c_str(), allocator).Move(), allocator);
      }
  
      if (m_errCodeHasBeenSet)
      {
          rapidjson::Value iKey(rapidjson::kStringType);
          string key = "ErrCode";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, m_errCode, allocator);
      }
  
      if (m_messageHasBeenSet)
      {
          rapidjson::Value iKey(rapidjson::kStringType);
          string key = "Message";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, rapidjson::Value(m_message.c_str(), allocator).Move(), allocator);
      }
  
      if (m_inputHasBeenSet)
      {
          rapidjson::Value iKey(rapidjson::kStringType);
          string key = "Input";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, rapidjson::Value(rapidjson::kObjectType).Move(), allocator);
          m_input.ToJsonObject(value[key.c_str()], allocator);
      }
  
      if (m_outputHasBeenSet)
      {
          rapidjson::Value iKey(rapidjson::kStringType);
          string key = "Output";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, rapidjson::Value(rapidjson::kObjectType).Move(), allocator);
          m_output.ToJsonObject(value[key.c_str()], allocator);
      }
  
  }
  
  
  string AiReviewTaskPoliticalOcrResult::GetStatus() const
  {
      return m_status;
  }
  
  void AiReviewTaskPoliticalOcrResult::SetStatus(const string& _status)
  {
      m_status = _status;
      m_statusHasBeenSet = true;
  }
  
  bool AiReviewTaskPoliticalOcrResult::StatusHasBeenSet() const
  {
      return m_statusHasBeenSet;
  }
  
  string AiReviewTaskPoliticalOcrResult::GetErrCodeExt() const
  {
      return m_errCodeExt;
  }
  
  void AiReviewTaskPoliticalOcrResult::SetErrCodeExt(const string& _errCodeExt)
  {
      m_errCodeExt = _errCodeExt;
      m_errCodeExtHasBeenSet = true;
  }
  
  bool AiReviewTaskPoliticalOcrResult::ErrCodeExtHasBeenSet() const
  {
      return m_errCodeExtHasBeenSet;
  }
  
  int64_t AiReviewTaskPoliticalOcrResult::GetErrCode() const
  {
      return m_errCode;
  }
  
  void AiReviewTaskPoliticalOcrResult::SetErrCode(const int64_t& _errCode)
  {
      m_errCode = _errCode;
      m_errCodeHasBeenSet = true;
  }
  
  bool AiReviewTaskPoliticalOcrResult::ErrCodeHasBeenSet() const
  {
      return m_errCodeHasBeenSet;
  }
  
  string AiReviewTaskPoliticalOcrResult::GetMessage() const
  {
      return m_message;
  }
  
  void AiReviewTaskPoliticalOcrResult::SetMessage(const string& _message)
  {
      m_message = _message;
      m_messageHasBeenSet = true;
  }
  
  bool AiReviewTaskPoliticalOcrResult::MessageHasBeenSet() const
  {
      return m_messageHasBeenSet;
  }
  
  AiReviewPoliticalOcrTaskInput AiReviewTaskPoliticalOcrResult::GetInput() const
  {
      return m_input;
  }
  
  void AiReviewTaskPoliticalOcrResult::SetInput(const AiReviewPoliticalOcrTaskInput& _input)
  {
      m_input = _input;
      m_inputHasBeenSet = true;
  }
  
  bool AiReviewTaskPoliticalOcrResult::InputHasBeenSet() const
  {
      return m_inputHasBeenSet;
  }
  
  AiReviewPoliticalOcrTaskOutput AiReviewTaskPoliticalOcrResult::GetOutput() const
  {
      return m_output;
  }
  
  void AiReviewTaskPoliticalOcrResult::SetOutput(const AiReviewPoliticalOcrTaskOutput& _output)
  {
      m_output = _output;
      m_outputHasBeenSet = true;
  }
  
  bool AiReviewTaskPoliticalOcrResult::OutputHasBeenSet() const
  {
      return m_outputHasBeenSet;
  }
  
  