{-# 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.Contact 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 Contact = Contact'
{
Contact -> Text
contactArn :: Prelude.Text
}
deriving (Contact -> Contact -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Contact -> Contact -> Bool
$c/= :: Contact -> Contact -> Bool
== :: Contact -> Contact -> Bool
$c== :: Contact -> Contact -> Bool
Prelude.Eq, ReadPrec [Contact]
ReadPrec Contact
Int -> ReadS Contact
ReadS [Contact]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Contact]
$creadListPrec :: ReadPrec [Contact]
readPrec :: ReadPrec Contact
$creadPrec :: ReadPrec Contact
readList :: ReadS [Contact]
$creadList :: ReadS [Contact]
readsPrec :: Int -> ReadS Contact
$creadsPrec :: Int -> ReadS Contact
Prelude.Read, Int -> Contact -> ShowS
[Contact] -> ShowS
Contact -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Contact] -> ShowS
$cshowList :: [Contact] -> ShowS
show :: Contact -> String
$cshow :: Contact -> String
showsPrec :: Int -> Contact -> ShowS
$cshowsPrec :: Int -> Contact -> ShowS
Prelude.Show, forall x. Rep Contact x -> Contact
forall x. Contact -> Rep Contact x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Contact x -> Contact
$cfrom :: forall x. Contact -> Rep Contact x
Prelude.Generic)
newContact ::
Prelude.Text ->
Contact
newContact :: Text -> Contact
newContact Text
pContactArn_ =
Contact' {$sel:contactArn:Contact' :: Text
contactArn = Text
pContactArn_}
contact_contactArn :: Lens.Lens' Contact Prelude.Text
contact_contactArn :: Lens' Contact Text
contact_contactArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Contact' {Text
contactArn :: Text
$sel:contactArn:Contact' :: Contact -> Text
contactArn} -> Text
contactArn) (\s :: Contact
s@Contact' {} Text
a -> Contact
s {$sel:contactArn:Contact' :: Text
contactArn = Text
a} :: Contact)
instance Prelude.Hashable Contact where
hashWithSalt :: Int -> Contact -> Int
hashWithSalt Int
_salt Contact' {Text
contactArn :: Text
$sel:contactArn:Contact' :: Contact -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
contactArn
instance Prelude.NFData Contact where
rnf :: Contact -> ()
rnf Contact' {Text
contactArn :: Text
$sel:contactArn:Contact' :: Contact -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
contactArn
instance Data.ToJSON Contact where
toJSON :: Contact -> Value
toJSON Contact' {Text
contactArn :: Text
$sel:contactArn:Contact' :: Contact -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"contactArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
contactArn)]
)