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/tcaplusdb/v20190823/model/DescribeTableGroupsRequest.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::Tcaplusdb::V20190823::Model;
  using namespace rapidjson;
  using namespace std;
  
  DescribeTableGroupsRequest::DescribeTableGroupsRequest() :
      m_clusterIdHasBeenSet(false),
      m_tableGroupIdsHasBeenSet(false),
      m_filtersHasBeenSet(false),
      m_offsetHasBeenSet(false),
      m_limitHasBeenSet(false)
  {
  }
  
  string DescribeTableGroupsRequest::ToJsonString() const
  {
      Document d;
      d.SetObject();
      Document::AllocatorType& allocator = d.GetAllocator();
  
  
      if (m_clusterIdHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "ClusterId";
          iKey.SetString(key.c_str(), allocator);
          d.AddMember(iKey, Value(m_clusterId.c_str(), allocator).Move(), allocator);
      }
  
      if (m_tableGroupIdsHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "TableGroupIds";
          iKey.SetString(key.c_str(), allocator);
          d.AddMember(iKey, Value(kArrayType).Move(), allocator);
  
          for (auto itr = m_tableGroupIds.begin(); itr != m_tableGroupIds.end(); ++itr)
          {
              d[key.c_str()].PushBack(Value().SetString((*itr).c_str(), allocator), allocator);
          }
      }
  
      if (m_filtersHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "Filters";
          iKey.SetString(key.c_str(), allocator);
          d.AddMember(iKey, Value(kArrayType).Move(), allocator);
  
          int i=0;
          for (auto itr = m_filters.begin(); itr != m_filters.end(); ++itr, ++i)
          {
              d[key.c_str()].PushBack(Value(kObjectType).Move(), allocator);
              (*itr).ToJsonObject(d[key.c_str()][i], allocator);
          }
      }
  
      if (m_offsetHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "Offset";
          iKey.SetString(key.c_str(), allocator);
          d.AddMember(iKey, m_offset, allocator);
      }
  
      if (m_limitHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "Limit";
          iKey.SetString(key.c_str(), allocator);
          d.AddMember(iKey, m_limit, allocator);
      }
  
  
      StringBuffer buffer;
      Writer<StringBuffer> writer(buffer);
      d.Accept(writer);
      return buffer.GetString();
  }
  
  
  string DescribeTableGroupsRequest::GetClusterId() const
  {
      return m_clusterId;
  }
  
  void DescribeTableGroupsRequest::SetClusterId(const string& _clusterId)
  {
      m_clusterId = _clusterId;
      m_clusterIdHasBeenSet = true;
  }
  
  bool DescribeTableGroupsRequest::ClusterIdHasBeenSet() const
  {
      return m_clusterIdHasBeenSet;
  }
  
  vector<string> DescribeTableGroupsRequest::GetTableGroupIds() const
  {
      return m_tableGroupIds;
  }
  
  void DescribeTableGroupsRequest::SetTableGroupIds(const vector<string>& _tableGroupIds)
  {
      m_tableGroupIds = _tableGroupIds;
      m_tableGroupIdsHasBeenSet = true;
  }
  
  bool DescribeTableGroupsRequest::TableGroupIdsHasBeenSet() const
  {
      return m_tableGroupIdsHasBeenSet;
  }
  
  vector<Filter> DescribeTableGroupsRequest::GetFilters() const
  {
      return m_filters;
  }
  
  void DescribeTableGroupsRequest::SetFilters(const vector<Filter>& _filters)
  {
      m_filters = _filters;
      m_filtersHasBeenSet = true;
  }
  
  bool DescribeTableGroupsRequest::FiltersHasBeenSet() const
  {
      return m_filtersHasBeenSet;
  }
  
  int64_t DescribeTableGroupsRequest::GetOffset() const
  {
      return m_offset;
  }
  
  void DescribeTableGroupsRequest::SetOffset(const int64_t& _offset)
  {
      m_offset = _offset;
      m_offsetHasBeenSet = true;
  }
  
  bool DescribeTableGroupsRequest::OffsetHasBeenSet() const
  {
      return m_offsetHasBeenSet;
  }
  
  int64_t DescribeTableGroupsRequest::GetLimit() const
  {
      return m_limit;
  }
  
  void DescribeTableGroupsRequest::SetLimit(const int64_t& _limit)
  {
      m_limit = _limit;
      m_limitHasBeenSet = true;
  }
  
  bool DescribeTableGroupsRequest::LimitHasBeenSet() const
  {
      return m_limitHasBeenSet;
  }
  
  
  