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