{-# 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.Lens as Lens
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
v1BotVersion :: Prelude.Maybe Prelude.Text,
MigrationSummary -> Maybe MigrationStrategy
migrationStrategy :: Prelude.Maybe MigrationStrategy,
MigrationSummary -> Maybe POSIX
migrationTimestamp :: Prelude.Maybe Core.POSIX,
MigrationSummary -> Maybe MigrationStatus
migrationStatus :: Prelude.Maybe MigrationStatus,
MigrationSummary -> Maybe Text
v2BotId :: Prelude.Maybe Prelude.Text,
MigrationSummary -> Maybe Locale
v1BotLocale :: Prelude.Maybe Locale,
MigrationSummary -> Maybe Text
v1BotName :: Prelude.Maybe Prelude.Text,
MigrationSummary -> Maybe Text
v2BotRole :: Prelude.Maybe Prelude.Text,
MigrationSummary -> Maybe Text
migrationId :: Prelude.Maybe Prelude.Text
}
deriving (MigrationSummary -> MigrationSummary -> Bool
(MigrationSummary -> MigrationSummary -> Bool)
-> (MigrationSummary -> MigrationSummary -> Bool)
-> Eq MigrationSummary
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]
(Int -> ReadS MigrationSummary)
-> ReadS [MigrationSummary]
-> ReadPrec MigrationSummary
-> ReadPrec [MigrationSummary]
-> Read 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
(Int -> MigrationSummary -> ShowS)
-> (MigrationSummary -> String)
-> ([MigrationSummary] -> ShowS)
-> Show MigrationSummary
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. MigrationSummary -> Rep MigrationSummary x)
-> (forall x. Rep MigrationSummary x -> MigrationSummary)
-> Generic MigrationSummary
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' :: Maybe Text
-> Maybe MigrationStrategy
-> Maybe POSIX
-> Maybe MigrationStatus
-> Maybe Text
-> Maybe Locale
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MigrationSummary
MigrationSummary'
{ $sel:v1BotVersion:MigrationSummary' :: Maybe Text
v1BotVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:migrationStrategy:MigrationSummary' :: Maybe MigrationStrategy
migrationStrategy = Maybe MigrationStrategy
forall a. Maybe a
Prelude.Nothing,
$sel:migrationTimestamp:MigrationSummary' :: Maybe POSIX
migrationTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:migrationStatus:MigrationSummary' :: Maybe MigrationStatus
migrationStatus = Maybe MigrationStatus
forall a. Maybe a
Prelude.Nothing,
$sel:v2BotId:MigrationSummary' :: Maybe Text
v2BotId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:v1BotLocale:MigrationSummary' :: Maybe Locale
v1BotLocale = Maybe Locale
forall a. Maybe a
Prelude.Nothing,
$sel:v1BotName:MigrationSummary' :: Maybe Text
v1BotName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:v2BotRole:MigrationSummary' :: Maybe Text
v2BotRole = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:migrationId:MigrationSummary' :: Maybe Text
migrationId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
migrationSummary_v1BotVersion :: Lens.Lens' MigrationSummary (Prelude.Maybe Prelude.Text)
migrationSummary_v1BotVersion :: (Maybe Text -> f (Maybe Text))
-> MigrationSummary -> f MigrationSummary
migrationSummary_v1BotVersion = (MigrationSummary -> Maybe Text)
-> (MigrationSummary -> Maybe Text -> MigrationSummary)
-> Lens MigrationSummary MigrationSummary (Maybe Text) (Maybe Text)
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_migrationStrategy :: Lens.Lens' MigrationSummary (Prelude.Maybe MigrationStrategy)
migrationSummary_migrationStrategy :: (Maybe MigrationStrategy -> f (Maybe MigrationStrategy))
-> MigrationSummary -> f MigrationSummary
migrationSummary_migrationStrategy = (MigrationSummary -> Maybe MigrationStrategy)
-> (MigrationSummary
-> Maybe MigrationStrategy -> MigrationSummary)
-> Lens
MigrationSummary
MigrationSummary
(Maybe MigrationStrategy)
(Maybe 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 :: (Maybe UTCTime -> f (Maybe UTCTime))
-> MigrationSummary -> f MigrationSummary
migrationSummary_migrationTimestamp = (MigrationSummary -> Maybe POSIX)
-> (MigrationSummary -> Maybe POSIX -> MigrationSummary)
-> Lens
MigrationSummary MigrationSummary (Maybe POSIX) (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX))
-> MigrationSummary -> f MigrationSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> MigrationSummary
-> f MigrationSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
migrationSummary_migrationStatus :: Lens.Lens' MigrationSummary (Prelude.Maybe MigrationStatus)
migrationSummary_migrationStatus :: (Maybe MigrationStatus -> f (Maybe MigrationStatus))
-> MigrationSummary -> f MigrationSummary
migrationSummary_migrationStatus = (MigrationSummary -> Maybe MigrationStatus)
-> (MigrationSummary -> Maybe MigrationStatus -> MigrationSummary)
-> Lens
MigrationSummary
MigrationSummary
(Maybe MigrationStatus)
(Maybe 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_v2BotId :: Lens.Lens' MigrationSummary (Prelude.Maybe Prelude.Text)
migrationSummary_v2BotId :: (Maybe Text -> f (Maybe Text))
-> MigrationSummary -> f MigrationSummary
migrationSummary_v2BotId = (MigrationSummary -> Maybe Text)
-> (MigrationSummary -> Maybe Text -> MigrationSummary)
-> Lens MigrationSummary MigrationSummary (Maybe Text) (Maybe Text)
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_v1BotLocale :: Lens.Lens' MigrationSummary (Prelude.Maybe Locale)
migrationSummary_v1BotLocale :: (Maybe Locale -> f (Maybe Locale))
-> MigrationSummary -> f MigrationSummary
migrationSummary_v1BotLocale = (MigrationSummary -> Maybe Locale)
-> (MigrationSummary -> Maybe Locale -> MigrationSummary)
-> Lens
MigrationSummary MigrationSummary (Maybe Locale) (Maybe Locale)
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 :: (Maybe Text -> f (Maybe Text))
-> MigrationSummary -> f MigrationSummary
migrationSummary_v1BotName = (MigrationSummary -> Maybe Text)
-> (MigrationSummary -> Maybe Text -> MigrationSummary)
-> Lens MigrationSummary MigrationSummary (Maybe Text) (Maybe Text)
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_v2BotRole :: Lens.Lens' MigrationSummary (Prelude.Maybe Prelude.Text)
migrationSummary_v2BotRole :: (Maybe Text -> f (Maybe Text))
-> MigrationSummary -> f MigrationSummary
migrationSummary_v2BotRole = (MigrationSummary -> Maybe Text)
-> (MigrationSummary -> Maybe Text -> MigrationSummary)
-> Lens MigrationSummary MigrationSummary (Maybe Text) (Maybe Text)
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)
migrationSummary_migrationId :: Lens.Lens' MigrationSummary (Prelude.Maybe Prelude.Text)
migrationSummary_migrationId :: (Maybe Text -> f (Maybe Text))
-> MigrationSummary -> f MigrationSummary
migrationSummary_migrationId = (MigrationSummary -> Maybe Text)
-> (MigrationSummary -> Maybe Text -> MigrationSummary)
-> Lens MigrationSummary MigrationSummary (Maybe Text) (Maybe Text)
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)
instance Core.FromJSON MigrationSummary where
parseJSON :: Value -> Parser MigrationSummary
parseJSON =
String
-> (Object -> Parser MigrationSummary)
-> Value
-> Parser MigrationSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MigrationSummary"
( \Object
x ->
Maybe Text
-> Maybe MigrationStrategy
-> Maybe POSIX
-> Maybe MigrationStatus
-> Maybe Text
-> Maybe Locale
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MigrationSummary
MigrationSummary'
(Maybe Text
-> Maybe MigrationStrategy
-> Maybe POSIX
-> Maybe MigrationStatus
-> Maybe Text
-> Maybe Locale
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MigrationSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe MigrationStrategy
-> Maybe POSIX
-> Maybe MigrationStatus
-> Maybe Text
-> Maybe Locale
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MigrationSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"v1BotVersion")
Parser
(Maybe MigrationStrategy
-> Maybe POSIX
-> Maybe MigrationStatus
-> Maybe Text
-> Maybe Locale
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MigrationSummary)
-> Parser (Maybe MigrationStrategy)
-> Parser
(Maybe POSIX
-> Maybe MigrationStatus
-> Maybe Text
-> Maybe Locale
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MigrationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MigrationStrategy)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"migrationStrategy")
Parser
(Maybe POSIX
-> Maybe MigrationStatus
-> Maybe Text
-> Maybe Locale
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MigrationSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe MigrationStatus
-> Maybe Text
-> Maybe Locale
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MigrationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"migrationTimestamp")
Parser
(Maybe MigrationStatus
-> Maybe Text
-> Maybe Locale
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MigrationSummary)
-> Parser (Maybe MigrationStatus)
-> Parser
(Maybe Text
-> Maybe Locale
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MigrationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MigrationStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"migrationStatus")
Parser
(Maybe Text
-> Maybe Locale
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MigrationSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Locale
-> Maybe Text -> Maybe Text -> Maybe Text -> MigrationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"v2BotId")
Parser
(Maybe Locale
-> Maybe Text -> Maybe Text -> Maybe Text -> MigrationSummary)
-> Parser (Maybe Locale)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> MigrationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Locale)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"v1BotLocale")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> MigrationSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> MigrationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"v1BotName")
Parser (Maybe Text -> Maybe Text -> MigrationSummary)
-> Parser (Maybe Text) -> Parser (Maybe Text -> MigrationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"v2BotRole")
Parser (Maybe Text -> MigrationSummary)
-> Parser (Maybe Text) -> Parser MigrationSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"migrationId")
)
instance Prelude.Hashable MigrationSummary
instance Prelude.NFData MigrationSummary