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/redis/v20180412/model/InstanceIntegerParam.h>
  
  using TencentCloud::CoreInternalOutcome;
  using namespace TencentCloud::Redis::V20180412::Model;
  using namespace rapidjson;
  using namespace std;
  
  InstanceIntegerParam::InstanceIntegerParam() :
      m_paramNameHasBeenSet(false),
      m_valueTypeHasBeenSet(false),
      m_needRestartHasBeenSet(false),
      m_defaultValueHasBeenSet(false),
      m_currentValueHasBeenSet(false),
      m_tipsHasBeenSet(false),
      m_minHasBeenSet(false),
      m_maxHasBeenSet(false),
      m_statusHasBeenSet(false)
  {
  }
  
  CoreInternalOutcome InstanceIntegerParam::Deserialize(const Value &value)
  {
      string requestId = "";
  
  
      if (value.HasMember("ParamName") && !value["ParamName"].IsNull())
      {
          if (!value["ParamName"].IsString())
          {
              return CoreInternalOutcome(Error("response `InstanceIntegerParam.ParamName` IsString=false incorrectly").SetRequestId(requestId));
          }
          m_paramName = string(value["ParamName"].GetString());
          m_paramNameHasBeenSet = true;
      }
  
      if (value.HasMember("ValueType") && !value["ValueType"].IsNull())
      {
          if (!value["ValueType"].IsString())
          {
              return CoreInternalOutcome(Error("response `InstanceIntegerParam.ValueType` IsString=false incorrectly").SetRequestId(requestId));
          }
          m_valueType = string(value["ValueType"].GetString());
          m_valueTypeHasBeenSet = true;
      }
  
      if (value.HasMember("NeedRestart") && !value["NeedRestart"].IsNull())
      {
          if (!value["NeedRestart"].IsString())
          {
              return CoreInternalOutcome(Error("response `InstanceIntegerParam.NeedRestart` IsString=false incorrectly").SetRequestId(requestId));
          }
          m_needRestart = string(value["NeedRestart"].GetString());
          m_needRestartHasBeenSet = true;
      }
  
      if (value.HasMember("DefaultValue") && !value["DefaultValue"].IsNull())
      {
          if (!value["DefaultValue"].IsString())
          {
              return CoreInternalOutcome(Error("response `InstanceIntegerParam.DefaultValue` IsString=false incorrectly").SetRequestId(requestId));
          }
          m_defaultValue = string(value["DefaultValue"].GetString());
          m_defaultValueHasBeenSet = true;
      }
  
      if (value.HasMember("CurrentValue") && !value["CurrentValue"].IsNull())
      {
          if (!value["CurrentValue"].IsString())
          {
              return CoreInternalOutcome(Error("response `InstanceIntegerParam.CurrentValue` IsString=false incorrectly").SetRequestId(requestId));
          }
          m_currentValue = string(value["CurrentValue"].GetString());
          m_currentValueHasBeenSet = true;
      }
  
      if (value.HasMember("Tips") && !value["Tips"].IsNull())
      {
          if (!value["Tips"].IsString())
          {
              return CoreInternalOutcome(Error("response `InstanceIntegerParam.Tips` IsString=false incorrectly").SetRequestId(requestId));
          }
          m_tips = string(value["Tips"].GetString());
          m_tipsHasBeenSet = true;
      }
  
      if (value.HasMember("Min") && !value["Min"].IsNull())
      {
          if (!value["Min"].IsString())
          {
              return CoreInternalOutcome(Error("response `InstanceIntegerParam.Min` IsString=false incorrectly").SetRequestId(requestId));
          }
          m_min = string(value["Min"].GetString());
          m_minHasBeenSet = true;
      }
  
      if (value.HasMember("Max") && !value["Max"].IsNull())
      {
          if (!value["Max"].IsString())
          {
              return CoreInternalOutcome(Error("response `InstanceIntegerParam.Max` IsString=false incorrectly").SetRequestId(requestId));
          }
          m_max = string(value["Max"].GetString());
          m_maxHasBeenSet = true;
      }
  
      if (value.HasMember("Status") && !value["Status"].IsNull())
      {
          if (!value["Status"].IsInt64())
          {
              return CoreInternalOutcome(Error("response `InstanceIntegerParam.Status` IsInt64=false incorrectly").SetRequestId(requestId));
          }
          m_status = value["Status"].GetInt64();
          m_statusHasBeenSet = true;
      }
  
  
      return CoreInternalOutcome(true);
  }
  
  void InstanceIntegerParam::ToJsonObject(Value &value, Document::AllocatorType& allocator) const
  {
  
      if (m_paramNameHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "ParamName";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, Value(m_paramName.c_str(), allocator).Move(), allocator);
      }
  
      if (m_valueTypeHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "ValueType";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, Value(m_valueType.c_str(), allocator).Move(), allocator);
      }
  
      if (m_needRestartHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "NeedRestart";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, Value(m_needRestart.c_str(), allocator).Move(), allocator);
      }
  
      if (m_defaultValueHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "DefaultValue";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, Value(m_defaultValue.c_str(), allocator).Move(), allocator);
      }
  
      if (m_currentValueHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "CurrentValue";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, Value(m_currentValue.c_str(), allocator).Move(), allocator);
      }
  
      if (m_tipsHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "Tips";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, Value(m_tips.c_str(), allocator).Move(), allocator);
      }
  
      if (m_minHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "Min";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, Value(m_min.c_str(), allocator).Move(), allocator);
      }
  
      if (m_maxHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "Max";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, Value(m_max.c_str(), allocator).Move(), allocator);
      }
  
      if (m_statusHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "Status";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, m_status, allocator);
      }
  
  }
  
  
  string InstanceIntegerParam::GetParamName() const
  {
      return m_paramName;
  }
  
  void InstanceIntegerParam::SetParamName(const string& _paramName)
  {
      m_paramName = _paramName;
      m_paramNameHasBeenSet = true;
  }
  
  bool InstanceIntegerParam::ParamNameHasBeenSet() const
  {
      return m_paramNameHasBeenSet;
  }
  
  string InstanceIntegerParam::GetValueType() const
  {
      return m_valueType;
  }
  
  void InstanceIntegerParam::SetValueType(const string& _valueType)
  {
      m_valueType = _valueType;
      m_valueTypeHasBeenSet = true;
  }
  
  bool InstanceIntegerParam::ValueTypeHasBeenSet() const
  {
      return m_valueTypeHasBeenSet;
  }
  
  string InstanceIntegerParam::GetNeedRestart() const
  {
      return m_needRestart;
  }
  
  void InstanceIntegerParam::SetNeedRestart(const string& _needRestart)
  {
      m_needRestart = _needRestart;
      m_needRestartHasBeenSet = true;
  }
  
  bool InstanceIntegerParam::NeedRestartHasBeenSet() const
  {
      return m_needRestartHasBeenSet;
  }
  
  string InstanceIntegerParam::GetDefaultValue() const
  {
      return m_defaultValue;
  }
  
  void InstanceIntegerParam::SetDefaultValue(const string& _defaultValue)
  {
      m_defaultValue = _defaultValue;
      m_defaultValueHasBeenSet = true;
  }
  
  bool InstanceIntegerParam::DefaultValueHasBeenSet() const
  {
      return m_defaultValueHasBeenSet;
  }
  
  string InstanceIntegerParam::GetCurrentValue() const
  {
      return m_currentValue;
  }
  
  void InstanceIntegerParam::SetCurrentValue(const string& _currentValue)
  {
      m_currentValue = _currentValue;
      m_currentValueHasBeenSet = true;
  }
  
  bool InstanceIntegerParam::CurrentValueHasBeenSet() const
  {
      return m_currentValueHasBeenSet;
  }
  
  string InstanceIntegerParam::GetTips() const
  {
      return m_tips;
  }
  
  void InstanceIntegerParam::SetTips(const string& _tips)
  {
      m_tips = _tips;
      m_tipsHasBeenSet = true;
  }
  
  bool InstanceIntegerParam::TipsHasBeenSet() const
  {
      return m_tipsHasBeenSet;
  }
  
  string InstanceIntegerParam::GetMin() const
  {
      return m_min;
  }
  
  void InstanceIntegerParam::SetMin(const string& _min)
  {
      m_min = _min;
      m_minHasBeenSet = true;
  }
  
  bool InstanceIntegerParam::MinHasBeenSet() const
  {
      return m_minHasBeenSet;
  }
  
  string InstanceIntegerParam::GetMax() const
  {
      return m_max;
  }
  
  void InstanceIntegerParam::SetMax(const string& _max)
  {
      m_max = _max;
      m_maxHasBeenSet = true;
  }
  
  bool InstanceIntegerParam::MaxHasBeenSet() const
  {
      return m_maxHasBeenSet;
  }
  
  int64_t InstanceIntegerParam::GetStatus() const
  {
      return m_status;
  }
  
  void InstanceIntegerParam::SetStatus(const int64_t& _status)
  {
      m_status = _status;
      m_statusHasBeenSet = true;
  }
  
  bool InstanceIntegerParam::StatusHasBeenSet() const
  {
      return m_statusHasBeenSet;
  }
  
  