{-# 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.LifeCycleLastCutoverInitiated
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MGN.Types.LifeCycleLastCutoverInitiated where

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

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

-- |
-- Create a value of 'LifeCycleLastCutoverInitiated' 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', 'lifeCycleLastCutoverInitiated_apiCallDateTime' -
--
-- 'jobID', 'lifeCycleLastCutoverInitiated_jobID' - Lifecycle last Cutover initiated by Job ID.
newLifeCycleLastCutoverInitiated ::
  LifeCycleLastCutoverInitiated
newLifeCycleLastCutoverInitiated :: LifeCycleLastCutoverInitiated
newLifeCycleLastCutoverInitiated =
  LifeCycleLastCutoverInitiated'
    { $sel:apiCallDateTime:LifeCycleLastCutoverInitiated' :: Maybe Text
apiCallDateTime =
        forall a. Maybe a
Prelude.Nothing,
      $sel:jobID:LifeCycleLastCutoverInitiated' :: Maybe Text
jobID = forall a. Maybe a
Prelude.Nothing
    }

lifeCycleLastCutoverInitiated_apiCallDateTime :: Lens.Lens' LifeCycleLastCutoverInitiated (Prelude.Maybe Prelude.Text)
lifeCycleLastCutoverInitiated_apiCallDateTime :: Lens' LifeCycleLastCutoverInitiated (Maybe Text)
lifeCycleLastCutoverInitiated_apiCallDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LifeCycleLastCutoverInitiated' {Maybe Text
apiCallDateTime :: Maybe Text
$sel:apiCallDateTime:LifeCycleLastCutoverInitiated' :: LifeCycleLastCutoverInitiated -> Maybe Text
apiCallDateTime} -> Maybe Text
apiCallDateTime) (\s :: LifeCycleLastCutoverInitiated
s@LifeCycleLastCutoverInitiated' {} Maybe Text
a -> LifeCycleLastCutoverInitiated
s {$sel:apiCallDateTime:LifeCycleLastCutoverInitiated' :: Maybe Text
apiCallDateTime = Maybe Text
a} :: LifeCycleLastCutoverInitiated)

-- | Lifecycle last Cutover initiated by Job ID.
lifeCycleLastCutoverInitiated_jobID :: Lens.Lens' LifeCycleLastCutoverInitiated (Prelude.Maybe Prelude.Text)
lifeCycleLastCutoverInitiated_jobID :: Lens' LifeCycleLastCutoverInitiated (Maybe Text)
lifeCycleLastCutoverInitiated_jobID = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LifeCycleLastCutoverInitiated' {Maybe Text
jobID :: Maybe Text
$sel:jobID:LifeCycleLastCutoverInitiated' :: LifeCycleLastCutoverInitiated -> Maybe Text
jobID} -> Maybe Text
jobID) (\s :: LifeCycleLastCutoverInitiated
s@LifeCycleLastCutoverInitiated' {} Maybe Text
a -> LifeCycleLastCutoverInitiated
s {$sel:jobID:LifeCycleLastCutoverInitiated' :: Maybe Text
jobID = Maybe Text
a} :: LifeCycleLastCutoverInitiated)

instance Data.FromJSON LifeCycleLastCutoverInitiated where
  parseJSON :: Value -> Parser LifeCycleLastCutoverInitiated
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"LifeCycleLastCutoverInitiated"
      ( \Object
x ->
          Maybe Text -> Maybe Text -> LifeCycleLastCutoverInitiated
LifeCycleLastCutoverInitiated'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"apiCallDateTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"jobID")
      )

instance
  Prelude.Hashable
    LifeCycleLastCutoverInitiated
  where
  hashWithSalt :: Int -> LifeCycleLastCutoverInitiated -> Int
hashWithSalt Int
_salt LifeCycleLastCutoverInitiated' {Maybe Text
jobID :: Maybe Text
apiCallDateTime :: Maybe Text
$sel:jobID:LifeCycleLastCutoverInitiated' :: LifeCycleLastCutoverInitiated -> Maybe Text
$sel:apiCallDateTime:LifeCycleLastCutoverInitiated' :: LifeCycleLastCutoverInitiated -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
apiCallDateTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
jobID

instance Prelude.NFData LifeCycleLastCutoverInitiated where
  rnf :: LifeCycleLastCutoverInitiated -> ()
rnf LifeCycleLastCutoverInitiated' {Maybe Text
jobID :: Maybe Text
apiCallDateTime :: Maybe Text
$sel:jobID:LifeCycleLastCutoverInitiated' :: LifeCycleLastCutoverInitiated -> Maybe Text
$sel:apiCallDateTime:LifeCycleLastCutoverInitiated' :: LifeCycleLastCutoverInitiated -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
apiCallDateTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobID