{-# 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.ElastiCache.Types.CacheNodeUpdateStatus
-- 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.ElastiCache.Types.CacheNodeUpdateStatus where

import qualified Amazonka.Core as Core
import Amazonka.ElastiCache.Types.NodeUpdateInitiatedBy
import Amazonka.ElastiCache.Types.NodeUpdateStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The status of the service update on the cache node
--
-- /See:/ 'newCacheNodeUpdateStatus' smart constructor.
data CacheNodeUpdateStatus = CacheNodeUpdateStatus'
  { -- | The end date of the update for a node
    CacheNodeUpdateStatus -> Maybe ISO8601
nodeUpdateEndDate :: Prelude.Maybe Core.ISO8601,
    -- | Reflects whether the update was initiated by the customer or
    -- automatically applied
    CacheNodeUpdateStatus -> Maybe NodeUpdateInitiatedBy
nodeUpdateInitiatedBy :: Prelude.Maybe NodeUpdateInitiatedBy,
    -- | The date when the NodeUpdateStatus was last modified>
    CacheNodeUpdateStatus -> Maybe ISO8601
nodeUpdateStatusModifiedDate :: Prelude.Maybe Core.ISO8601,
    -- | The node ID of the cache cluster
    CacheNodeUpdateStatus -> Maybe Text
cacheNodeId :: Prelude.Maybe Prelude.Text,
    -- | The date when the update is triggered
    CacheNodeUpdateStatus -> Maybe ISO8601
nodeUpdateInitiatedDate :: Prelude.Maybe Core.ISO8601,
    -- | The start date of the update for a node
    CacheNodeUpdateStatus -> Maybe ISO8601
nodeUpdateStartDate :: Prelude.Maybe Core.ISO8601,
    -- | The update status of the node
    CacheNodeUpdateStatus -> Maybe NodeUpdateStatus
nodeUpdateStatus :: Prelude.Maybe NodeUpdateStatus,
    -- | The deletion date of the node
    CacheNodeUpdateStatus -> Maybe ISO8601
nodeDeletionDate :: Prelude.Maybe Core.ISO8601
  }
  deriving (CacheNodeUpdateStatus -> CacheNodeUpdateStatus -> Bool
(CacheNodeUpdateStatus -> CacheNodeUpdateStatus -> Bool)
-> (CacheNodeUpdateStatus -> CacheNodeUpdateStatus -> Bool)
-> Eq CacheNodeUpdateStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CacheNodeUpdateStatus -> CacheNodeUpdateStatus -> Bool
$c/= :: CacheNodeUpdateStatus -> CacheNodeUpdateStatus -> Bool
== :: CacheNodeUpdateStatus -> CacheNodeUpdateStatus -> Bool
$c== :: CacheNodeUpdateStatus -> CacheNodeUpdateStatus -> Bool
Prelude.Eq, ReadPrec [CacheNodeUpdateStatus]
ReadPrec CacheNodeUpdateStatus
Int -> ReadS CacheNodeUpdateStatus
ReadS [CacheNodeUpdateStatus]
(Int -> ReadS CacheNodeUpdateStatus)
-> ReadS [CacheNodeUpdateStatus]
-> ReadPrec CacheNodeUpdateStatus
-> ReadPrec [CacheNodeUpdateStatus]
-> Read CacheNodeUpdateStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CacheNodeUpdateStatus]
$creadListPrec :: ReadPrec [CacheNodeUpdateStatus]
readPrec :: ReadPrec CacheNodeUpdateStatus
$creadPrec :: ReadPrec CacheNodeUpdateStatus
readList :: ReadS [CacheNodeUpdateStatus]
$creadList :: ReadS [CacheNodeUpdateStatus]
readsPrec :: Int -> ReadS CacheNodeUpdateStatus
$creadsPrec :: Int -> ReadS CacheNodeUpdateStatus
Prelude.Read, Int -> CacheNodeUpdateStatus -> ShowS
[CacheNodeUpdateStatus] -> ShowS
CacheNodeUpdateStatus -> String
(Int -> CacheNodeUpdateStatus -> ShowS)
-> (CacheNodeUpdateStatus -> String)
-> ([CacheNodeUpdateStatus] -> ShowS)
-> Show CacheNodeUpdateStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CacheNodeUpdateStatus] -> ShowS
$cshowList :: [CacheNodeUpdateStatus] -> ShowS
show :: CacheNodeUpdateStatus -> String
$cshow :: CacheNodeUpdateStatus -> String
showsPrec :: Int -> CacheNodeUpdateStatus -> ShowS
$cshowsPrec :: Int -> CacheNodeUpdateStatus -> ShowS
Prelude.Show, (forall x. CacheNodeUpdateStatus -> Rep CacheNodeUpdateStatus x)
-> (forall x. Rep CacheNodeUpdateStatus x -> CacheNodeUpdateStatus)
-> Generic CacheNodeUpdateStatus
forall x. Rep CacheNodeUpdateStatus x -> CacheNodeUpdateStatus
forall x. CacheNodeUpdateStatus -> Rep CacheNodeUpdateStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CacheNodeUpdateStatus x -> CacheNodeUpdateStatus
$cfrom :: forall x. CacheNodeUpdateStatus -> Rep CacheNodeUpdateStatus x
Prelude.Generic)

-- |
-- Create a value of 'CacheNodeUpdateStatus' 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:
--
-- 'nodeUpdateEndDate', 'cacheNodeUpdateStatus_nodeUpdateEndDate' - The end date of the update for a node
--
-- 'nodeUpdateInitiatedBy', 'cacheNodeUpdateStatus_nodeUpdateInitiatedBy' - Reflects whether the update was initiated by the customer or
-- automatically applied
--
-- 'nodeUpdateStatusModifiedDate', 'cacheNodeUpdateStatus_nodeUpdateStatusModifiedDate' - The date when the NodeUpdateStatus was last modified>
--
-- 'cacheNodeId', 'cacheNodeUpdateStatus_cacheNodeId' - The node ID of the cache cluster
--
-- 'nodeUpdateInitiatedDate', 'cacheNodeUpdateStatus_nodeUpdateInitiatedDate' - The date when the update is triggered
--
-- 'nodeUpdateStartDate', 'cacheNodeUpdateStatus_nodeUpdateStartDate' - The start date of the update for a node
--
-- 'nodeUpdateStatus', 'cacheNodeUpdateStatus_nodeUpdateStatus' - The update status of the node
--
-- 'nodeDeletionDate', 'cacheNodeUpdateStatus_nodeDeletionDate' - The deletion date of the node
newCacheNodeUpdateStatus ::
  CacheNodeUpdateStatus
newCacheNodeUpdateStatus :: CacheNodeUpdateStatus
newCacheNodeUpdateStatus =
  CacheNodeUpdateStatus' :: Maybe ISO8601
-> Maybe NodeUpdateInitiatedBy
-> Maybe ISO8601
-> Maybe Text
-> Maybe ISO8601
-> Maybe ISO8601
-> Maybe NodeUpdateStatus
-> Maybe ISO8601
-> CacheNodeUpdateStatus
CacheNodeUpdateStatus'
    { $sel:nodeUpdateEndDate:CacheNodeUpdateStatus' :: Maybe ISO8601
nodeUpdateEndDate =
        Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:nodeUpdateInitiatedBy:CacheNodeUpdateStatus' :: Maybe NodeUpdateInitiatedBy
nodeUpdateInitiatedBy = Maybe NodeUpdateInitiatedBy
forall a. Maybe a
Prelude.Nothing,
      $sel:nodeUpdateStatusModifiedDate:CacheNodeUpdateStatus' :: Maybe ISO8601
nodeUpdateStatusModifiedDate = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheNodeId:CacheNodeUpdateStatus' :: Maybe Text
cacheNodeId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nodeUpdateInitiatedDate:CacheNodeUpdateStatus' :: Maybe ISO8601
nodeUpdateInitiatedDate = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:nodeUpdateStartDate:CacheNodeUpdateStatus' :: Maybe ISO8601
nodeUpdateStartDate = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:nodeUpdateStatus:CacheNodeUpdateStatus' :: Maybe NodeUpdateStatus
nodeUpdateStatus = Maybe NodeUpdateStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:nodeDeletionDate:CacheNodeUpdateStatus' :: Maybe ISO8601
nodeDeletionDate = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing
    }

-- | The end date of the update for a node
cacheNodeUpdateStatus_nodeUpdateEndDate :: Lens.Lens' CacheNodeUpdateStatus (Prelude.Maybe Prelude.UTCTime)
cacheNodeUpdateStatus_nodeUpdateEndDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CacheNodeUpdateStatus -> f CacheNodeUpdateStatus
cacheNodeUpdateStatus_nodeUpdateEndDate = (CacheNodeUpdateStatus -> Maybe ISO8601)
-> (CacheNodeUpdateStatus
    -> Maybe ISO8601 -> CacheNodeUpdateStatus)
-> Lens
     CacheNodeUpdateStatus
     CacheNodeUpdateStatus
     (Maybe ISO8601)
     (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNodeUpdateStatus' {Maybe ISO8601
nodeUpdateEndDate :: Maybe ISO8601
$sel:nodeUpdateEndDate:CacheNodeUpdateStatus' :: CacheNodeUpdateStatus -> Maybe ISO8601
nodeUpdateEndDate} -> Maybe ISO8601
nodeUpdateEndDate) (\s :: CacheNodeUpdateStatus
s@CacheNodeUpdateStatus' {} Maybe ISO8601
a -> CacheNodeUpdateStatus
s {$sel:nodeUpdateEndDate:CacheNodeUpdateStatus' :: Maybe ISO8601
nodeUpdateEndDate = Maybe ISO8601
a} :: CacheNodeUpdateStatus) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> CacheNodeUpdateStatus -> f CacheNodeUpdateStatus)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CacheNodeUpdateStatus
-> f CacheNodeUpdateStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Reflects whether the update was initiated by the customer or
-- automatically applied
cacheNodeUpdateStatus_nodeUpdateInitiatedBy :: Lens.Lens' CacheNodeUpdateStatus (Prelude.Maybe NodeUpdateInitiatedBy)
cacheNodeUpdateStatus_nodeUpdateInitiatedBy :: (Maybe NodeUpdateInitiatedBy -> f (Maybe NodeUpdateInitiatedBy))
-> CacheNodeUpdateStatus -> f CacheNodeUpdateStatus
cacheNodeUpdateStatus_nodeUpdateInitiatedBy = (CacheNodeUpdateStatus -> Maybe NodeUpdateInitiatedBy)
-> (CacheNodeUpdateStatus
    -> Maybe NodeUpdateInitiatedBy -> CacheNodeUpdateStatus)
-> Lens
     CacheNodeUpdateStatus
     CacheNodeUpdateStatus
     (Maybe NodeUpdateInitiatedBy)
     (Maybe NodeUpdateInitiatedBy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNodeUpdateStatus' {Maybe NodeUpdateInitiatedBy
nodeUpdateInitiatedBy :: Maybe NodeUpdateInitiatedBy
$sel:nodeUpdateInitiatedBy:CacheNodeUpdateStatus' :: CacheNodeUpdateStatus -> Maybe NodeUpdateInitiatedBy
nodeUpdateInitiatedBy} -> Maybe NodeUpdateInitiatedBy
nodeUpdateInitiatedBy) (\s :: CacheNodeUpdateStatus
s@CacheNodeUpdateStatus' {} Maybe NodeUpdateInitiatedBy
a -> CacheNodeUpdateStatus
s {$sel:nodeUpdateInitiatedBy:CacheNodeUpdateStatus' :: Maybe NodeUpdateInitiatedBy
nodeUpdateInitiatedBy = Maybe NodeUpdateInitiatedBy
a} :: CacheNodeUpdateStatus)

-- | The date when the NodeUpdateStatus was last modified>
cacheNodeUpdateStatus_nodeUpdateStatusModifiedDate :: Lens.Lens' CacheNodeUpdateStatus (Prelude.Maybe Prelude.UTCTime)
cacheNodeUpdateStatus_nodeUpdateStatusModifiedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CacheNodeUpdateStatus -> f CacheNodeUpdateStatus
cacheNodeUpdateStatus_nodeUpdateStatusModifiedDate = (CacheNodeUpdateStatus -> Maybe ISO8601)
-> (CacheNodeUpdateStatus
    -> Maybe ISO8601 -> CacheNodeUpdateStatus)
-> Lens
     CacheNodeUpdateStatus
     CacheNodeUpdateStatus
     (Maybe ISO8601)
     (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNodeUpdateStatus' {Maybe ISO8601
nodeUpdateStatusModifiedDate :: Maybe ISO8601
$sel:nodeUpdateStatusModifiedDate:CacheNodeUpdateStatus' :: CacheNodeUpdateStatus -> Maybe ISO8601
nodeUpdateStatusModifiedDate} -> Maybe ISO8601
nodeUpdateStatusModifiedDate) (\s :: CacheNodeUpdateStatus
s@CacheNodeUpdateStatus' {} Maybe ISO8601
a -> CacheNodeUpdateStatus
s {$sel:nodeUpdateStatusModifiedDate:CacheNodeUpdateStatus' :: Maybe ISO8601
nodeUpdateStatusModifiedDate = Maybe ISO8601
a} :: CacheNodeUpdateStatus) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> CacheNodeUpdateStatus -> f CacheNodeUpdateStatus)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CacheNodeUpdateStatus
-> f CacheNodeUpdateStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The node ID of the cache cluster
cacheNodeUpdateStatus_cacheNodeId :: Lens.Lens' CacheNodeUpdateStatus (Prelude.Maybe Prelude.Text)
cacheNodeUpdateStatus_cacheNodeId :: (Maybe Text -> f (Maybe Text))
-> CacheNodeUpdateStatus -> f CacheNodeUpdateStatus
cacheNodeUpdateStatus_cacheNodeId = (CacheNodeUpdateStatus -> Maybe Text)
-> (CacheNodeUpdateStatus -> Maybe Text -> CacheNodeUpdateStatus)
-> Lens
     CacheNodeUpdateStatus
     CacheNodeUpdateStatus
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNodeUpdateStatus' {Maybe Text
cacheNodeId :: Maybe Text
$sel:cacheNodeId:CacheNodeUpdateStatus' :: CacheNodeUpdateStatus -> Maybe Text
cacheNodeId} -> Maybe Text
cacheNodeId) (\s :: CacheNodeUpdateStatus
s@CacheNodeUpdateStatus' {} Maybe Text
a -> CacheNodeUpdateStatus
s {$sel:cacheNodeId:CacheNodeUpdateStatus' :: Maybe Text
cacheNodeId = Maybe Text
a} :: CacheNodeUpdateStatus)

-- | The date when the update is triggered
cacheNodeUpdateStatus_nodeUpdateInitiatedDate :: Lens.Lens' CacheNodeUpdateStatus (Prelude.Maybe Prelude.UTCTime)
cacheNodeUpdateStatus_nodeUpdateInitiatedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CacheNodeUpdateStatus -> f CacheNodeUpdateStatus
cacheNodeUpdateStatus_nodeUpdateInitiatedDate = (CacheNodeUpdateStatus -> Maybe ISO8601)
-> (CacheNodeUpdateStatus
    -> Maybe ISO8601 -> CacheNodeUpdateStatus)
-> Lens
     CacheNodeUpdateStatus
     CacheNodeUpdateStatus
     (Maybe ISO8601)
     (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNodeUpdateStatus' {Maybe ISO8601
nodeUpdateInitiatedDate :: Maybe ISO8601
$sel:nodeUpdateInitiatedDate:CacheNodeUpdateStatus' :: CacheNodeUpdateStatus -> Maybe ISO8601
nodeUpdateInitiatedDate} -> Maybe ISO8601
nodeUpdateInitiatedDate) (\s :: CacheNodeUpdateStatus
s@CacheNodeUpdateStatus' {} Maybe ISO8601
a -> CacheNodeUpdateStatus
s {$sel:nodeUpdateInitiatedDate:CacheNodeUpdateStatus' :: Maybe ISO8601
nodeUpdateInitiatedDate = Maybe ISO8601
a} :: CacheNodeUpdateStatus) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> CacheNodeUpdateStatus -> f CacheNodeUpdateStatus)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CacheNodeUpdateStatus
-> f CacheNodeUpdateStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The start date of the update for a node
cacheNodeUpdateStatus_nodeUpdateStartDate :: Lens.Lens' CacheNodeUpdateStatus (Prelude.Maybe Prelude.UTCTime)
cacheNodeUpdateStatus_nodeUpdateStartDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CacheNodeUpdateStatus -> f CacheNodeUpdateStatus
cacheNodeUpdateStatus_nodeUpdateStartDate = (CacheNodeUpdateStatus -> Maybe ISO8601)
-> (CacheNodeUpdateStatus
    -> Maybe ISO8601 -> CacheNodeUpdateStatus)
-> Lens
     CacheNodeUpdateStatus
     CacheNodeUpdateStatus
     (Maybe ISO8601)
     (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNodeUpdateStatus' {Maybe ISO8601
nodeUpdateStartDate :: Maybe ISO8601
$sel:nodeUpdateStartDate:CacheNodeUpdateStatus' :: CacheNodeUpdateStatus -> Maybe ISO8601
nodeUpdateStartDate} -> Maybe ISO8601
nodeUpdateStartDate) (\s :: CacheNodeUpdateStatus
s@CacheNodeUpdateStatus' {} Maybe ISO8601
a -> CacheNodeUpdateStatus
s {$sel:nodeUpdateStartDate:CacheNodeUpdateStatus' :: Maybe ISO8601
nodeUpdateStartDate = Maybe ISO8601
a} :: CacheNodeUpdateStatus) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> CacheNodeUpdateStatus -> f CacheNodeUpdateStatus)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CacheNodeUpdateStatus
-> f CacheNodeUpdateStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The update status of the node
cacheNodeUpdateStatus_nodeUpdateStatus :: Lens.Lens' CacheNodeUpdateStatus (Prelude.Maybe NodeUpdateStatus)
cacheNodeUpdateStatus_nodeUpdateStatus :: (Maybe NodeUpdateStatus -> f (Maybe NodeUpdateStatus))
-> CacheNodeUpdateStatus -> f CacheNodeUpdateStatus
cacheNodeUpdateStatus_nodeUpdateStatus = (CacheNodeUpdateStatus -> Maybe NodeUpdateStatus)
-> (CacheNodeUpdateStatus
    -> Maybe NodeUpdateStatus -> CacheNodeUpdateStatus)
-> Lens
     CacheNodeUpdateStatus
     CacheNodeUpdateStatus
     (Maybe NodeUpdateStatus)
     (Maybe NodeUpdateStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNodeUpdateStatus' {Maybe NodeUpdateStatus
nodeUpdateStatus :: Maybe NodeUpdateStatus
$sel:nodeUpdateStatus:CacheNodeUpdateStatus' :: CacheNodeUpdateStatus -> Maybe NodeUpdateStatus
nodeUpdateStatus} -> Maybe NodeUpdateStatus
nodeUpdateStatus) (\s :: CacheNodeUpdateStatus
s@CacheNodeUpdateStatus' {} Maybe NodeUpdateStatus
a -> CacheNodeUpdateStatus
s {$sel:nodeUpdateStatus:CacheNodeUpdateStatus' :: Maybe NodeUpdateStatus
nodeUpdateStatus = Maybe NodeUpdateStatus
a} :: CacheNodeUpdateStatus)

-- | The deletion date of the node
cacheNodeUpdateStatus_nodeDeletionDate :: Lens.Lens' CacheNodeUpdateStatus (Prelude.Maybe Prelude.UTCTime)
cacheNodeUpdateStatus_nodeDeletionDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CacheNodeUpdateStatus -> f CacheNodeUpdateStatus
cacheNodeUpdateStatus_nodeDeletionDate = (CacheNodeUpdateStatus -> Maybe ISO8601)
-> (CacheNodeUpdateStatus
    -> Maybe ISO8601 -> CacheNodeUpdateStatus)
-> Lens
     CacheNodeUpdateStatus
     CacheNodeUpdateStatus
     (Maybe ISO8601)
     (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNodeUpdateStatus' {Maybe ISO8601
nodeDeletionDate :: Maybe ISO8601
$sel:nodeDeletionDate:CacheNodeUpdateStatus' :: CacheNodeUpdateStatus -> Maybe ISO8601
nodeDeletionDate} -> Maybe ISO8601
nodeDeletionDate) (\s :: CacheNodeUpdateStatus
s@CacheNodeUpdateStatus' {} Maybe ISO8601
a -> CacheNodeUpdateStatus
s {$sel:nodeDeletionDate:CacheNodeUpdateStatus' :: Maybe ISO8601
nodeDeletionDate = Maybe ISO8601
a} :: CacheNodeUpdateStatus) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> CacheNodeUpdateStatus -> f CacheNodeUpdateStatus)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CacheNodeUpdateStatus
-> f CacheNodeUpdateStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

instance Core.FromXML CacheNodeUpdateStatus where
  parseXML :: [Node] -> Either String CacheNodeUpdateStatus
parseXML [Node]
x =
    Maybe ISO8601
-> Maybe NodeUpdateInitiatedBy
-> Maybe ISO8601
-> Maybe Text
-> Maybe ISO8601
-> Maybe ISO8601
-> Maybe NodeUpdateStatus
-> Maybe ISO8601
-> CacheNodeUpdateStatus
CacheNodeUpdateStatus'
      (Maybe ISO8601
 -> Maybe NodeUpdateInitiatedBy
 -> Maybe ISO8601
 -> Maybe Text
 -> Maybe ISO8601
 -> Maybe ISO8601
 -> Maybe NodeUpdateStatus
 -> Maybe ISO8601
 -> CacheNodeUpdateStatus)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe NodeUpdateInitiatedBy
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ISO8601
      -> Maybe NodeUpdateStatus
      -> Maybe ISO8601
      -> CacheNodeUpdateStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NodeUpdateEndDate")
      Either
  String
  (Maybe NodeUpdateInitiatedBy
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ISO8601
   -> Maybe NodeUpdateStatus
   -> Maybe ISO8601
   -> CacheNodeUpdateStatus)
-> Either String (Maybe NodeUpdateInitiatedBy)
-> Either
     String
     (Maybe ISO8601
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ISO8601
      -> Maybe NodeUpdateStatus
      -> Maybe ISO8601
      -> CacheNodeUpdateStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe NodeUpdateInitiatedBy)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NodeUpdateInitiatedBy")
      Either
  String
  (Maybe ISO8601
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ISO8601
   -> Maybe NodeUpdateStatus
   -> Maybe ISO8601
   -> CacheNodeUpdateStatus)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe Text
      -> Maybe ISO8601
      -> Maybe ISO8601
      -> Maybe NodeUpdateStatus
      -> Maybe ISO8601
      -> CacheNodeUpdateStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NodeUpdateStatusModifiedDate")
      Either
  String
  (Maybe Text
   -> Maybe ISO8601
   -> Maybe ISO8601
   -> Maybe NodeUpdateStatus
   -> Maybe ISO8601
   -> CacheNodeUpdateStatus)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ISO8601
      -> Maybe ISO8601
      -> Maybe NodeUpdateStatus
      -> Maybe ISO8601
      -> CacheNodeUpdateStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CacheNodeId")
      Either
  String
  (Maybe ISO8601
   -> Maybe ISO8601
   -> Maybe NodeUpdateStatus
   -> Maybe ISO8601
   -> CacheNodeUpdateStatus)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe ISO8601
      -> Maybe NodeUpdateStatus
      -> Maybe ISO8601
      -> CacheNodeUpdateStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NodeUpdateInitiatedDate")
      Either
  String
  (Maybe ISO8601
   -> Maybe NodeUpdateStatus
   -> Maybe ISO8601
   -> CacheNodeUpdateStatus)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe NodeUpdateStatus -> Maybe ISO8601 -> CacheNodeUpdateStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NodeUpdateStartDate")
      Either
  String
  (Maybe NodeUpdateStatus -> Maybe ISO8601 -> CacheNodeUpdateStatus)
-> Either String (Maybe NodeUpdateStatus)
-> Either String (Maybe ISO8601 -> CacheNodeUpdateStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe NodeUpdateStatus)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NodeUpdateStatus")
      Either String (Maybe ISO8601 -> CacheNodeUpdateStatus)
-> Either String (Maybe ISO8601)
-> Either String CacheNodeUpdateStatus
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NodeDeletionDate")

instance Prelude.Hashable CacheNodeUpdateStatus

instance Prelude.NFData CacheNodeUpdateStatus