{-# 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.QuickSight.Types.DataSetReference where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DataSetReference = DataSetReference'
{
DataSetReference -> Text
dataSetPlaceholder :: Prelude.Text,
DataSetReference -> Text
dataSetArn :: Prelude.Text
}
deriving (DataSetReference -> DataSetReference -> Bool
(DataSetReference -> DataSetReference -> Bool)
-> (DataSetReference -> DataSetReference -> Bool)
-> Eq DataSetReference
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DataSetReference -> DataSetReference -> Bool
$c/= :: DataSetReference -> DataSetReference -> Bool
== :: DataSetReference -> DataSetReference -> Bool
$c== :: DataSetReference -> DataSetReference -> Bool
Prelude.Eq, ReadPrec [DataSetReference]
ReadPrec DataSetReference
Int -> ReadS DataSetReference
ReadS [DataSetReference]
(Int -> ReadS DataSetReference)
-> ReadS [DataSetReference]
-> ReadPrec DataSetReference
-> ReadPrec [DataSetReference]
-> Read DataSetReference
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DataSetReference]
$creadListPrec :: ReadPrec [DataSetReference]
readPrec :: ReadPrec DataSetReference
$creadPrec :: ReadPrec DataSetReference
readList :: ReadS [DataSetReference]
$creadList :: ReadS [DataSetReference]
readsPrec :: Int -> ReadS DataSetReference
$creadsPrec :: Int -> ReadS DataSetReference
Prelude.Read, Int -> DataSetReference -> ShowS
[DataSetReference] -> ShowS
DataSetReference -> String
(Int -> DataSetReference -> ShowS)
-> (DataSetReference -> String)
-> ([DataSetReference] -> ShowS)
-> Show DataSetReference
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DataSetReference] -> ShowS
$cshowList :: [DataSetReference] -> ShowS
show :: DataSetReference -> String
$cshow :: DataSetReference -> String
showsPrec :: Int -> DataSetReference -> ShowS
$cshowsPrec :: Int -> DataSetReference -> ShowS
Prelude.Show, (forall x. DataSetReference -> Rep DataSetReference x)
-> (forall x. Rep DataSetReference x -> DataSetReference)
-> Generic DataSetReference
forall x. Rep DataSetReference x -> DataSetReference
forall x. DataSetReference -> Rep DataSetReference x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DataSetReference x -> DataSetReference
$cfrom :: forall x. DataSetReference -> Rep DataSetReference x
Prelude.Generic)
newDataSetReference ::
Prelude.Text ->
Prelude.Text ->
DataSetReference
newDataSetReference :: Text -> Text -> DataSetReference
newDataSetReference Text
pDataSetPlaceholder_ Text
pDataSetArn_ =
DataSetReference' :: Text -> Text -> DataSetReference
DataSetReference'
{ $sel:dataSetPlaceholder:DataSetReference' :: Text
dataSetPlaceholder =
Text
pDataSetPlaceholder_,
$sel:dataSetArn:DataSetReference' :: Text
dataSetArn = Text
pDataSetArn_
}
dataSetReference_dataSetPlaceholder :: Lens.Lens' DataSetReference Prelude.Text
dataSetReference_dataSetPlaceholder :: (Text -> f Text) -> DataSetReference -> f DataSetReference
dataSetReference_dataSetPlaceholder = (DataSetReference -> Text)
-> (DataSetReference -> Text -> DataSetReference)
-> Lens DataSetReference DataSetReference Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSetReference' {Text
dataSetPlaceholder :: Text
$sel:dataSetPlaceholder:DataSetReference' :: DataSetReference -> Text
dataSetPlaceholder} -> Text
dataSetPlaceholder) (\s :: DataSetReference
s@DataSetReference' {} Text
a -> DataSetReference
s {$sel:dataSetPlaceholder:DataSetReference' :: Text
dataSetPlaceholder = Text
a} :: DataSetReference)
dataSetReference_dataSetArn :: Lens.Lens' DataSetReference Prelude.Text
dataSetReference_dataSetArn :: (Text -> f Text) -> DataSetReference -> f DataSetReference
dataSetReference_dataSetArn = (DataSetReference -> Text)
-> (DataSetReference -> Text -> DataSetReference)
-> Lens DataSetReference DataSetReference Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSetReference' {Text
dataSetArn :: Text
$sel:dataSetArn:DataSetReference' :: DataSetReference -> Text
dataSetArn} -> Text
dataSetArn) (\s :: DataSetReference
s@DataSetReference' {} Text
a -> DataSetReference
s {$sel:dataSetArn:DataSetReference' :: Text
dataSetArn = Text
a} :: DataSetReference)
instance Prelude.Hashable DataSetReference
instance Prelude.NFData DataSetReference
instance Core.ToJSON DataSetReference where
toJSON :: DataSetReference -> Value
toJSON DataSetReference' {Text
dataSetArn :: Text
dataSetPlaceholder :: Text
$sel:dataSetArn:DataSetReference' :: DataSetReference -> Text
$sel:dataSetPlaceholder:DataSetReference' :: DataSetReference -> 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
"DataSetPlaceholder" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
dataSetPlaceholder),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DataSetArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
dataSetArn)
]
)