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/bm/v20180423/model/ModifyDeviceAutoRenewFlagRequest.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::Bm::V20180423::Model;
  using namespace rapidjson;
  using namespace std;
  
  ModifyDeviceAutoRenewFlagRequest::ModifyDeviceAutoRenewFlagRequest() :
      m_autoRenewFlagHasBeenSet(false),
      m_instanceIdsHasBeenSet(false)
  {
  }
  
  string ModifyDeviceAutoRenewFlagRequest::ToJsonString() const
  {
      Document d;
      d.SetObject();
      Document::AllocatorType& allocator = d.GetAllocator();
  
  
      if (m_autoRenewFlagHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "AutoRenewFlag";
          iKey.SetString(key.c_str(), allocator);
          d.AddMember(iKey, m_autoRenewFlag, allocator);
      }
  
      if (m_instanceIdsHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "InstanceIds";
          iKey.SetString(key.c_str(), allocator);
          d.AddMember(iKey, Value(kArrayType).Move(), allocator);
  
          for (auto itr = m_instanceIds.begin(); itr != m_instanceIds.end(); ++itr)
          {
              d[key.c_str()].PushBack(Value().SetString((*itr).c_str(), allocator), allocator);
          }
      }
  
  
      StringBuffer buffer;
      Writer<StringBuffer> writer(buffer);
      d.Accept(writer);
      return buffer.GetString();
  }
  
  
  uint64_t ModifyDeviceAutoRenewFlagRequest::GetAutoRenewFlag() const
  {
      return m_autoRenewFlag;
  }
  
  void ModifyDeviceAutoRenewFlagRequest::SetAutoRenewFlag(const uint64_t& _autoRenewFlag)
  {
      m_autoRenewFlag = _autoRenewFlag;
      m_autoRenewFlagHasBeenSet = true;
  }
  
  bool ModifyDeviceAutoRenewFlagRequest::AutoRenewFlagHasBeenSet() const
  {
      return m_autoRenewFlagHasBeenSet;
  }
  
  vector<string> ModifyDeviceAutoRenewFlagRequest::GetInstanceIds() const
  {
      return m_instanceIds;
  }
  
  void ModifyDeviceAutoRenewFlagRequest::SetInstanceIds(const vector<string>& _instanceIds)
  {
      m_instanceIds = _instanceIds;
      m_instanceIdsHasBeenSet = true;
  }
  
  bool ModifyDeviceAutoRenewFlagRequest::InstanceIdsHasBeenSet() const
  {
      return m_instanceIdsHasBeenSet;
  }
  
  
  