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/cdb/v20170320/model/ParamTemplateInfo.h>
  
  using TencentCloud::CoreInternalOutcome;
  using namespace TencentCloud::Cdb::V20170320::Model;
  using namespace rapidjson;
  using namespace std;
  
  ParamTemplateInfo::ParamTemplateInfo() :
      m_templateIdHasBeenSet(false),
      m_nameHasBeenSet(false),
      m_descriptionHasBeenSet(false),
      m_engineVersionHasBeenSet(false)
  {
  }
  
  CoreInternalOutcome ParamTemplateInfo::Deserialize(const Value &value)
  {
      string requestId = "";
  
  
      if (value.HasMember("TemplateId") && !value["TemplateId"].IsNull())
      {
          if (!value["TemplateId"].IsInt64())
          {
              return CoreInternalOutcome(Error("response `ParamTemplateInfo.TemplateId` IsInt64=false incorrectly").SetRequestId(requestId));
          }
          m_templateId = value["TemplateId"].GetInt64();
          m_templateIdHasBeenSet = true;
      }
  
      if (value.HasMember("Name") && !value["Name"].IsNull())
      {
          if (!value["Name"].IsString())
          {
              return CoreInternalOutcome(Error("response `ParamTemplateInfo.Name` IsString=false incorrectly").SetRequestId(requestId));
          }
          m_name = string(value["Name"].GetString());
          m_nameHasBeenSet = true;
      }
  
      if (value.HasMember("Description") && !value["Description"].IsNull())
      {
          if (!value["Description"].IsString())
          {
              return CoreInternalOutcome(Error("response `ParamTemplateInfo.Description` IsString=false incorrectly").SetRequestId(requestId));
          }
          m_description = string(value["Description"].GetString());
          m_descriptionHasBeenSet = true;
      }
  
      if (value.HasMember("EngineVersion") && !value["EngineVersion"].IsNull())
      {
          if (!value["EngineVersion"].IsString())
          {
              return CoreInternalOutcome(Error("response `ParamTemplateInfo.EngineVersion` IsString=false incorrectly").SetRequestId(requestId));
          }
          m_engineVersion = string(value["EngineVersion"].GetString());
          m_engineVersionHasBeenSet = true;
      }
  
  
      return CoreInternalOutcome(true);
  }
  
  void ParamTemplateInfo::ToJsonObject(Value &value, Document::AllocatorType& allocator) const
  {
  
      if (m_templateIdHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "TemplateId";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, m_templateId, allocator);
      }
  
      if (m_nameHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "Name";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, Value(m_name.c_str(), allocator).Move(), allocator);
      }
  
      if (m_descriptionHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "Description";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, Value(m_description.c_str(), allocator).Move(), allocator);
      }
  
      if (m_engineVersionHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "EngineVersion";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, Value(m_engineVersion.c_str(), allocator).Move(), allocator);
      }
  
  }
  
  
  int64_t ParamTemplateInfo::GetTemplateId() const
  {
      return m_templateId;
  }
  
  void ParamTemplateInfo::SetTemplateId(const int64_t& _templateId)
  {
      m_templateId = _templateId;
      m_templateIdHasBeenSet = true;
  }
  
  bool ParamTemplateInfo::TemplateIdHasBeenSet() const
  {
      return m_templateIdHasBeenSet;
  }
  
  string ParamTemplateInfo::GetName() const
  {
      return m_name;
  }
  
  void ParamTemplateInfo::SetName(const string& _name)
  {
      m_name = _name;
      m_nameHasBeenSet = true;
  }
  
  bool ParamTemplateInfo::NameHasBeenSet() const
  {
      return m_nameHasBeenSet;
  }
  
  string ParamTemplateInfo::GetDescription() const
  {
      return m_description;
  }
  
  void ParamTemplateInfo::SetDescription(const string& _description)
  {
      m_description = _description;
      m_descriptionHasBeenSet = true;
  }
  
  bool ParamTemplateInfo::DescriptionHasBeenSet() const
  {
      return m_descriptionHasBeenSet;
  }
  
  string ParamTemplateInfo::GetEngineVersion() const
  {
      return m_engineVersion;
  }
  
  void ParamTemplateInfo::SetEngineVersion(const string& _engineVersion)
  {
      m_engineVersion = _engineVersion;
      m_engineVersionHasBeenSet = true;
  }
  
  bool ParamTemplateInfo::EngineVersionHasBeenSet() const
  {
      return m_engineVersionHasBeenSet;
  }
  
  