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/cat/v20180409/model/AlarmTopic.h>
  
  using TencentCloud::CoreInternalOutcome;
  using namespace TencentCloud::Cat::V20180409::Model;
  using namespace rapidjson;
  using namespace std;
  
  AlarmTopic::AlarmTopic() :
      m_topicIdHasBeenSet(false),
      m_topicNameHasBeenSet(false)
  {
  }
  
  CoreInternalOutcome AlarmTopic::Deserialize(const Value &value)
  {
      string requestId = "";
  
  
      if (value.HasMember("TopicId") && !value["TopicId"].IsNull())
      {
          if (!value["TopicId"].IsString())
          {
              return CoreInternalOutcome(Error("response `AlarmTopic.TopicId` IsString=false incorrectly").SetRequestId(requestId));
          }
          m_topicId = string(value["TopicId"].GetString());
          m_topicIdHasBeenSet = true;
      }
  
      if (value.HasMember("TopicName") && !value["TopicName"].IsNull())
      {
          if (!value["TopicName"].IsString())
          {
              return CoreInternalOutcome(Error("response `AlarmTopic.TopicName` IsString=false incorrectly").SetRequestId(requestId));
          }
          m_topicName = string(value["TopicName"].GetString());
          m_topicNameHasBeenSet = true;
      }
  
  
      return CoreInternalOutcome(true);
  }
  
  void AlarmTopic::ToJsonObject(Value &value, Document::AllocatorType& allocator) const
  {
  
      if (m_topicIdHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "TopicId";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, Value(m_topicId.c_str(), allocator).Move(), allocator);
      }
  
      if (m_topicNameHasBeenSet)
      {
          Value iKey(kStringType);
          string key = "TopicName";
          iKey.SetString(key.c_str(), allocator);
          value.AddMember(iKey, Value(m_topicName.c_str(), allocator).Move(), allocator);
      }
  
  }
  
  
  string AlarmTopic::GetTopicId() const
  {
      return m_topicId;
  }
  
  void AlarmTopic::SetTopicId(const string& _topicId)
  {
      m_topicId = _topicId;
      m_topicIdHasBeenSet = true;
  }
  
  bool AlarmTopic::TopicIdHasBeenSet() const
  {
      return m_topicIdHasBeenSet;
  }
  
  string AlarmTopic::GetTopicName() const
  {
      return m_topicName;
  }
  
  void AlarmTopic::SetTopicName(const string& _topicName)
  {
      m_topicName = _topicName;
      m_topicNameHasBeenSet = true;
  }
  
  bool AlarmTopic::TopicNameHasBeenSet() const
  {
      return m_topicNameHasBeenSet;
  }
  
  