{-# 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.LexV2Models.Types.BotAliasSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.LexV2Models.Types.BotAliasStatus
import qualified Amazonka.Prelude as Prelude
data BotAliasSummary = BotAliasSummary'
{
BotAliasSummary -> Maybe Text
botAliasId :: Prelude.Maybe Prelude.Text,
BotAliasSummary -> Maybe Text
botAliasName :: Prelude.Maybe Prelude.Text,
BotAliasSummary -> Maybe BotAliasStatus
botAliasStatus :: Prelude.Maybe BotAliasStatus,
BotAliasSummary -> Maybe Text
botVersion :: Prelude.Maybe Prelude.Text,
BotAliasSummary -> Maybe POSIX
creationDateTime :: Prelude.Maybe Data.POSIX,
BotAliasSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
BotAliasSummary -> Maybe POSIX
lastUpdatedDateTime :: Prelude.Maybe Data.POSIX
}
deriving (BotAliasSummary -> BotAliasSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BotAliasSummary -> BotAliasSummary -> Bool
$c/= :: BotAliasSummary -> BotAliasSummary -> Bool
== :: BotAliasSummary -> BotAliasSummary -> Bool
$c== :: BotAliasSummary -> BotAliasSummary -> Bool
Prelude.Eq, ReadPrec [BotAliasSummary]
ReadPrec BotAliasSummary
Int -> ReadS BotAliasSummary
ReadS [BotAliasSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BotAliasSummary]
$creadListPrec :: ReadPrec [BotAliasSummary]
readPrec :: ReadPrec BotAliasSummary
$creadPrec :: ReadPrec BotAliasSummary
readList :: ReadS [BotAliasSummary]
$creadList :: ReadS [BotAliasSummary]
readsPrec :: Int -> ReadS BotAliasSummary
$creadsPrec :: Int -> ReadS BotAliasSummary
Prelude.Read, Int -> BotAliasSummary -> ShowS
[BotAliasSummary] -> ShowS
BotAliasSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BotAliasSummary] -> ShowS
$cshowList :: [BotAliasSummary] -> ShowS
show :: BotAliasSummary -> String
$cshow :: BotAliasSummary -> String
showsPrec :: Int -> BotAliasSummary -> ShowS
$cshowsPrec :: Int -> BotAliasSummary -> ShowS
Prelude.Show, forall x. Rep BotAliasSummary x -> BotAliasSummary
forall x. BotAliasSummary -> Rep BotAliasSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BotAliasSummary x -> BotAliasSummary
$cfrom :: forall x. BotAliasSummary -> Rep BotAliasSummary x
Prelude.Generic)
newBotAliasSummary ::
BotAliasSummary
newBotAliasSummary :: BotAliasSummary
newBotAliasSummary =
BotAliasSummary'
{ $sel:botAliasId:BotAliasSummary' :: Maybe Text
botAliasId = forall a. Maybe a
Prelude.Nothing,
$sel:botAliasName:BotAliasSummary' :: Maybe Text
botAliasName = forall a. Maybe a
Prelude.Nothing,
$sel:botAliasStatus:BotAliasSummary' :: Maybe BotAliasStatus
botAliasStatus = forall a. Maybe a
Prelude.Nothing,
$sel:botVersion:BotAliasSummary' :: Maybe Text
botVersion = forall a. Maybe a
Prelude.Nothing,
$sel:creationDateTime:BotAliasSummary' :: Maybe POSIX
creationDateTime = forall a. Maybe a
Prelude.Nothing,
$sel:description:BotAliasSummary' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedDateTime:BotAliasSummary' :: Maybe POSIX
lastUpdatedDateTime = forall a. Maybe a
Prelude.Nothing
}
botAliasSummary_botAliasId :: Lens.Lens' BotAliasSummary (Prelude.Maybe Prelude.Text)
botAliasSummary_botAliasId :: Lens' BotAliasSummary (Maybe Text)
botAliasSummary_botAliasId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotAliasSummary' {Maybe Text
botAliasId :: Maybe Text
$sel:botAliasId:BotAliasSummary' :: BotAliasSummary -> Maybe Text
botAliasId} -> Maybe Text
botAliasId) (\s :: BotAliasSummary
s@BotAliasSummary' {} Maybe Text
a -> BotAliasSummary
s {$sel:botAliasId:BotAliasSummary' :: Maybe Text
botAliasId = Maybe Text
a} :: BotAliasSummary)
botAliasSummary_botAliasName :: Lens.Lens' BotAliasSummary (Prelude.Maybe Prelude.Text)
botAliasSummary_botAliasName :: Lens' BotAliasSummary (Maybe Text)
botAliasSummary_botAliasName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotAliasSummary' {Maybe Text
botAliasName :: Maybe Text
$sel:botAliasName:BotAliasSummary' :: BotAliasSummary -> Maybe Text
botAliasName} -> Maybe Text
botAliasName) (\s :: BotAliasSummary
s@BotAliasSummary' {} Maybe Text
a -> BotAliasSummary
s {$sel:botAliasName:BotAliasSummary' :: Maybe Text
botAliasName = Maybe Text
a} :: BotAliasSummary)
botAliasSummary_botAliasStatus :: Lens.Lens' BotAliasSummary (Prelude.Maybe BotAliasStatus)
botAliasSummary_botAliasStatus :: Lens' BotAliasSummary (Maybe BotAliasStatus)
botAliasSummary_botAliasStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotAliasSummary' {Maybe BotAliasStatus
botAliasStatus :: Maybe BotAliasStatus
$sel:botAliasStatus:BotAliasSummary' :: BotAliasSummary -> Maybe BotAliasStatus
botAliasStatus} -> Maybe BotAliasStatus
botAliasStatus) (\s :: BotAliasSummary
s@BotAliasSummary' {} Maybe BotAliasStatus
a -> BotAliasSummary
s {$sel:botAliasStatus:BotAliasSummary' :: Maybe BotAliasStatus
botAliasStatus = Maybe BotAliasStatus
a} :: BotAliasSummary)
botAliasSummary_botVersion :: Lens.Lens' BotAliasSummary (Prelude.Maybe Prelude.Text)
botAliasSummary_botVersion :: Lens' BotAliasSummary (Maybe Text)
botAliasSummary_botVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotAliasSummary' {Maybe Text
botVersion :: Maybe Text
$sel:botVersion:BotAliasSummary' :: BotAliasSummary -> Maybe Text
botVersion} -> Maybe Text
botVersion) (\s :: BotAliasSummary
s@BotAliasSummary' {} Maybe Text
a -> BotAliasSummary
s {$sel:botVersion:BotAliasSummary' :: Maybe Text
botVersion = Maybe Text
a} :: BotAliasSummary)
botAliasSummary_creationDateTime :: Lens.Lens' BotAliasSummary (Prelude.Maybe Prelude.UTCTime)
botAliasSummary_creationDateTime :: Lens' BotAliasSummary (Maybe UTCTime)
botAliasSummary_creationDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotAliasSummary' {Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:creationDateTime:BotAliasSummary' :: BotAliasSummary -> Maybe POSIX
creationDateTime} -> Maybe POSIX
creationDateTime) (\s :: BotAliasSummary
s@BotAliasSummary' {} Maybe POSIX
a -> BotAliasSummary
s {$sel:creationDateTime:BotAliasSummary' :: Maybe POSIX
creationDateTime = Maybe POSIX
a} :: BotAliasSummary) 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
botAliasSummary_description :: Lens.Lens' BotAliasSummary (Prelude.Maybe Prelude.Text)
botAliasSummary_description :: Lens' BotAliasSummary (Maybe Text)
botAliasSummary_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotAliasSummary' {Maybe Text
description :: Maybe Text
$sel:description:BotAliasSummary' :: BotAliasSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: BotAliasSummary
s@BotAliasSummary' {} Maybe Text
a -> BotAliasSummary
s {$sel:description:BotAliasSummary' :: Maybe Text
description = Maybe Text
a} :: BotAliasSummary)
botAliasSummary_lastUpdatedDateTime :: Lens.Lens' BotAliasSummary (Prelude.Maybe Prelude.UTCTime)
botAliasSummary_lastUpdatedDateTime :: Lens' BotAliasSummary (Maybe UTCTime)
botAliasSummary_lastUpdatedDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotAliasSummary' {Maybe POSIX
lastUpdatedDateTime :: Maybe POSIX
$sel:lastUpdatedDateTime:BotAliasSummary' :: BotAliasSummary -> Maybe POSIX
lastUpdatedDateTime} -> Maybe POSIX
lastUpdatedDateTime) (\s :: BotAliasSummary
s@BotAliasSummary' {} Maybe POSIX
a -> BotAliasSummary
s {$sel:lastUpdatedDateTime:BotAliasSummary' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
a} :: BotAliasSummary) 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
instance Data.FromJSON BotAliasSummary where
parseJSON :: Value -> Parser BotAliasSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BotAliasSummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe BotAliasStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> BotAliasSummary
BotAliasSummary'
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
"botAliasId")
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
"botAliasName")
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
"botAliasStatus")
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
"botVersion")
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
"creationDateTime")
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
"description")
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
"lastUpdatedDateTime")
)
instance Prelude.Hashable BotAliasSummary where
hashWithSalt :: Int -> BotAliasSummary -> Int
hashWithSalt Int
_salt BotAliasSummary' {Maybe Text
Maybe POSIX
Maybe BotAliasStatus
lastUpdatedDateTime :: Maybe POSIX
description :: Maybe Text
creationDateTime :: Maybe POSIX
botVersion :: Maybe Text
botAliasStatus :: Maybe BotAliasStatus
botAliasName :: Maybe Text
botAliasId :: Maybe Text
$sel:lastUpdatedDateTime:BotAliasSummary' :: BotAliasSummary -> Maybe POSIX
$sel:description:BotAliasSummary' :: BotAliasSummary -> Maybe Text
$sel:creationDateTime:BotAliasSummary' :: BotAliasSummary -> Maybe POSIX
$sel:botVersion:BotAliasSummary' :: BotAliasSummary -> Maybe Text
$sel:botAliasStatus:BotAliasSummary' :: BotAliasSummary -> Maybe BotAliasStatus
$sel:botAliasName:BotAliasSummary' :: BotAliasSummary -> Maybe Text
$sel:botAliasId:BotAliasSummary' :: BotAliasSummary -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
botAliasId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
botAliasName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe BotAliasStatus
botAliasStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
botVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationDateTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastUpdatedDateTime
instance Prelude.NFData BotAliasSummary where
rnf :: BotAliasSummary -> ()
rnf BotAliasSummary' {Maybe Text
Maybe POSIX
Maybe BotAliasStatus
lastUpdatedDateTime :: Maybe POSIX
description :: Maybe Text
creationDateTime :: Maybe POSIX
botVersion :: Maybe Text
botAliasStatus :: Maybe BotAliasStatus
botAliasName :: Maybe Text
botAliasId :: Maybe Text
$sel:lastUpdatedDateTime:BotAliasSummary' :: BotAliasSummary -> Maybe POSIX
$sel:description:BotAliasSummary' :: BotAliasSummary -> Maybe Text
$sel:creationDateTime:BotAliasSummary' :: BotAliasSummary -> Maybe POSIX
$sel:botVersion:BotAliasSummary' :: BotAliasSummary -> Maybe Text
$sel:botAliasStatus:BotAliasSummary' :: BotAliasSummary -> Maybe BotAliasStatus
$sel:botAliasName:BotAliasSummary' :: BotAliasSummary -> Maybe Text
$sel:botAliasId:BotAliasSummary' :: BotAliasSummary -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
botAliasId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
botAliasName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe BotAliasStatus
botAliasStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
botVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationDateTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdatedDateTime