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