/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Firehose { namespace Model { /** *

Describes a COPY command for Amazon Redshift.

See * Also:

AWS * API Reference

*/ class AWS_FIREHOSE_API CopyCommand { public: CopyCommand(); CopyCommand(Aws::Utils::Json::JsonView jsonValue); CopyCommand& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; /** *

The name of the target table. The table must already exist in the * database.

*/ inline const Aws::String& GetDataTableName() const{ return m_dataTableName; } /** *

The name of the target table. The table must already exist in the * database.

*/ inline bool DataTableNameHasBeenSet() const { return m_dataTableNameHasBeenSet; } /** *

The name of the target table. The table must already exist in the * database.

*/ inline void SetDataTableName(const Aws::String& value) { m_dataTableNameHasBeenSet = true; m_dataTableName = value; } /** *

The name of the target table. The table must already exist in the * database.

*/ inline void SetDataTableName(Aws::String&& value) { m_dataTableNameHasBeenSet = true; m_dataTableName = std::move(value); } /** *

The name of the target table. The table must already exist in the * database.

*/ inline void SetDataTableName(const char* value) { m_dataTableNameHasBeenSet = true; m_dataTableName.assign(value); } /** *

The name of the target table. The table must already exist in the * database.

*/ inline CopyCommand& WithDataTableName(const Aws::String& value) { SetDataTableName(value); return *this;} /** *

The name of the target table. The table must already exist in the * database.

*/ inline CopyCommand& WithDataTableName(Aws::String&& value) { SetDataTableName(std::move(value)); return *this;} /** *

The name of the target table. The table must already exist in the * database.

*/ inline CopyCommand& WithDataTableName(const char* value) { SetDataTableName(value); return *this;} /** *

A comma-separated list of column names.

*/ inline const Aws::String& GetDataTableColumns() const{ return m_dataTableColumns; } /** *

A comma-separated list of column names.

*/ inline bool DataTableColumnsHasBeenSet() const { return m_dataTableColumnsHasBeenSet; } /** *

A comma-separated list of column names.

*/ inline void SetDataTableColumns(const Aws::String& value) { m_dataTableColumnsHasBeenSet = true; m_dataTableColumns = value; } /** *

A comma-separated list of column names.

*/ inline void SetDataTableColumns(Aws::String&& value) { m_dataTableColumnsHasBeenSet = true; m_dataTableColumns = std::move(value); } /** *

A comma-separated list of column names.

*/ inline void SetDataTableColumns(const char* value) { m_dataTableColumnsHasBeenSet = true; m_dataTableColumns.assign(value); } /** *

A comma-separated list of column names.

*/ inline CopyCommand& WithDataTableColumns(const Aws::String& value) { SetDataTableColumns(value); return *this;} /** *

A comma-separated list of column names.

*/ inline CopyCommand& WithDataTableColumns(Aws::String&& value) { SetDataTableColumns(std::move(value)); return *this;} /** *

A comma-separated list of column names.

*/ inline CopyCommand& WithDataTableColumns(const char* value) { SetDataTableColumns(value); return *this;} /** *

Optional parameters to use with the Amazon Redshift COPY * command. For more information, see the "Optional Parameters" section of Amazon * Redshift COPY command. Some possible examples that would apply to Kinesis * Data Firehose are as follows:

delimiter '\t' lzop; - fields * are delimited with "\t" (TAB character) and compressed using lzop.

* delimiter '|' - fields are delimited with "|" (this is the default * delimiter).

delimiter '|' escape - the delimiter should be * escaped.

fixedwidth * 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6' - fields * are fixed width in the source, with each width specified after every column in * the table.

JSON 's3://mybucket/jsonpaths.txt' - data is in * JSON format, and the path specified is the format of the data.

For more * examples, see Amazon * Redshift COPY command examples.

*/ inline const Aws::String& GetCopyOptions() const{ return m_copyOptions; } /** *

Optional parameters to use with the Amazon Redshift COPY * command. For more information, see the "Optional Parameters" section of Amazon * Redshift COPY command. Some possible examples that would apply to Kinesis * Data Firehose are as follows:

delimiter '\t' lzop; - fields * are delimited with "\t" (TAB character) and compressed using lzop.

* delimiter '|' - fields are delimited with "|" (this is the default * delimiter).

delimiter '|' escape - the delimiter should be * escaped.

fixedwidth * 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6' - fields * are fixed width in the source, with each width specified after every column in * the table.

JSON 's3://mybucket/jsonpaths.txt' - data is in * JSON format, and the path specified is the format of the data.

For more * examples, see Amazon * Redshift COPY command examples.

*/ inline bool CopyOptionsHasBeenSet() const { return m_copyOptionsHasBeenSet; } /** *

Optional parameters to use with the Amazon Redshift COPY * command. For more information, see the "Optional Parameters" section of Amazon * Redshift COPY command. Some possible examples that would apply to Kinesis * Data Firehose are as follows:

delimiter '\t' lzop; - fields * are delimited with "\t" (TAB character) and compressed using lzop.

* delimiter '|' - fields are delimited with "|" (this is the default * delimiter).

delimiter '|' escape - the delimiter should be * escaped.

fixedwidth * 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6' - fields * are fixed width in the source, with each width specified after every column in * the table.

JSON 's3://mybucket/jsonpaths.txt' - data is in * JSON format, and the path specified is the format of the data.

For more * examples, see Amazon * Redshift COPY command examples.

*/ inline void SetCopyOptions(const Aws::String& value) { m_copyOptionsHasBeenSet = true; m_copyOptions = value; } /** *

Optional parameters to use with the Amazon Redshift COPY * command. For more information, see the "Optional Parameters" section of Amazon * Redshift COPY command. Some possible examples that would apply to Kinesis * Data Firehose are as follows:

delimiter '\t' lzop; - fields * are delimited with "\t" (TAB character) and compressed using lzop.

* delimiter '|' - fields are delimited with "|" (this is the default * delimiter).

delimiter '|' escape - the delimiter should be * escaped.

fixedwidth * 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6' - fields * are fixed width in the source, with each width specified after every column in * the table.

JSON 's3://mybucket/jsonpaths.txt' - data is in * JSON format, and the path specified is the format of the data.

For more * examples, see Amazon * Redshift COPY command examples.

*/ inline void SetCopyOptions(Aws::String&& value) { m_copyOptionsHasBeenSet = true; m_copyOptions = std::move(value); } /** *

Optional parameters to use with the Amazon Redshift COPY * command. For more information, see the "Optional Parameters" section of Amazon * Redshift COPY command. Some possible examples that would apply to Kinesis * Data Firehose are as follows:

delimiter '\t' lzop; - fields * are delimited with "\t" (TAB character) and compressed using lzop.

* delimiter '|' - fields are delimited with "|" (this is the default * delimiter).

delimiter '|' escape - the delimiter should be * escaped.

fixedwidth * 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6' - fields * are fixed width in the source, with each width specified after every column in * the table.

JSON 's3://mybucket/jsonpaths.txt' - data is in * JSON format, and the path specified is the format of the data.

For more * examples, see Amazon * Redshift COPY command examples.

*/ inline void SetCopyOptions(const char* value) { m_copyOptionsHasBeenSet = true; m_copyOptions.assign(value); } /** *

Optional parameters to use with the Amazon Redshift COPY * command. For more information, see the "Optional Parameters" section of Amazon * Redshift COPY command. Some possible examples that would apply to Kinesis * Data Firehose are as follows:

delimiter '\t' lzop; - fields * are delimited with "\t" (TAB character) and compressed using lzop.

* delimiter '|' - fields are delimited with "|" (this is the default * delimiter).

delimiter '|' escape - the delimiter should be * escaped.

fixedwidth * 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6' - fields * are fixed width in the source, with each width specified after every column in * the table.

JSON 's3://mybucket/jsonpaths.txt' - data is in * JSON format, and the path specified is the format of the data.

For more * examples, see Amazon * Redshift COPY command examples.

*/ inline CopyCommand& WithCopyOptions(const Aws::String& value) { SetCopyOptions(value); return *this;} /** *

Optional parameters to use with the Amazon Redshift COPY * command. For more information, see the "Optional Parameters" section of Amazon * Redshift COPY command. Some possible examples that would apply to Kinesis * Data Firehose are as follows:

delimiter '\t' lzop; - fields * are delimited with "\t" (TAB character) and compressed using lzop.

* delimiter '|' - fields are delimited with "|" (this is the default * delimiter).

delimiter '|' escape - the delimiter should be * escaped.

fixedwidth * 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6' - fields * are fixed width in the source, with each width specified after every column in * the table.

JSON 's3://mybucket/jsonpaths.txt' - data is in * JSON format, and the path specified is the format of the data.

For more * examples, see Amazon * Redshift COPY command examples.

*/ inline CopyCommand& WithCopyOptions(Aws::String&& value) { SetCopyOptions(std::move(value)); return *this;} /** *

Optional parameters to use with the Amazon Redshift COPY * command. For more information, see the "Optional Parameters" section of Amazon * Redshift COPY command. Some possible examples that would apply to Kinesis * Data Firehose are as follows:

delimiter '\t' lzop; - fields * are delimited with "\t" (TAB character) and compressed using lzop.

* delimiter '|' - fields are delimited with "|" (this is the default * delimiter).

delimiter '|' escape - the delimiter should be * escaped.

fixedwidth * 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6' - fields * are fixed width in the source, with each width specified after every column in * the table.

JSON 's3://mybucket/jsonpaths.txt' - data is in * JSON format, and the path specified is the format of the data.

For more * examples, see Amazon * Redshift COPY command examples.

*/ inline CopyCommand& WithCopyOptions(const char* value) { SetCopyOptions(value); return *this;} private: Aws::String m_dataTableName; bool m_dataTableNameHasBeenSet; Aws::String m_dataTableColumns; bool m_dataTableColumnsHasBeenSet; Aws::String m_copyOptions; bool m_copyOptionsHasBeenSet; }; } // namespace Model } // namespace Firehose } // namespace Aws