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/batch/v20170312/model/CpmVirtualPrivateCloud.h>
  
  using TencentCloud::CoreInternalOutcome;
  using namespace TencentCloud::Batch::V20170312::Model;
  using namespace std;
  
  CpmVirtualPrivateCloud::CpmVirtualPrivateCloud() :
      m_vpcIdHasBeenSet(false),
      m_subnetIdHasBeenSet(false)
  {
  }
  
  CoreInternalOutcome CpmVirtualPrivateCloud::Deserialize(const rapidjson::Value &value)
  {
      string requestId = "";
  
  
      if (value.HasMember("VpcId") && !value["VpcId"].IsNull())
      {
          if (!value["VpcId"].IsString())
          {
              return CoreInternalOutcome(Core::Error("response `CpmVirtualPrivateCloud.VpcId` IsString=false incorrectly").SetRequestId(requestId));
          }
          m_vpcId = string(value["VpcId"].GetString());
          m_vpcIdHasBeenSet = true;
      }
  
      if (value.HasMember("SubnetId") && !value["SubnetId"].IsNull())
      {
          if (!value["SubnetId"].IsString())
          {
              return CoreInternalOutcome(Core::Error("response `CpmVirtualPrivateCloud.SubnetId` IsString=false incorrectly").SetRequestId(requestId));
          }
          m_subnetId = string(value["SubnetId"].GetString());
          m_subnetIdHasBeenSet = true;
      }
  
  
      return CoreInternalOutcome(true);
  }
  
  void CpmVirtualPrivateCloud::ToJsonObject(rapidjson::Value &value, rapidjson::Document::AllocatorType& allocator) const
  {
  
      if (m_vpcIdHasBeenSet)
      {
          rapidjson::Value iKey(rapidjson::kStringType);
          string key = "VpcId";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, rapidjson::Value(m_vpcId.c_str(), allocator).Move(), allocator);
      }
  
      if (m_subnetIdHasBeenSet)
      {
          rapidjson::Value iKey(rapidjson::kStringType);
          string key = "SubnetId";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, rapidjson::Value(m_subnetId.c_str(), allocator).Move(), allocator);
      }
  
  }
  
  
  string CpmVirtualPrivateCloud::GetVpcId() const
  {
      return m_vpcId;
  }
  
  void CpmVirtualPrivateCloud::SetVpcId(const string& _vpcId)
  {
      m_vpcId = _vpcId;
      m_vpcIdHasBeenSet = true;
  }
  
  bool CpmVirtualPrivateCloud::VpcIdHasBeenSet() const
  {
      return m_vpcIdHasBeenSet;
  }
  
  string CpmVirtualPrivateCloud::GetSubnetId() const
  {
      return m_subnetId;
  }
  
  void CpmVirtualPrivateCloud::SetSubnetId(const string& _subnetId)
  {
      m_subnetId = _subnetId;
      m_subnetIdHasBeenSet = true;
  }
  
  bool CpmVirtualPrivateCloud::SubnetIdHasBeenSet() const
  {
      return m_subnetIdHasBeenSet;
  }
  
  