{-# 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.DataExchange.Types.RedshiftDataShareAssetSourceEntry where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RedshiftDataShareAssetSourceEntry = RedshiftDataShareAssetSourceEntry'
{
RedshiftDataShareAssetSourceEntry -> Text
dataShareArn :: Prelude.Text
}
deriving (RedshiftDataShareAssetSourceEntry
-> RedshiftDataShareAssetSourceEntry -> Bool
(RedshiftDataShareAssetSourceEntry
-> RedshiftDataShareAssetSourceEntry -> Bool)
-> (RedshiftDataShareAssetSourceEntry
-> RedshiftDataShareAssetSourceEntry -> Bool)
-> Eq RedshiftDataShareAssetSourceEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RedshiftDataShareAssetSourceEntry
-> RedshiftDataShareAssetSourceEntry -> Bool
$c/= :: RedshiftDataShareAssetSourceEntry
-> RedshiftDataShareAssetSourceEntry -> Bool
== :: RedshiftDataShareAssetSourceEntry
-> RedshiftDataShareAssetSourceEntry -> Bool
$c== :: RedshiftDataShareAssetSourceEntry
-> RedshiftDataShareAssetSourceEntry -> Bool
Prelude.Eq, ReadPrec [RedshiftDataShareAssetSourceEntry]
ReadPrec RedshiftDataShareAssetSourceEntry
Int -> ReadS RedshiftDataShareAssetSourceEntry
ReadS [RedshiftDataShareAssetSourceEntry]
(Int -> ReadS RedshiftDataShareAssetSourceEntry)
-> ReadS [RedshiftDataShareAssetSourceEntry]
-> ReadPrec RedshiftDataShareAssetSourceEntry
-> ReadPrec [RedshiftDataShareAssetSourceEntry]
-> Read RedshiftDataShareAssetSourceEntry
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RedshiftDataShareAssetSourceEntry]
$creadListPrec :: ReadPrec [RedshiftDataShareAssetSourceEntry]
readPrec :: ReadPrec RedshiftDataShareAssetSourceEntry
$creadPrec :: ReadPrec RedshiftDataShareAssetSourceEntry
readList :: ReadS [RedshiftDataShareAssetSourceEntry]
$creadList :: ReadS [RedshiftDataShareAssetSourceEntry]
readsPrec :: Int -> ReadS RedshiftDataShareAssetSourceEntry
$creadsPrec :: Int -> ReadS RedshiftDataShareAssetSourceEntry
Prelude.Read, Int -> RedshiftDataShareAssetSourceEntry -> ShowS
[RedshiftDataShareAssetSourceEntry] -> ShowS
RedshiftDataShareAssetSourceEntry -> String
(Int -> RedshiftDataShareAssetSourceEntry -> ShowS)
-> (RedshiftDataShareAssetSourceEntry -> String)
-> ([RedshiftDataShareAssetSourceEntry] -> ShowS)
-> Show RedshiftDataShareAssetSourceEntry
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RedshiftDataShareAssetSourceEntry] -> ShowS
$cshowList :: [RedshiftDataShareAssetSourceEntry] -> ShowS
show :: RedshiftDataShareAssetSourceEntry -> String
$cshow :: RedshiftDataShareAssetSourceEntry -> String
showsPrec :: Int -> RedshiftDataShareAssetSourceEntry -> ShowS
$cshowsPrec :: Int -> RedshiftDataShareAssetSourceEntry -> ShowS
Prelude.Show, (forall x.
RedshiftDataShareAssetSourceEntry
-> Rep RedshiftDataShareAssetSourceEntry x)
-> (forall x.
Rep RedshiftDataShareAssetSourceEntry x
-> RedshiftDataShareAssetSourceEntry)
-> Generic RedshiftDataShareAssetSourceEntry
forall x.
Rep RedshiftDataShareAssetSourceEntry x
-> RedshiftDataShareAssetSourceEntry
forall x.
RedshiftDataShareAssetSourceEntry
-> Rep RedshiftDataShareAssetSourceEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RedshiftDataShareAssetSourceEntry x
-> RedshiftDataShareAssetSourceEntry
$cfrom :: forall x.
RedshiftDataShareAssetSourceEntry
-> Rep RedshiftDataShareAssetSourceEntry x
Prelude.Generic)
newRedshiftDataShareAssetSourceEntry ::
Prelude.Text ->
RedshiftDataShareAssetSourceEntry
newRedshiftDataShareAssetSourceEntry :: Text -> RedshiftDataShareAssetSourceEntry
newRedshiftDataShareAssetSourceEntry Text
pDataShareArn_ =
RedshiftDataShareAssetSourceEntry' :: Text -> RedshiftDataShareAssetSourceEntry
RedshiftDataShareAssetSourceEntry'
{ $sel:dataShareArn:RedshiftDataShareAssetSourceEntry' :: Text
dataShareArn =
Text
pDataShareArn_
}
redshiftDataShareAssetSourceEntry_dataShareArn :: Lens.Lens' RedshiftDataShareAssetSourceEntry Prelude.Text
redshiftDataShareAssetSourceEntry_dataShareArn :: (Text -> f Text)
-> RedshiftDataShareAssetSourceEntry
-> f RedshiftDataShareAssetSourceEntry
redshiftDataShareAssetSourceEntry_dataShareArn = (RedshiftDataShareAssetSourceEntry -> Text)
-> (RedshiftDataShareAssetSourceEntry
-> Text -> RedshiftDataShareAssetSourceEntry)
-> Lens
RedshiftDataShareAssetSourceEntry
RedshiftDataShareAssetSourceEntry
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftDataShareAssetSourceEntry' {Text
dataShareArn :: Text
$sel:dataShareArn:RedshiftDataShareAssetSourceEntry' :: RedshiftDataShareAssetSourceEntry -> Text
dataShareArn} -> Text
dataShareArn) (\s :: RedshiftDataShareAssetSourceEntry
s@RedshiftDataShareAssetSourceEntry' {} Text
a -> RedshiftDataShareAssetSourceEntry
s {$sel:dataShareArn:RedshiftDataShareAssetSourceEntry' :: Text
dataShareArn = Text
a} :: RedshiftDataShareAssetSourceEntry)
instance
Core.FromJSON
RedshiftDataShareAssetSourceEntry
where
parseJSON :: Value -> Parser RedshiftDataShareAssetSourceEntry
parseJSON =
String
-> (Object -> Parser RedshiftDataShareAssetSourceEntry)
-> Value
-> Parser RedshiftDataShareAssetSourceEntry
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RedshiftDataShareAssetSourceEntry"
( \Object
x ->
Text -> RedshiftDataShareAssetSourceEntry
RedshiftDataShareAssetSourceEntry'
(Text -> RedshiftDataShareAssetSourceEntry)
-> Parser Text -> Parser RedshiftDataShareAssetSourceEntry
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"DataShareArn")
)
instance
Prelude.Hashable
RedshiftDataShareAssetSourceEntry
instance
Prelude.NFData
RedshiftDataShareAssetSourceEntry
instance
Core.ToJSON
RedshiftDataShareAssetSourceEntry
where
toJSON :: RedshiftDataShareAssetSourceEntry -> Value
toJSON RedshiftDataShareAssetSourceEntry' {Text
dataShareArn :: Text
$sel:dataShareArn:RedshiftDataShareAssetSourceEntry' :: RedshiftDataShareAssetSourceEntry -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DataShareArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
dataShareArn)]
)