{-# 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.SimpleEmailPart where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data SimpleEmailPart = SimpleEmailPart'
{
SimpleEmailPart -> Maybe Text
charset :: Prelude.Maybe Prelude.Text,
SimpleEmailPart -> Maybe Text
data' :: Prelude.Maybe Prelude.Text
}
deriving (SimpleEmailPart -> SimpleEmailPart -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SimpleEmailPart -> SimpleEmailPart -> Bool
$c/= :: SimpleEmailPart -> SimpleEmailPart -> Bool
== :: SimpleEmailPart -> SimpleEmailPart -> Bool
$c== :: SimpleEmailPart -> SimpleEmailPart -> Bool
Prelude.Eq, ReadPrec [SimpleEmailPart]
ReadPrec SimpleEmailPart
Int -> ReadS SimpleEmailPart
ReadS [SimpleEmailPart]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SimpleEmailPart]
$creadListPrec :: ReadPrec [SimpleEmailPart]
readPrec :: ReadPrec SimpleEmailPart
$creadPrec :: ReadPrec SimpleEmailPart
readList :: ReadS [SimpleEmailPart]
$creadList :: ReadS [SimpleEmailPart]
readsPrec :: Int -> ReadS SimpleEmailPart
$creadsPrec :: Int -> ReadS SimpleEmailPart
Prelude.Read, Int -> SimpleEmailPart -> ShowS
[SimpleEmailPart] -> ShowS
SimpleEmailPart -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SimpleEmailPart] -> ShowS
$cshowList :: [SimpleEmailPart] -> ShowS
show :: SimpleEmailPart -> String
$cshow :: SimpleEmailPart -> String
showsPrec :: Int -> SimpleEmailPart -> ShowS
$cshowsPrec :: Int -> SimpleEmailPart -> ShowS
Prelude.Show, forall x. Rep SimpleEmailPart x -> SimpleEmailPart
forall x. SimpleEmailPart -> Rep SimpleEmailPart x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SimpleEmailPart x -> SimpleEmailPart
$cfrom :: forall x. SimpleEmailPart -> Rep SimpleEmailPart x
Prelude.Generic)
newSimpleEmailPart ::
SimpleEmailPart
newSimpleEmailPart :: SimpleEmailPart
newSimpleEmailPart =
SimpleEmailPart'
{ $sel:charset:SimpleEmailPart' :: Maybe Text
charset = forall a. Maybe a
Prelude.Nothing,
$sel:data':SimpleEmailPart' :: Maybe Text
data' = forall a. Maybe a
Prelude.Nothing
}
simpleEmailPart_charset :: Lens.Lens' SimpleEmailPart (Prelude.Maybe Prelude.Text)
simpleEmailPart_charset :: Lens' SimpleEmailPart (Maybe Text)
simpleEmailPart_charset = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SimpleEmailPart' {Maybe Text
charset :: Maybe Text
$sel:charset:SimpleEmailPart' :: SimpleEmailPart -> Maybe Text
charset} -> Maybe Text
charset) (\s :: SimpleEmailPart
s@SimpleEmailPart' {} Maybe Text
a -> SimpleEmailPart
s {$sel:charset:SimpleEmailPart' :: Maybe Text
charset = Maybe Text
a} :: SimpleEmailPart)
simpleEmailPart_data :: Lens.Lens' SimpleEmailPart (Prelude.Maybe Prelude.Text)
simpleEmailPart_data :: Lens' SimpleEmailPart (Maybe Text)
simpleEmailPart_data = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SimpleEmailPart' {Maybe Text
data' :: Maybe Text
$sel:data':SimpleEmailPart' :: SimpleEmailPart -> Maybe Text
data'} -> Maybe Text
data') (\s :: SimpleEmailPart
s@SimpleEmailPart' {} Maybe Text
a -> SimpleEmailPart
s {$sel:data':SimpleEmailPart' :: Maybe Text
data' = Maybe Text
a} :: SimpleEmailPart)
instance Prelude.Hashable SimpleEmailPart where
hashWithSalt :: Int -> SimpleEmailPart -> Int
hashWithSalt Int
_salt SimpleEmailPart' {Maybe Text
data' :: Maybe Text
charset :: Maybe Text
$sel:data':SimpleEmailPart' :: SimpleEmailPart -> Maybe Text
$sel:charset:SimpleEmailPart' :: SimpleEmailPart -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
charset
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
data'
instance Prelude.NFData SimpleEmailPart where
rnf :: SimpleEmailPart -> ()
rnf SimpleEmailPart' {Maybe Text
data' :: Maybe Text
charset :: Maybe Text
$sel:data':SimpleEmailPart' :: SimpleEmailPart -> Maybe Text
$sel:charset:SimpleEmailPart' :: SimpleEmailPart -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
charset seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
data'
instance Data.ToJSON SimpleEmailPart where
toJSON :: SimpleEmailPart -> Value
toJSON SimpleEmailPart' {Maybe Text
data' :: Maybe Text
charset :: Maybe Text
$sel:data':SimpleEmailPart' :: SimpleEmailPart -> Maybe Text
$sel:charset:SimpleEmailPart' :: SimpleEmailPart -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"Charset" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
charset,
(Key
"Data" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
data'
]
)