{-# 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.Connect.Types.VocabularySummary where
import Amazonka.Connect.Types.VocabularyLanguageCode
import Amazonka.Connect.Types.VocabularyState
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 VocabularySummary = VocabularySummary'
{
VocabularySummary -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
VocabularySummary -> Text
name :: Prelude.Text,
VocabularySummary -> Text
id :: Prelude.Text,
VocabularySummary -> Text
arn :: Prelude.Text,
VocabularySummary -> VocabularyLanguageCode
languageCode :: VocabularyLanguageCode,
VocabularySummary -> VocabularyState
state :: VocabularyState,
VocabularySummary -> POSIX
lastModifiedTime :: Data.POSIX
}
deriving (VocabularySummary -> VocabularySummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VocabularySummary -> VocabularySummary -> Bool
$c/= :: VocabularySummary -> VocabularySummary -> Bool
== :: VocabularySummary -> VocabularySummary -> Bool
$c== :: VocabularySummary -> VocabularySummary -> Bool
Prelude.Eq, ReadPrec [VocabularySummary]
ReadPrec VocabularySummary
Int -> ReadS VocabularySummary
ReadS [VocabularySummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VocabularySummary]
$creadListPrec :: ReadPrec [VocabularySummary]
readPrec :: ReadPrec VocabularySummary
$creadPrec :: ReadPrec VocabularySummary
readList :: ReadS [VocabularySummary]
$creadList :: ReadS [VocabularySummary]
readsPrec :: Int -> ReadS VocabularySummary
$creadsPrec :: Int -> ReadS VocabularySummary
Prelude.Read, Int -> VocabularySummary -> ShowS
[VocabularySummary] -> ShowS
VocabularySummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VocabularySummary] -> ShowS
$cshowList :: [VocabularySummary] -> ShowS
show :: VocabularySummary -> String
$cshow :: VocabularySummary -> String
showsPrec :: Int -> VocabularySummary -> ShowS
$cshowsPrec :: Int -> VocabularySummary -> ShowS
Prelude.Show, forall x. Rep VocabularySummary x -> VocabularySummary
forall x. VocabularySummary -> Rep VocabularySummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VocabularySummary x -> VocabularySummary
$cfrom :: forall x. VocabularySummary -> Rep VocabularySummary x
Prelude.Generic)
newVocabularySummary ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
VocabularyLanguageCode ->
VocabularyState ->
Prelude.UTCTime ->
VocabularySummary
newVocabularySummary :: Text
-> Text
-> Text
-> VocabularyLanguageCode
-> VocabularyState
-> UTCTime
-> VocabularySummary
newVocabularySummary
Text
pName_
Text
pId_
Text
pArn_
VocabularyLanguageCode
pLanguageCode_
VocabularyState
pState_
UTCTime
pLastModifiedTime_ =
VocabularySummary'
{ $sel:failureReason:VocabularySummary' :: Maybe Text
failureReason = forall a. Maybe a
Prelude.Nothing,
$sel:name:VocabularySummary' :: Text
name = Text
pName_,
$sel:id:VocabularySummary' :: Text
id = Text
pId_,
$sel:arn:VocabularySummary' :: Text
arn = Text
pArn_,
$sel:languageCode:VocabularySummary' :: VocabularyLanguageCode
languageCode = VocabularyLanguageCode
pLanguageCode_,
$sel:state:VocabularySummary' :: VocabularyState
state = VocabularyState
pState_,
$sel:lastModifiedTime:VocabularySummary' :: POSIX
lastModifiedTime =
forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastModifiedTime_
}
vocabularySummary_failureReason :: Lens.Lens' VocabularySummary (Prelude.Maybe Prelude.Text)
vocabularySummary_failureReason :: Lens' VocabularySummary (Maybe Text)
vocabularySummary_failureReason = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VocabularySummary' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:VocabularySummary' :: VocabularySummary -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: VocabularySummary
s@VocabularySummary' {} Maybe Text
a -> VocabularySummary
s {$sel:failureReason:VocabularySummary' :: Maybe Text
failureReason = Maybe Text
a} :: VocabularySummary)
vocabularySummary_name :: Lens.Lens' VocabularySummary Prelude.Text
vocabularySummary_name :: Lens' VocabularySummary Text
vocabularySummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VocabularySummary' {Text
name :: Text
$sel:name:VocabularySummary' :: VocabularySummary -> Text
name} -> Text
name) (\s :: VocabularySummary
s@VocabularySummary' {} Text
a -> VocabularySummary
s {$sel:name:VocabularySummary' :: Text
name = Text
a} :: VocabularySummary)
vocabularySummary_id :: Lens.Lens' VocabularySummary Prelude.Text
vocabularySummary_id :: Lens' VocabularySummary Text
vocabularySummary_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VocabularySummary' {Text
id :: Text
$sel:id:VocabularySummary' :: VocabularySummary -> Text
id} -> Text
id) (\s :: VocabularySummary
s@VocabularySummary' {} Text
a -> VocabularySummary
s {$sel:id:VocabularySummary' :: Text
id = Text
a} :: VocabularySummary)
vocabularySummary_arn :: Lens.Lens' VocabularySummary Prelude.Text
vocabularySummary_arn :: Lens' VocabularySummary Text
vocabularySummary_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VocabularySummary' {Text
arn :: Text
$sel:arn:VocabularySummary' :: VocabularySummary -> Text
arn} -> Text
arn) (\s :: VocabularySummary
s@VocabularySummary' {} Text
a -> VocabularySummary
s {$sel:arn:VocabularySummary' :: Text
arn = Text
a} :: VocabularySummary)
vocabularySummary_languageCode :: Lens.Lens' VocabularySummary VocabularyLanguageCode
vocabularySummary_languageCode :: Lens' VocabularySummary VocabularyLanguageCode
vocabularySummary_languageCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VocabularySummary' {VocabularyLanguageCode
languageCode :: VocabularyLanguageCode
$sel:languageCode:VocabularySummary' :: VocabularySummary -> VocabularyLanguageCode
languageCode} -> VocabularyLanguageCode
languageCode) (\s :: VocabularySummary
s@VocabularySummary' {} VocabularyLanguageCode
a -> VocabularySummary
s {$sel:languageCode:VocabularySummary' :: VocabularyLanguageCode
languageCode = VocabularyLanguageCode
a} :: VocabularySummary)
vocabularySummary_state :: Lens.Lens' VocabularySummary VocabularyState
vocabularySummary_state :: Lens' VocabularySummary VocabularyState
vocabularySummary_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VocabularySummary' {VocabularyState
state :: VocabularyState
$sel:state:VocabularySummary' :: VocabularySummary -> VocabularyState
state} -> VocabularyState
state) (\s :: VocabularySummary
s@VocabularySummary' {} VocabularyState
a -> VocabularySummary
s {$sel:state:VocabularySummary' :: VocabularyState
state = VocabularyState
a} :: VocabularySummary)
vocabularySummary_lastModifiedTime :: Lens.Lens' VocabularySummary Prelude.UTCTime
vocabularySummary_lastModifiedTime :: Lens' VocabularySummary UTCTime
vocabularySummary_lastModifiedTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VocabularySummary' {POSIX
lastModifiedTime :: POSIX
$sel:lastModifiedTime:VocabularySummary' :: VocabularySummary -> POSIX
lastModifiedTime} -> POSIX
lastModifiedTime) (\s :: VocabularySummary
s@VocabularySummary' {} POSIX
a -> VocabularySummary
s {$sel:lastModifiedTime:VocabularySummary' :: POSIX
lastModifiedTime = POSIX
a} :: VocabularySummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON VocabularySummary where
parseJSON :: Value -> Parser VocabularySummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"VocabularySummary"
( \Object
x ->
Maybe Text
-> Text
-> Text
-> Text
-> VocabularyLanguageCode
-> VocabularyState
-> POSIX
-> VocabularySummary
VocabularySummary'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"FailureReason")
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
"Name")
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
"Id")
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
"Arn")
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
"LanguageCode")
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
"State")
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
"LastModifiedTime")
)
instance Prelude.Hashable VocabularySummary where
hashWithSalt :: Int -> VocabularySummary -> Int
hashWithSalt Int
_salt VocabularySummary' {Maybe Text
Text
POSIX
VocabularyLanguageCode
VocabularyState
lastModifiedTime :: POSIX
state :: VocabularyState
languageCode :: VocabularyLanguageCode
arn :: Text
id :: Text
name :: Text
failureReason :: Maybe Text
$sel:lastModifiedTime:VocabularySummary' :: VocabularySummary -> POSIX
$sel:state:VocabularySummary' :: VocabularySummary -> VocabularyState
$sel:languageCode:VocabularySummary' :: VocabularySummary -> VocabularyLanguageCode
$sel:arn:VocabularySummary' :: VocabularySummary -> Text
$sel:id:VocabularySummary' :: VocabularySummary -> Text
$sel:name:VocabularySummary' :: VocabularySummary -> Text
$sel:failureReason:VocabularySummary' :: VocabularySummary -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
failureReason
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` VocabularyLanguageCode
languageCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` VocabularyState
state
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
lastModifiedTime
instance Prelude.NFData VocabularySummary where
rnf :: VocabularySummary -> ()
rnf VocabularySummary' {Maybe Text
Text
POSIX
VocabularyLanguageCode
VocabularyState
lastModifiedTime :: POSIX
state :: VocabularyState
languageCode :: VocabularyLanguageCode
arn :: Text
id :: Text
name :: Text
failureReason :: Maybe Text
$sel:lastModifiedTime:VocabularySummary' :: VocabularySummary -> POSIX
$sel:state:VocabularySummary' :: VocabularySummary -> VocabularyState
$sel:languageCode:VocabularySummary' :: VocabularySummary -> VocabularyLanguageCode
$sel:arn:VocabularySummary' :: VocabularySummary -> Text
$sel:id:VocabularySummary' :: VocabularySummary -> Text
$sel:name:VocabularySummary' :: VocabularySummary -> Text
$sel:failureReason:VocabularySummary' :: VocabularySummary -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
failureReason
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf VocabularyLanguageCode
languageCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf VocabularyState
state
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
lastModifiedTime