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

#pragma once
#include <aws/core/utils/DateTime.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/redshift-data/RedshiftDataAPIService_EXPORTS.h>
#include <aws/redshift-data/model/ResultFormatString.h>
#include <aws/redshift-data/model/SqlParameter.h>
#include <aws/redshift-data/model/StatusString.h>

#include <utility>

namespace Aws {
namespace Utils {
namespace Json {
class JsonValue;
class JsonView;
}  // namespace Json
}  // namespace Utils
namespace RedshiftDataAPIService {
namespace Model {

/**
 * <p>The SQL statement to run.</p><p><h3>See Also:</h3>   <a
 * href="http://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/StatementData">AWS
 * API Reference</a></p>
 */
class StatementData {
 public:
  AWS_REDSHIFTDATAAPISERVICE_API StatementData() = default;
  AWS_REDSHIFTDATAAPISERVICE_API StatementData(Aws::Utils::Json::JsonView jsonValue);
  AWS_REDSHIFTDATAAPISERVICE_API StatementData& operator=(Aws::Utils::Json::JsonView jsonValue);
  AWS_REDSHIFTDATAAPISERVICE_API Aws::Utils::Json::JsonValue Jsonize() const;

  ///@{
  /**
   * <p>The SQL statement identifier. This value is a universally unique identifier
   * (UUID) generated by Amazon Redshift Data API. </p>
   */
  inline const Aws::String& GetId() const { return m_id; }
  inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
  template <typename IdT = Aws::String>
  void SetId(IdT&& value) {
    m_idHasBeenSet = true;
    m_id = std::forward<IdT>(value);
  }
  template <typename IdT = Aws::String>
  StatementData& WithId(IdT&& value) {
    SetId(std::forward<IdT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The SQL statement.</p>
   */
  inline const Aws::String& GetQueryString() const { return m_queryString; }
  inline bool QueryStringHasBeenSet() const { return m_queryStringHasBeenSet; }
  template <typename QueryStringT = Aws::String>
  void SetQueryString(QueryStringT&& value) {
    m_queryStringHasBeenSet = true;
    m_queryString = std::forward<QueryStringT>(value);
  }
  template <typename QueryStringT = Aws::String>
  StatementData& WithQueryString(QueryStringT&& value) {
    SetQueryString(std::forward<QueryStringT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>One or more SQL statements. Each query string in the array corresponds to one
   * of the queries in a batch query request.</p>
   */
  inline const Aws::Vector<Aws::String>& GetQueryStrings() const { return m_queryStrings; }
  inline bool QueryStringsHasBeenSet() const { return m_queryStringsHasBeenSet; }
  template <typename QueryStringsT = Aws::Vector<Aws::String>>
  void SetQueryStrings(QueryStringsT&& value) {
    m_queryStringsHasBeenSet = true;
    m_queryStrings = std::forward<QueryStringsT>(value);
  }
  template <typename QueryStringsT = Aws::Vector<Aws::String>>
  StatementData& WithQueryStrings(QueryStringsT&& value) {
    SetQueryStrings(std::forward<QueryStringsT>(value));
    return *this;
  }
  template <typename QueryStringsT = Aws::String>
  StatementData& AddQueryStrings(QueryStringsT&& value) {
    m_queryStringsHasBeenSet = true;
    m_queryStrings.emplace_back(std::forward<QueryStringsT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The name or Amazon Resource Name (ARN) of the secret that enables access to
   * the database. </p>
   */
  inline const Aws::String& GetSecretArn() const { return m_secretArn; }
  inline bool SecretArnHasBeenSet() const { return m_secretArnHasBeenSet; }
  template <typename SecretArnT = Aws::String>
  void SetSecretArn(SecretArnT&& value) {
    m_secretArnHasBeenSet = true;
    m_secretArn = std::forward<SecretArnT>(value);
  }
  template <typename SecretArnT = Aws::String>
  StatementData& WithSecretArn(SecretArnT&& value) {
    SetSecretArn(std::forward<SecretArnT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The status of the SQL statement. An example is the that the SQL statement
   * finished. </p>
   */
  inline StatusString GetStatus() const { return m_status; }
  inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
  inline void SetStatus(StatusString value) {
    m_statusHasBeenSet = true;
    m_status = value;
  }
  inline StatementData& WithStatus(StatusString value) {
    SetStatus(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The name of the SQL statement. </p>
   */
  inline const Aws::String& GetStatementName() const { return m_statementName; }
  inline bool StatementNameHasBeenSet() const { return m_statementNameHasBeenSet; }
  template <typename StatementNameT = Aws::String>
  void SetStatementName(StatementNameT&& value) {
    m_statementNameHasBeenSet = true;
    m_statementName = std::forward<StatementNameT>(value);
  }
  template <typename StatementNameT = Aws::String>
  StatementData& WithStatementName(StatementNameT&& value) {
    SetStatementName(std::forward<StatementNameT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The date and time (UTC) the statement was created. </p>
   */
  inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
  inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
  template <typename CreatedAtT = Aws::Utils::DateTime>
  void SetCreatedAt(CreatedAtT&& value) {
    m_createdAtHasBeenSet = true;
    m_createdAt = std::forward<CreatedAtT>(value);
  }
  template <typename CreatedAtT = Aws::Utils::DateTime>
  StatementData& WithCreatedAt(CreatedAtT&& value) {
    SetCreatedAt(std::forward<CreatedAtT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The date and time (UTC) that the statement metadata was last updated.</p>
   */
  inline const Aws::Utils::DateTime& GetUpdatedAt() const { return m_updatedAt; }
  inline bool UpdatedAtHasBeenSet() const { return m_updatedAtHasBeenSet; }
  template <typename UpdatedAtT = Aws::Utils::DateTime>
  void SetUpdatedAt(UpdatedAtT&& value) {
    m_updatedAtHasBeenSet = true;
    m_updatedAt = std::forward<UpdatedAtT>(value);
  }
  template <typename UpdatedAtT = Aws::Utils::DateTime>
  StatementData& WithUpdatedAt(UpdatedAtT&& value) {
    SetUpdatedAt(std::forward<UpdatedAtT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The parameters used in a SQL statement.</p>
   */
  inline const Aws::Vector<SqlParameter>& GetQueryParameters() const { return m_queryParameters; }
  inline bool QueryParametersHasBeenSet() const { return m_queryParametersHasBeenSet; }
  template <typename QueryParametersT = Aws::Vector<SqlParameter>>
  void SetQueryParameters(QueryParametersT&& value) {
    m_queryParametersHasBeenSet = true;
    m_queryParameters = std::forward<QueryParametersT>(value);
  }
  template <typename QueryParametersT = Aws::Vector<SqlParameter>>
  StatementData& WithQueryParameters(QueryParametersT&& value) {
    SetQueryParameters(std::forward<QueryParametersT>(value));
    return *this;
  }
  template <typename QueryParametersT = SqlParameter>
  StatementData& AddQueryParameters(QueryParametersT&& value) {
    m_queryParametersHasBeenSet = true;
    m_queryParameters.emplace_back(std::forward<QueryParametersT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>A value that indicates whether the statement is a batch query request.</p>
   */
  inline bool GetIsBatchStatement() const { return m_isBatchStatement; }
  inline bool IsBatchStatementHasBeenSet() const { return m_isBatchStatementHasBeenSet; }
  inline void SetIsBatchStatement(bool value) {
    m_isBatchStatementHasBeenSet = true;
    m_isBatchStatement = value;
  }
  inline StatementData& WithIsBatchStatement(bool value) {
    SetIsBatchStatement(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The data format of the result of the SQL statement.</p>
   */
  inline ResultFormatString GetResultFormat() const { return m_resultFormat; }
  inline bool ResultFormatHasBeenSet() const { return m_resultFormatHasBeenSet; }
  inline void SetResultFormat(ResultFormatString value) {
    m_resultFormatHasBeenSet = true;
    m_resultFormat = value;
  }
  inline StatementData& WithResultFormat(ResultFormatString value) {
    SetResultFormat(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The session identifier of the query.</p>
   */
  inline const Aws::String& GetSessionId() const { return m_sessionId; }
  inline bool SessionIdHasBeenSet() const { return m_sessionIdHasBeenSet; }
  template <typename SessionIdT = Aws::String>
  void SetSessionId(SessionIdT&& value) {
    m_sessionIdHasBeenSet = true;
    m_sessionId = std::forward<SessionIdT>(value);
  }
  template <typename SessionIdT = Aws::String>
  StatementData& WithSessionId(SessionIdT&& value) {
    SetSessionId(std::forward<SessionIdT>(value));
    return *this;
  }
  ///@}
 private:
  Aws::String m_id;

  Aws::String m_queryString;

  Aws::Vector<Aws::String> m_queryStrings;

  Aws::String m_secretArn;

  StatusString m_status{StatusString::NOT_SET};

  Aws::String m_statementName;

  Aws::Utils::DateTime m_createdAt{};

  Aws::Utils::DateTime m_updatedAt{};

  Aws::Vector<SqlParameter> m_queryParameters;

  bool m_isBatchStatement{false};

  ResultFormatString m_resultFormat{ResultFormatString::NOT_SET};

  Aws::String m_sessionId;
  bool m_idHasBeenSet = false;
  bool m_queryStringHasBeenSet = false;
  bool m_queryStringsHasBeenSet = false;
  bool m_secretArnHasBeenSet = false;
  bool m_statusHasBeenSet = false;
  bool m_statementNameHasBeenSet = false;
  bool m_createdAtHasBeenSet = false;
  bool m_updatedAtHasBeenSet = false;
  bool m_queryParametersHasBeenSet = false;
  bool m_isBatchStatementHasBeenSet = false;
  bool m_resultFormatHasBeenSet = false;
  bool m_sessionIdHasBeenSet = false;
};

}  // namespace Model
}  // namespace RedshiftDataAPIService
}  // namespace Aws
