{-# 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.LexModels.Types.MigrationSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.LexModels.Types.Locale
import Amazonka.LexModels.Types.MigrationStatus
import Amazonka.LexModels.Types.MigrationStrategy
import qualified Amazonka.Prelude as Prelude
data MigrationSummary = MigrationSummary'
{
MigrationSummary -> Maybe Text
migrationId :: Prelude.Maybe Prelude.Text,
MigrationSummary -> Maybe MigrationStatus
migrationStatus :: Prelude.Maybe MigrationStatus,
MigrationSummary -> Maybe MigrationStrategy
migrationStrategy :: Prelude.Maybe MigrationStrategy,
MigrationSummary -> Maybe POSIX
migrationTimestamp :: Prelude.Maybe Data.POSIX,
MigrationSummary -> Maybe Locale
v1BotLocale :: Prelude.Maybe Locale,
MigrationSummary -> Maybe Text
v1BotName :: Prelude.Maybe Prelude.Text,
MigrationSummary -> Maybe Text
v1BotVersion :: Prelude.Maybe Prelude.Text,
MigrationSummary -> Maybe Text
v2BotId :: Prelude.Maybe Prelude.Text,
MigrationSummary -> Maybe Text
v2BotRole :: Prelude.Maybe Prelude.Text
}
deriving (MigrationSummary -> MigrationSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MigrationSummary -> MigrationSummary -> Bool
$c/= :: MigrationSummary -> MigrationSummary -> Bool
== :: MigrationSummary -> MigrationSummary -> Bool
$c== :: MigrationSummary -> MigrationSummary -> Bool
Prelude.Eq, ReadPrec [MigrationSummary]
ReadPrec MigrationSummary
Int -> ReadS MigrationSummary
ReadS [MigrationSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MigrationSummary]
$creadListPrec :: ReadPrec [MigrationSummary]
readPrec :: ReadPrec MigrationSummary
$creadPrec :: ReadPrec MigrationSummary
readList :: ReadS [MigrationSummary]
$creadList :: ReadS [MigrationSummary]
readsPrec :: Int -> ReadS MigrationSummary
$creadsPrec :: Int -> ReadS MigrationSummary
Prelude.Read, Int -> MigrationSummary -> ShowS
[MigrationSummary] -> ShowS
MigrationSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MigrationSummary] -> ShowS
$cshowList :: [MigrationSummary] -> ShowS
show :: MigrationSummary -> String
$cshow :: MigrationSummary -> String
showsPrec :: Int -> MigrationSummary -> ShowS
$cshowsPrec :: Int -> MigrationSummary -> ShowS
Prelude.Show, forall x. Rep MigrationSummary x -> MigrationSummary
forall x. MigrationSummary -> Rep MigrationSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MigrationSummary x -> MigrationSummary
$cfrom :: forall x. MigrationSummary -> Rep MigrationSummary x
Prelude.Generic)
newMigrationSummary ::
MigrationSummary
newMigrationSummary :: MigrationSummary
newMigrationSummary =
MigrationSummary'
{ $sel:migrationId:MigrationSummary' :: Maybe Text
migrationId = forall a. Maybe a
Prelude.Nothing,
$sel:migrationStatus:MigrationSummary' :: Maybe MigrationStatus
migrationStatus = forall a. Maybe a
Prelude.Nothing,
$sel:migrationStrategy:MigrationSummary' :: Maybe MigrationStrategy
migrationStrategy = forall a. Maybe a
Prelude.Nothing,
$sel:migrationTimestamp:MigrationSummary' :: Maybe POSIX
migrationTimestamp = forall a. Maybe a
Prelude.Nothing,
$sel:v1BotLocale:MigrationSummary' :: Maybe Locale
v1BotLocale = forall a. Maybe a
Prelude.Nothing,
$sel:v1BotName:MigrationSummary' :: Maybe Text
v1BotName = forall a. Maybe a
Prelude.Nothing,
$sel:v1BotVersion:MigrationSummary' :: Maybe Text
v1BotVersion = forall a. Maybe a
Prelude.Nothing,
$sel:v2BotId:MigrationSummary' :: Maybe Text
v2BotId = forall a. Maybe a
Prelude.Nothing,
$sel:v2BotRole:MigrationSummary' :: Maybe Text
v2BotRole = forall a. Maybe a
Prelude.Nothing
}
migrationSummary_migrationId :: Lens.Lens' MigrationSummary (Prelude.Maybe Prelude.Text)
migrationSummary_migrationId :: Lens' MigrationSummary (Maybe Text)
migrationSummary_migrationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MigrationSummary' {Maybe Text
migrationId :: Maybe Text
$sel:migrationId:MigrationSummary' :: MigrationSummary -> Maybe Text
migrationId} -> Maybe Text
migrationId) (\s :: MigrationSummary
s@MigrationSummary' {} Maybe Text
a -> MigrationSummary
s {$sel:migrationId:MigrationSummary' :: Maybe Text
migrationId = Maybe Text
a} :: MigrationSummary)
migrationSummary_migrationStatus :: Lens.Lens' MigrationSummary (Prelude.Maybe MigrationStatus)
migrationSummary_migrationStatus :: Lens' MigrationSummary (Maybe MigrationStatus)
migrationSummary_migrationStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MigrationSummary' {Maybe MigrationStatus
migrationStatus :: Maybe MigrationStatus
$sel:migrationStatus:MigrationSummary' :: MigrationSummary -> Maybe MigrationStatus
migrationStatus} -> Maybe MigrationStatus
migrationStatus) (\s :: MigrationSummary
s@MigrationSummary' {} Maybe MigrationStatus
a -> MigrationSummary
s {$sel:migrationStatus:MigrationSummary' :: Maybe MigrationStatus
migrationStatus = Maybe MigrationStatus
a} :: MigrationSummary)
migrationSummary_migrationStrategy :: Lens.Lens' MigrationSummary (Prelude.Maybe MigrationStrategy)
migrationSummary_migrationStrategy :: Lens' MigrationSummary (Maybe MigrationStrategy)
migrationSummary_migrationStrategy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MigrationSummary' {Maybe MigrationStrategy
migrationStrategy :: Maybe MigrationStrategy
$sel:migrationStrategy:MigrationSummary' :: MigrationSummary -> Maybe MigrationStrategy
migrationStrategy} -> Maybe MigrationStrategy
migrationStrategy) (\s :: MigrationSummary
s@MigrationSummary' {} Maybe MigrationStrategy
a -> MigrationSummary
s {$sel:migrationStrategy:MigrationSummary' :: Maybe MigrationStrategy
migrationStrategy = Maybe MigrationStrategy
a} :: MigrationSummary)
migrationSummary_migrationTimestamp :: Lens.Lens' MigrationSummary (Prelude.Maybe Prelude.UTCTime)
migrationSummary_migrationTimestamp :: Lens' MigrationSummary (Maybe UTCTime)
migrationSummary_migrationTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MigrationSummary' {Maybe POSIX
migrationTimestamp :: Maybe POSIX
$sel:migrationTimestamp:MigrationSummary' :: MigrationSummary -> Maybe POSIX
migrationTimestamp} -> Maybe POSIX
migrationTimestamp) (\s :: MigrationSummary
s@MigrationSummary' {} Maybe POSIX
a -> MigrationSummary
s {$sel:migrationTimestamp:MigrationSummary' :: Maybe POSIX
migrationTimestamp = Maybe POSIX
a} :: MigrationSummary) 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
migrationSummary_v1BotLocale :: Lens.Lens' MigrationSummary (Prelude.Maybe Locale)
migrationSummary_v1BotLocale :: Lens' MigrationSummary (Maybe Locale)
migrationSummary_v1BotLocale = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MigrationSummary' {Maybe Locale
v1BotLocale :: Maybe Locale
$sel:v1BotLocale:MigrationSummary' :: MigrationSummary -> Maybe Locale
v1BotLocale} -> Maybe Locale
v1BotLocale) (\s :: MigrationSummary
s@MigrationSummary' {} Maybe Locale
a -> MigrationSummary
s {$sel:v1BotLocale:MigrationSummary' :: Maybe Locale
v1BotLocale = Maybe Locale
a} :: MigrationSummary)
migrationSummary_v1BotName :: Lens.Lens' MigrationSummary (Prelude.Maybe Prelude.Text)
migrationSummary_v1BotName :: Lens' MigrationSummary (Maybe Text)
migrationSummary_v1BotName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MigrationSummary' {Maybe Text
v1BotName :: Maybe Text
$sel:v1BotName:MigrationSummary' :: MigrationSummary -> Maybe Text
v1BotName} -> Maybe Text
v1BotName) (\s :: MigrationSummary
s@MigrationSummary' {} Maybe Text
a -> MigrationSummary
s {$sel:v1BotName:MigrationSummary' :: Maybe Text
v1BotName = Maybe Text
a} :: MigrationSummary)
migrationSummary_v1BotVersion :: Lens.Lens' MigrationSummary (Prelude.Maybe Prelude.Text)
migrationSummary_v1BotVersion :: Lens' MigrationSummary (Maybe Text)
migrationSummary_v1BotVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MigrationSummary' {Maybe Text
v1BotVersion :: Maybe Text
$sel:v1BotVersion:MigrationSummary' :: MigrationSummary -> Maybe Text
v1BotVersion} -> Maybe Text
v1BotVersion) (\s :: MigrationSummary
s@MigrationSummary' {} Maybe Text
a -> MigrationSummary
s {$sel:v1BotVersion:MigrationSummary' :: Maybe Text
v1BotVersion = Maybe Text
a} :: MigrationSummary)
migrationSummary_v2BotId :: Lens.Lens' MigrationSummary (Prelude.Maybe Prelude.Text)
migrationSummary_v2BotId :: Lens' MigrationSummary (Maybe Text)
migrationSummary_v2BotId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MigrationSummary' {Maybe Text
v2BotId :: Maybe Text
$sel:v2BotId:MigrationSummary' :: MigrationSummary -> Maybe Text
v2BotId} -> Maybe Text
v2BotId) (\s :: MigrationSummary
s@MigrationSummary' {} Maybe Text
a -> MigrationSummary
s {$sel:v2BotId:MigrationSummary' :: Maybe Text
v2BotId = Maybe Text
a} :: MigrationSummary)
migrationSummary_v2BotRole :: Lens.Lens' MigrationSummary (Prelude.Maybe Prelude.Text)
migrationSummary_v2BotRole :: Lens' MigrationSummary (Maybe Text)
migrationSummary_v2BotRole = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MigrationSummary' {Maybe Text
v2BotRole :: Maybe Text
$sel:v2BotRole:MigrationSummary' :: MigrationSummary -> Maybe Text
v2BotRole} -> Maybe Text
v2BotRole) (\s :: MigrationSummary
s@MigrationSummary' {} Maybe Text
a -> MigrationSummary
s {$sel:v2BotRole:MigrationSummary' :: Maybe Text
v2BotRole = Maybe Text
a} :: MigrationSummary)
instance Data.FromJSON MigrationSummary where
parseJSON :: Value -> Parser MigrationSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"MigrationSummary"
( \Object
x ->
Maybe Text
-> Maybe MigrationStatus
-> Maybe MigrationStrategy
-> Maybe POSIX
-> Maybe Locale
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MigrationSummary
MigrationSummary'
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
"migrationId")
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
"migrationStatus")
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
"migrationStrategy")
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
"migrationTimestamp")
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
"v1BotLocale")
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
"v1BotName")
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
"v1BotVersion")
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
"v2BotId")
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
"v2BotRole")
)
instance Prelude.Hashable MigrationSummary where
hashWithSalt :: Int -> MigrationSummary -> Int
hashWithSalt Int
_salt MigrationSummary' {Maybe Text
Maybe POSIX
Maybe Locale
Maybe MigrationStatus
Maybe MigrationStrategy
v2BotRole :: Maybe Text
v2BotId :: Maybe Text
v1BotVersion :: Maybe Text
v1BotName :: Maybe Text
v1BotLocale :: Maybe Locale
migrationTimestamp :: Maybe POSIX
migrationStrategy :: Maybe MigrationStrategy
migrationStatus :: Maybe MigrationStatus
migrationId :: Maybe Text
$sel:v2BotRole:MigrationSummary' :: MigrationSummary -> Maybe Text
$sel:v2BotId:MigrationSummary' :: MigrationSummary -> Maybe Text
$sel:v1BotVersion:MigrationSummary' :: MigrationSummary -> Maybe Text
$sel:v1BotName:MigrationSummary' :: MigrationSummary -> Maybe Text
$sel:v1BotLocale:MigrationSummary' :: MigrationSummary -> Maybe Locale
$sel:migrationTimestamp:MigrationSummary' :: MigrationSummary -> Maybe POSIX
$sel:migrationStrategy:MigrationSummary' :: MigrationSummary -> Maybe MigrationStrategy
$sel:migrationStatus:MigrationSummary' :: MigrationSummary -> Maybe MigrationStatus
$sel:migrationId:MigrationSummary' :: MigrationSummary -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
migrationId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MigrationStatus
migrationStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MigrationStrategy
migrationStrategy
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
migrationTimestamp
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Locale
v1BotLocale
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
v1BotName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
v1BotVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
v2BotId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
v2BotRole
instance Prelude.NFData MigrationSummary where
rnf :: MigrationSummary -> ()
rnf MigrationSummary' {Maybe Text
Maybe POSIX
Maybe Locale
Maybe MigrationStatus
Maybe MigrationStrategy
v2BotRole :: Maybe Text
v2BotId :: Maybe Text
v1BotVersion :: Maybe Text
v1BotName :: Maybe Text
v1BotLocale :: Maybe Locale
migrationTimestamp :: Maybe POSIX
migrationStrategy :: Maybe MigrationStrategy
migrationStatus :: Maybe MigrationStatus
migrationId :: Maybe Text
$sel:v2BotRole:MigrationSummary' :: MigrationSummary -> Maybe Text
$sel:v2BotId:MigrationSummary' :: MigrationSummary -> Maybe Text
$sel:v1BotVersion:MigrationSummary' :: MigrationSummary -> Maybe Text
$sel:v1BotName:MigrationSummary' :: MigrationSummary -> Maybe Text
$sel:v1BotLocale:MigrationSummary' :: MigrationSummary -> Maybe Locale
$sel:migrationTimestamp:MigrationSummary' :: MigrationSummary -> Maybe POSIX
$sel:migrationStrategy:MigrationSummary' :: MigrationSummary -> Maybe MigrationStrategy
$sel:migrationStatus:MigrationSummary' :: MigrationSummary -> Maybe MigrationStatus
$sel:migrationId:MigrationSummary' :: MigrationSummary -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
migrationId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MigrationStatus
migrationStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MigrationStrategy
migrationStrategy
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
migrationTimestamp
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Locale
v1BotLocale
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
v1BotName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
v1BotVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
v2BotId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
v2BotRole