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/tcr/v20190924/model/RegistryCondition.h>
  
  using TencentCloud::CoreInternalOutcome;
  using namespace TencentCloud::Tcr::V20190924::Model;
  using namespace std;
  
  RegistryCondition::RegistryCondition() :
      m_typeHasBeenSet(false),
      m_statusHasBeenSet(false),
      m_reasonHasBeenSet(false)
  {
  }
  
  CoreInternalOutcome RegistryCondition::Deserialize(const rapidjson::Value &value)
  {
      string requestId = "";
  
  
      if (value.HasMember("Type") && !value["Type"].IsNull())
      {
          if (!value["Type"].IsString())
          {
              return CoreInternalOutcome(Error("response `RegistryCondition.Type` IsString=false incorrectly").SetRequestId(requestId));
          }
          m_type = string(value["Type"].GetString());
          m_typeHasBeenSet = true;
      }
  
      if (value.HasMember("Status") && !value["Status"].IsNull())
      {
          if (!value["Status"].IsString())
          {
              return CoreInternalOutcome(Error("response `RegistryCondition.Status` IsString=false incorrectly").SetRequestId(requestId));
          }
          m_status = string(value["Status"].GetString());
          m_statusHasBeenSet = true;
      }
  
      if (value.HasMember("Reason") && !value["Reason"].IsNull())
      {
          if (!value["Reason"].IsString())
          {
              return CoreInternalOutcome(Error("response `RegistryCondition.Reason` IsString=false incorrectly").SetRequestId(requestId));
          }
          m_reason = string(value["Reason"].GetString());
          m_reasonHasBeenSet = true;
      }
  
  
      return CoreInternalOutcome(true);
  }
  
  void RegistryCondition::ToJsonObject(rapidjson::Value &value, rapidjson::Document::AllocatorType& allocator) const
  {
  
      if (m_typeHasBeenSet)
      {
          rapidjson::Value iKey(rapidjson::kStringType);
          string key = "Type";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, rapidjson::Value(m_type.c_str(), allocator).Move(), allocator);
      }
  
      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_reasonHasBeenSet)
      {
          rapidjson::Value iKey(rapidjson::kStringType);
          string key = "Reason";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, rapidjson::Value(m_reason.c_str(), allocator).Move(), allocator);
      }
  
  }
  
  
  string RegistryCondition::GetType() const
  {
      return m_type;
  }
  
  void RegistryCondition::SetType(const string& _type)
  {
      m_type = _type;
      m_typeHasBeenSet = true;
  }
  
  bool RegistryCondition::TypeHasBeenSet() const
  {
      return m_typeHasBeenSet;
  }
  
  string RegistryCondition::GetStatus() const
  {
      return m_status;
  }
  
  void RegistryCondition::SetStatus(const string& _status)
  {
      m_status = _status;
      m_statusHasBeenSet = true;
  }
  
  bool RegistryCondition::StatusHasBeenSet() const
  {
      return m_statusHasBeenSet;
  }
  
  string RegistryCondition::GetReason() const
  {
      return m_reason;
  }
  
  void RegistryCondition::SetReason(const string& _reason)
  {
      m_reason = _reason;
      m_reasonHasBeenSet = true;
  }
  
  bool RegistryCondition::ReasonHasBeenSet() const
  {
      return m_reasonHasBeenSet;
  }
  
  