{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.S3.Types.CSVInput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.S3.Internal
import Amazonka.S3.Types.FileHeaderInfo
data CSVInput = CSVInput'
{
CSVInput -> Maybe Text
quoteCharacter :: Prelude.Maybe Prelude.Text,
CSVInput -> Maybe Text
recordDelimiter :: Prelude.Maybe Prelude.Text,
CSVInput -> Maybe Bool
allowQuotedRecordDelimiter :: Prelude.Maybe Prelude.Bool,
:: Prelude.Maybe FileHeaderInfo,
CSVInput -> Maybe Text
quoteEscapeCharacter :: Prelude.Maybe Prelude.Text,
:: Prelude.Maybe Prelude.Text,
CSVInput -> Maybe Text
fieldDelimiter :: Prelude.Maybe Prelude.Text
}
deriving (CSVInput -> CSVInput -> Bool
(CSVInput -> CSVInput -> Bool)
-> (CSVInput -> CSVInput -> Bool) -> Eq CSVInput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CSVInput -> CSVInput -> Bool
$c/= :: CSVInput -> CSVInput -> Bool
== :: CSVInput -> CSVInput -> Bool
$c== :: CSVInput -> CSVInput -> Bool
Prelude.Eq, ReadPrec [CSVInput]
ReadPrec CSVInput
Int -> ReadS CSVInput
ReadS [CSVInput]
(Int -> ReadS CSVInput)
-> ReadS [CSVInput]
-> ReadPrec CSVInput
-> ReadPrec [CSVInput]
-> Read CSVInput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CSVInput]
$creadListPrec :: ReadPrec [CSVInput]
readPrec :: ReadPrec CSVInput
$creadPrec :: ReadPrec CSVInput
readList :: ReadS [CSVInput]
$creadList :: ReadS [CSVInput]
readsPrec :: Int -> ReadS CSVInput
$creadsPrec :: Int -> ReadS CSVInput
Prelude.Read, Int -> CSVInput -> ShowS
[CSVInput] -> ShowS
CSVInput -> String
(Int -> CSVInput -> ShowS)
-> (CSVInput -> String) -> ([CSVInput] -> ShowS) -> Show CSVInput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CSVInput] -> ShowS
$cshowList :: [CSVInput] -> ShowS
show :: CSVInput -> String
$cshow :: CSVInput -> String
showsPrec :: Int -> CSVInput -> ShowS
$cshowsPrec :: Int -> CSVInput -> ShowS
Prelude.Show, (forall x. CSVInput -> Rep CSVInput x)
-> (forall x. Rep CSVInput x -> CSVInput) -> Generic CSVInput
forall x. Rep CSVInput x -> CSVInput
forall x. CSVInput -> Rep CSVInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CSVInput x -> CSVInput
$cfrom :: forall x. CSVInput -> Rep CSVInput x
Prelude.Generic)
newCSVInput ::
CSVInput
newCSVInput :: CSVInput
newCSVInput =
CSVInput' :: Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe FileHeaderInfo
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> CSVInput
CSVInput'
{ $sel:quoteCharacter:CSVInput' :: Maybe Text
quoteCharacter = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:recordDelimiter:CSVInput' :: Maybe Text
recordDelimiter = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:allowQuotedRecordDelimiter:CSVInput' :: Maybe Bool
allowQuotedRecordDelimiter = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:fileHeaderInfo:CSVInput' :: Maybe FileHeaderInfo
fileHeaderInfo = Maybe FileHeaderInfo
forall a. Maybe a
Prelude.Nothing,
$sel:quoteEscapeCharacter:CSVInput' :: Maybe Text
quoteEscapeCharacter = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:comments:CSVInput' :: Maybe Text
comments = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:fieldDelimiter:CSVInput' :: Maybe Text
fieldDelimiter = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
cSVInput_quoteCharacter :: Lens.Lens' CSVInput (Prelude.Maybe Prelude.Text)
cSVInput_quoteCharacter :: (Maybe Text -> f (Maybe Text)) -> CSVInput -> f CSVInput
cSVInput_quoteCharacter = (CSVInput -> Maybe Text)
-> (CSVInput -> Maybe Text -> CSVInput)
-> Lens CSVInput CSVInput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CSVInput' {Maybe Text
quoteCharacter :: Maybe Text
$sel:quoteCharacter:CSVInput' :: CSVInput -> Maybe Text
quoteCharacter} -> Maybe Text
quoteCharacter) (\s :: CSVInput
s@CSVInput' {} Maybe Text
a -> CSVInput
s {$sel:quoteCharacter:CSVInput' :: Maybe Text
quoteCharacter = Maybe Text
a} :: CSVInput)
cSVInput_recordDelimiter :: Lens.Lens' CSVInput (Prelude.Maybe Prelude.Text)
cSVInput_recordDelimiter :: (Maybe Text -> f (Maybe Text)) -> CSVInput -> f CSVInput
cSVInput_recordDelimiter = (CSVInput -> Maybe Text)
-> (CSVInput -> Maybe Text -> CSVInput)
-> Lens CSVInput CSVInput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CSVInput' {Maybe Text
recordDelimiter :: Maybe Text
$sel:recordDelimiter:CSVInput' :: CSVInput -> Maybe Text
recordDelimiter} -> Maybe Text
recordDelimiter) (\s :: CSVInput
s@CSVInput' {} Maybe Text
a -> CSVInput
s {$sel:recordDelimiter:CSVInput' :: Maybe Text
recordDelimiter = Maybe Text
a} :: CSVInput)
cSVInput_allowQuotedRecordDelimiter :: Lens.Lens' CSVInput (Prelude.Maybe Prelude.Bool)
cSVInput_allowQuotedRecordDelimiter :: (Maybe Bool -> f (Maybe Bool)) -> CSVInput -> f CSVInput
cSVInput_allowQuotedRecordDelimiter = (CSVInput -> Maybe Bool)
-> (CSVInput -> Maybe Bool -> CSVInput)
-> Lens CSVInput CSVInput (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CSVInput' {Maybe Bool
allowQuotedRecordDelimiter :: Maybe Bool
$sel:allowQuotedRecordDelimiter:CSVInput' :: CSVInput -> Maybe Bool
allowQuotedRecordDelimiter} -> Maybe Bool
allowQuotedRecordDelimiter) (\s :: CSVInput
s@CSVInput' {} Maybe Bool
a -> CSVInput
s {$sel:allowQuotedRecordDelimiter:CSVInput' :: Maybe Bool
allowQuotedRecordDelimiter = Maybe Bool
a} :: CSVInput)
cSVInput_fileHeaderInfo :: Lens.Lens' CSVInput (Prelude.Maybe FileHeaderInfo)
= (CSVInput -> Maybe FileHeaderInfo)
-> (CSVInput -> Maybe FileHeaderInfo -> CSVInput)
-> Lens
CSVInput CSVInput (Maybe FileHeaderInfo) (Maybe FileHeaderInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CSVInput' {Maybe FileHeaderInfo
fileHeaderInfo :: Maybe FileHeaderInfo
$sel:fileHeaderInfo:CSVInput' :: CSVInput -> Maybe FileHeaderInfo
fileHeaderInfo} -> Maybe FileHeaderInfo
fileHeaderInfo) (\s :: CSVInput
s@CSVInput' {} Maybe FileHeaderInfo
a -> CSVInput
s {$sel:fileHeaderInfo:CSVInput' :: Maybe FileHeaderInfo
fileHeaderInfo = Maybe FileHeaderInfo
a} :: CSVInput)
cSVInput_quoteEscapeCharacter :: Lens.Lens' CSVInput (Prelude.Maybe Prelude.Text)
cSVInput_quoteEscapeCharacter :: (Maybe Text -> f (Maybe Text)) -> CSVInput -> f CSVInput
cSVInput_quoteEscapeCharacter = (CSVInput -> Maybe Text)
-> (CSVInput -> Maybe Text -> CSVInput)
-> Lens CSVInput CSVInput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CSVInput' {Maybe Text
quoteEscapeCharacter :: Maybe Text
$sel:quoteEscapeCharacter:CSVInput' :: CSVInput -> Maybe Text
quoteEscapeCharacter} -> Maybe Text
quoteEscapeCharacter) (\s :: CSVInput
s@CSVInput' {} Maybe Text
a -> CSVInput
s {$sel:quoteEscapeCharacter:CSVInput' :: Maybe Text
quoteEscapeCharacter = Maybe Text
a} :: CSVInput)
cSVInput_comments :: Lens.Lens' CSVInput (Prelude.Maybe Prelude.Text)
= (CSVInput -> Maybe Text)
-> (CSVInput -> Maybe Text -> CSVInput)
-> Lens CSVInput CSVInput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CSVInput' {Maybe Text
comments :: Maybe Text
$sel:comments:CSVInput' :: CSVInput -> Maybe Text
comments} -> Maybe Text
comments) (\s :: CSVInput
s@CSVInput' {} Maybe Text
a -> CSVInput
s {$sel:comments:CSVInput' :: Maybe Text
comments = Maybe Text
a} :: CSVInput)
cSVInput_fieldDelimiter :: Lens.Lens' CSVInput (Prelude.Maybe Prelude.Text)
cSVInput_fieldDelimiter :: (Maybe Text -> f (Maybe Text)) -> CSVInput -> f CSVInput
cSVInput_fieldDelimiter = (CSVInput -> Maybe Text)
-> (CSVInput -> Maybe Text -> CSVInput)
-> Lens CSVInput CSVInput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CSVInput' {Maybe Text
fieldDelimiter :: Maybe Text
$sel:fieldDelimiter:CSVInput' :: CSVInput -> Maybe Text
fieldDelimiter} -> Maybe Text
fieldDelimiter) (\s :: CSVInput
s@CSVInput' {} Maybe Text
a -> CSVInput
s {$sel:fieldDelimiter:CSVInput' :: Maybe Text
fieldDelimiter = Maybe Text
a} :: CSVInput)
instance Prelude.Hashable CSVInput
instance Prelude.NFData CSVInput
instance Core.ToXML CSVInput where
toXML :: CSVInput -> XML
toXML CSVInput' {Maybe Bool
Maybe Text
Maybe FileHeaderInfo
fieldDelimiter :: Maybe Text
comments :: Maybe Text
quoteEscapeCharacter :: Maybe Text
fileHeaderInfo :: Maybe FileHeaderInfo
allowQuotedRecordDelimiter :: Maybe Bool
recordDelimiter :: Maybe Text
quoteCharacter :: Maybe Text
$sel:fieldDelimiter:CSVInput' :: CSVInput -> Maybe Text
$sel:comments:CSVInput' :: CSVInput -> Maybe Text
$sel:quoteEscapeCharacter:CSVInput' :: CSVInput -> Maybe Text
$sel:fileHeaderInfo:CSVInput' :: CSVInput -> Maybe FileHeaderInfo
$sel:allowQuotedRecordDelimiter:CSVInput' :: CSVInput -> Maybe Bool
$sel:recordDelimiter:CSVInput' :: CSVInput -> Maybe Text
$sel:quoteCharacter:CSVInput' :: CSVInput -> Maybe Text
..} =
[XML] -> XML
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ Name
"QuoteCharacter" Name -> Maybe Text -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe Text
quoteCharacter,
Name
"RecordDelimiter" Name -> Maybe Text -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe Text
recordDelimiter,
Name
"AllowQuotedRecordDelimiter"
Name -> Maybe Bool -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe Bool
allowQuotedRecordDelimiter,
Name
"FileHeaderInfo" Name -> Maybe FileHeaderInfo -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe FileHeaderInfo
fileHeaderInfo,
Name
"QuoteEscapeCharacter" Name -> Maybe Text -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe Text
quoteEscapeCharacter,
Name
"Comments" Name -> Maybe Text -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe Text
comments,
Name
"FieldDelimiter" Name -> Maybe Text -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe Text
fieldDelimiter
]