{-# 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.MalwareProtectionConfigurationResult -- 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.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 -- | An object that contains information on the status of all Malware -- Protection data sources. -- -- /See:/ 'newMalwareProtectionConfigurationResult' smart constructor. data MalwareProtectionConfigurationResult = MalwareProtectionConfigurationResult' { -- | Describes the configuration of Malware Protection for EC2 instances with -- findings. scanEc2InstanceWithFindings :: Prelude.Maybe ScanEc2InstanceWithFindingsResult, -- | The GuardDuty Malware Protection service role. serviceRole :: Prelude.Maybe Prelude.Text } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'MalwareProtectionConfigurationResult' with all optional fields omitted. -- -- Use or to modify other optional fields. -- -- The following record fields are available, with the corresponding lenses provided -- for backwards compatibility: -- -- 'scanEc2InstanceWithFindings', 'malwareProtectionConfigurationResult_scanEc2InstanceWithFindings' - Describes the configuration of Malware Protection for EC2 instances with -- findings. -- -- 'serviceRole', 'malwareProtectionConfigurationResult_serviceRole' - The GuardDuty Malware Protection service role. newMalwareProtectionConfigurationResult :: MalwareProtectionConfigurationResult newMalwareProtectionConfigurationResult = MalwareProtectionConfigurationResult' { scanEc2InstanceWithFindings = Prelude.Nothing, serviceRole = Prelude.Nothing } -- | Describes the configuration of Malware Protection for EC2 instances with -- findings. malwareProtectionConfigurationResult_scanEc2InstanceWithFindings :: Lens.Lens' MalwareProtectionConfigurationResult (Prelude.Maybe ScanEc2InstanceWithFindingsResult) malwareProtectionConfigurationResult_scanEc2InstanceWithFindings = Lens.lens (\MalwareProtectionConfigurationResult' {scanEc2InstanceWithFindings} -> scanEc2InstanceWithFindings) (\s@MalwareProtectionConfigurationResult' {} a -> s {scanEc2InstanceWithFindings = a} :: MalwareProtectionConfigurationResult) -- | The GuardDuty Malware Protection service role. malwareProtectionConfigurationResult_serviceRole :: Lens.Lens' MalwareProtectionConfigurationResult (Prelude.Maybe Prelude.Text) malwareProtectionConfigurationResult_serviceRole = Lens.lens (\MalwareProtectionConfigurationResult' {serviceRole} -> serviceRole) (\s@MalwareProtectionConfigurationResult' {} a -> s {serviceRole = a} :: MalwareProtectionConfigurationResult) instance Data.FromJSON MalwareProtectionConfigurationResult where parseJSON = Data.withObject "MalwareProtectionConfigurationResult" ( \x -> MalwareProtectionConfigurationResult' Prelude.<$> (x Data..:? "scanEc2InstanceWithFindings") Prelude.<*> (x Data..:? "serviceRole") ) instance Prelude.Hashable MalwareProtectionConfigurationResult where hashWithSalt _salt MalwareProtectionConfigurationResult' {..} = _salt `Prelude.hashWithSalt` scanEc2InstanceWithFindings `Prelude.hashWithSalt` serviceRole instance Prelude.NFData MalwareProtectionConfigurationResult where rnf MalwareProtectionConfigurationResult' {..} = Prelude.rnf scanEc2InstanceWithFindings `Prelude.seq` Prelude.rnf serviceRole