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

import qualified Amazonka.Core as Core
import Amazonka.ElastiCache.Types.ServiceUpdateSeverity
import Amazonka.ElastiCache.Types.ServiceUpdateStatus
import Amazonka.ElastiCache.Types.ServiceUpdateType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | An update that you can apply to your Redis clusters.
--
-- /See:/ 'newServiceUpdate' smart constructor.
data ServiceUpdate = ServiceUpdate'
  { -- | The Elasticache engine version to which the update applies. Either Redis
    -- or Memcached engine version
    ServiceUpdate -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
    -- | Reflects the nature of the service update
    ServiceUpdate -> Maybe ServiceUpdateType
serviceUpdateType :: Prelude.Maybe ServiceUpdateType,
    -- | The unique ID of the service update
    ServiceUpdate -> Maybe Text
serviceUpdateName :: Prelude.Maybe Prelude.Text,
    -- | The Elasticache engine to which the update applies. Either Redis or
    -- Memcached
    ServiceUpdate -> Maybe Text
engine :: Prelude.Maybe Prelude.Text,
    -- | The date when the service update is initially available
    ServiceUpdate -> Maybe ISO8601
serviceUpdateReleaseDate :: Prelude.Maybe Core.ISO8601,
    -- | Indicates whether the service update will be automatically applied once
    -- the recommended apply-by date has expired.
    ServiceUpdate -> Maybe Bool
autoUpdateAfterRecommendedApplyByDate :: Prelude.Maybe Prelude.Bool,
    -- | The severity of the service update
    ServiceUpdate -> Maybe ServiceUpdateSeverity
serviceUpdateSeverity :: Prelude.Maybe ServiceUpdateSeverity,
    -- | The date after which the service update is no longer available
    ServiceUpdate -> Maybe ISO8601
serviceUpdateEndDate :: Prelude.Maybe Core.ISO8601,
    -- | Provides details of the service update
    ServiceUpdate -> Maybe Text
serviceUpdateDescription :: Prelude.Maybe Prelude.Text,
    -- | The recommendend date to apply the service update in order to ensure
    -- compliance. For information on compliance, see
    -- <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/elasticache-compliance.html#elasticache-compliance-self-service Self-Service Security Updates for Compliance>.
    ServiceUpdate -> Maybe ISO8601
serviceUpdateRecommendedApplyByDate :: Prelude.Maybe Core.ISO8601,
    -- | The status of the service update
    ServiceUpdate -> Maybe ServiceUpdateStatus
serviceUpdateStatus :: Prelude.Maybe ServiceUpdateStatus,
    -- | The estimated length of time the service update will take
    ServiceUpdate -> Maybe Text
estimatedUpdateTime :: Prelude.Maybe Prelude.Text
  }
  deriving (ServiceUpdate -> ServiceUpdate -> Bool
(ServiceUpdate -> ServiceUpdate -> Bool)
-> (ServiceUpdate -> ServiceUpdate -> Bool) -> Eq ServiceUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServiceUpdate -> ServiceUpdate -> Bool
$c/= :: ServiceUpdate -> ServiceUpdate -> Bool
== :: ServiceUpdate -> ServiceUpdate -> Bool
$c== :: ServiceUpdate -> ServiceUpdate -> Bool
Prelude.Eq, ReadPrec [ServiceUpdate]
ReadPrec ServiceUpdate
Int -> ReadS ServiceUpdate
ReadS [ServiceUpdate]
(Int -> ReadS ServiceUpdate)
-> ReadS [ServiceUpdate]
-> ReadPrec ServiceUpdate
-> ReadPrec [ServiceUpdate]
-> Read ServiceUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ServiceUpdate]
$creadListPrec :: ReadPrec [ServiceUpdate]
readPrec :: ReadPrec ServiceUpdate
$creadPrec :: ReadPrec ServiceUpdate
readList :: ReadS [ServiceUpdate]
$creadList :: ReadS [ServiceUpdate]
readsPrec :: Int -> ReadS ServiceUpdate
$creadsPrec :: Int -> ReadS ServiceUpdate
Prelude.Read, Int -> ServiceUpdate -> ShowS
[ServiceUpdate] -> ShowS
ServiceUpdate -> String
(Int -> ServiceUpdate -> ShowS)
-> (ServiceUpdate -> String)
-> ([ServiceUpdate] -> ShowS)
-> Show ServiceUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServiceUpdate] -> ShowS
$cshowList :: [ServiceUpdate] -> ShowS
show :: ServiceUpdate -> String
$cshow :: ServiceUpdate -> String
showsPrec :: Int -> ServiceUpdate -> ShowS
$cshowsPrec :: Int -> ServiceUpdate -> ShowS
Prelude.Show, (forall x. ServiceUpdate -> Rep ServiceUpdate x)
-> (forall x. Rep ServiceUpdate x -> ServiceUpdate)
-> Generic ServiceUpdate
forall x. Rep ServiceUpdate x -> ServiceUpdate
forall x. ServiceUpdate -> Rep ServiceUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ServiceUpdate x -> ServiceUpdate
$cfrom :: forall x. ServiceUpdate -> Rep ServiceUpdate x
Prelude.Generic)

-- |
-- Create a value of 'ServiceUpdate' 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:
--
-- 'engineVersion', 'serviceUpdate_engineVersion' - The Elasticache engine version to which the update applies. Either Redis
-- or Memcached engine version
--
-- 'serviceUpdateType', 'serviceUpdate_serviceUpdateType' - Reflects the nature of the service update
--
-- 'serviceUpdateName', 'serviceUpdate_serviceUpdateName' - The unique ID of the service update
--
-- 'engine', 'serviceUpdate_engine' - The Elasticache engine to which the update applies. Either Redis or
-- Memcached
--
-- 'serviceUpdateReleaseDate', 'serviceUpdate_serviceUpdateReleaseDate' - The date when the service update is initially available
--
-- 'autoUpdateAfterRecommendedApplyByDate', 'serviceUpdate_autoUpdateAfterRecommendedApplyByDate' - Indicates whether the service update will be automatically applied once
-- the recommended apply-by date has expired.
--
-- 'serviceUpdateSeverity', 'serviceUpdate_serviceUpdateSeverity' - The severity of the service update
--
-- 'serviceUpdateEndDate', 'serviceUpdate_serviceUpdateEndDate' - The date after which the service update is no longer available
--
-- 'serviceUpdateDescription', 'serviceUpdate_serviceUpdateDescription' - Provides details of the service update
--
-- 'serviceUpdateRecommendedApplyByDate', 'serviceUpdate_serviceUpdateRecommendedApplyByDate' - The recommendend date to apply the service update in order to ensure
-- compliance. For information on compliance, see
-- <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/elasticache-compliance.html#elasticache-compliance-self-service Self-Service Security Updates for Compliance>.
--
-- 'serviceUpdateStatus', 'serviceUpdate_serviceUpdateStatus' - The status of the service update
--
-- 'estimatedUpdateTime', 'serviceUpdate_estimatedUpdateTime' - The estimated length of time the service update will take
newServiceUpdate ::
  ServiceUpdate
newServiceUpdate :: ServiceUpdate
newServiceUpdate =
  ServiceUpdate' :: Maybe Text
-> Maybe ServiceUpdateType
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Bool
-> Maybe ServiceUpdateSeverity
-> Maybe ISO8601
-> Maybe Text
-> Maybe ISO8601
-> Maybe ServiceUpdateStatus
-> Maybe Text
-> ServiceUpdate
ServiceUpdate'
    { $sel:engineVersion:ServiceUpdate' :: Maybe Text
engineVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceUpdateType:ServiceUpdate' :: Maybe ServiceUpdateType
serviceUpdateType = Maybe ServiceUpdateType
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceUpdateName:ServiceUpdate' :: Maybe Text
serviceUpdateName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:engine:ServiceUpdate' :: Maybe Text
engine = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceUpdateReleaseDate:ServiceUpdate' :: Maybe ISO8601
serviceUpdateReleaseDate = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:autoUpdateAfterRecommendedApplyByDate:ServiceUpdate' :: Maybe Bool
autoUpdateAfterRecommendedApplyByDate =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceUpdateSeverity:ServiceUpdate' :: Maybe ServiceUpdateSeverity
serviceUpdateSeverity = Maybe ServiceUpdateSeverity
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceUpdateEndDate:ServiceUpdate' :: Maybe ISO8601
serviceUpdateEndDate = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceUpdateDescription:ServiceUpdate' :: Maybe Text
serviceUpdateDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceUpdateRecommendedApplyByDate:ServiceUpdate' :: Maybe ISO8601
serviceUpdateRecommendedApplyByDate =
        Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceUpdateStatus:ServiceUpdate' :: Maybe ServiceUpdateStatus
serviceUpdateStatus = Maybe ServiceUpdateStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:estimatedUpdateTime:ServiceUpdate' :: Maybe Text
estimatedUpdateTime = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The Elasticache engine version to which the update applies. Either Redis
-- or Memcached engine version
serviceUpdate_engineVersion :: Lens.Lens' ServiceUpdate (Prelude.Maybe Prelude.Text)
serviceUpdate_engineVersion :: (Maybe Text -> f (Maybe Text)) -> ServiceUpdate -> f ServiceUpdate
serviceUpdate_engineVersion = (ServiceUpdate -> Maybe Text)
-> (ServiceUpdate -> Maybe Text -> ServiceUpdate)
-> Lens ServiceUpdate ServiceUpdate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceUpdate' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:ServiceUpdate' :: ServiceUpdate -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: ServiceUpdate
s@ServiceUpdate' {} Maybe Text
a -> ServiceUpdate
s {$sel:engineVersion:ServiceUpdate' :: Maybe Text
engineVersion = Maybe Text
a} :: ServiceUpdate)

-- | Reflects the nature of the service update
serviceUpdate_serviceUpdateType :: Lens.Lens' ServiceUpdate (Prelude.Maybe ServiceUpdateType)
serviceUpdate_serviceUpdateType :: (Maybe ServiceUpdateType -> f (Maybe ServiceUpdateType))
-> ServiceUpdate -> f ServiceUpdate
serviceUpdate_serviceUpdateType = (ServiceUpdate -> Maybe ServiceUpdateType)
-> (ServiceUpdate -> Maybe ServiceUpdateType -> ServiceUpdate)
-> Lens
     ServiceUpdate
     ServiceUpdate
     (Maybe ServiceUpdateType)
     (Maybe ServiceUpdateType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceUpdate' {Maybe ServiceUpdateType
serviceUpdateType :: Maybe ServiceUpdateType
$sel:serviceUpdateType:ServiceUpdate' :: ServiceUpdate -> Maybe ServiceUpdateType
serviceUpdateType} -> Maybe ServiceUpdateType
serviceUpdateType) (\s :: ServiceUpdate
s@ServiceUpdate' {} Maybe ServiceUpdateType
a -> ServiceUpdate
s {$sel:serviceUpdateType:ServiceUpdate' :: Maybe ServiceUpdateType
serviceUpdateType = Maybe ServiceUpdateType
a} :: ServiceUpdate)

-- | The unique ID of the service update
serviceUpdate_serviceUpdateName :: Lens.Lens' ServiceUpdate (Prelude.Maybe Prelude.Text)
serviceUpdate_serviceUpdateName :: (Maybe Text -> f (Maybe Text)) -> ServiceUpdate -> f ServiceUpdate
serviceUpdate_serviceUpdateName = (ServiceUpdate -> Maybe Text)
-> (ServiceUpdate -> Maybe Text -> ServiceUpdate)
-> Lens ServiceUpdate ServiceUpdate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceUpdate' {Maybe Text
serviceUpdateName :: Maybe Text
$sel:serviceUpdateName:ServiceUpdate' :: ServiceUpdate -> Maybe Text
serviceUpdateName} -> Maybe Text
serviceUpdateName) (\s :: ServiceUpdate
s@ServiceUpdate' {} Maybe Text
a -> ServiceUpdate
s {$sel:serviceUpdateName:ServiceUpdate' :: Maybe Text
serviceUpdateName = Maybe Text
a} :: ServiceUpdate)

-- | The Elasticache engine to which the update applies. Either Redis or
-- Memcached
serviceUpdate_engine :: Lens.Lens' ServiceUpdate (Prelude.Maybe Prelude.Text)
serviceUpdate_engine :: (Maybe Text -> f (Maybe Text)) -> ServiceUpdate -> f ServiceUpdate
serviceUpdate_engine = (ServiceUpdate -> Maybe Text)
-> (ServiceUpdate -> Maybe Text -> ServiceUpdate)
-> Lens ServiceUpdate ServiceUpdate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceUpdate' {Maybe Text
engine :: Maybe Text
$sel:engine:ServiceUpdate' :: ServiceUpdate -> Maybe Text
engine} -> Maybe Text
engine) (\s :: ServiceUpdate
s@ServiceUpdate' {} Maybe Text
a -> ServiceUpdate
s {$sel:engine:ServiceUpdate' :: Maybe Text
engine = Maybe Text
a} :: ServiceUpdate)

-- | The date when the service update is initially available
serviceUpdate_serviceUpdateReleaseDate :: Lens.Lens' ServiceUpdate (Prelude.Maybe Prelude.UTCTime)
serviceUpdate_serviceUpdateReleaseDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ServiceUpdate -> f ServiceUpdate
serviceUpdate_serviceUpdateReleaseDate = (ServiceUpdate -> Maybe ISO8601)
-> (ServiceUpdate -> Maybe ISO8601 -> ServiceUpdate)
-> Lens ServiceUpdate ServiceUpdate (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceUpdate' {Maybe ISO8601
serviceUpdateReleaseDate :: Maybe ISO8601
$sel:serviceUpdateReleaseDate:ServiceUpdate' :: ServiceUpdate -> Maybe ISO8601
serviceUpdateReleaseDate} -> Maybe ISO8601
serviceUpdateReleaseDate) (\s :: ServiceUpdate
s@ServiceUpdate' {} Maybe ISO8601
a -> ServiceUpdate
s {$sel:serviceUpdateReleaseDate:ServiceUpdate' :: Maybe ISO8601
serviceUpdateReleaseDate = Maybe ISO8601
a} :: ServiceUpdate) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> ServiceUpdate -> f ServiceUpdate)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ServiceUpdate
-> f ServiceUpdate
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

-- | Indicates whether the service update will be automatically applied once
-- the recommended apply-by date has expired.
serviceUpdate_autoUpdateAfterRecommendedApplyByDate :: Lens.Lens' ServiceUpdate (Prelude.Maybe Prelude.Bool)
serviceUpdate_autoUpdateAfterRecommendedApplyByDate :: (Maybe Bool -> f (Maybe Bool)) -> ServiceUpdate -> f ServiceUpdate
serviceUpdate_autoUpdateAfterRecommendedApplyByDate = (ServiceUpdate -> Maybe Bool)
-> (ServiceUpdate -> Maybe Bool -> ServiceUpdate)
-> Lens ServiceUpdate ServiceUpdate (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceUpdate' {Maybe Bool
autoUpdateAfterRecommendedApplyByDate :: Maybe Bool
$sel:autoUpdateAfterRecommendedApplyByDate:ServiceUpdate' :: ServiceUpdate -> Maybe Bool
autoUpdateAfterRecommendedApplyByDate} -> Maybe Bool
autoUpdateAfterRecommendedApplyByDate) (\s :: ServiceUpdate
s@ServiceUpdate' {} Maybe Bool
a -> ServiceUpdate
s {$sel:autoUpdateAfterRecommendedApplyByDate:ServiceUpdate' :: Maybe Bool
autoUpdateAfterRecommendedApplyByDate = Maybe Bool
a} :: ServiceUpdate)

-- | The severity of the service update
serviceUpdate_serviceUpdateSeverity :: Lens.Lens' ServiceUpdate (Prelude.Maybe ServiceUpdateSeverity)
serviceUpdate_serviceUpdateSeverity :: (Maybe ServiceUpdateSeverity -> f (Maybe ServiceUpdateSeverity))
-> ServiceUpdate -> f ServiceUpdate
serviceUpdate_serviceUpdateSeverity = (ServiceUpdate -> Maybe ServiceUpdateSeverity)
-> (ServiceUpdate -> Maybe ServiceUpdateSeverity -> ServiceUpdate)
-> Lens
     ServiceUpdate
     ServiceUpdate
     (Maybe ServiceUpdateSeverity)
     (Maybe ServiceUpdateSeverity)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceUpdate' {Maybe ServiceUpdateSeverity
serviceUpdateSeverity :: Maybe ServiceUpdateSeverity
$sel:serviceUpdateSeverity:ServiceUpdate' :: ServiceUpdate -> Maybe ServiceUpdateSeverity
serviceUpdateSeverity} -> Maybe ServiceUpdateSeverity
serviceUpdateSeverity) (\s :: ServiceUpdate
s@ServiceUpdate' {} Maybe ServiceUpdateSeverity
a -> ServiceUpdate
s {$sel:serviceUpdateSeverity:ServiceUpdate' :: Maybe ServiceUpdateSeverity
serviceUpdateSeverity = Maybe ServiceUpdateSeverity
a} :: ServiceUpdate)

-- | The date after which the service update is no longer available
serviceUpdate_serviceUpdateEndDate :: Lens.Lens' ServiceUpdate (Prelude.Maybe Prelude.UTCTime)
serviceUpdate_serviceUpdateEndDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ServiceUpdate -> f ServiceUpdate
serviceUpdate_serviceUpdateEndDate = (ServiceUpdate -> Maybe ISO8601)
-> (ServiceUpdate -> Maybe ISO8601 -> ServiceUpdate)
-> Lens ServiceUpdate ServiceUpdate (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceUpdate' {Maybe ISO8601
serviceUpdateEndDate :: Maybe ISO8601
$sel:serviceUpdateEndDate:ServiceUpdate' :: ServiceUpdate -> Maybe ISO8601
serviceUpdateEndDate} -> Maybe ISO8601
serviceUpdateEndDate) (\s :: ServiceUpdate
s@ServiceUpdate' {} Maybe ISO8601
a -> ServiceUpdate
s {$sel:serviceUpdateEndDate:ServiceUpdate' :: Maybe ISO8601
serviceUpdateEndDate = Maybe ISO8601
a} :: ServiceUpdate) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> ServiceUpdate -> f ServiceUpdate)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ServiceUpdate
-> f ServiceUpdate
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

-- | Provides details of the service update
serviceUpdate_serviceUpdateDescription :: Lens.Lens' ServiceUpdate (Prelude.Maybe Prelude.Text)
serviceUpdate_serviceUpdateDescription :: (Maybe Text -> f (Maybe Text)) -> ServiceUpdate -> f ServiceUpdate
serviceUpdate_serviceUpdateDescription = (ServiceUpdate -> Maybe Text)
-> (ServiceUpdate -> Maybe Text -> ServiceUpdate)
-> Lens ServiceUpdate ServiceUpdate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceUpdate' {Maybe Text
serviceUpdateDescription :: Maybe Text
$sel:serviceUpdateDescription:ServiceUpdate' :: ServiceUpdate -> Maybe Text
serviceUpdateDescription} -> Maybe Text
serviceUpdateDescription) (\s :: ServiceUpdate
s@ServiceUpdate' {} Maybe Text
a -> ServiceUpdate
s {$sel:serviceUpdateDescription:ServiceUpdate' :: Maybe Text
serviceUpdateDescription = Maybe Text
a} :: ServiceUpdate)

-- | The recommendend date to apply the service update in order to ensure
-- compliance. For information on compliance, see
-- <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/elasticache-compliance.html#elasticache-compliance-self-service Self-Service Security Updates for Compliance>.
serviceUpdate_serviceUpdateRecommendedApplyByDate :: Lens.Lens' ServiceUpdate (Prelude.Maybe Prelude.UTCTime)
serviceUpdate_serviceUpdateRecommendedApplyByDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ServiceUpdate -> f ServiceUpdate
serviceUpdate_serviceUpdateRecommendedApplyByDate = (ServiceUpdate -> Maybe ISO8601)
-> (ServiceUpdate -> Maybe ISO8601 -> ServiceUpdate)
-> Lens ServiceUpdate ServiceUpdate (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceUpdate' {Maybe ISO8601
serviceUpdateRecommendedApplyByDate :: Maybe ISO8601
$sel:serviceUpdateRecommendedApplyByDate:ServiceUpdate' :: ServiceUpdate -> Maybe ISO8601
serviceUpdateRecommendedApplyByDate} -> Maybe ISO8601
serviceUpdateRecommendedApplyByDate) (\s :: ServiceUpdate
s@ServiceUpdate' {} Maybe ISO8601
a -> ServiceUpdate
s {$sel:serviceUpdateRecommendedApplyByDate:ServiceUpdate' :: Maybe ISO8601
serviceUpdateRecommendedApplyByDate = Maybe ISO8601
a} :: ServiceUpdate) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> ServiceUpdate -> f ServiceUpdate)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ServiceUpdate
-> f ServiceUpdate
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 status of the service update
serviceUpdate_serviceUpdateStatus :: Lens.Lens' ServiceUpdate (Prelude.Maybe ServiceUpdateStatus)
serviceUpdate_serviceUpdateStatus :: (Maybe ServiceUpdateStatus -> f (Maybe ServiceUpdateStatus))
-> ServiceUpdate -> f ServiceUpdate
serviceUpdate_serviceUpdateStatus = (ServiceUpdate -> Maybe ServiceUpdateStatus)
-> (ServiceUpdate -> Maybe ServiceUpdateStatus -> ServiceUpdate)
-> Lens
     ServiceUpdate
     ServiceUpdate
     (Maybe ServiceUpdateStatus)
     (Maybe ServiceUpdateStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceUpdate' {Maybe ServiceUpdateStatus
serviceUpdateStatus :: Maybe ServiceUpdateStatus
$sel:serviceUpdateStatus:ServiceUpdate' :: ServiceUpdate -> Maybe ServiceUpdateStatus
serviceUpdateStatus} -> Maybe ServiceUpdateStatus
serviceUpdateStatus) (\s :: ServiceUpdate
s@ServiceUpdate' {} Maybe ServiceUpdateStatus
a -> ServiceUpdate
s {$sel:serviceUpdateStatus:ServiceUpdate' :: Maybe ServiceUpdateStatus
serviceUpdateStatus = Maybe ServiceUpdateStatus
a} :: ServiceUpdate)

-- | The estimated length of time the service update will take
serviceUpdate_estimatedUpdateTime :: Lens.Lens' ServiceUpdate (Prelude.Maybe Prelude.Text)
serviceUpdate_estimatedUpdateTime :: (Maybe Text -> f (Maybe Text)) -> ServiceUpdate -> f ServiceUpdate
serviceUpdate_estimatedUpdateTime = (ServiceUpdate -> Maybe Text)
-> (ServiceUpdate -> Maybe Text -> ServiceUpdate)
-> Lens ServiceUpdate ServiceUpdate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceUpdate' {Maybe Text
estimatedUpdateTime :: Maybe Text
$sel:estimatedUpdateTime:ServiceUpdate' :: ServiceUpdate -> Maybe Text
estimatedUpdateTime} -> Maybe Text
estimatedUpdateTime) (\s :: ServiceUpdate
s@ServiceUpdate' {} Maybe Text
a -> ServiceUpdate
s {$sel:estimatedUpdateTime:ServiceUpdate' :: Maybe Text
estimatedUpdateTime = Maybe Text
a} :: ServiceUpdate)

instance Core.FromXML ServiceUpdate where
  parseXML :: [Node] -> Either String ServiceUpdate
parseXML [Node]
x =
    Maybe Text
-> Maybe ServiceUpdateType
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Bool
-> Maybe ServiceUpdateSeverity
-> Maybe ISO8601
-> Maybe Text
-> Maybe ISO8601
-> Maybe ServiceUpdateStatus
-> Maybe Text
-> ServiceUpdate
ServiceUpdate'
      (Maybe Text
 -> Maybe ServiceUpdateType
 -> Maybe Text
 -> Maybe Text
 -> Maybe ISO8601
 -> Maybe Bool
 -> Maybe ServiceUpdateSeverity
 -> Maybe ISO8601
 -> Maybe Text
 -> Maybe ISO8601
 -> Maybe ServiceUpdateStatus
 -> Maybe Text
 -> ServiceUpdate)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ServiceUpdateType
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Bool
      -> Maybe ServiceUpdateSeverity
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ServiceUpdateStatus
      -> Maybe Text
      -> ServiceUpdate)
forall (f :: * -> *) a b. Functor 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
"EngineVersion")
      Either
  String
  (Maybe ServiceUpdateType
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Bool
   -> Maybe ServiceUpdateSeverity
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ServiceUpdateStatus
   -> Maybe Text
   -> ServiceUpdate)
-> Either String (Maybe ServiceUpdateType)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Bool
      -> Maybe ServiceUpdateSeverity
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ServiceUpdateStatus
      -> Maybe Text
      -> ServiceUpdate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ServiceUpdateType)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ServiceUpdateType")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Bool
   -> Maybe ServiceUpdateSeverity
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ServiceUpdateStatus
   -> Maybe Text
   -> ServiceUpdate)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe ISO8601
      -> Maybe Bool
      -> Maybe ServiceUpdateSeverity
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ServiceUpdateStatus
      -> Maybe Text
      -> ServiceUpdate)
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
"ServiceUpdateName")
      Either
  String
  (Maybe Text
   -> Maybe ISO8601
   -> Maybe Bool
   -> Maybe ServiceUpdateSeverity
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ServiceUpdateStatus
   -> Maybe Text
   -> ServiceUpdate)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ISO8601
      -> Maybe Bool
      -> Maybe ServiceUpdateSeverity
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ServiceUpdateStatus
      -> Maybe Text
      -> ServiceUpdate)
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
"Engine")
      Either
  String
  (Maybe ISO8601
   -> Maybe Bool
   -> Maybe ServiceUpdateSeverity
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ServiceUpdateStatus
   -> Maybe Text
   -> ServiceUpdate)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe Bool
      -> Maybe ServiceUpdateSeverity
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ServiceUpdateStatus
      -> Maybe Text
      -> ServiceUpdate)
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
"ServiceUpdateReleaseDate")
      Either
  String
  (Maybe Bool
   -> Maybe ServiceUpdateSeverity
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ServiceUpdateStatus
   -> Maybe Text
   -> ServiceUpdate)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe ServiceUpdateSeverity
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ServiceUpdateStatus
      -> Maybe Text
      -> ServiceUpdate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AutoUpdateAfterRecommendedApplyByDate")
      Either
  String
  (Maybe ServiceUpdateSeverity
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ServiceUpdateStatus
   -> Maybe Text
   -> ServiceUpdate)
-> Either String (Maybe ServiceUpdateSeverity)
-> Either
     String
     (Maybe ISO8601
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe ServiceUpdateStatus
      -> Maybe Text
      -> ServiceUpdate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ServiceUpdateSeverity)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ServiceUpdateSeverity")
      Either
  String
  (Maybe ISO8601
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe ServiceUpdateStatus
   -> Maybe Text
   -> ServiceUpdate)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe Text
      -> Maybe ISO8601
      -> Maybe ServiceUpdateStatus
      -> Maybe Text
      -> ServiceUpdate)
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
"ServiceUpdateEndDate")
      Either
  String
  (Maybe Text
   -> Maybe ISO8601
   -> Maybe ServiceUpdateStatus
   -> Maybe Text
   -> ServiceUpdate)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ISO8601
      -> Maybe ServiceUpdateStatus -> Maybe Text -> ServiceUpdate)
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
"ServiceUpdateDescription")
      Either
  String
  (Maybe ISO8601
   -> Maybe ServiceUpdateStatus -> Maybe Text -> ServiceUpdate)
-> Either String (Maybe ISO8601)
-> Either
     String (Maybe ServiceUpdateStatus -> Maybe Text -> ServiceUpdate)
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
"ServiceUpdateRecommendedApplyByDate")
      Either
  String (Maybe ServiceUpdateStatus -> Maybe Text -> ServiceUpdate)
-> Either String (Maybe ServiceUpdateStatus)
-> Either String (Maybe Text -> ServiceUpdate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ServiceUpdateStatus)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ServiceUpdateStatus")
      Either String (Maybe Text -> ServiceUpdate)
-> Either String (Maybe Text) -> Either String ServiceUpdate
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
"EstimatedUpdateTime")

instance Prelude.Hashable ServiceUpdate

instance Prelude.NFData ServiceUpdate