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/tci/v20190318/model/SuspectedInfo.h>
  
  using TencentCloud::CoreInternalOutcome;
  using namespace TencentCloud::Tci::V20190318::Model;
  using namespace std;
  
  SuspectedInfo::SuspectedInfo() :
      m_faceSetHasBeenSet(false),
      m_personIdHasBeenSet(false)
  {
  }
  
  CoreInternalOutcome SuspectedInfo::Deserialize(const rapidjson::Value &value)
  {
      string requestId = "";
  
  
      if (value.HasMember("FaceSet") && !value["FaceSet"].IsNull())
      {
          if (!value["FaceSet"].IsArray())
              return CoreInternalOutcome(Error("response `SuspectedInfo.FaceSet` is not array type"));
  
          const rapidjson::Value &tmpValue = value["FaceSet"];
          for (rapidjson::Value::ConstValueIterator itr = tmpValue.Begin(); itr != tmpValue.End(); ++itr)
          {
              FrameInfo item;
              CoreInternalOutcome outcome = item.Deserialize(*itr);
              if (!outcome.IsSuccess())
              {
                  outcome.GetError().SetRequestId(requestId);
                  return outcome;
              }
              m_faceSet.push_back(item);
          }
          m_faceSetHasBeenSet = true;
      }
  
      if (value.HasMember("PersonId") && !value["PersonId"].IsNull())
      {
          if (!value["PersonId"].IsString())
          {
              return CoreInternalOutcome(Error("response `SuspectedInfo.PersonId` IsString=false incorrectly").SetRequestId(requestId));
          }
          m_personId = string(value["PersonId"].GetString());
          m_personIdHasBeenSet = true;
      }
  
  
      return CoreInternalOutcome(true);
  }
  
  void SuspectedInfo::ToJsonObject(rapidjson::Value &value, rapidjson::Document::AllocatorType& allocator) const
  {
  
      if (m_faceSetHasBeenSet)
      {
          rapidjson::Value iKey(rapidjson::kStringType);
          string key = "FaceSet";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, rapidjson::Value(rapidjson::kArrayType).Move(), allocator);
  
          int i=0;
          for (auto itr = m_faceSet.begin(); itr != m_faceSet.end(); ++itr, ++i)
          {
              value[key.c_str()].PushBack(rapidjson::Value(rapidjson::kObjectType).Move(), allocator);
              (*itr).ToJsonObject(value[key.c_str()][i], allocator);
          }
      }
  
      if (m_personIdHasBeenSet)
      {
          rapidjson::Value iKey(rapidjson::kStringType);
          string key = "PersonId";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, rapidjson::Value(m_personId.c_str(), allocator).Move(), allocator);
      }
  
  }
  
  
  vector<FrameInfo> SuspectedInfo::GetFaceSet() const
  {
      return m_faceSet;
  }
  
  void SuspectedInfo::SetFaceSet(const vector<FrameInfo>& _faceSet)
  {
      m_faceSet = _faceSet;
      m_faceSetHasBeenSet = true;
  }
  
  bool SuspectedInfo::FaceSetHasBeenSet() const
  {
      return m_faceSetHasBeenSet;
  }
  
  string SuspectedInfo::GetPersonId() const
  {
      return m_personId;
  }
  
  void SuspectedInfo::SetPersonId(const string& _personId)
  {
      m_personId = _personId;
      m_personIdHasBeenSet = true;
  }
  
  bool SuspectedInfo::PersonIdHasBeenSet() const
  {
      return m_personIdHasBeenSet;
  }
  
  