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/cpdp/v20190820/model/QueryPayerinfoResult.h>
  
  using TencentCloud::CoreInternalOutcome;
  using namespace TencentCloud::Cpdp::V20190820::Model;
  using namespace rapidjson;
  using namespace std;
  
  QueryPayerinfoResult::QueryPayerinfoResult() :
      m_codeHasBeenSet(false),
      m_dataHasBeenSet(false)
  {
  }
  
  CoreInternalOutcome QueryPayerinfoResult::Deserialize(const Value &value)
  {
      string requestId = "";
  
  
      if (value.HasMember("Code") && !value["Code"].IsNull())
      {
          if (!value["Code"].IsString())
          {
              return CoreInternalOutcome(Error("response `QueryPayerinfoResult.Code` IsString=false incorrectly").SetRequestId(requestId));
          }
          m_code = string(value["Code"].GetString());
          m_codeHasBeenSet = true;
      }
  
      if (value.HasMember("Data") && !value["Data"].IsNull())
      {
          if (!value["Data"].IsObject())
          {
              return CoreInternalOutcome(Error("response `QueryPayerinfoResult.Data` is not object type").SetRequestId(requestId));
          }
  
          CoreInternalOutcome outcome = m_data.Deserialize(value["Data"]);
          if (!outcome.IsSuccess())
          {
              outcome.GetError().SetRequestId(requestId);
              return outcome;
          }
  
          m_dataHasBeenSet = true;
      }
  
  
      return CoreInternalOutcome(true);
  }
  
  void QueryPayerinfoResult::ToJsonObject(Value &value, Document::AllocatorType& allocator) const
  {
  
      if (m_codeHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "Code";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, Value(m_code.c_str(), allocator).Move(), allocator);
      }
  
      if (m_dataHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "Data";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, Value(kObjectType).Move(), allocator);
          m_data.ToJsonObject(value[key.c_str()], allocator);
      }
  
  }
  
  
  string QueryPayerinfoResult::GetCode() const
  {
      return m_code;
  }
  
  void QueryPayerinfoResult::SetCode(const string& _code)
  {
      m_code = _code;
      m_codeHasBeenSet = true;
  }
  
  bool QueryPayerinfoResult::CodeHasBeenSet() const
  {
      return m_codeHasBeenSet;
  }
  
  QueryPayerinfoData QueryPayerinfoResult::GetData() const
  {
      return m_data;
  }
  
  void QueryPayerinfoResult::SetData(const QueryPayerinfoData& _data)
  {
      m_data = _data;
      m_dataHasBeenSet = true;
  }
  
  bool QueryPayerinfoResult::DataHasBeenSet() const
  {
      return m_dataHasBeenSet;
  }
  
  