{-# 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.GuardDuty.Types.MalwareProtectionDataSourceFreeTrial
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.GuardDuty.Types.MalwareProtectionDataSourceFreeTrial 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.DataSourceFreeTrial
import qualified Amazonka.Prelude as Prelude

-- | Provides details about Malware Protection when it is enabled as a data
-- source.
--
-- /See:/ 'newMalwareProtectionDataSourceFreeTrial' smart constructor.
data MalwareProtectionDataSourceFreeTrial = MalwareProtectionDataSourceFreeTrial'
  { -- | Describes whether Malware Protection for EC2 instances with findings is
    -- enabled as a data source.
    MalwareProtectionDataSourceFreeTrial -> Maybe DataSourceFreeTrial
scanEc2InstanceWithFindings :: Prelude.Maybe DataSourceFreeTrial
  }
  deriving (MalwareProtectionDataSourceFreeTrial
-> MalwareProtectionDataSourceFreeTrial -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MalwareProtectionDataSourceFreeTrial
-> MalwareProtectionDataSourceFreeTrial -> Bool
$c/= :: MalwareProtectionDataSourceFreeTrial
-> MalwareProtectionDataSourceFreeTrial -> Bool
== :: MalwareProtectionDataSourceFreeTrial
-> MalwareProtectionDataSourceFreeTrial -> Bool
$c== :: MalwareProtectionDataSourceFreeTrial
-> MalwareProtectionDataSourceFreeTrial -> Bool
Prelude.Eq, ReadPrec [MalwareProtectionDataSourceFreeTrial]
ReadPrec MalwareProtectionDataSourceFreeTrial
Int -> ReadS MalwareProtectionDataSourceFreeTrial
ReadS [MalwareProtectionDataSourceFreeTrial]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MalwareProtectionDataSourceFreeTrial]
$creadListPrec :: ReadPrec [MalwareProtectionDataSourceFreeTrial]
readPrec :: ReadPrec MalwareProtectionDataSourceFreeTrial
$creadPrec :: ReadPrec MalwareProtectionDataSourceFreeTrial
readList :: ReadS [MalwareProtectionDataSourceFreeTrial]
$creadList :: ReadS [MalwareProtectionDataSourceFreeTrial]
readsPrec :: Int -> ReadS MalwareProtectionDataSourceFreeTrial
$creadsPrec :: Int -> ReadS MalwareProtectionDataSourceFreeTrial
Prelude.Read, Int -> MalwareProtectionDataSourceFreeTrial -> ShowS
[MalwareProtectionDataSourceFreeTrial] -> ShowS
MalwareProtectionDataSourceFreeTrial -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MalwareProtectionDataSourceFreeTrial] -> ShowS
$cshowList :: [MalwareProtectionDataSourceFreeTrial] -> ShowS
show :: MalwareProtectionDataSourceFreeTrial -> String
$cshow :: MalwareProtectionDataSourceFreeTrial -> String
showsPrec :: Int -> MalwareProtectionDataSourceFreeTrial -> ShowS
$cshowsPrec :: Int -> MalwareProtectionDataSourceFreeTrial -> ShowS
Prelude.Show, forall x.
Rep MalwareProtectionDataSourceFreeTrial x
-> MalwareProtectionDataSourceFreeTrial
forall x.
MalwareProtectionDataSourceFreeTrial
-> Rep MalwareProtectionDataSourceFreeTrial x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MalwareProtectionDataSourceFreeTrial x
-> MalwareProtectionDataSourceFreeTrial
$cfrom :: forall x.
MalwareProtectionDataSourceFreeTrial
-> Rep MalwareProtectionDataSourceFreeTrial x
Prelude.Generic)

-- |
-- Create a value of 'MalwareProtectionDataSourceFreeTrial' 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:
--
-- 'scanEc2InstanceWithFindings', 'malwareProtectionDataSourceFreeTrial_scanEc2InstanceWithFindings' - Describes whether Malware Protection for EC2 instances with findings is
-- enabled as a data source.
newMalwareProtectionDataSourceFreeTrial ::
  MalwareProtectionDataSourceFreeTrial
newMalwareProtectionDataSourceFreeTrial :: MalwareProtectionDataSourceFreeTrial
newMalwareProtectionDataSourceFreeTrial =
  MalwareProtectionDataSourceFreeTrial'
    { $sel:scanEc2InstanceWithFindings:MalwareProtectionDataSourceFreeTrial' :: Maybe DataSourceFreeTrial
scanEc2InstanceWithFindings =
        forall a. Maybe a
Prelude.Nothing
    }

-- | Describes whether Malware Protection for EC2 instances with findings is
-- enabled as a data source.
malwareProtectionDataSourceFreeTrial_scanEc2InstanceWithFindings :: Lens.Lens' MalwareProtectionDataSourceFreeTrial (Prelude.Maybe DataSourceFreeTrial)
malwareProtectionDataSourceFreeTrial_scanEc2InstanceWithFindings :: Lens'
  MalwareProtectionDataSourceFreeTrial (Maybe DataSourceFreeTrial)
malwareProtectionDataSourceFreeTrial_scanEc2InstanceWithFindings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MalwareProtectionDataSourceFreeTrial' {Maybe DataSourceFreeTrial
scanEc2InstanceWithFindings :: Maybe DataSourceFreeTrial
$sel:scanEc2InstanceWithFindings:MalwareProtectionDataSourceFreeTrial' :: MalwareProtectionDataSourceFreeTrial -> Maybe DataSourceFreeTrial
scanEc2InstanceWithFindings} -> Maybe DataSourceFreeTrial
scanEc2InstanceWithFindings) (\s :: MalwareProtectionDataSourceFreeTrial
s@MalwareProtectionDataSourceFreeTrial' {} Maybe DataSourceFreeTrial
a -> MalwareProtectionDataSourceFreeTrial
s {$sel:scanEc2InstanceWithFindings:MalwareProtectionDataSourceFreeTrial' :: Maybe DataSourceFreeTrial
scanEc2InstanceWithFindings = Maybe DataSourceFreeTrial
a} :: MalwareProtectionDataSourceFreeTrial)

instance
  Data.FromJSON
    MalwareProtectionDataSourceFreeTrial
  where
  parseJSON :: Value -> Parser MalwareProtectionDataSourceFreeTrial
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"MalwareProtectionDataSourceFreeTrial"
      ( \Object
x ->
          Maybe DataSourceFreeTrial -> MalwareProtectionDataSourceFreeTrial
MalwareProtectionDataSourceFreeTrial'
            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")
      )

instance
  Prelude.Hashable
    MalwareProtectionDataSourceFreeTrial
  where
  hashWithSalt :: Int -> MalwareProtectionDataSourceFreeTrial -> Int
hashWithSalt
    Int
_salt
    MalwareProtectionDataSourceFreeTrial' {Maybe DataSourceFreeTrial
scanEc2InstanceWithFindings :: Maybe DataSourceFreeTrial
$sel:scanEc2InstanceWithFindings:MalwareProtectionDataSourceFreeTrial' :: MalwareProtectionDataSourceFreeTrial -> Maybe DataSourceFreeTrial
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DataSourceFreeTrial
scanEc2InstanceWithFindings

instance
  Prelude.NFData
    MalwareProtectionDataSourceFreeTrial
  where
  rnf :: MalwareProtectionDataSourceFreeTrial -> ()
rnf MalwareProtectionDataSourceFreeTrial' {Maybe DataSourceFreeTrial
scanEc2InstanceWithFindings :: Maybe DataSourceFreeTrial
$sel:scanEc2InstanceWithFindings:MalwareProtectionDataSourceFreeTrial' :: MalwareProtectionDataSourceFreeTrial -> Maybe DataSourceFreeTrial
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe DataSourceFreeTrial
scanEc2InstanceWithFindings