{-# 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 #-}
module Amazonka.Config.Types.RemediationException where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RemediationException = RemediationException'
{
RemediationException -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
RemediationException -> Maybe POSIX
expirationTime :: Prelude.Maybe Core.POSIX,
RemediationException -> Text
configRuleName :: Prelude.Text,
RemediationException -> Text
resourceType :: Prelude.Text,
RemediationException -> Text
resourceId :: Prelude.Text
}
deriving (RemediationException -> RemediationException -> Bool
(RemediationException -> RemediationException -> Bool)
-> (RemediationException -> RemediationException -> Bool)
-> Eq RemediationException
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemediationException -> RemediationException -> Bool
$c/= :: RemediationException -> RemediationException -> Bool
== :: RemediationException -> RemediationException -> Bool
$c== :: RemediationException -> RemediationException -> Bool
Prelude.Eq, ReadPrec [RemediationException]
ReadPrec RemediationException
Int -> ReadS RemediationException
ReadS [RemediationException]
(Int -> ReadS RemediationException)
-> ReadS [RemediationException]
-> ReadPrec RemediationException
-> ReadPrec [RemediationException]
-> Read RemediationException
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemediationException]
$creadListPrec :: ReadPrec [RemediationException]
readPrec :: ReadPrec RemediationException
$creadPrec :: ReadPrec RemediationException
readList :: ReadS [RemediationException]
$creadList :: ReadS [RemediationException]
readsPrec :: Int -> ReadS RemediationException
$creadsPrec :: Int -> ReadS RemediationException
Prelude.Read, Int -> RemediationException -> ShowS
[RemediationException] -> ShowS
RemediationException -> String
(Int -> RemediationException -> ShowS)
-> (RemediationException -> String)
-> ([RemediationException] -> ShowS)
-> Show RemediationException
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemediationException] -> ShowS
$cshowList :: [RemediationException] -> ShowS
show :: RemediationException -> String
$cshow :: RemediationException -> String
showsPrec :: Int -> RemediationException -> ShowS
$cshowsPrec :: Int -> RemediationException -> ShowS
Prelude.Show, (forall x. RemediationException -> Rep RemediationException x)
-> (forall x. Rep RemediationException x -> RemediationException)
-> Generic RemediationException
forall x. Rep RemediationException x -> RemediationException
forall x. RemediationException -> Rep RemediationException x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RemediationException x -> RemediationException
$cfrom :: forall x. RemediationException -> Rep RemediationException x
Prelude.Generic)
newRemediationException ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
RemediationException
newRemediationException :: Text -> Text -> Text -> RemediationException
newRemediationException
Text
pConfigRuleName_
Text
pResourceType_
Text
pResourceId_ =
RemediationException' :: Maybe Text
-> Maybe POSIX -> Text -> Text -> Text -> RemediationException
RemediationException'
{ $sel:message:RemediationException' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:expirationTime:RemediationException' :: Maybe POSIX
expirationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:configRuleName:RemediationException' :: Text
configRuleName = Text
pConfigRuleName_,
$sel:resourceType:RemediationException' :: Text
resourceType = Text
pResourceType_,
$sel:resourceId:RemediationException' :: Text
resourceId = Text
pResourceId_
}
remediationException_message :: Lens.Lens' RemediationException (Prelude.Maybe Prelude.Text)
remediationException_message :: (Maybe Text -> f (Maybe Text))
-> RemediationException -> f RemediationException
remediationException_message = (RemediationException -> Maybe Text)
-> (RemediationException -> Maybe Text -> RemediationException)
-> Lens
RemediationException RemediationException (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemediationException' {Maybe Text
message :: Maybe Text
$sel:message:RemediationException' :: RemediationException -> Maybe Text
message} -> Maybe Text
message) (\s :: RemediationException
s@RemediationException' {} Maybe Text
a -> RemediationException
s {$sel:message:RemediationException' :: Maybe Text
message = Maybe Text
a} :: RemediationException)
remediationException_expirationTime :: Lens.Lens' RemediationException (Prelude.Maybe Prelude.UTCTime)
remediationException_expirationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> RemediationException -> f RemediationException
remediationException_expirationTime = (RemediationException -> Maybe POSIX)
-> (RemediationException -> Maybe POSIX -> RemediationException)
-> Lens
RemediationException
RemediationException
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemediationException' {Maybe POSIX
expirationTime :: Maybe POSIX
$sel:expirationTime:RemediationException' :: RemediationException -> Maybe POSIX
expirationTime} -> Maybe POSIX
expirationTime) (\s :: RemediationException
s@RemediationException' {} Maybe POSIX
a -> RemediationException
s {$sel:expirationTime:RemediationException' :: Maybe POSIX
expirationTime = Maybe POSIX
a} :: RemediationException) ((Maybe POSIX -> f (Maybe POSIX))
-> RemediationException -> f RemediationException)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> RemediationException
-> f RemediationException
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
remediationException_configRuleName :: Lens.Lens' RemediationException Prelude.Text
remediationException_configRuleName :: (Text -> f Text) -> RemediationException -> f RemediationException
remediationException_configRuleName = (RemediationException -> Text)
-> (RemediationException -> Text -> RemediationException)
-> Lens RemediationException RemediationException Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemediationException' {Text
configRuleName :: Text
$sel:configRuleName:RemediationException' :: RemediationException -> Text
configRuleName} -> Text
configRuleName) (\s :: RemediationException
s@RemediationException' {} Text
a -> RemediationException
s {$sel:configRuleName:RemediationException' :: Text
configRuleName = Text
a} :: RemediationException)
remediationException_resourceType :: Lens.Lens' RemediationException Prelude.Text
remediationException_resourceType :: (Text -> f Text) -> RemediationException -> f RemediationException
remediationException_resourceType = (RemediationException -> Text)
-> (RemediationException -> Text -> RemediationException)
-> Lens RemediationException RemediationException Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemediationException' {Text
resourceType :: Text
$sel:resourceType:RemediationException' :: RemediationException -> Text
resourceType} -> Text
resourceType) (\s :: RemediationException
s@RemediationException' {} Text
a -> RemediationException
s {$sel:resourceType:RemediationException' :: Text
resourceType = Text
a} :: RemediationException)
remediationException_resourceId :: Lens.Lens' RemediationException Prelude.Text
remediationException_resourceId :: (Text -> f Text) -> RemediationException -> f RemediationException
remediationException_resourceId = (RemediationException -> Text)
-> (RemediationException -> Text -> RemediationException)
-> Lens RemediationException RemediationException Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemediationException' {Text
resourceId :: Text
$sel:resourceId:RemediationException' :: RemediationException -> Text
resourceId} -> Text
resourceId) (\s :: RemediationException
s@RemediationException' {} Text
a -> RemediationException
s {$sel:resourceId:RemediationException' :: Text
resourceId = Text
a} :: RemediationException)
instance Core.FromJSON RemediationException where
parseJSON :: Value -> Parser RemediationException
parseJSON =
String
-> (Object -> Parser RemediationException)
-> Value
-> Parser RemediationException
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RemediationException"
( \Object
x ->
Maybe Text
-> Maybe POSIX -> Text -> Text -> Text -> RemediationException
RemediationException'
(Maybe Text
-> Maybe POSIX -> Text -> Text -> Text -> RemediationException)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX -> Text -> Text -> Text -> RemediationException)
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
"Message")
Parser
(Maybe POSIX -> Text -> Text -> Text -> RemediationException)
-> Parser (Maybe POSIX)
-> Parser (Text -> Text -> Text -> RemediationException)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ExpirationTime")
Parser (Text -> Text -> Text -> RemediationException)
-> Parser Text -> Parser (Text -> Text -> RemediationException)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ConfigRuleName")
Parser (Text -> Text -> RemediationException)
-> Parser Text -> Parser (Text -> RemediationException)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ResourceType")
Parser (Text -> RemediationException)
-> Parser Text -> Parser RemediationException
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ResourceId")
)
instance Prelude.Hashable RemediationException
instance Prelude.NFData RemediationException