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