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

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

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

-- |
-- Create a value of 'LifeCycleLastTestInitiated' 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:
--
-- 'jobID', 'lifeCycleLastTestInitiated_jobID' - Lifecycle last Test initiated Job ID.
--
-- 'apiCallDateTime', 'lifeCycleLastTestInitiated_apiCallDateTime' - Lifecycle last Test initiated API call date and time.
newLifeCycleLastTestInitiated ::
  LifeCycleLastTestInitiated
newLifeCycleLastTestInitiated :: LifeCycleLastTestInitiated
newLifeCycleLastTestInitiated =
  LifeCycleLastTestInitiated' :: Maybe Text -> Maybe Text -> LifeCycleLastTestInitiated
LifeCycleLastTestInitiated'
    { $sel:jobID:LifeCycleLastTestInitiated' :: Maybe Text
jobID =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:apiCallDateTime:LifeCycleLastTestInitiated' :: Maybe Text
apiCallDateTime = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Lifecycle last Test initiated Job ID.
lifeCycleLastTestInitiated_jobID :: Lens.Lens' LifeCycleLastTestInitiated (Prelude.Maybe Prelude.Text)
lifeCycleLastTestInitiated_jobID :: (Maybe Text -> f (Maybe Text))
-> LifeCycleLastTestInitiated -> f LifeCycleLastTestInitiated
lifeCycleLastTestInitiated_jobID = (LifeCycleLastTestInitiated -> Maybe Text)
-> (LifeCycleLastTestInitiated
    -> Maybe Text -> LifeCycleLastTestInitiated)
-> Lens
     LifeCycleLastTestInitiated
     LifeCycleLastTestInitiated
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LifeCycleLastTestInitiated' {Maybe Text
jobID :: Maybe Text
$sel:jobID:LifeCycleLastTestInitiated' :: LifeCycleLastTestInitiated -> Maybe Text
jobID} -> Maybe Text
jobID) (\s :: LifeCycleLastTestInitiated
s@LifeCycleLastTestInitiated' {} Maybe Text
a -> LifeCycleLastTestInitiated
s {$sel:jobID:LifeCycleLastTestInitiated' :: Maybe Text
jobID = Maybe Text
a} :: LifeCycleLastTestInitiated)

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

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

instance Prelude.Hashable LifeCycleLastTestInitiated

instance Prelude.NFData LifeCycleLastTestInitiated