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/vpc/v20170312/model/ResetRoutesRequest.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::Vpc::V20170312::Model;
  using namespace std;
  
  ResetRoutesRequest::ResetRoutesRequest() :
      m_routeTableIdHasBeenSet(false),
      m_routeTableNameHasBeenSet(false),
      m_routesHasBeenSet(false)
  {
  }
  
  string ResetRoutesRequest::ToJsonString() const
  {
      rapidjson::Document d;
      d.SetObject();
      rapidjson::Document::AllocatorType& allocator = d.GetAllocator();
  
  
      if (m_routeTableIdHasBeenSet)
      {
          rapidjson::Value iKey(rapidjson::kStringType);
          string key = "RouteTableId";
          iKey.SetString(key.c_str(), allocator);
          d.AddMember(iKey, rapidjson::Value(m_routeTableId.c_str(), allocator).Move(), allocator);
      }
  
      if (m_routeTableNameHasBeenSet)
      {
          rapidjson::Value iKey(rapidjson::kStringType);
          string key = "RouteTableName";
          iKey.SetString(key.c_str(), allocator);
          d.AddMember(iKey, rapidjson::Value(m_routeTableName.c_str(), allocator).Move(), allocator);
      }
  
      if (m_routesHasBeenSet)
      {
          rapidjson::Value iKey(rapidjson::kStringType);
          string key = "Routes";
          iKey.SetString(key.c_str(), allocator);
          d.AddMember(iKey, rapidjson::Value(rapidjson::kArrayType).Move(), allocator);
  
          int i=0;
          for (auto itr = m_routes.begin(); itr != m_routes.end(); ++itr, ++i)
          {
              d[key.c_str()].PushBack(rapidjson::Value(rapidjson::kObjectType).Move(), allocator);
              (*itr).ToJsonObject(d[key.c_str()][i], allocator);
          }
      }
  
  
      rapidjson::StringBuffer buffer;
      rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
      d.Accept(writer);
      return buffer.GetString();
  }
  
  
  string ResetRoutesRequest::GetRouteTableId() const
  {
      return m_routeTableId;
  }
  
  void ResetRoutesRequest::SetRouteTableId(const string& _routeTableId)
  {
      m_routeTableId = _routeTableId;
      m_routeTableIdHasBeenSet = true;
  }
  
  bool ResetRoutesRequest::RouteTableIdHasBeenSet() const
  {
      return m_routeTableIdHasBeenSet;
  }
  
  string ResetRoutesRequest::GetRouteTableName() const
  {
      return m_routeTableName;
  }
  
  void ResetRoutesRequest::SetRouteTableName(const string& _routeTableName)
  {
      m_routeTableName = _routeTableName;
      m_routeTableNameHasBeenSet = true;
  }
  
  bool ResetRoutesRequest::RouteTableNameHasBeenSet() const
  {
      return m_routeTableNameHasBeenSet;
  }
  
  vector<Route> ResetRoutesRequest::GetRoutes() const
  {
      return m_routes;
  }
  
  void ResetRoutesRequest::SetRoutes(const vector<Route>& _routes)
  {
      m_routes = _routes;
      m_routesHasBeenSet = true;
  }
  
  bool ResetRoutesRequest::RoutesHasBeenSet() const
  {
      return m_routesHasBeenSet;
  }
  
  
  