{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.LexModels.Types.MigrationSummary
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
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

-- | Provides information about migrating a bot from Amazon Lex V1 to Amazon
-- Lex V2.
--
-- /See:/ 'newMigrationSummary' smart constructor.
data MigrationSummary = MigrationSummary'
  { -- | The version of the Amazon Lex V1 bot that is the source of the
    -- migration.
    MigrationSummary -> Maybe Text
v1BotVersion :: Prelude.Maybe Prelude.Text,
    -- | The strategy used to conduct the migration.
    MigrationSummary -> Maybe MigrationStrategy
migrationStrategy :: Prelude.Maybe MigrationStrategy,
    -- | The date and time that the migration started.
    MigrationSummary -> Maybe POSIX
migrationTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The status of the operation. When the status is @COMPLETE@ the bot is
    -- available in Amazon Lex V2. There may be alerts and warnings that need
    -- to be resolved to complete the migration.
    MigrationSummary -> Maybe MigrationStatus
migrationStatus :: Prelude.Maybe MigrationStatus,
    -- | The unique identifier of the Amazon Lex V2 that is the destination of
    -- the migration.
    MigrationSummary -> Maybe Text
v2BotId :: Prelude.Maybe Prelude.Text,
    -- | The locale of the Amazon Lex V1 bot that is the source of the migration.
    MigrationSummary -> Maybe Locale
v1BotLocale :: Prelude.Maybe Locale,
    -- | The name of the Amazon Lex V1 bot that is the source of the migration.
    MigrationSummary -> Maybe Text
v1BotName :: Prelude.Maybe Prelude.Text,
    -- | The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.
    MigrationSummary -> Maybe Text
v2BotRole :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier that Amazon Lex assigned to the migration.
    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)

-- |
-- Create a value of 'MigrationSummary' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'v1BotVersion', 'migrationSummary_v1BotVersion' - The version of the Amazon Lex V1 bot that is the source of the
-- migration.
--
-- 'migrationStrategy', 'migrationSummary_migrationStrategy' - The strategy used to conduct the migration.
--
-- 'migrationTimestamp', 'migrationSummary_migrationTimestamp' - The date and time that the migration started.
--
-- 'migrationStatus', 'migrationSummary_migrationStatus' - The status of the operation. When the status is @COMPLETE@ the bot is
-- available in Amazon Lex V2. There may be alerts and warnings that need
-- to be resolved to complete the migration.
--
-- 'v2BotId', 'migrationSummary_v2BotId' - The unique identifier of the Amazon Lex V2 that is the destination of
-- the migration.
--
-- 'v1BotLocale', 'migrationSummary_v1BotLocale' - The locale of the Amazon Lex V1 bot that is the source of the migration.
--
-- 'v1BotName', 'migrationSummary_v1BotName' - The name of the Amazon Lex V1 bot that is the source of the migration.
--
-- 'v2BotRole', 'migrationSummary_v2BotRole' - The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.
--
-- 'migrationId', 'migrationSummary_migrationId' - The unique identifier that Amazon Lex assigned to the migration.
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
    }

-- | The version of the Amazon Lex V1 bot that is the source of the
-- migration.
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)

-- | The strategy used to conduct the migration.
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)

-- | The date and time that the migration started.
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

-- | The status of the operation. When the status is @COMPLETE@ the bot is
-- available in Amazon Lex V2. There may be alerts and warnings that need
-- to be resolved to complete the migration.
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)

-- | The unique identifier of the Amazon Lex V2 that is the destination of
-- the migration.
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)

-- | The locale of the Amazon Lex V1 bot that is the source of the migration.
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)

-- | The name of the Amazon Lex V1 bot that is the source of the migration.
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)

-- | The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.
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)

-- | The unique identifier that Amazon Lex assigned to the migration.
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