{-# 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.LakeFormation.Types.ColumnWildcard where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ColumnWildcard = ColumnWildcard'
{
ColumnWildcard -> Maybe [Text]
excludedColumnNames :: Prelude.Maybe [Prelude.Text]
}
deriving (ColumnWildcard -> ColumnWildcard -> Bool
(ColumnWildcard -> ColumnWildcard -> Bool)
-> (ColumnWildcard -> ColumnWildcard -> Bool) -> Eq ColumnWildcard
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ColumnWildcard -> ColumnWildcard -> Bool
$c/= :: ColumnWildcard -> ColumnWildcard -> Bool
== :: ColumnWildcard -> ColumnWildcard -> Bool
$c== :: ColumnWildcard -> ColumnWildcard -> Bool
Prelude.Eq, ReadPrec [ColumnWildcard]
ReadPrec ColumnWildcard
Int -> ReadS ColumnWildcard
ReadS [ColumnWildcard]
(Int -> ReadS ColumnWildcard)
-> ReadS [ColumnWildcard]
-> ReadPrec ColumnWildcard
-> ReadPrec [ColumnWildcard]
-> Read ColumnWildcard
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ColumnWildcard]
$creadListPrec :: ReadPrec [ColumnWildcard]
readPrec :: ReadPrec ColumnWildcard
$creadPrec :: ReadPrec ColumnWildcard
readList :: ReadS [ColumnWildcard]
$creadList :: ReadS [ColumnWildcard]
readsPrec :: Int -> ReadS ColumnWildcard
$creadsPrec :: Int -> ReadS ColumnWildcard
Prelude.Read, Int -> ColumnWildcard -> ShowS
[ColumnWildcard] -> ShowS
ColumnWildcard -> String
(Int -> ColumnWildcard -> ShowS)
-> (ColumnWildcard -> String)
-> ([ColumnWildcard] -> ShowS)
-> Show ColumnWildcard
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ColumnWildcard] -> ShowS
$cshowList :: [ColumnWildcard] -> ShowS
show :: ColumnWildcard -> String
$cshow :: ColumnWildcard -> String
showsPrec :: Int -> ColumnWildcard -> ShowS
$cshowsPrec :: Int -> ColumnWildcard -> ShowS
Prelude.Show, (forall x. ColumnWildcard -> Rep ColumnWildcard x)
-> (forall x. Rep ColumnWildcard x -> ColumnWildcard)
-> Generic ColumnWildcard
forall x. Rep ColumnWildcard x -> ColumnWildcard
forall x. ColumnWildcard -> Rep ColumnWildcard x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ColumnWildcard x -> ColumnWildcard
$cfrom :: forall x. ColumnWildcard -> Rep ColumnWildcard x
Prelude.Generic)
newColumnWildcard ::
ColumnWildcard
newColumnWildcard :: ColumnWildcard
newColumnWildcard =
ColumnWildcard' :: Maybe [Text] -> ColumnWildcard
ColumnWildcard'
{ $sel:excludedColumnNames:ColumnWildcard' :: Maybe [Text]
excludedColumnNames =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing
}
columnWildcard_excludedColumnNames :: Lens.Lens' ColumnWildcard (Prelude.Maybe [Prelude.Text])
columnWildcard_excludedColumnNames :: (Maybe [Text] -> f (Maybe [Text]))
-> ColumnWildcard -> f ColumnWildcard
columnWildcard_excludedColumnNames = (ColumnWildcard -> Maybe [Text])
-> (ColumnWildcard -> Maybe [Text] -> ColumnWildcard)
-> Lens ColumnWildcard ColumnWildcard (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ColumnWildcard' {Maybe [Text]
excludedColumnNames :: Maybe [Text]
$sel:excludedColumnNames:ColumnWildcard' :: ColumnWildcard -> Maybe [Text]
excludedColumnNames} -> Maybe [Text]
excludedColumnNames) (\s :: ColumnWildcard
s@ColumnWildcard' {} Maybe [Text]
a -> ColumnWildcard
s {$sel:excludedColumnNames:ColumnWildcard' :: Maybe [Text]
excludedColumnNames = Maybe [Text]
a} :: ColumnWildcard) ((Maybe [Text] -> f (Maybe [Text]))
-> ColumnWildcard -> f ColumnWildcard)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ColumnWildcard
-> f ColumnWildcard
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON ColumnWildcard where
parseJSON :: Value -> Parser ColumnWildcard
parseJSON =
String
-> (Object -> Parser ColumnWildcard)
-> Value
-> Parser ColumnWildcard
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ColumnWildcard"
( \Object
x ->
Maybe [Text] -> ColumnWildcard
ColumnWildcard'
(Maybe [Text] -> ColumnWildcard)
-> Parser (Maybe [Text]) -> Parser ColumnWildcard
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ExcludedColumnNames"
Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable ColumnWildcard
instance Prelude.NFData ColumnWildcard
instance Core.ToJSON ColumnWildcard where
toJSON :: ColumnWildcard -> Value
toJSON ColumnWildcard' {Maybe [Text]
excludedColumnNames :: Maybe [Text]
$sel:excludedColumnNames:ColumnWildcard' :: ColumnWildcard -> Maybe [Text]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ExcludedColumnNames" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
excludedColumnNames
]
)