{-# 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.DefaultVocabulary where
import Amazonka.Connect.Types.VocabularyLanguageCode
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 DefaultVocabulary = DefaultVocabulary'
{
DefaultVocabulary -> Text
instanceId :: Prelude.Text,
DefaultVocabulary -> VocabularyLanguageCode
languageCode :: VocabularyLanguageCode,
DefaultVocabulary -> Text
vocabularyId :: Prelude.Text,
DefaultVocabulary -> Text
vocabularyName :: Prelude.Text
}
deriving (DefaultVocabulary -> DefaultVocabulary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DefaultVocabulary -> DefaultVocabulary -> Bool
$c/= :: DefaultVocabulary -> DefaultVocabulary -> Bool
== :: DefaultVocabulary -> DefaultVocabulary -> Bool
$c== :: DefaultVocabulary -> DefaultVocabulary -> Bool
Prelude.Eq, ReadPrec [DefaultVocabulary]
ReadPrec DefaultVocabulary
Int -> ReadS DefaultVocabulary
ReadS [DefaultVocabulary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DefaultVocabulary]
$creadListPrec :: ReadPrec [DefaultVocabulary]
readPrec :: ReadPrec DefaultVocabulary
$creadPrec :: ReadPrec DefaultVocabulary
readList :: ReadS [DefaultVocabulary]
$creadList :: ReadS [DefaultVocabulary]
readsPrec :: Int -> ReadS DefaultVocabulary
$creadsPrec :: Int -> ReadS DefaultVocabulary
Prelude.Read, Int -> DefaultVocabulary -> ShowS
[DefaultVocabulary] -> ShowS
DefaultVocabulary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DefaultVocabulary] -> ShowS
$cshowList :: [DefaultVocabulary] -> ShowS
show :: DefaultVocabulary -> String
$cshow :: DefaultVocabulary -> String
showsPrec :: Int -> DefaultVocabulary -> ShowS
$cshowsPrec :: Int -> DefaultVocabulary -> ShowS
Prelude.Show, forall x. Rep DefaultVocabulary x -> DefaultVocabulary
forall x. DefaultVocabulary -> Rep DefaultVocabulary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DefaultVocabulary x -> DefaultVocabulary
$cfrom :: forall x. DefaultVocabulary -> Rep DefaultVocabulary x
Prelude.Generic)
newDefaultVocabulary ::
Prelude.Text ->
VocabularyLanguageCode ->
Prelude.Text ->
Prelude.Text ->
DefaultVocabulary
newDefaultVocabulary :: Text -> VocabularyLanguageCode -> Text -> Text -> DefaultVocabulary
newDefaultVocabulary
Text
pInstanceId_
VocabularyLanguageCode
pLanguageCode_
Text
pVocabularyId_
Text
pVocabularyName_ =
DefaultVocabulary'
{ $sel:instanceId:DefaultVocabulary' :: Text
instanceId = Text
pInstanceId_,
$sel:languageCode:DefaultVocabulary' :: VocabularyLanguageCode
languageCode = VocabularyLanguageCode
pLanguageCode_,
$sel:vocabularyId:DefaultVocabulary' :: Text
vocabularyId = Text
pVocabularyId_,
$sel:vocabularyName:DefaultVocabulary' :: Text
vocabularyName = Text
pVocabularyName_
}
defaultVocabulary_instanceId :: Lens.Lens' DefaultVocabulary Prelude.Text
defaultVocabulary_instanceId :: Lens' DefaultVocabulary Text
defaultVocabulary_instanceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DefaultVocabulary' {Text
instanceId :: Text
$sel:instanceId:DefaultVocabulary' :: DefaultVocabulary -> Text
instanceId} -> Text
instanceId) (\s :: DefaultVocabulary
s@DefaultVocabulary' {} Text
a -> DefaultVocabulary
s {$sel:instanceId:DefaultVocabulary' :: Text
instanceId = Text
a} :: DefaultVocabulary)
defaultVocabulary_languageCode :: Lens.Lens' DefaultVocabulary VocabularyLanguageCode
defaultVocabulary_languageCode :: Lens' DefaultVocabulary VocabularyLanguageCode
defaultVocabulary_languageCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DefaultVocabulary' {VocabularyLanguageCode
languageCode :: VocabularyLanguageCode
$sel:languageCode:DefaultVocabulary' :: DefaultVocabulary -> VocabularyLanguageCode
languageCode} -> VocabularyLanguageCode
languageCode) (\s :: DefaultVocabulary
s@DefaultVocabulary' {} VocabularyLanguageCode
a -> DefaultVocabulary
s {$sel:languageCode:DefaultVocabulary' :: VocabularyLanguageCode
languageCode = VocabularyLanguageCode
a} :: DefaultVocabulary)
defaultVocabulary_vocabularyId :: Lens.Lens' DefaultVocabulary Prelude.Text
defaultVocabulary_vocabularyId :: Lens' DefaultVocabulary Text
defaultVocabulary_vocabularyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DefaultVocabulary' {Text
vocabularyId :: Text
$sel:vocabularyId:DefaultVocabulary' :: DefaultVocabulary -> Text
vocabularyId} -> Text
vocabularyId) (\s :: DefaultVocabulary
s@DefaultVocabulary' {} Text
a -> DefaultVocabulary
s {$sel:vocabularyId:DefaultVocabulary' :: Text
vocabularyId = Text
a} :: DefaultVocabulary)
defaultVocabulary_vocabularyName :: Lens.Lens' DefaultVocabulary Prelude.Text
defaultVocabulary_vocabularyName :: Lens' DefaultVocabulary Text
defaultVocabulary_vocabularyName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DefaultVocabulary' {Text
vocabularyName :: Text
$sel:vocabularyName:DefaultVocabulary' :: DefaultVocabulary -> Text
vocabularyName} -> Text
vocabularyName) (\s :: DefaultVocabulary
s@DefaultVocabulary' {} Text
a -> DefaultVocabulary
s {$sel:vocabularyName:DefaultVocabulary' :: Text
vocabularyName = Text
a} :: DefaultVocabulary)
instance Data.FromJSON DefaultVocabulary where
parseJSON :: Value -> Parser DefaultVocabulary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DefaultVocabulary"
( \Object
x ->
Text -> VocabularyLanguageCode -> Text -> Text -> DefaultVocabulary
DefaultVocabulary'
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
"InstanceId")
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
"VocabularyId")
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
"VocabularyName")
)
instance Prelude.Hashable DefaultVocabulary where
hashWithSalt :: Int -> DefaultVocabulary -> Int
hashWithSalt Int
_salt DefaultVocabulary' {Text
VocabularyLanguageCode
vocabularyName :: Text
vocabularyId :: Text
languageCode :: VocabularyLanguageCode
instanceId :: Text
$sel:vocabularyName:DefaultVocabulary' :: DefaultVocabulary -> Text
$sel:vocabularyId:DefaultVocabulary' :: DefaultVocabulary -> Text
$sel:languageCode:DefaultVocabulary' :: DefaultVocabulary -> VocabularyLanguageCode
$sel:instanceId:DefaultVocabulary' :: DefaultVocabulary -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
instanceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` VocabularyLanguageCode
languageCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
vocabularyId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
vocabularyName
instance Prelude.NFData DefaultVocabulary where
rnf :: DefaultVocabulary -> ()
rnf DefaultVocabulary' {Text
VocabularyLanguageCode
vocabularyName :: Text
vocabularyId :: Text
languageCode :: VocabularyLanguageCode
instanceId :: Text
$sel:vocabularyName:DefaultVocabulary' :: DefaultVocabulary -> Text
$sel:vocabularyId:DefaultVocabulary' :: DefaultVocabulary -> Text
$sel:languageCode:DefaultVocabulary' :: DefaultVocabulary -> VocabularyLanguageCode
$sel:instanceId:DefaultVocabulary' :: DefaultVocabulary -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
instanceId
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 Text
vocabularyId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
vocabularyName