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