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/dbbrain/v20191016/model/DescribeSlowLogTopSqlsRequest.h>
  #include <tencentcloud/core/utils/rapidjson/document.h>
  #include <tencentcloud/core/utils/rapidjson/writer.h>
  #include <tencentcloud/core/utils/rapidjson/stringbuffer.h>
  
  using namespace TencentCloud::Dbbrain::V20191016::Model;
  using namespace rapidjson;
  using namespace std;
  
  DescribeSlowLogTopSqlsRequest::DescribeSlowLogTopSqlsRequest() :
      m_instanceIdHasBeenSet(false),
      m_startTimeHasBeenSet(false),
      m_endTimeHasBeenSet(false),
      m_sortByHasBeenSet(false),
      m_orderByHasBeenSet(false),
      m_limitHasBeenSet(false),
      m_offsetHasBeenSet(false)
  {
  }
  
  string DescribeSlowLogTopSqlsRequest::ToJsonString() const
  {
      Document d;
      d.SetObject();
      Document::AllocatorType& allocator = d.GetAllocator();
  
  
      if (m_instanceIdHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "InstanceId";
          iKey.SetString(key.c_str(), allocator);
          d.AddMember(iKey, Value(m_instanceId.c_str(), allocator).Move(), allocator);
      }
  
      if (m_startTimeHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "StartTime";
          iKey.SetString(key.c_str(), allocator);
          d.AddMember(iKey, Value(m_startTime.c_str(), allocator).Move(), allocator);
      }
  
      if (m_endTimeHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "EndTime";
          iKey.SetString(key.c_str(), allocator);
          d.AddMember(iKey, Value(m_endTime.c_str(), allocator).Move(), allocator);
      }
  
      if (m_sortByHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "SortBy";
          iKey.SetString(key.c_str(), allocator);
          d.AddMember(iKey, Value(m_sortBy.c_str(), allocator).Move(), allocator);
      }
  
      if (m_orderByHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "OrderBy";
          iKey.SetString(key.c_str(), allocator);
          d.AddMember(iKey, Value(m_orderBy.c_str(), allocator).Move(), allocator);
      }
  
      if (m_limitHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "Limit";
          iKey.SetString(key.c_str(), allocator);
          d.AddMember(iKey, m_limit, allocator);
      }
  
      if (m_offsetHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "Offset";
          iKey.SetString(key.c_str(), allocator);
          d.AddMember(iKey, m_offset, allocator);
      }
  
  
      StringBuffer buffer;
      Writer<StringBuffer> writer(buffer);
      d.Accept(writer);
      return buffer.GetString();
  }
  
  
  string DescribeSlowLogTopSqlsRequest::GetInstanceId() const
  {
      return m_instanceId;
  }
  
  void DescribeSlowLogTopSqlsRequest::SetInstanceId(const string& _instanceId)
  {
      m_instanceId = _instanceId;
      m_instanceIdHasBeenSet = true;
  }
  
  bool DescribeSlowLogTopSqlsRequest::InstanceIdHasBeenSet() const
  {
      return m_instanceIdHasBeenSet;
  }
  
  string DescribeSlowLogTopSqlsRequest::GetStartTime() const
  {
      return m_startTime;
  }
  
  void DescribeSlowLogTopSqlsRequest::SetStartTime(const string& _startTime)
  {
      m_startTime = _startTime;
      m_startTimeHasBeenSet = true;
  }
  
  bool DescribeSlowLogTopSqlsRequest::StartTimeHasBeenSet() const
  {
      return m_startTimeHasBeenSet;
  }
  
  string DescribeSlowLogTopSqlsRequest::GetEndTime() const
  {
      return m_endTime;
  }
  
  void DescribeSlowLogTopSqlsRequest::SetEndTime(const string& _endTime)
  {
      m_endTime = _endTime;
      m_endTimeHasBeenSet = true;
  }
  
  bool DescribeSlowLogTopSqlsRequest::EndTimeHasBeenSet() const
  {
      return m_endTimeHasBeenSet;
  }
  
  string DescribeSlowLogTopSqlsRequest::GetSortBy() const
  {
      return m_sortBy;
  }
  
  void DescribeSlowLogTopSqlsRequest::SetSortBy(const string& _sortBy)
  {
      m_sortBy = _sortBy;
      m_sortByHasBeenSet = true;
  }
  
  bool DescribeSlowLogTopSqlsRequest::SortByHasBeenSet() const
  {
      return m_sortByHasBeenSet;
  }
  
  string DescribeSlowLogTopSqlsRequest::GetOrderBy() const
  {
      return m_orderBy;
  }
  
  void DescribeSlowLogTopSqlsRequest::SetOrderBy(const string& _orderBy)
  {
      m_orderBy = _orderBy;
      m_orderByHasBeenSet = true;
  }
  
  bool DescribeSlowLogTopSqlsRequest::OrderByHasBeenSet() const
  {
      return m_orderByHasBeenSet;
  }
  
  int64_t DescribeSlowLogTopSqlsRequest::GetLimit() const
  {
      return m_limit;
  }
  
  void DescribeSlowLogTopSqlsRequest::SetLimit(const int64_t& _limit)
  {
      m_limit = _limit;
      m_limitHasBeenSet = true;
  }
  
  bool DescribeSlowLogTopSqlsRequest::LimitHasBeenSet() const
  {
      return m_limitHasBeenSet;
  }
  
  int64_t DescribeSlowLogTopSqlsRequest::GetOffset() const
  {
      return m_offset;
  }
  
  void DescribeSlowLogTopSqlsRequest::SetOffset(const int64_t& _offset)
  {
      m_offset = _offset;
      m_offsetHasBeenSet = true;
  }
  
  bool DescribeSlowLogTopSqlsRequest::OffsetHasBeenSet() const
  {
      return m_offsetHasBeenSet;
  }
  
  
  