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/ie/v20200304/model/CoverTaskResultItem.h>
  
  using TencentCloud::CoreInternalOutcome;
  using namespace TencentCloud::Ie::V20200304::Model;
  using namespace std;
  
  CoverTaskResultItem::CoverTaskResultItem() :
      m_coverUrlHasBeenSet(false),
      m_confidenceHasBeenSet(false)
  {
  }
  
  CoreInternalOutcome CoverTaskResultItem::Deserialize(const rapidjson::Value &value)
  {
      string requestId = "";
  
  
      if (value.HasMember("CoverUrl") && !value["CoverUrl"].IsNull())
      {
          if (!value["CoverUrl"].IsString())
          {
              return CoreInternalOutcome(Core::Error("response `CoverTaskResultItem.CoverUrl` IsString=false incorrectly").SetRequestId(requestId));
          }
          m_coverUrl = string(value["CoverUrl"].GetString());
          m_coverUrlHasBeenSet = true;
      }
  
      if (value.HasMember("Confidence") && !value["Confidence"].IsNull())
      {
          if (!value["Confidence"].IsLosslessDouble())
          {
              return CoreInternalOutcome(Core::Error("response `CoverTaskResultItem.Confidence` IsLosslessDouble=false incorrectly").SetRequestId(requestId));
          }
          m_confidence = value["Confidence"].GetDouble();
          m_confidenceHasBeenSet = true;
      }
  
  
      return CoreInternalOutcome(true);
  }
  
  void CoverTaskResultItem::ToJsonObject(rapidjson::Value &value, rapidjson::Document::AllocatorType& allocator) const
  {
  
      if (m_coverUrlHasBeenSet)
      {
          rapidjson::Value iKey(rapidjson::kStringType);
          string key = "CoverUrl";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, rapidjson::Value(m_coverUrl.c_str(), allocator).Move(), allocator);
      }
  
      if (m_confidenceHasBeenSet)
      {
          rapidjson::Value iKey(rapidjson::kStringType);
          string key = "Confidence";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, m_confidence, allocator);
      }
  
  }
  
  
  string CoverTaskResultItem::GetCoverUrl() const
  {
      return m_coverUrl;
  }
  
  void CoverTaskResultItem::SetCoverUrl(const string& _coverUrl)
  {
      m_coverUrl = _coverUrl;
      m_coverUrlHasBeenSet = true;
  }
  
  bool CoverTaskResultItem::CoverUrlHasBeenSet() const
  {
      return m_coverUrlHasBeenSet;
  }
  
  double CoverTaskResultItem::GetConfidence() const
  {
      return m_confidence;
  }
  
  void CoverTaskResultItem::SetConfidence(const double& _confidence)
  {
      m_confidence = _confidence;
      m_confidenceHasBeenSet = true;
  }
  
  bool CoverTaskResultItem::ConfidenceHasBeenSet() const
  {
      return m_confidenceHasBeenSet;
  }
  
  