{-# 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.SESV2.Types.Destination 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 Destination = Destination'
{
Destination -> Maybe [Text]
bccAddresses :: Prelude.Maybe [Prelude.Text],
Destination -> Maybe [Text]
ccAddresses :: Prelude.Maybe [Prelude.Text],
Destination -> Maybe [Text]
toAddresses :: Prelude.Maybe [Prelude.Text]
}
deriving (Destination -> Destination -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Destination -> Destination -> Bool
$c/= :: Destination -> Destination -> Bool
== :: Destination -> Destination -> Bool
$c== :: Destination -> Destination -> Bool
Prelude.Eq, ReadPrec [Destination]
ReadPrec Destination
Int -> ReadS Destination
ReadS [Destination]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Destination]
$creadListPrec :: ReadPrec [Destination]
readPrec :: ReadPrec Destination
$creadPrec :: ReadPrec Destination
readList :: ReadS [Destination]
$creadList :: ReadS [Destination]
readsPrec :: Int -> ReadS Destination
$creadsPrec :: Int -> ReadS Destination
Prelude.Read, Int -> Destination -> ShowS
[Destination] -> ShowS
Destination -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Destination] -> ShowS
$cshowList :: [Destination] -> ShowS
show :: Destination -> String
$cshow :: Destination -> String
showsPrec :: Int -> Destination -> ShowS
$cshowsPrec :: Int -> Destination -> ShowS
Prelude.Show, forall x. Rep Destination x -> Destination
forall x. Destination -> Rep Destination x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Destination x -> Destination
$cfrom :: forall x. Destination -> Rep Destination x
Prelude.Generic)
newDestination ::
Destination
newDestination :: Destination
newDestination =
Destination'
{ $sel:bccAddresses:Destination' :: Maybe [Text]
bccAddresses = forall a. Maybe a
Prelude.Nothing,
$sel:ccAddresses:Destination' :: Maybe [Text]
ccAddresses = forall a. Maybe a
Prelude.Nothing,
$sel:toAddresses:Destination' :: Maybe [Text]
toAddresses = forall a. Maybe a
Prelude.Nothing
}
destination_bccAddresses :: Lens.Lens' Destination (Prelude.Maybe [Prelude.Text])
destination_bccAddresses :: Lens' Destination (Maybe [Text])
destination_bccAddresses = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Destination' {Maybe [Text]
bccAddresses :: Maybe [Text]
$sel:bccAddresses:Destination' :: Destination -> Maybe [Text]
bccAddresses} -> Maybe [Text]
bccAddresses) (\s :: Destination
s@Destination' {} Maybe [Text]
a -> Destination
s {$sel:bccAddresses:Destination' :: Maybe [Text]
bccAddresses = Maybe [Text]
a} :: Destination) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
destination_ccAddresses :: Lens.Lens' Destination (Prelude.Maybe [Prelude.Text])
destination_ccAddresses :: Lens' Destination (Maybe [Text])
destination_ccAddresses = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Destination' {Maybe [Text]
ccAddresses :: Maybe [Text]
$sel:ccAddresses:Destination' :: Destination -> Maybe [Text]
ccAddresses} -> Maybe [Text]
ccAddresses) (\s :: Destination
s@Destination' {} Maybe [Text]
a -> Destination
s {$sel:ccAddresses:Destination' :: Maybe [Text]
ccAddresses = Maybe [Text]
a} :: Destination) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
destination_toAddresses :: Lens.Lens' Destination (Prelude.Maybe [Prelude.Text])
destination_toAddresses :: Lens' Destination (Maybe [Text])
destination_toAddresses = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Destination' {Maybe [Text]
toAddresses :: Maybe [Text]
$sel:toAddresses:Destination' :: Destination -> Maybe [Text]
toAddresses} -> Maybe [Text]
toAddresses) (\s :: Destination
s@Destination' {} Maybe [Text]
a -> Destination
s {$sel:toAddresses:Destination' :: Maybe [Text]
toAddresses = Maybe [Text]
a} :: Destination) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.Hashable Destination where
hashWithSalt :: Int -> Destination -> Int
hashWithSalt Int
_salt Destination' {Maybe [Text]
toAddresses :: Maybe [Text]
ccAddresses :: Maybe [Text]
bccAddresses :: Maybe [Text]
$sel:toAddresses:Destination' :: Destination -> Maybe [Text]
$sel:ccAddresses:Destination' :: Destination -> Maybe [Text]
$sel:bccAddresses:Destination' :: Destination -> Maybe [Text]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
bccAddresses
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
ccAddresses
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
toAddresses
instance Prelude.NFData Destination where
rnf :: Destination -> ()
rnf Destination' {Maybe [Text]
toAddresses :: Maybe [Text]
ccAddresses :: Maybe [Text]
bccAddresses :: Maybe [Text]
$sel:toAddresses:Destination' :: Destination -> Maybe [Text]
$sel:ccAddresses:Destination' :: Destination -> Maybe [Text]
$sel:bccAddresses:Destination' :: Destination -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
bccAddresses
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
ccAddresses
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
toAddresses
instance Data.ToJSON Destination where
toJSON :: Destination -> Value
toJSON Destination' {Maybe [Text]
toAddresses :: Maybe [Text]
ccAddresses :: Maybe [Text]
bccAddresses :: Maybe [Text]
$sel:toAddresses:Destination' :: Destination -> Maybe [Text]
$sel:ccAddresses:Destination' :: Destination -> Maybe [Text]
$sel:bccAddresses:Destination' :: Destination -> Maybe [Text]
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"BccAddresses" 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]
bccAddresses,
(Key
"CcAddresses" 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]
ccAddresses,
(Key
"ToAddresses" 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]
toAddresses
]
)