1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/databrew/GlueDataBrew_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSString.h> 9 #include <utility> 10 11 namespace Aws 12 { 13 namespace Utils 14 { 15 namespace Json 16 { 17 class JsonValue; 18 class JsonView; 19 } // namespace Json 20 } // namespace Utils 21 namespace GlueDataBrew 22 { 23 namespace Model 24 { 25 26 /** 27 * <p>Represents a set of options that define how DataBrew will read a 28 * comma-separated value (CSV) file when creating a dataset from that 29 * file.</p><p><h3>See Also:</h3> <a 30 * href="http://docs.aws.amazon.com/goto/WebAPI/databrew-2017-07-25/CsvOptions">AWS 31 * API Reference</a></p> 32 */ 33 class AWS_GLUEDATABREW_API CsvOptions 34 { 35 public: 36 CsvOptions(); 37 CsvOptions(Aws::Utils::Json::JsonView jsonValue); 38 CsvOptions& operator=(Aws::Utils::Json::JsonView jsonValue); 39 Aws::Utils::Json::JsonValue Jsonize() const; 40 41 42 /** 43 * <p>A single character that specifies the delimiter being used in the CSV 44 * file.</p> 45 */ GetDelimiter()46 inline const Aws::String& GetDelimiter() const{ return m_delimiter; } 47 48 /** 49 * <p>A single character that specifies the delimiter being used in the CSV 50 * file.</p> 51 */ DelimiterHasBeenSet()52 inline bool DelimiterHasBeenSet() const { return m_delimiterHasBeenSet; } 53 54 /** 55 * <p>A single character that specifies the delimiter being used in the CSV 56 * file.</p> 57 */ SetDelimiter(const Aws::String & value)58 inline void SetDelimiter(const Aws::String& value) { m_delimiterHasBeenSet = true; m_delimiter = value; } 59 60 /** 61 * <p>A single character that specifies the delimiter being used in the CSV 62 * file.</p> 63 */ SetDelimiter(Aws::String && value)64 inline void SetDelimiter(Aws::String&& value) { m_delimiterHasBeenSet = true; m_delimiter = std::move(value); } 65 66 /** 67 * <p>A single character that specifies the delimiter being used in the CSV 68 * file.</p> 69 */ SetDelimiter(const char * value)70 inline void SetDelimiter(const char* value) { m_delimiterHasBeenSet = true; m_delimiter.assign(value); } 71 72 /** 73 * <p>A single character that specifies the delimiter being used in the CSV 74 * file.</p> 75 */ WithDelimiter(const Aws::String & value)76 inline CsvOptions& WithDelimiter(const Aws::String& value) { SetDelimiter(value); return *this;} 77 78 /** 79 * <p>A single character that specifies the delimiter being used in the CSV 80 * file.</p> 81 */ WithDelimiter(Aws::String && value)82 inline CsvOptions& WithDelimiter(Aws::String&& value) { SetDelimiter(std::move(value)); return *this;} 83 84 /** 85 * <p>A single character that specifies the delimiter being used in the CSV 86 * file.</p> 87 */ WithDelimiter(const char * value)88 inline CsvOptions& WithDelimiter(const char* value) { SetDelimiter(value); return *this;} 89 90 91 /** 92 * <p>A variable that specifies whether the first row in the file is parsed as the 93 * header. If this value is false, column names are auto-generated.</p> 94 */ GetHeaderRow()95 inline bool GetHeaderRow() const{ return m_headerRow; } 96 97 /** 98 * <p>A variable that specifies whether the first row in the file is parsed as the 99 * header. If this value is false, column names are auto-generated.</p> 100 */ HeaderRowHasBeenSet()101 inline bool HeaderRowHasBeenSet() const { return m_headerRowHasBeenSet; } 102 103 /** 104 * <p>A variable that specifies whether the first row in the file is parsed as the 105 * header. If this value is false, column names are auto-generated.</p> 106 */ SetHeaderRow(bool value)107 inline void SetHeaderRow(bool value) { m_headerRowHasBeenSet = true; m_headerRow = value; } 108 109 /** 110 * <p>A variable that specifies whether the first row in the file is parsed as the 111 * header. If this value is false, column names are auto-generated.</p> 112 */ WithHeaderRow(bool value)113 inline CsvOptions& WithHeaderRow(bool value) { SetHeaderRow(value); return *this;} 114 115 private: 116 117 Aws::String m_delimiter; 118 bool m_delimiterHasBeenSet; 119 120 bool m_headerRow; 121 bool m_headerRowHasBeenSet; 122 }; 123 124 } // namespace Model 125 } // namespace GlueDataBrew 126 } // namespace Aws 127