{-# 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.FMS.Types.RemediationActionWithOrder where
import qualified Amazonka.Core as Core
import Amazonka.FMS.Types.RemediationAction
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RemediationActionWithOrder = RemediationActionWithOrder'
{
RemediationActionWithOrder -> Maybe RemediationAction
remediationAction :: Prelude.Maybe RemediationAction,
RemediationActionWithOrder -> Maybe Int
order :: Prelude.Maybe Prelude.Int
}
deriving (RemediationActionWithOrder -> RemediationActionWithOrder -> Bool
(RemediationActionWithOrder -> RemediationActionWithOrder -> Bool)
-> (RemediationActionWithOrder
-> RemediationActionWithOrder -> Bool)
-> Eq RemediationActionWithOrder
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemediationActionWithOrder -> RemediationActionWithOrder -> Bool
$c/= :: RemediationActionWithOrder -> RemediationActionWithOrder -> Bool
== :: RemediationActionWithOrder -> RemediationActionWithOrder -> Bool
$c== :: RemediationActionWithOrder -> RemediationActionWithOrder -> Bool
Prelude.Eq, ReadPrec [RemediationActionWithOrder]
ReadPrec RemediationActionWithOrder
Int -> ReadS RemediationActionWithOrder
ReadS [RemediationActionWithOrder]
(Int -> ReadS RemediationActionWithOrder)
-> ReadS [RemediationActionWithOrder]
-> ReadPrec RemediationActionWithOrder
-> ReadPrec [RemediationActionWithOrder]
-> Read RemediationActionWithOrder
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemediationActionWithOrder]
$creadListPrec :: ReadPrec [RemediationActionWithOrder]
readPrec :: ReadPrec RemediationActionWithOrder
$creadPrec :: ReadPrec RemediationActionWithOrder
readList :: ReadS [RemediationActionWithOrder]
$creadList :: ReadS [RemediationActionWithOrder]
readsPrec :: Int -> ReadS RemediationActionWithOrder
$creadsPrec :: Int -> ReadS RemediationActionWithOrder
Prelude.Read, Int -> RemediationActionWithOrder -> ShowS
[RemediationActionWithOrder] -> ShowS
RemediationActionWithOrder -> String
(Int -> RemediationActionWithOrder -> ShowS)
-> (RemediationActionWithOrder -> String)
-> ([RemediationActionWithOrder] -> ShowS)
-> Show RemediationActionWithOrder
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemediationActionWithOrder] -> ShowS
$cshowList :: [RemediationActionWithOrder] -> ShowS
show :: RemediationActionWithOrder -> String
$cshow :: RemediationActionWithOrder -> String
showsPrec :: Int -> RemediationActionWithOrder -> ShowS
$cshowsPrec :: Int -> RemediationActionWithOrder -> ShowS
Prelude.Show, (forall x.
RemediationActionWithOrder -> Rep RemediationActionWithOrder x)
-> (forall x.
Rep RemediationActionWithOrder x -> RemediationActionWithOrder)
-> Generic RemediationActionWithOrder
forall x.
Rep RemediationActionWithOrder x -> RemediationActionWithOrder
forall x.
RemediationActionWithOrder -> Rep RemediationActionWithOrder x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RemediationActionWithOrder x -> RemediationActionWithOrder
$cfrom :: forall x.
RemediationActionWithOrder -> Rep RemediationActionWithOrder x
Prelude.Generic)
newRemediationActionWithOrder ::
RemediationActionWithOrder
newRemediationActionWithOrder :: RemediationActionWithOrder
newRemediationActionWithOrder =
RemediationActionWithOrder' :: Maybe RemediationAction -> Maybe Int -> RemediationActionWithOrder
RemediationActionWithOrder'
{ $sel:remediationAction:RemediationActionWithOrder' :: Maybe RemediationAction
remediationAction =
Maybe RemediationAction
forall a. Maybe a
Prelude.Nothing,
$sel:order:RemediationActionWithOrder' :: Maybe Int
order = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
remediationActionWithOrder_remediationAction :: Lens.Lens' RemediationActionWithOrder (Prelude.Maybe RemediationAction)
remediationActionWithOrder_remediationAction :: (Maybe RemediationAction -> f (Maybe RemediationAction))
-> RemediationActionWithOrder -> f RemediationActionWithOrder
remediationActionWithOrder_remediationAction = (RemediationActionWithOrder -> Maybe RemediationAction)
-> (RemediationActionWithOrder
-> Maybe RemediationAction -> RemediationActionWithOrder)
-> Lens
RemediationActionWithOrder
RemediationActionWithOrder
(Maybe RemediationAction)
(Maybe RemediationAction)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemediationActionWithOrder' {Maybe RemediationAction
remediationAction :: Maybe RemediationAction
$sel:remediationAction:RemediationActionWithOrder' :: RemediationActionWithOrder -> Maybe RemediationAction
remediationAction} -> Maybe RemediationAction
remediationAction) (\s :: RemediationActionWithOrder
s@RemediationActionWithOrder' {} Maybe RemediationAction
a -> RemediationActionWithOrder
s {$sel:remediationAction:RemediationActionWithOrder' :: Maybe RemediationAction
remediationAction = Maybe RemediationAction
a} :: RemediationActionWithOrder)
remediationActionWithOrder_order :: Lens.Lens' RemediationActionWithOrder (Prelude.Maybe Prelude.Int)
remediationActionWithOrder_order :: (Maybe Int -> f (Maybe Int))
-> RemediationActionWithOrder -> f RemediationActionWithOrder
remediationActionWithOrder_order = (RemediationActionWithOrder -> Maybe Int)
-> (RemediationActionWithOrder
-> Maybe Int -> RemediationActionWithOrder)
-> Lens
RemediationActionWithOrder
RemediationActionWithOrder
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemediationActionWithOrder' {Maybe Int
order :: Maybe Int
$sel:order:RemediationActionWithOrder' :: RemediationActionWithOrder -> Maybe Int
order} -> Maybe Int
order) (\s :: RemediationActionWithOrder
s@RemediationActionWithOrder' {} Maybe Int
a -> RemediationActionWithOrder
s {$sel:order:RemediationActionWithOrder' :: Maybe Int
order = Maybe Int
a} :: RemediationActionWithOrder)
instance Core.FromJSON RemediationActionWithOrder where
parseJSON :: Value -> Parser RemediationActionWithOrder
parseJSON =
String
-> (Object -> Parser RemediationActionWithOrder)
-> Value
-> Parser RemediationActionWithOrder
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RemediationActionWithOrder"
( \Object
x ->
Maybe RemediationAction -> Maybe Int -> RemediationActionWithOrder
RemediationActionWithOrder'
(Maybe RemediationAction
-> Maybe Int -> RemediationActionWithOrder)
-> Parser (Maybe RemediationAction)
-> Parser (Maybe Int -> RemediationActionWithOrder)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe RemediationAction)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RemediationAction")
Parser (Maybe Int -> RemediationActionWithOrder)
-> Parser (Maybe Int) -> Parser RemediationActionWithOrder
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Order")
)
instance Prelude.Hashable RemediationActionWithOrder
instance Prelude.NFData RemediationActionWithOrder