{-# 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.Polly.Types.LexiconAttributes where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Polly.Types.LanguageCode
import qualified Amazonka.Prelude as Prelude
data LexiconAttributes = LexiconAttributes'
{
LexiconAttributes -> Maybe Text
alphabet :: Prelude.Maybe Prelude.Text,
LexiconAttributes -> Maybe LanguageCode
languageCode :: Prelude.Maybe LanguageCode,
LexiconAttributes -> Maybe POSIX
lastModified :: Prelude.Maybe Data.POSIX,
LexiconAttributes -> Maybe Int
lexemesCount :: Prelude.Maybe Prelude.Int,
LexiconAttributes -> Maybe Text
lexiconArn :: Prelude.Maybe Prelude.Text,
LexiconAttributes -> Maybe Int
size :: Prelude.Maybe Prelude.Int
}
deriving (LexiconAttributes -> LexiconAttributes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LexiconAttributes -> LexiconAttributes -> Bool
$c/= :: LexiconAttributes -> LexiconAttributes -> Bool
== :: LexiconAttributes -> LexiconAttributes -> Bool
$c== :: LexiconAttributes -> LexiconAttributes -> Bool
Prelude.Eq, ReadPrec [LexiconAttributes]
ReadPrec LexiconAttributes
Int -> ReadS LexiconAttributes
ReadS [LexiconAttributes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LexiconAttributes]
$creadListPrec :: ReadPrec [LexiconAttributes]
readPrec :: ReadPrec LexiconAttributes
$creadPrec :: ReadPrec LexiconAttributes
readList :: ReadS [LexiconAttributes]
$creadList :: ReadS [LexiconAttributes]
readsPrec :: Int -> ReadS LexiconAttributes
$creadsPrec :: Int -> ReadS LexiconAttributes
Prelude.Read, Int -> LexiconAttributes -> ShowS
[LexiconAttributes] -> ShowS
LexiconAttributes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LexiconAttributes] -> ShowS
$cshowList :: [LexiconAttributes] -> ShowS
show :: LexiconAttributes -> String
$cshow :: LexiconAttributes -> String
showsPrec :: Int -> LexiconAttributes -> ShowS
$cshowsPrec :: Int -> LexiconAttributes -> ShowS
Prelude.Show, forall x. Rep LexiconAttributes x -> LexiconAttributes
forall x. LexiconAttributes -> Rep LexiconAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LexiconAttributes x -> LexiconAttributes
$cfrom :: forall x. LexiconAttributes -> Rep LexiconAttributes x
Prelude.Generic)
newLexiconAttributes ::
LexiconAttributes
newLexiconAttributes :: LexiconAttributes
newLexiconAttributes =
LexiconAttributes'
{ $sel:alphabet:LexiconAttributes' :: Maybe Text
alphabet = forall a. Maybe a
Prelude.Nothing,
$sel:languageCode:LexiconAttributes' :: Maybe LanguageCode
languageCode = forall a. Maybe a
Prelude.Nothing,
$sel:lastModified:LexiconAttributes' :: Maybe POSIX
lastModified = forall a. Maybe a
Prelude.Nothing,
$sel:lexemesCount:LexiconAttributes' :: Maybe Int
lexemesCount = forall a. Maybe a
Prelude.Nothing,
$sel:lexiconArn:LexiconAttributes' :: Maybe Text
lexiconArn = forall a. Maybe a
Prelude.Nothing,
$sel:size:LexiconAttributes' :: Maybe Int
size = forall a. Maybe a
Prelude.Nothing
}
lexiconAttributes_alphabet :: Lens.Lens' LexiconAttributes (Prelude.Maybe Prelude.Text)
lexiconAttributes_alphabet :: Lens' LexiconAttributes (Maybe Text)
lexiconAttributes_alphabet = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LexiconAttributes' {Maybe Text
alphabet :: Maybe Text
$sel:alphabet:LexiconAttributes' :: LexiconAttributes -> Maybe Text
alphabet} -> Maybe Text
alphabet) (\s :: LexiconAttributes
s@LexiconAttributes' {} Maybe Text
a -> LexiconAttributes
s {$sel:alphabet:LexiconAttributes' :: Maybe Text
alphabet = Maybe Text
a} :: LexiconAttributes)
lexiconAttributes_languageCode :: Lens.Lens' LexiconAttributes (Prelude.Maybe LanguageCode)
lexiconAttributes_languageCode :: Lens' LexiconAttributes (Maybe LanguageCode)
lexiconAttributes_languageCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LexiconAttributes' {Maybe LanguageCode
languageCode :: Maybe LanguageCode
$sel:languageCode:LexiconAttributes' :: LexiconAttributes -> Maybe LanguageCode
languageCode} -> Maybe LanguageCode
languageCode) (\s :: LexiconAttributes
s@LexiconAttributes' {} Maybe LanguageCode
a -> LexiconAttributes
s {$sel:languageCode:LexiconAttributes' :: Maybe LanguageCode
languageCode = Maybe LanguageCode
a} :: LexiconAttributes)
lexiconAttributes_lastModified :: Lens.Lens' LexiconAttributes (Prelude.Maybe Prelude.UTCTime)
lexiconAttributes_lastModified :: Lens' LexiconAttributes (Maybe UTCTime)
lexiconAttributes_lastModified = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LexiconAttributes' {Maybe POSIX
lastModified :: Maybe POSIX
$sel:lastModified:LexiconAttributes' :: LexiconAttributes -> Maybe POSIX
lastModified} -> Maybe POSIX
lastModified) (\s :: LexiconAttributes
s@LexiconAttributes' {} Maybe POSIX
a -> LexiconAttributes
s {$sel:lastModified:LexiconAttributes' :: Maybe POSIX
lastModified = Maybe POSIX
a} :: LexiconAttributes) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time
lexiconAttributes_lexemesCount :: Lens.Lens' LexiconAttributes (Prelude.Maybe Prelude.Int)
lexiconAttributes_lexemesCount :: Lens' LexiconAttributes (Maybe Int)
lexiconAttributes_lexemesCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LexiconAttributes' {Maybe Int
lexemesCount :: Maybe Int
$sel:lexemesCount:LexiconAttributes' :: LexiconAttributes -> Maybe Int
lexemesCount} -> Maybe Int
lexemesCount) (\s :: LexiconAttributes
s@LexiconAttributes' {} Maybe Int
a -> LexiconAttributes
s {$sel:lexemesCount:LexiconAttributes' :: Maybe Int
lexemesCount = Maybe Int
a} :: LexiconAttributes)
lexiconAttributes_lexiconArn :: Lens.Lens' LexiconAttributes (Prelude.Maybe Prelude.Text)
lexiconAttributes_lexiconArn :: Lens' LexiconAttributes (Maybe Text)
lexiconAttributes_lexiconArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LexiconAttributes' {Maybe Text
lexiconArn :: Maybe Text
$sel:lexiconArn:LexiconAttributes' :: LexiconAttributes -> Maybe Text
lexiconArn} -> Maybe Text
lexiconArn) (\s :: LexiconAttributes
s@LexiconAttributes' {} Maybe Text
a -> LexiconAttributes
s {$sel:lexiconArn:LexiconAttributes' :: Maybe Text
lexiconArn = Maybe Text
a} :: LexiconAttributes)
lexiconAttributes_size :: Lens.Lens' LexiconAttributes (Prelude.Maybe Prelude.Int)
lexiconAttributes_size :: Lens' LexiconAttributes (Maybe Int)
lexiconAttributes_size = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LexiconAttributes' {Maybe Int
size :: Maybe Int
$sel:size:LexiconAttributes' :: LexiconAttributes -> Maybe Int
size} -> Maybe Int
size) (\s :: LexiconAttributes
s@LexiconAttributes' {} Maybe Int
a -> LexiconAttributes
s {$sel:size:LexiconAttributes' :: Maybe Int
size = Maybe Int
a} :: LexiconAttributes)
instance Data.FromJSON LexiconAttributes where
parseJSON :: Value -> Parser LexiconAttributes
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"LexiconAttributes"
( \Object
x ->
Maybe Text
-> Maybe LanguageCode
-> Maybe POSIX
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> LexiconAttributes
LexiconAttributes'
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
"Alphabet")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe 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 (Maybe a)
Data..:? Key
"LastModified")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LexemesCount")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LexiconArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Size")
)
instance Prelude.Hashable LexiconAttributes where
hashWithSalt :: Int -> LexiconAttributes -> Int
hashWithSalt Int
_salt LexiconAttributes' {Maybe Int
Maybe Text
Maybe POSIX
Maybe LanguageCode
size :: Maybe Int
lexiconArn :: Maybe Text
lexemesCount :: Maybe Int
lastModified :: Maybe POSIX
languageCode :: Maybe LanguageCode
alphabet :: Maybe Text
$sel:size:LexiconAttributes' :: LexiconAttributes -> Maybe Int
$sel:lexiconArn:LexiconAttributes' :: LexiconAttributes -> Maybe Text
$sel:lexemesCount:LexiconAttributes' :: LexiconAttributes -> Maybe Int
$sel:lastModified:LexiconAttributes' :: LexiconAttributes -> Maybe POSIX
$sel:languageCode:LexiconAttributes' :: LexiconAttributes -> Maybe LanguageCode
$sel:alphabet:LexiconAttributes' :: LexiconAttributes -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
alphabet
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LanguageCode
languageCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastModified
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
lexemesCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lexiconArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
size
instance Prelude.NFData LexiconAttributes where
rnf :: LexiconAttributes -> ()
rnf LexiconAttributes' {Maybe Int
Maybe Text
Maybe POSIX
Maybe LanguageCode
size :: Maybe Int
lexiconArn :: Maybe Text
lexemesCount :: Maybe Int
lastModified :: Maybe POSIX
languageCode :: Maybe LanguageCode
alphabet :: Maybe Text
$sel:size:LexiconAttributes' :: LexiconAttributes -> Maybe Int
$sel:lexiconArn:LexiconAttributes' :: LexiconAttributes -> Maybe Text
$sel:lexemesCount:LexiconAttributes' :: LexiconAttributes -> Maybe Int
$sel:lastModified:LexiconAttributes' :: LexiconAttributes -> Maybe POSIX
$sel:languageCode:LexiconAttributes' :: LexiconAttributes -> Maybe LanguageCode
$sel:alphabet:LexiconAttributes' :: LexiconAttributes -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
alphabet
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LanguageCode
languageCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastModified
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
lexemesCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lexiconArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
size