{-# 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.GuardDuty.Types.MalwareProtectionConfigurationResult where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.GuardDuty.Types.ScanEc2InstanceWithFindingsResult
import qualified Amazonka.Prelude as Prelude
data MalwareProtectionConfigurationResult = MalwareProtectionConfigurationResult'
{
MalwareProtectionConfigurationResult
-> Maybe ScanEc2InstanceWithFindingsResult
scanEc2InstanceWithFindings :: Prelude.Maybe ScanEc2InstanceWithFindingsResult,
MalwareProtectionConfigurationResult -> Maybe Text
serviceRole :: Prelude.Maybe Prelude.Text
}
deriving (MalwareProtectionConfigurationResult
-> MalwareProtectionConfigurationResult -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MalwareProtectionConfigurationResult
-> MalwareProtectionConfigurationResult -> Bool
$c/= :: MalwareProtectionConfigurationResult
-> MalwareProtectionConfigurationResult -> Bool
== :: MalwareProtectionConfigurationResult
-> MalwareProtectionConfigurationResult -> Bool
$c== :: MalwareProtectionConfigurationResult
-> MalwareProtectionConfigurationResult -> Bool
Prelude.Eq, ReadPrec [MalwareProtectionConfigurationResult]
ReadPrec MalwareProtectionConfigurationResult
Int -> ReadS MalwareProtectionConfigurationResult
ReadS [MalwareProtectionConfigurationResult]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MalwareProtectionConfigurationResult]
$creadListPrec :: ReadPrec [MalwareProtectionConfigurationResult]
readPrec :: ReadPrec MalwareProtectionConfigurationResult
$creadPrec :: ReadPrec MalwareProtectionConfigurationResult
readList :: ReadS [MalwareProtectionConfigurationResult]
$creadList :: ReadS [MalwareProtectionConfigurationResult]
readsPrec :: Int -> ReadS MalwareProtectionConfigurationResult
$creadsPrec :: Int -> ReadS MalwareProtectionConfigurationResult
Prelude.Read, Int -> MalwareProtectionConfigurationResult -> ShowS
[MalwareProtectionConfigurationResult] -> ShowS
MalwareProtectionConfigurationResult -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MalwareProtectionConfigurationResult] -> ShowS
$cshowList :: [MalwareProtectionConfigurationResult] -> ShowS
show :: MalwareProtectionConfigurationResult -> String
$cshow :: MalwareProtectionConfigurationResult -> String
showsPrec :: Int -> MalwareProtectionConfigurationResult -> ShowS
$cshowsPrec :: Int -> MalwareProtectionConfigurationResult -> ShowS
Prelude.Show, forall x.
Rep MalwareProtectionConfigurationResult x
-> MalwareProtectionConfigurationResult
forall x.
MalwareProtectionConfigurationResult
-> Rep MalwareProtectionConfigurationResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MalwareProtectionConfigurationResult x
-> MalwareProtectionConfigurationResult
$cfrom :: forall x.
MalwareProtectionConfigurationResult
-> Rep MalwareProtectionConfigurationResult x
Prelude.Generic)
newMalwareProtectionConfigurationResult ::
MalwareProtectionConfigurationResult
newMalwareProtectionConfigurationResult :: MalwareProtectionConfigurationResult
newMalwareProtectionConfigurationResult =
MalwareProtectionConfigurationResult'
{ $sel:scanEc2InstanceWithFindings:MalwareProtectionConfigurationResult' :: Maybe ScanEc2InstanceWithFindingsResult
scanEc2InstanceWithFindings =
forall a. Maybe a
Prelude.Nothing,
$sel:serviceRole:MalwareProtectionConfigurationResult' :: Maybe Text
serviceRole = forall a. Maybe a
Prelude.Nothing
}
malwareProtectionConfigurationResult_scanEc2InstanceWithFindings :: Lens.Lens' MalwareProtectionConfigurationResult (Prelude.Maybe ScanEc2InstanceWithFindingsResult)
malwareProtectionConfigurationResult_scanEc2InstanceWithFindings :: Lens'
MalwareProtectionConfigurationResult
(Maybe ScanEc2InstanceWithFindingsResult)
malwareProtectionConfigurationResult_scanEc2InstanceWithFindings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MalwareProtectionConfigurationResult' {Maybe ScanEc2InstanceWithFindingsResult
scanEc2InstanceWithFindings :: Maybe ScanEc2InstanceWithFindingsResult
$sel:scanEc2InstanceWithFindings:MalwareProtectionConfigurationResult' :: MalwareProtectionConfigurationResult
-> Maybe ScanEc2InstanceWithFindingsResult
scanEc2InstanceWithFindings} -> Maybe ScanEc2InstanceWithFindingsResult
scanEc2InstanceWithFindings) (\s :: MalwareProtectionConfigurationResult
s@MalwareProtectionConfigurationResult' {} Maybe ScanEc2InstanceWithFindingsResult
a -> MalwareProtectionConfigurationResult
s {$sel:scanEc2InstanceWithFindings:MalwareProtectionConfigurationResult' :: Maybe ScanEc2InstanceWithFindingsResult
scanEc2InstanceWithFindings = Maybe ScanEc2InstanceWithFindingsResult
a} :: MalwareProtectionConfigurationResult)
malwareProtectionConfigurationResult_serviceRole :: Lens.Lens' MalwareProtectionConfigurationResult (Prelude.Maybe Prelude.Text)
malwareProtectionConfigurationResult_serviceRole :: Lens' MalwareProtectionConfigurationResult (Maybe Text)
malwareProtectionConfigurationResult_serviceRole = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MalwareProtectionConfigurationResult' {Maybe Text
serviceRole :: Maybe Text
$sel:serviceRole:MalwareProtectionConfigurationResult' :: MalwareProtectionConfigurationResult -> Maybe Text
serviceRole} -> Maybe Text
serviceRole) (\s :: MalwareProtectionConfigurationResult
s@MalwareProtectionConfigurationResult' {} Maybe Text
a -> MalwareProtectionConfigurationResult
s {$sel:serviceRole:MalwareProtectionConfigurationResult' :: Maybe Text
serviceRole = Maybe Text
a} :: MalwareProtectionConfigurationResult)
instance
Data.FromJSON
MalwareProtectionConfigurationResult
where
parseJSON :: Value -> Parser MalwareProtectionConfigurationResult
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"MalwareProtectionConfigurationResult"
( \Object
x ->
Maybe ScanEc2InstanceWithFindingsResult
-> Maybe Text -> MalwareProtectionConfigurationResult
MalwareProtectionConfigurationResult'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"scanEc2InstanceWithFindings")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"serviceRole")
)
instance
Prelude.Hashable
MalwareProtectionConfigurationResult
where
hashWithSalt :: Int -> MalwareProtectionConfigurationResult -> Int
hashWithSalt
Int
_salt
MalwareProtectionConfigurationResult' {Maybe Text
Maybe ScanEc2InstanceWithFindingsResult
serviceRole :: Maybe Text
scanEc2InstanceWithFindings :: Maybe ScanEc2InstanceWithFindingsResult
$sel:serviceRole:MalwareProtectionConfigurationResult' :: MalwareProtectionConfigurationResult -> Maybe Text
$sel:scanEc2InstanceWithFindings:MalwareProtectionConfigurationResult' :: MalwareProtectionConfigurationResult
-> Maybe ScanEc2InstanceWithFindingsResult
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ScanEc2InstanceWithFindingsResult
scanEc2InstanceWithFindings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
serviceRole
instance
Prelude.NFData
MalwareProtectionConfigurationResult
where
rnf :: MalwareProtectionConfigurationResult -> ()
rnf MalwareProtectionConfigurationResult' {Maybe Text
Maybe ScanEc2InstanceWithFindingsResult
serviceRole :: Maybe Text
scanEc2InstanceWithFindings :: Maybe ScanEc2InstanceWithFindingsResult
$sel:serviceRole:MalwareProtectionConfigurationResult' :: MalwareProtectionConfigurationResult -> Maybe Text
$sel:scanEc2InstanceWithFindings:MalwareProtectionConfigurationResult' :: MalwareProtectionConfigurationResult
-> Maybe ScanEc2InstanceWithFindingsResult
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ScanEc2InstanceWithFindingsResult
scanEc2InstanceWithFindings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
serviceRole