/**
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0.
 */

#pragma once
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/timestream-write/TimestreamWriteRequest.h>
#include <aws/timestream-write/TimestreamWrite_EXPORTS.h>
#include <aws/timestream-write/model/MagneticStoreWriteProperties.h>
#include <aws/timestream-write/model/RetentionProperties.h>
#include <aws/timestream-write/model/Schema.h>

#include <utility>

namespace Aws {
namespace TimestreamWrite {
namespace Model {

/**
 */
class UpdateTableRequest : public TimestreamWriteRequest {
 public:
  AWS_TIMESTREAMWRITE_API UpdateTableRequest() = default;

  // Service request name is the Operation name which will send this request out,
  // each operation should has unique request name, so that we can get operation's name from this request.
  // Note: this is not true for response, multiple operations may have the same response name,
  // so we can not get operation's name from response.
  inline virtual const char* GetServiceRequestName() const override { return "UpdateTable"; }

  AWS_TIMESTREAMWRITE_API Aws::String SerializePayload() const override;

  AWS_TIMESTREAMWRITE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;

  ///@{
  /**
   * <p>The name of the Timestream database.</p>
   */
  inline const Aws::String& GetDatabaseName() const { return m_databaseName; }
  inline bool DatabaseNameHasBeenSet() const { return m_databaseNameHasBeenSet; }
  template <typename DatabaseNameT = Aws::String>
  void SetDatabaseName(DatabaseNameT&& value) {
    m_databaseNameHasBeenSet = true;
    m_databaseName = std::forward<DatabaseNameT>(value);
  }
  template <typename DatabaseNameT = Aws::String>
  UpdateTableRequest& WithDatabaseName(DatabaseNameT&& value) {
    SetDatabaseName(std::forward<DatabaseNameT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The name of the Timestream table.</p>
   */
  inline const Aws::String& GetTableName() const { return m_tableName; }
  inline bool TableNameHasBeenSet() const { return m_tableNameHasBeenSet; }
  template <typename TableNameT = Aws::String>
  void SetTableName(TableNameT&& value) {
    m_tableNameHasBeenSet = true;
    m_tableName = std::forward<TableNameT>(value);
  }
  template <typename TableNameT = Aws::String>
  UpdateTableRequest& WithTableName(TableNameT&& value) {
    SetTableName(std::forward<TableNameT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The retention duration of the memory store and the magnetic store.</p>
   */
  inline const RetentionProperties& GetRetentionProperties() const { return m_retentionProperties; }
  inline bool RetentionPropertiesHasBeenSet() const { return m_retentionPropertiesHasBeenSet; }
  template <typename RetentionPropertiesT = RetentionProperties>
  void SetRetentionProperties(RetentionPropertiesT&& value) {
    m_retentionPropertiesHasBeenSet = true;
    m_retentionProperties = std::forward<RetentionPropertiesT>(value);
  }
  template <typename RetentionPropertiesT = RetentionProperties>
  UpdateTableRequest& WithRetentionProperties(RetentionPropertiesT&& value) {
    SetRetentionProperties(std::forward<RetentionPropertiesT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Contains properties to set on the table when enabling magnetic store
   * writes.</p>
   */
  inline const MagneticStoreWriteProperties& GetMagneticStoreWriteProperties() const { return m_magneticStoreWriteProperties; }
  inline bool MagneticStoreWritePropertiesHasBeenSet() const { return m_magneticStoreWritePropertiesHasBeenSet; }
  template <typename MagneticStoreWritePropertiesT = MagneticStoreWriteProperties>
  void SetMagneticStoreWriteProperties(MagneticStoreWritePropertiesT&& value) {
    m_magneticStoreWritePropertiesHasBeenSet = true;
    m_magneticStoreWriteProperties = std::forward<MagneticStoreWritePropertiesT>(value);
  }
  template <typename MagneticStoreWritePropertiesT = MagneticStoreWriteProperties>
  UpdateTableRequest& WithMagneticStoreWriteProperties(MagneticStoreWritePropertiesT&& value) {
    SetMagneticStoreWriteProperties(std::forward<MagneticStoreWritePropertiesT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p> The schema of the table. </p>
   */
  inline const Schema& GetSchema() const { return m_schema; }
  inline bool SchemaHasBeenSet() const { return m_schemaHasBeenSet; }
  template <typename SchemaT = Schema>
  void SetSchema(SchemaT&& value) {
    m_schemaHasBeenSet = true;
    m_schema = std::forward<SchemaT>(value);
  }
  template <typename SchemaT = Schema>
  UpdateTableRequest& WithSchema(SchemaT&& value) {
    SetSchema(std::forward<SchemaT>(value));
    return *this;
  }
  ///@}
 private:
  Aws::String m_databaseName;

  Aws::String m_tableName;

  RetentionProperties m_retentionProperties;

  MagneticStoreWriteProperties m_magneticStoreWriteProperties;

  Schema m_schema;
  bool m_databaseNameHasBeenSet = false;
  bool m_tableNameHasBeenSet = false;
  bool m_retentionPropertiesHasBeenSet = false;
  bool m_magneticStoreWritePropertiesHasBeenSet = false;
  bool m_schemaHasBeenSet = false;
};

}  // namespace Model
}  // namespace TimestreamWrite
}  // namespace Aws
