{-# 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.LifeCycleLastTestReverted
-- 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.LifeCycleLastTestReverted where

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

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

-- |
-- Create a value of 'LifeCycleLastTestReverted' 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', 'lifeCycleLastTestReverted_apiCallDateTime' - Lifecycle last Test reverted API call date and time.
newLifeCycleLastTestReverted ::
  LifeCycleLastTestReverted
newLifeCycleLastTestReverted :: LifeCycleLastTestReverted
newLifeCycleLastTestReverted =
  LifeCycleLastTestReverted' :: Maybe Text -> LifeCycleLastTestReverted
LifeCycleLastTestReverted'
    { $sel:apiCallDateTime:LifeCycleLastTestReverted' :: Maybe Text
apiCallDateTime =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

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

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

instance Prelude.NFData LifeCycleLastTestReverted