module Stratosphere.GuardDuty.MalwareProtectionPlan.CFNStatusReasonsProperty (
CFNStatusReasonsProperty(..), mkCFNStatusReasonsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CFNStatusReasonsProperty
=
CFNStatusReasonsProperty {CFNStatusReasonsProperty -> ()
haddock_workaround_ :: (),
CFNStatusReasonsProperty -> Maybe (Value Text)
code :: (Prelude.Maybe (Value Prelude.Text)),
CFNStatusReasonsProperty -> Maybe (Value Text)
message :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (CFNStatusReasonsProperty -> CFNStatusReasonsProperty -> Bool
(CFNStatusReasonsProperty -> CFNStatusReasonsProperty -> Bool)
-> (CFNStatusReasonsProperty -> CFNStatusReasonsProperty -> Bool)
-> Eq CFNStatusReasonsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CFNStatusReasonsProperty -> CFNStatusReasonsProperty -> Bool
== :: CFNStatusReasonsProperty -> CFNStatusReasonsProperty -> Bool
$c/= :: CFNStatusReasonsProperty -> CFNStatusReasonsProperty -> Bool
/= :: CFNStatusReasonsProperty -> CFNStatusReasonsProperty -> Bool
Prelude.Eq, Int -> CFNStatusReasonsProperty -> ShowS
[CFNStatusReasonsProperty] -> ShowS
CFNStatusReasonsProperty -> String
(Int -> CFNStatusReasonsProperty -> ShowS)
-> (CFNStatusReasonsProperty -> String)
-> ([CFNStatusReasonsProperty] -> ShowS)
-> Show CFNStatusReasonsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CFNStatusReasonsProperty -> ShowS
showsPrec :: Int -> CFNStatusReasonsProperty -> ShowS
$cshow :: CFNStatusReasonsProperty -> String
show :: CFNStatusReasonsProperty -> String
$cshowList :: [CFNStatusReasonsProperty] -> ShowS
showList :: [CFNStatusReasonsProperty] -> ShowS
Prelude.Show)
mkCFNStatusReasonsProperty :: CFNStatusReasonsProperty
mkCFNStatusReasonsProperty :: CFNStatusReasonsProperty
mkCFNStatusReasonsProperty
= CFNStatusReasonsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), code :: Maybe (Value Text)
code = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
message :: Maybe (Value Text)
message = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CFNStatusReasonsProperty where
toResourceProperties :: CFNStatusReasonsProperty -> ResourceProperties
toResourceProperties CFNStatusReasonsProperty {Maybe (Value Text)
()
haddock_workaround_ :: CFNStatusReasonsProperty -> ()
code :: CFNStatusReasonsProperty -> Maybe (Value Text)
message :: CFNStatusReasonsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
code :: Maybe (Value Text)
message :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::GuardDuty::MalwareProtectionPlan.CFNStatusReasons",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Code" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
code,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Message" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
message])}
instance JSON.ToJSON CFNStatusReasonsProperty where
toJSON :: CFNStatusReasonsProperty -> Value
toJSON CFNStatusReasonsProperty {Maybe (Value Text)
()
haddock_workaround_ :: CFNStatusReasonsProperty -> ()
code :: CFNStatusReasonsProperty -> Maybe (Value Text)
message :: CFNStatusReasonsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
code :: Maybe (Value Text)
message :: Maybe (Value Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Code" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
code,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Message" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
message]))
instance Property "Code" CFNStatusReasonsProperty where
type PropertyType "Code" CFNStatusReasonsProperty = Value Prelude.Text
set :: PropertyType "Code" CFNStatusReasonsProperty
-> CFNStatusReasonsProperty -> CFNStatusReasonsProperty
set PropertyType "Code" CFNStatusReasonsProperty
newValue CFNStatusReasonsProperty {Maybe (Value Text)
()
haddock_workaround_ :: CFNStatusReasonsProperty -> ()
code :: CFNStatusReasonsProperty -> Maybe (Value Text)
message :: CFNStatusReasonsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
code :: Maybe (Value Text)
message :: Maybe (Value Text)
..}
= CFNStatusReasonsProperty {code :: Maybe (Value Text)
code = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Code" CFNStatusReasonsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
message :: Maybe (Value Text)
haddock_workaround_ :: ()
message :: Maybe (Value Text)
..}
instance Property "Message" CFNStatusReasonsProperty where
type PropertyType "Message" CFNStatusReasonsProperty = Value Prelude.Text
set :: PropertyType "Message" CFNStatusReasonsProperty
-> CFNStatusReasonsProperty -> CFNStatusReasonsProperty
set PropertyType "Message" CFNStatusReasonsProperty
newValue CFNStatusReasonsProperty {Maybe (Value Text)
()
haddock_workaround_ :: CFNStatusReasonsProperty -> ()
code :: CFNStatusReasonsProperty -> Maybe (Value Text)
message :: CFNStatusReasonsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
code :: Maybe (Value Text)
message :: Maybe (Value Text)
..}
= CFNStatusReasonsProperty {message :: Maybe (Value Text)
message = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Message" CFNStatusReasonsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
code :: Maybe (Value Text)
haddock_workaround_ :: ()
code :: Maybe (Value Text)
..}