{-# 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.HoneyCode.Types.TableColumn where
import qualified Amazonka.Core as Core
import Amazonka.HoneyCode.Types.Format
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TableColumn = TableColumn'
{
TableColumn -> Maybe Format
format :: Prelude.Maybe Format,
TableColumn -> Maybe Text
tableColumnName :: Prelude.Maybe Prelude.Text,
TableColumn -> Maybe Text
tableColumnId :: Prelude.Maybe Prelude.Text
}
deriving (TableColumn -> TableColumn -> Bool
(TableColumn -> TableColumn -> Bool)
-> (TableColumn -> TableColumn -> Bool) -> Eq TableColumn
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TableColumn -> TableColumn -> Bool
$c/= :: TableColumn -> TableColumn -> Bool
== :: TableColumn -> TableColumn -> Bool
$c== :: TableColumn -> TableColumn -> Bool
Prelude.Eq, ReadPrec [TableColumn]
ReadPrec TableColumn
Int -> ReadS TableColumn
ReadS [TableColumn]
(Int -> ReadS TableColumn)
-> ReadS [TableColumn]
-> ReadPrec TableColumn
-> ReadPrec [TableColumn]
-> Read TableColumn
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TableColumn]
$creadListPrec :: ReadPrec [TableColumn]
readPrec :: ReadPrec TableColumn
$creadPrec :: ReadPrec TableColumn
readList :: ReadS [TableColumn]
$creadList :: ReadS [TableColumn]
readsPrec :: Int -> ReadS TableColumn
$creadsPrec :: Int -> ReadS TableColumn
Prelude.Read, Int -> TableColumn -> ShowS
[TableColumn] -> ShowS
TableColumn -> String
(Int -> TableColumn -> ShowS)
-> (TableColumn -> String)
-> ([TableColumn] -> ShowS)
-> Show TableColumn
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TableColumn] -> ShowS
$cshowList :: [TableColumn] -> ShowS
show :: TableColumn -> String
$cshow :: TableColumn -> String
showsPrec :: Int -> TableColumn -> ShowS
$cshowsPrec :: Int -> TableColumn -> ShowS
Prelude.Show, (forall x. TableColumn -> Rep TableColumn x)
-> (forall x. Rep TableColumn x -> TableColumn)
-> Generic TableColumn
forall x. Rep TableColumn x -> TableColumn
forall x. TableColumn -> Rep TableColumn x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TableColumn x -> TableColumn
$cfrom :: forall x. TableColumn -> Rep TableColumn x
Prelude.Generic)
newTableColumn ::
TableColumn
newTableColumn :: TableColumn
newTableColumn =
TableColumn' :: Maybe Format -> Maybe Text -> Maybe Text -> TableColumn
TableColumn'
{ $sel:format:TableColumn' :: Maybe Format
format = Maybe Format
forall a. Maybe a
Prelude.Nothing,
$sel:tableColumnName:TableColumn' :: Maybe Text
tableColumnName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tableColumnId:TableColumn' :: Maybe Text
tableColumnId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
tableColumn_format :: Lens.Lens' TableColumn (Prelude.Maybe Format)
tableColumn_format :: (Maybe Format -> f (Maybe Format)) -> TableColumn -> f TableColumn
tableColumn_format = (TableColumn -> Maybe Format)
-> (TableColumn -> Maybe Format -> TableColumn)
-> Lens TableColumn TableColumn (Maybe Format) (Maybe Format)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableColumn' {Maybe Format
format :: Maybe Format
$sel:format:TableColumn' :: TableColumn -> Maybe Format
format} -> Maybe Format
format) (\s :: TableColumn
s@TableColumn' {} Maybe Format
a -> TableColumn
s {$sel:format:TableColumn' :: Maybe Format
format = Maybe Format
a} :: TableColumn)
tableColumn_tableColumnName :: Lens.Lens' TableColumn (Prelude.Maybe Prelude.Text)
tableColumn_tableColumnName :: (Maybe Text -> f (Maybe Text)) -> TableColumn -> f TableColumn
tableColumn_tableColumnName = (TableColumn -> Maybe Text)
-> (TableColumn -> Maybe Text -> TableColumn)
-> Lens TableColumn TableColumn (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableColumn' {Maybe Text
tableColumnName :: Maybe Text
$sel:tableColumnName:TableColumn' :: TableColumn -> Maybe Text
tableColumnName} -> Maybe Text
tableColumnName) (\s :: TableColumn
s@TableColumn' {} Maybe Text
a -> TableColumn
s {$sel:tableColumnName:TableColumn' :: Maybe Text
tableColumnName = Maybe Text
a} :: TableColumn)
tableColumn_tableColumnId :: Lens.Lens' TableColumn (Prelude.Maybe Prelude.Text)
tableColumn_tableColumnId :: (Maybe Text -> f (Maybe Text)) -> TableColumn -> f TableColumn
tableColumn_tableColumnId = (TableColumn -> Maybe Text)
-> (TableColumn -> Maybe Text -> TableColumn)
-> Lens TableColumn TableColumn (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableColumn' {Maybe Text
tableColumnId :: Maybe Text
$sel:tableColumnId:TableColumn' :: TableColumn -> Maybe Text
tableColumnId} -> Maybe Text
tableColumnId) (\s :: TableColumn
s@TableColumn' {} Maybe Text
a -> TableColumn
s {$sel:tableColumnId:TableColumn' :: Maybe Text
tableColumnId = Maybe Text
a} :: TableColumn)
instance Core.FromJSON TableColumn where
parseJSON :: Value -> Parser TableColumn
parseJSON =
String
-> (Object -> Parser TableColumn) -> Value -> Parser TableColumn
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TableColumn"
( \Object
x ->
Maybe Format -> Maybe Text -> Maybe Text -> TableColumn
TableColumn'
(Maybe Format -> Maybe Text -> Maybe Text -> TableColumn)
-> Parser (Maybe Format)
-> Parser (Maybe Text -> Maybe Text -> TableColumn)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Format)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"format")
Parser (Maybe Text -> Maybe Text -> TableColumn)
-> Parser (Maybe Text) -> Parser (Maybe Text -> TableColumn)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tableColumnName")
Parser (Maybe Text -> TableColumn)
-> Parser (Maybe Text) -> Parser TableColumn
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tableColumnId")
)
instance Prelude.Hashable TableColumn
instance Prelude.NFData TableColumn