{-# 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.ConnectCases.Types.ContactContent 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 ContactContent = ContactContent'
{
ContactContent -> Text
channel :: Prelude.Text,
ContactContent -> ISO8601
connectedToSystemTime :: Data.ISO8601,
ContactContent -> Text
contactArn :: Prelude.Text
}
deriving (ContactContent -> ContactContent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContactContent -> ContactContent -> Bool
$c/= :: ContactContent -> ContactContent -> Bool
== :: ContactContent -> ContactContent -> Bool
$c== :: ContactContent -> ContactContent -> Bool
Prelude.Eq, ReadPrec [ContactContent]
ReadPrec ContactContent
Int -> ReadS ContactContent
ReadS [ContactContent]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ContactContent]
$creadListPrec :: ReadPrec [ContactContent]
readPrec :: ReadPrec ContactContent
$creadPrec :: ReadPrec ContactContent
readList :: ReadS [ContactContent]
$creadList :: ReadS [ContactContent]
readsPrec :: Int -> ReadS ContactContent
$creadsPrec :: Int -> ReadS ContactContent
Prelude.Read, Int -> ContactContent -> ShowS
[ContactContent] -> ShowS
ContactContent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContactContent] -> ShowS
$cshowList :: [ContactContent] -> ShowS
show :: ContactContent -> String
$cshow :: ContactContent -> String
showsPrec :: Int -> ContactContent -> ShowS
$cshowsPrec :: Int -> ContactContent -> ShowS
Prelude.Show, forall x. Rep ContactContent x -> ContactContent
forall x. ContactContent -> Rep ContactContent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ContactContent x -> ContactContent
$cfrom :: forall x. ContactContent -> Rep ContactContent x
Prelude.Generic)
newContactContent ::
Prelude.Text ->
Prelude.UTCTime ->
Prelude.Text ->
ContactContent
newContactContent :: Text -> UTCTime -> Text -> ContactContent
newContactContent
Text
pChannel_
UTCTime
pConnectedToSystemTime_
Text
pContactArn_ =
ContactContent'
{ $sel:channel:ContactContent' :: Text
channel = Text
pChannel_,
$sel:connectedToSystemTime:ContactContent' :: ISO8601
connectedToSystemTime =
forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pConnectedToSystemTime_,
$sel:contactArn:ContactContent' :: Text
contactArn = Text
pContactArn_
}
contactContent_channel :: Lens.Lens' ContactContent Prelude.Text
contactContent_channel :: Lens' ContactContent Text
contactContent_channel = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContactContent' {Text
channel :: Text
$sel:channel:ContactContent' :: ContactContent -> Text
channel} -> Text
channel) (\s :: ContactContent
s@ContactContent' {} Text
a -> ContactContent
s {$sel:channel:ContactContent' :: Text
channel = Text
a} :: ContactContent)
contactContent_connectedToSystemTime :: Lens.Lens' ContactContent Prelude.UTCTime
contactContent_connectedToSystemTime :: Lens' ContactContent UTCTime
contactContent_connectedToSystemTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContactContent' {ISO8601
connectedToSystemTime :: ISO8601
$sel:connectedToSystemTime:ContactContent' :: ContactContent -> ISO8601
connectedToSystemTime} -> ISO8601
connectedToSystemTime) (\s :: ContactContent
s@ContactContent' {} ISO8601
a -> ContactContent
s {$sel:connectedToSystemTime:ContactContent' :: ISO8601
connectedToSystemTime = ISO8601
a} :: ContactContent) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
contactContent_contactArn :: Lens.Lens' ContactContent Prelude.Text
contactContent_contactArn :: Lens' ContactContent Text
contactContent_contactArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContactContent' {Text
contactArn :: Text
$sel:contactArn:ContactContent' :: ContactContent -> Text
contactArn} -> Text
contactArn) (\s :: ContactContent
s@ContactContent' {} Text
a -> ContactContent
s {$sel:contactArn:ContactContent' :: Text
contactArn = Text
a} :: ContactContent)
instance Data.FromJSON ContactContent where
parseJSON :: Value -> Parser ContactContent
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ContactContent"
( \Object
x ->
Text -> ISO8601 -> Text -> ContactContent
ContactContent'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"channel")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"connectedToSystemTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"contactArn")
)
instance Prelude.Hashable ContactContent where
hashWithSalt :: Int -> ContactContent -> Int
hashWithSalt Int
_salt ContactContent' {Text
ISO8601
contactArn :: Text
connectedToSystemTime :: ISO8601
channel :: Text
$sel:contactArn:ContactContent' :: ContactContent -> Text
$sel:connectedToSystemTime:ContactContent' :: ContactContent -> ISO8601
$sel:channel:ContactContent' :: ContactContent -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
channel
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ISO8601
connectedToSystemTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
contactArn
instance Prelude.NFData ContactContent where
rnf :: ContactContent -> ()
rnf ContactContent' {Text
ISO8601
contactArn :: Text
connectedToSystemTime :: ISO8601
channel :: Text
$sel:contactArn:ContactContent' :: ContactContent -> Text
$sel:connectedToSystemTime:ContactContent' :: ContactContent -> ISO8601
$sel:channel:ContactContent' :: ContactContent -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
channel
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
connectedToSystemTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
contactArn