{-# 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.MGN.Types.LifeCycleLastCutoverReverted
-- 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.MGN.Types.LifeCycleLastCutoverReverted where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Lifecycle last Cutover reverted.
--
-- /See:/ 'newLifeCycleLastCutoverReverted' smart constructor.
data LifeCycleLastCutoverReverted = LifeCycleLastCutoverReverted'
  { -- | Lifecycle last Cutover reverted API call date time.
    LifeCycleLastCutoverReverted -> Maybe Text
apiCallDateTime :: Prelude.Maybe Prelude.Text
  }
  deriving (LifeCycleLastCutoverReverted
-> LifeCycleLastCutoverReverted -> Bool
(LifeCycleLastCutoverReverted
 -> LifeCycleLastCutoverReverted -> Bool)
-> (LifeCycleLastCutoverReverted
    -> LifeCycleLastCutoverReverted -> Bool)
-> Eq LifeCycleLastCutoverReverted
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LifeCycleLastCutoverReverted
-> LifeCycleLastCutoverReverted -> Bool
$c/= :: LifeCycleLastCutoverReverted
-> LifeCycleLastCutoverReverted -> Bool
== :: LifeCycleLastCutoverReverted
-> LifeCycleLastCutoverReverted -> Bool
$c== :: LifeCycleLastCutoverReverted
-> LifeCycleLastCutoverReverted -> Bool
Prelude.Eq, ReadPrec [LifeCycleLastCutoverReverted]
ReadPrec LifeCycleLastCutoverReverted
Int -> ReadS LifeCycleLastCutoverReverted
ReadS [LifeCycleLastCutoverReverted]
(Int -> ReadS LifeCycleLastCutoverReverted)
-> ReadS [LifeCycleLastCutoverReverted]
-> ReadPrec LifeCycleLastCutoverReverted
-> ReadPrec [LifeCycleLastCutoverReverted]
-> Read LifeCycleLastCutoverReverted
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LifeCycleLastCutoverReverted]
$creadListPrec :: ReadPrec [LifeCycleLastCutoverReverted]
readPrec :: ReadPrec LifeCycleLastCutoverReverted
$creadPrec :: ReadPrec LifeCycleLastCutoverReverted
readList :: ReadS [LifeCycleLastCutoverReverted]
$creadList :: ReadS [LifeCycleLastCutoverReverted]
readsPrec :: Int -> ReadS LifeCycleLastCutoverReverted
$creadsPrec :: Int -> ReadS LifeCycleLastCutoverReverted
Prelude.Read, Int -> LifeCycleLastCutoverReverted -> ShowS
[LifeCycleLastCutoverReverted] -> ShowS
LifeCycleLastCutoverReverted -> String
(Int -> LifeCycleLastCutoverReverted -> ShowS)
-> (LifeCycleLastCutoverReverted -> String)
-> ([LifeCycleLastCutoverReverted] -> ShowS)
-> Show LifeCycleLastCutoverReverted
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LifeCycleLastCutoverReverted] -> ShowS
$cshowList :: [LifeCycleLastCutoverReverted] -> ShowS
show :: LifeCycleLastCutoverReverted -> String
$cshow :: LifeCycleLastCutoverReverted -> String
showsPrec :: Int -> LifeCycleLastCutoverReverted -> ShowS
$cshowsPrec :: Int -> LifeCycleLastCutoverReverted -> ShowS
Prelude.Show, (forall x.
 LifeCycleLastCutoverReverted -> Rep LifeCycleLastCutoverReverted x)
-> (forall x.
    Rep LifeCycleLastCutoverReverted x -> LifeCycleLastCutoverReverted)
-> Generic LifeCycleLastCutoverReverted
forall x.
Rep LifeCycleLastCutoverReverted x -> LifeCycleLastCutoverReverted
forall x.
LifeCycleLastCutoverReverted -> Rep LifeCycleLastCutoverReverted x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LifeCycleLastCutoverReverted x -> LifeCycleLastCutoverReverted
$cfrom :: forall x.
LifeCycleLastCutoverReverted -> Rep LifeCycleLastCutoverReverted x
Prelude.Generic)

-- |
-- Create a value of 'LifeCycleLastCutoverReverted' 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:
--
-- 'apiCallDateTime', 'lifeCycleLastCutoverReverted_apiCallDateTime' - Lifecycle last Cutover reverted API call date time.
newLifeCycleLastCutoverReverted ::
  LifeCycleLastCutoverReverted
newLifeCycleLastCutoverReverted :: LifeCycleLastCutoverReverted
newLifeCycleLastCutoverReverted =
  LifeCycleLastCutoverReverted' :: Maybe Text -> LifeCycleLastCutoverReverted
LifeCycleLastCutoverReverted'
    { $sel:apiCallDateTime:LifeCycleLastCutoverReverted' :: Maybe Text
apiCallDateTime =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Lifecycle last Cutover reverted API call date time.
lifeCycleLastCutoverReverted_apiCallDateTime :: Lens.Lens' LifeCycleLastCutoverReverted (Prelude.Maybe Prelude.Text)
lifeCycleLastCutoverReverted_apiCallDateTime :: (Maybe Text -> f (Maybe Text))
-> LifeCycleLastCutoverReverted -> f LifeCycleLastCutoverReverted
lifeCycleLastCutoverReverted_apiCallDateTime = (LifeCycleLastCutoverReverted -> Maybe Text)
-> (LifeCycleLastCutoverReverted
    -> Maybe Text -> LifeCycleLastCutoverReverted)
-> Lens
     LifeCycleLastCutoverReverted
     LifeCycleLastCutoverReverted
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LifeCycleLastCutoverReverted' {Maybe Text
apiCallDateTime :: Maybe Text
$sel:apiCallDateTime:LifeCycleLastCutoverReverted' :: LifeCycleLastCutoverReverted -> Maybe Text
apiCallDateTime} -> Maybe Text
apiCallDateTime) (\s :: LifeCycleLastCutoverReverted
s@LifeCycleLastCutoverReverted' {} Maybe Text
a -> LifeCycleLastCutoverReverted
s {$sel:apiCallDateTime:LifeCycleLastCutoverReverted' :: Maybe Text
apiCallDateTime = Maybe Text
a} :: LifeCycleLastCutoverReverted)

instance Core.FromJSON LifeCycleLastCutoverReverted where
  parseJSON :: Value -> Parser LifeCycleLastCutoverReverted
parseJSON =
    String
-> (Object -> Parser LifeCycleLastCutoverReverted)
-> Value
-> Parser LifeCycleLastCutoverReverted
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"LifeCycleLastCutoverReverted"
      ( \Object
x ->
          Maybe Text -> LifeCycleLastCutoverReverted
LifeCycleLastCutoverReverted'
            (Maybe Text -> LifeCycleLastCutoverReverted)
-> Parser (Maybe Text) -> Parser LifeCycleLastCutoverReverted
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
"apiCallDateTime")
      )

instance
  Prelude.Hashable
    LifeCycleLastCutoverReverted

instance Prelude.NFData LifeCycleLastCutoverReverted