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/FaceAttrResult.h>
  
  using TencentCloud::CoreInternalOutcome;
  using namespace TencentCloud::Tci::V20190318::Model;
  using namespace std;
  
  FaceAttrResult::FaceAttrResult() :
      m_ageHasBeenSet(false),
      m_sexHasBeenSet(false)
  {
  }
  
  CoreInternalOutcome FaceAttrResult::Deserialize(const rapidjson::Value &value)
  {
      string requestId = "";
  
  
      if (value.HasMember("Age") && !value["Age"].IsNull())
      {
          if (!value["Age"].IsInt64())
          {
              return CoreInternalOutcome(Core::Error("response `FaceAttrResult.Age` IsInt64=false incorrectly").SetRequestId(requestId));
          }
          m_age = value["Age"].GetInt64();
          m_ageHasBeenSet = true;
      }
  
      if (value.HasMember("Sex") && !value["Sex"].IsNull())
      {
          if (!value["Sex"].IsString())
          {
              return CoreInternalOutcome(Core::Error("response `FaceAttrResult.Sex` IsString=false incorrectly").SetRequestId(requestId));
          }
          m_sex = string(value["Sex"].GetString());
          m_sexHasBeenSet = true;
      }
  
  
      return CoreInternalOutcome(true);
  }
  
  void FaceAttrResult::ToJsonObject(rapidjson::Value &value, rapidjson::Document::AllocatorType& allocator) const
  {
  
      if (m_ageHasBeenSet)
      {
          rapidjson::Value iKey(rapidjson::kStringType);
          string key = "Age";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, m_age, allocator);
      }
  
      if (m_sexHasBeenSet)
      {
          rapidjson::Value iKey(rapidjson::kStringType);
          string key = "Sex";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, rapidjson::Value(m_sex.c_str(), allocator).Move(), allocator);
      }
  
  }
  
  
  int64_t FaceAttrResult::GetAge() const
  {
      return m_age;
  }
  
  void FaceAttrResult::SetAge(const int64_t& _age)
  {
      m_age = _age;
      m_ageHasBeenSet = true;
  }
  
  bool FaceAttrResult::AgeHasBeenSet() const
  {
      return m_ageHasBeenSet;
  }
  
  string FaceAttrResult::GetSex() const
  {
      return m_sex;
  }
  
  void FaceAttrResult::SetSex(const string& _sex)
  {
      m_sex = _sex;
      m_sexHasBeenSet = true;
  }
  
  bool FaceAttrResult::SexHasBeenSet() const
  {
      return m_sexHasBeenSet;
  }
  
  