{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.IoT.DescribeSecurityProfile
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets information about a Device Defender security profile.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions DescribeSecurityProfile>
-- action.
module Amazonka.IoT.DescribeSecurityProfile
  ( -- * Creating a Request
    DescribeSecurityProfile (..),
    newDescribeSecurityProfile,

    -- * Request Lenses
    describeSecurityProfile_securityProfileName,

    -- * Destructuring the Response
    DescribeSecurityProfileResponse (..),
    newDescribeSecurityProfileResponse,

    -- * Response Lenses
    describeSecurityProfileResponse_alertTargets,
    describeSecurityProfileResponse_additionalMetricsToRetainV2,
    describeSecurityProfileResponse_behaviors,
    describeSecurityProfileResponse_lastModifiedDate,
    describeSecurityProfileResponse_version,
    describeSecurityProfileResponse_securityProfileName,
    describeSecurityProfileResponse_creationDate,
    describeSecurityProfileResponse_additionalMetricsToRetain,
    describeSecurityProfileResponse_securityProfileArn,
    describeSecurityProfileResponse_securityProfileDescription,
    describeSecurityProfileResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IoT.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeSecurityProfile' smart constructor.
data DescribeSecurityProfile = DescribeSecurityProfile'
  { -- | The name of the security profile whose information you want to get.
    DescribeSecurityProfile -> Text
securityProfileName :: Prelude.Text
  }
  deriving (DescribeSecurityProfile -> DescribeSecurityProfile -> Bool
(DescribeSecurityProfile -> DescribeSecurityProfile -> Bool)
-> (DescribeSecurityProfile -> DescribeSecurityProfile -> Bool)
-> Eq DescribeSecurityProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeSecurityProfile -> DescribeSecurityProfile -> Bool
$c/= :: DescribeSecurityProfile -> DescribeSecurityProfile -> Bool
== :: DescribeSecurityProfile -> DescribeSecurityProfile -> Bool
$c== :: DescribeSecurityProfile -> DescribeSecurityProfile -> Bool
Prelude.Eq, ReadPrec [DescribeSecurityProfile]
ReadPrec DescribeSecurityProfile
Int -> ReadS DescribeSecurityProfile
ReadS [DescribeSecurityProfile]
(Int -> ReadS DescribeSecurityProfile)
-> ReadS [DescribeSecurityProfile]
-> ReadPrec DescribeSecurityProfile
-> ReadPrec [DescribeSecurityProfile]
-> Read DescribeSecurityProfile
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeSecurityProfile]
$creadListPrec :: ReadPrec [DescribeSecurityProfile]
readPrec :: ReadPrec DescribeSecurityProfile
$creadPrec :: ReadPrec DescribeSecurityProfile
readList :: ReadS [DescribeSecurityProfile]
$creadList :: ReadS [DescribeSecurityProfile]
readsPrec :: Int -> ReadS DescribeSecurityProfile
$creadsPrec :: Int -> ReadS DescribeSecurityProfile
Prelude.Read, Int -> DescribeSecurityProfile -> ShowS
[DescribeSecurityProfile] -> ShowS
DescribeSecurityProfile -> String
(Int -> DescribeSecurityProfile -> ShowS)
-> (DescribeSecurityProfile -> String)
-> ([DescribeSecurityProfile] -> ShowS)
-> Show DescribeSecurityProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeSecurityProfile] -> ShowS
$cshowList :: [DescribeSecurityProfile] -> ShowS
show :: DescribeSecurityProfile -> String
$cshow :: DescribeSecurityProfile -> String
showsPrec :: Int -> DescribeSecurityProfile -> ShowS
$cshowsPrec :: Int -> DescribeSecurityProfile -> ShowS
Prelude.Show, (forall x.
 DescribeSecurityProfile -> Rep DescribeSecurityProfile x)
-> (forall x.
    Rep DescribeSecurityProfile x -> DescribeSecurityProfile)
-> Generic DescribeSecurityProfile
forall x. Rep DescribeSecurityProfile x -> DescribeSecurityProfile
forall x. DescribeSecurityProfile -> Rep DescribeSecurityProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeSecurityProfile x -> DescribeSecurityProfile
$cfrom :: forall x. DescribeSecurityProfile -> Rep DescribeSecurityProfile x
Prelude.Generic)

-- |
-- Create a value of 'DescribeSecurityProfile' 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:
--
-- 'securityProfileName', 'describeSecurityProfile_securityProfileName' - The name of the security profile whose information you want to get.
newDescribeSecurityProfile ::
  -- | 'securityProfileName'
  Prelude.Text ->
  DescribeSecurityProfile
newDescribeSecurityProfile :: Text -> DescribeSecurityProfile
newDescribeSecurityProfile Text
pSecurityProfileName_ =
  DescribeSecurityProfile' :: Text -> DescribeSecurityProfile
DescribeSecurityProfile'
    { $sel:securityProfileName:DescribeSecurityProfile' :: Text
securityProfileName =
        Text
pSecurityProfileName_
    }

-- | The name of the security profile whose information you want to get.
describeSecurityProfile_securityProfileName :: Lens.Lens' DescribeSecurityProfile Prelude.Text
describeSecurityProfile_securityProfileName :: (Text -> f Text)
-> DescribeSecurityProfile -> f DescribeSecurityProfile
describeSecurityProfile_securityProfileName = (DescribeSecurityProfile -> Text)
-> (DescribeSecurityProfile -> Text -> DescribeSecurityProfile)
-> Lens DescribeSecurityProfile DescribeSecurityProfile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecurityProfile' {Text
securityProfileName :: Text
$sel:securityProfileName:DescribeSecurityProfile' :: DescribeSecurityProfile -> Text
securityProfileName} -> Text
securityProfileName) (\s :: DescribeSecurityProfile
s@DescribeSecurityProfile' {} Text
a -> DescribeSecurityProfile
s {$sel:securityProfileName:DescribeSecurityProfile' :: Text
securityProfileName = Text
a} :: DescribeSecurityProfile)

instance Core.AWSRequest DescribeSecurityProfile where
  type
    AWSResponse DescribeSecurityProfile =
      DescribeSecurityProfileResponse
  request :: DescribeSecurityProfile -> Request DescribeSecurityProfile
request = Service
-> DescribeSecurityProfile -> Request DescribeSecurityProfile
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeSecurityProfile
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeSecurityProfile)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeSecurityProfile))
-> Logger
-> Service
-> Proxy DescribeSecurityProfile
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeSecurityProfile)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe (HashMap AlertTargetType AlertTarget)
-> Maybe [MetricToRetain]
-> Maybe [Behavior]
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeSecurityProfileResponse
DescribeSecurityProfileResponse'
            (Maybe (HashMap AlertTargetType AlertTarget)
 -> Maybe [MetricToRetain]
 -> Maybe [Behavior]
 -> Maybe POSIX
 -> Maybe Integer
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> DescribeSecurityProfileResponse)
-> Either String (Maybe (HashMap AlertTargetType AlertTarget))
-> Either
     String
     (Maybe [MetricToRetain]
      -> Maybe [Behavior]
      -> Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeSecurityProfileResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text
-> Either
     String (Maybe (Maybe (HashMap AlertTargetType AlertTarget)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"alertTargets" Either String (Maybe (Maybe (HashMap AlertTargetType AlertTarget)))
-> Maybe (HashMap AlertTargetType AlertTarget)
-> Either String (Maybe (HashMap AlertTargetType AlertTarget))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap AlertTargetType AlertTarget)
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe [MetricToRetain]
   -> Maybe [Behavior]
   -> Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeSecurityProfileResponse)
-> Either String (Maybe [MetricToRetain])
-> Either
     String
     (Maybe [Behavior]
      -> Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeSecurityProfileResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [MetricToRetain]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"additionalMetricsToRetainV2"
                            Either String (Maybe (Maybe [MetricToRetain]))
-> Maybe [MetricToRetain] -> Either String (Maybe [MetricToRetain])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [MetricToRetain]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe [Behavior]
   -> Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeSecurityProfileResponse)
-> Either String (Maybe [Behavior])
-> Either
     String
     (Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeSecurityProfileResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Behavior]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"behaviors" Either String (Maybe (Maybe [Behavior]))
-> Maybe [Behavior] -> Either String (Maybe [Behavior])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Behavior]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeSecurityProfileResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeSecurityProfileResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"lastModifiedDate")
            Either
  String
  (Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeSecurityProfileResponse)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeSecurityProfileResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"version")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeSecurityProfileResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeSecurityProfileResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"securityProfileName")
            Either
  String
  (Maybe POSIX
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeSecurityProfileResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeSecurityProfileResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"creationDate")
            Either
  String
  (Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeSecurityProfileResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Int -> DescribeSecurityProfileResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"additionalMetricsToRetain"
                            Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe Text
   -> Maybe Text -> Int -> DescribeSecurityProfileResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Int -> DescribeSecurityProfileResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"securityProfileArn")
            Either
  String (Maybe Text -> Int -> DescribeSecurityProfileResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeSecurityProfileResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"securityProfileDescription")
            Either String (Int -> DescribeSecurityProfileResponse)
-> Either String Int
-> Either String DescribeSecurityProfileResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeSecurityProfile

instance Prelude.NFData DescribeSecurityProfile

instance Core.ToHeaders DescribeSecurityProfile where
  toHeaders :: DescribeSecurityProfile -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeSecurityProfile -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath DescribeSecurityProfile where
  toPath :: DescribeSecurityProfile -> ByteString
toPath DescribeSecurityProfile' {Text
securityProfileName :: Text
$sel:securityProfileName:DescribeSecurityProfile' :: DescribeSecurityProfile -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/security-profiles/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
securityProfileName
      ]

instance Core.ToQuery DescribeSecurityProfile where
  toQuery :: DescribeSecurityProfile -> QueryString
toQuery = QueryString -> DescribeSecurityProfile -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newDescribeSecurityProfileResponse' smart constructor.
data DescribeSecurityProfileResponse = DescribeSecurityProfileResponse'
  { -- | Where the alerts are sent. (Alerts are always sent to the console.)
    DescribeSecurityProfileResponse
-> Maybe (HashMap AlertTargetType AlertTarget)
alertTargets :: Prelude.Maybe (Prelude.HashMap AlertTargetType AlertTarget),
    -- | A list of metrics whose data is retained (stored). By default, data is
    -- retained for any metric used in the profile\'s behaviors, but it is also
    -- retained for any metric specified here.
    DescribeSecurityProfileResponse -> Maybe [MetricToRetain]
additionalMetricsToRetainV2 :: Prelude.Maybe [MetricToRetain],
    -- | Specifies the behaviors that, when violated by a device (thing), cause
    -- an alert.
    DescribeSecurityProfileResponse -> Maybe [Behavior]
behaviors :: Prelude.Maybe [Behavior],
    -- | The time the security profile was last modified.
    DescribeSecurityProfileResponse -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Core.POSIX,
    -- | The version of the security profile. A new version is generated whenever
    -- the security profile is updated.
    DescribeSecurityProfileResponse -> Maybe Integer
version :: Prelude.Maybe Prelude.Integer,
    -- | The name of the security profile.
    DescribeSecurityProfileResponse -> Maybe Text
securityProfileName :: Prelude.Maybe Prelude.Text,
    -- | The time the security profile was created.
    DescribeSecurityProfileResponse -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
    -- | /Please use DescribeSecurityProfileResponse$additionalMetricsToRetainV2
    -- instead./
    --
    -- A list of metrics whose data is retained (stored). By default, data is
    -- retained for any metric used in the profile\'s @behaviors@, but it is
    -- also retained for any metric specified here.
    DescribeSecurityProfileResponse -> Maybe [Text]
additionalMetricsToRetain :: Prelude.Maybe [Prelude.Text],
    -- | The ARN of the security profile.
    DescribeSecurityProfileResponse -> Maybe Text
securityProfileArn :: Prelude.Maybe Prelude.Text,
    -- | A description of the security profile (associated with the security
    -- profile when it was created or updated).
    DescribeSecurityProfileResponse -> Maybe Text
securityProfileDescription :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeSecurityProfileResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeSecurityProfileResponse
-> DescribeSecurityProfileResponse -> Bool
(DescribeSecurityProfileResponse
 -> DescribeSecurityProfileResponse -> Bool)
-> (DescribeSecurityProfileResponse
    -> DescribeSecurityProfileResponse -> Bool)
-> Eq DescribeSecurityProfileResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeSecurityProfileResponse
-> DescribeSecurityProfileResponse -> Bool
$c/= :: DescribeSecurityProfileResponse
-> DescribeSecurityProfileResponse -> Bool
== :: DescribeSecurityProfileResponse
-> DescribeSecurityProfileResponse -> Bool
$c== :: DescribeSecurityProfileResponse
-> DescribeSecurityProfileResponse -> Bool
Prelude.Eq, ReadPrec [DescribeSecurityProfileResponse]
ReadPrec DescribeSecurityProfileResponse
Int -> ReadS DescribeSecurityProfileResponse
ReadS [DescribeSecurityProfileResponse]
(Int -> ReadS DescribeSecurityProfileResponse)
-> ReadS [DescribeSecurityProfileResponse]
-> ReadPrec DescribeSecurityProfileResponse
-> ReadPrec [DescribeSecurityProfileResponse]
-> Read DescribeSecurityProfileResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeSecurityProfileResponse]
$creadListPrec :: ReadPrec [DescribeSecurityProfileResponse]
readPrec :: ReadPrec DescribeSecurityProfileResponse
$creadPrec :: ReadPrec DescribeSecurityProfileResponse
readList :: ReadS [DescribeSecurityProfileResponse]
$creadList :: ReadS [DescribeSecurityProfileResponse]
readsPrec :: Int -> ReadS DescribeSecurityProfileResponse
$creadsPrec :: Int -> ReadS DescribeSecurityProfileResponse
Prelude.Read, Int -> DescribeSecurityProfileResponse -> ShowS
[DescribeSecurityProfileResponse] -> ShowS
DescribeSecurityProfileResponse -> String
(Int -> DescribeSecurityProfileResponse -> ShowS)
-> (DescribeSecurityProfileResponse -> String)
-> ([DescribeSecurityProfileResponse] -> ShowS)
-> Show DescribeSecurityProfileResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeSecurityProfileResponse] -> ShowS
$cshowList :: [DescribeSecurityProfileResponse] -> ShowS
show :: DescribeSecurityProfileResponse -> String
$cshow :: DescribeSecurityProfileResponse -> String
showsPrec :: Int -> DescribeSecurityProfileResponse -> ShowS
$cshowsPrec :: Int -> DescribeSecurityProfileResponse -> ShowS
Prelude.Show, (forall x.
 DescribeSecurityProfileResponse
 -> Rep DescribeSecurityProfileResponse x)
-> (forall x.
    Rep DescribeSecurityProfileResponse x
    -> DescribeSecurityProfileResponse)
-> Generic DescribeSecurityProfileResponse
forall x.
Rep DescribeSecurityProfileResponse x
-> DescribeSecurityProfileResponse
forall x.
DescribeSecurityProfileResponse
-> Rep DescribeSecurityProfileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeSecurityProfileResponse x
-> DescribeSecurityProfileResponse
$cfrom :: forall x.
DescribeSecurityProfileResponse
-> Rep DescribeSecurityProfileResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeSecurityProfileResponse' 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:
--
-- 'alertTargets', 'describeSecurityProfileResponse_alertTargets' - Where the alerts are sent. (Alerts are always sent to the console.)
--
-- 'additionalMetricsToRetainV2', 'describeSecurityProfileResponse_additionalMetricsToRetainV2' - A list of metrics whose data is retained (stored). By default, data is
-- retained for any metric used in the profile\'s behaviors, but it is also
-- retained for any metric specified here.
--
-- 'behaviors', 'describeSecurityProfileResponse_behaviors' - Specifies the behaviors that, when violated by a device (thing), cause
-- an alert.
--
-- 'lastModifiedDate', 'describeSecurityProfileResponse_lastModifiedDate' - The time the security profile was last modified.
--
-- 'version', 'describeSecurityProfileResponse_version' - The version of the security profile. A new version is generated whenever
-- the security profile is updated.
--
-- 'securityProfileName', 'describeSecurityProfileResponse_securityProfileName' - The name of the security profile.
--
-- 'creationDate', 'describeSecurityProfileResponse_creationDate' - The time the security profile was created.
--
-- 'additionalMetricsToRetain', 'describeSecurityProfileResponse_additionalMetricsToRetain' - /Please use DescribeSecurityProfileResponse$additionalMetricsToRetainV2
-- instead./
--
-- A list of metrics whose data is retained (stored). By default, data is
-- retained for any metric used in the profile\'s @behaviors@, but it is
-- also retained for any metric specified here.
--
-- 'securityProfileArn', 'describeSecurityProfileResponse_securityProfileArn' - The ARN of the security profile.
--
-- 'securityProfileDescription', 'describeSecurityProfileResponse_securityProfileDescription' - A description of the security profile (associated with the security
-- profile when it was created or updated).
--
-- 'httpStatus', 'describeSecurityProfileResponse_httpStatus' - The response's http status code.
newDescribeSecurityProfileResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeSecurityProfileResponse
newDescribeSecurityProfileResponse :: Int -> DescribeSecurityProfileResponse
newDescribeSecurityProfileResponse Int
pHttpStatus_ =
  DescribeSecurityProfileResponse' :: Maybe (HashMap AlertTargetType AlertTarget)
-> Maybe [MetricToRetain]
-> Maybe [Behavior]
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeSecurityProfileResponse
DescribeSecurityProfileResponse'
    { $sel:alertTargets:DescribeSecurityProfileResponse' :: Maybe (HashMap AlertTargetType AlertTarget)
alertTargets =
        Maybe (HashMap AlertTargetType AlertTarget)
forall a. Maybe a
Prelude.Nothing,
      $sel:additionalMetricsToRetainV2:DescribeSecurityProfileResponse' :: Maybe [MetricToRetain]
additionalMetricsToRetainV2 =
        Maybe [MetricToRetain]
forall a. Maybe a
Prelude.Nothing,
      $sel:behaviors:DescribeSecurityProfileResponse' :: Maybe [Behavior]
behaviors = Maybe [Behavior]
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedDate:DescribeSecurityProfileResponse' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:version:DescribeSecurityProfileResponse' :: Maybe Integer
version = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:securityProfileName:DescribeSecurityProfileResponse' :: Maybe Text
securityProfileName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:DescribeSecurityProfileResponse' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:additionalMetricsToRetain:DescribeSecurityProfileResponse' :: Maybe [Text]
additionalMetricsToRetain =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:securityProfileArn:DescribeSecurityProfileResponse' :: Maybe Text
securityProfileArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:securityProfileDescription:DescribeSecurityProfileResponse' :: Maybe Text
securityProfileDescription =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeSecurityProfileResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Where the alerts are sent. (Alerts are always sent to the console.)
describeSecurityProfileResponse_alertTargets :: Lens.Lens' DescribeSecurityProfileResponse (Prelude.Maybe (Prelude.HashMap AlertTargetType AlertTarget))
describeSecurityProfileResponse_alertTargets :: (Maybe (HashMap AlertTargetType AlertTarget)
 -> f (Maybe (HashMap AlertTargetType AlertTarget)))
-> DescribeSecurityProfileResponse
-> f DescribeSecurityProfileResponse
describeSecurityProfileResponse_alertTargets = (DescribeSecurityProfileResponse
 -> Maybe (HashMap AlertTargetType AlertTarget))
-> (DescribeSecurityProfileResponse
    -> Maybe (HashMap AlertTargetType AlertTarget)
    -> DescribeSecurityProfileResponse)
-> Lens
     DescribeSecurityProfileResponse
     DescribeSecurityProfileResponse
     (Maybe (HashMap AlertTargetType AlertTarget))
     (Maybe (HashMap AlertTargetType AlertTarget))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecurityProfileResponse' {Maybe (HashMap AlertTargetType AlertTarget)
alertTargets :: Maybe (HashMap AlertTargetType AlertTarget)
$sel:alertTargets:DescribeSecurityProfileResponse' :: DescribeSecurityProfileResponse
-> Maybe (HashMap AlertTargetType AlertTarget)
alertTargets} -> Maybe (HashMap AlertTargetType AlertTarget)
alertTargets) (\s :: DescribeSecurityProfileResponse
s@DescribeSecurityProfileResponse' {} Maybe (HashMap AlertTargetType AlertTarget)
a -> DescribeSecurityProfileResponse
s {$sel:alertTargets:DescribeSecurityProfileResponse' :: Maybe (HashMap AlertTargetType AlertTarget)
alertTargets = Maybe (HashMap AlertTargetType AlertTarget)
a} :: DescribeSecurityProfileResponse) ((Maybe (HashMap AlertTargetType AlertTarget)
  -> f (Maybe (HashMap AlertTargetType AlertTarget)))
 -> DescribeSecurityProfileResponse
 -> f DescribeSecurityProfileResponse)
-> ((Maybe (HashMap AlertTargetType AlertTarget)
     -> f (Maybe (HashMap AlertTargetType AlertTarget)))
    -> Maybe (HashMap AlertTargetType AlertTarget)
    -> f (Maybe (HashMap AlertTargetType AlertTarget)))
-> (Maybe (HashMap AlertTargetType AlertTarget)
    -> f (Maybe (HashMap AlertTargetType AlertTarget)))
-> DescribeSecurityProfileResponse
-> f DescribeSecurityProfileResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap AlertTargetType AlertTarget)
  (HashMap AlertTargetType AlertTarget)
  (HashMap AlertTargetType AlertTarget)
  (HashMap AlertTargetType AlertTarget)
-> Iso
     (Maybe (HashMap AlertTargetType AlertTarget))
     (Maybe (HashMap AlertTargetType AlertTarget))
     (Maybe (HashMap AlertTargetType AlertTarget))
     (Maybe (HashMap AlertTargetType AlertTarget))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap AlertTargetType AlertTarget)
  (HashMap AlertTargetType AlertTarget)
  (HashMap AlertTargetType AlertTarget)
  (HashMap AlertTargetType AlertTarget)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of metrics whose data is retained (stored). By default, data is
-- retained for any metric used in the profile\'s behaviors, but it is also
-- retained for any metric specified here.
describeSecurityProfileResponse_additionalMetricsToRetainV2 :: Lens.Lens' DescribeSecurityProfileResponse (Prelude.Maybe [MetricToRetain])
describeSecurityProfileResponse_additionalMetricsToRetainV2 :: (Maybe [MetricToRetain] -> f (Maybe [MetricToRetain]))
-> DescribeSecurityProfileResponse
-> f DescribeSecurityProfileResponse
describeSecurityProfileResponse_additionalMetricsToRetainV2 = (DescribeSecurityProfileResponse -> Maybe [MetricToRetain])
-> (DescribeSecurityProfileResponse
    -> Maybe [MetricToRetain] -> DescribeSecurityProfileResponse)
-> Lens
     DescribeSecurityProfileResponse
     DescribeSecurityProfileResponse
     (Maybe [MetricToRetain])
     (Maybe [MetricToRetain])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecurityProfileResponse' {Maybe [MetricToRetain]
additionalMetricsToRetainV2 :: Maybe [MetricToRetain]
$sel:additionalMetricsToRetainV2:DescribeSecurityProfileResponse' :: DescribeSecurityProfileResponse -> Maybe [MetricToRetain]
additionalMetricsToRetainV2} -> Maybe [MetricToRetain]
additionalMetricsToRetainV2) (\s :: DescribeSecurityProfileResponse
s@DescribeSecurityProfileResponse' {} Maybe [MetricToRetain]
a -> DescribeSecurityProfileResponse
s {$sel:additionalMetricsToRetainV2:DescribeSecurityProfileResponse' :: Maybe [MetricToRetain]
additionalMetricsToRetainV2 = Maybe [MetricToRetain]
a} :: DescribeSecurityProfileResponse) ((Maybe [MetricToRetain] -> f (Maybe [MetricToRetain]))
 -> DescribeSecurityProfileResponse
 -> f DescribeSecurityProfileResponse)
-> ((Maybe [MetricToRetain] -> f (Maybe [MetricToRetain]))
    -> Maybe [MetricToRetain] -> f (Maybe [MetricToRetain]))
-> (Maybe [MetricToRetain] -> f (Maybe [MetricToRetain]))
-> DescribeSecurityProfileResponse
-> f DescribeSecurityProfileResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [MetricToRetain] [MetricToRetain] [MetricToRetain] [MetricToRetain]
-> Iso
     (Maybe [MetricToRetain])
     (Maybe [MetricToRetain])
     (Maybe [MetricToRetain])
     (Maybe [MetricToRetain])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [MetricToRetain] [MetricToRetain] [MetricToRetain] [MetricToRetain]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Specifies the behaviors that, when violated by a device (thing), cause
-- an alert.
describeSecurityProfileResponse_behaviors :: Lens.Lens' DescribeSecurityProfileResponse (Prelude.Maybe [Behavior])
describeSecurityProfileResponse_behaviors :: (Maybe [Behavior] -> f (Maybe [Behavior]))
-> DescribeSecurityProfileResponse
-> f DescribeSecurityProfileResponse
describeSecurityProfileResponse_behaviors = (DescribeSecurityProfileResponse -> Maybe [Behavior])
-> (DescribeSecurityProfileResponse
    -> Maybe [Behavior] -> DescribeSecurityProfileResponse)
-> Lens
     DescribeSecurityProfileResponse
     DescribeSecurityProfileResponse
     (Maybe [Behavior])
     (Maybe [Behavior])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecurityProfileResponse' {Maybe [Behavior]
behaviors :: Maybe [Behavior]
$sel:behaviors:DescribeSecurityProfileResponse' :: DescribeSecurityProfileResponse -> Maybe [Behavior]
behaviors} -> Maybe [Behavior]
behaviors) (\s :: DescribeSecurityProfileResponse
s@DescribeSecurityProfileResponse' {} Maybe [Behavior]
a -> DescribeSecurityProfileResponse
s {$sel:behaviors:DescribeSecurityProfileResponse' :: Maybe [Behavior]
behaviors = Maybe [Behavior]
a} :: DescribeSecurityProfileResponse) ((Maybe [Behavior] -> f (Maybe [Behavior]))
 -> DescribeSecurityProfileResponse
 -> f DescribeSecurityProfileResponse)
-> ((Maybe [Behavior] -> f (Maybe [Behavior]))
    -> Maybe [Behavior] -> f (Maybe [Behavior]))
-> (Maybe [Behavior] -> f (Maybe [Behavior]))
-> DescribeSecurityProfileResponse
-> f DescribeSecurityProfileResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Behavior] [Behavior] [Behavior] [Behavior]
-> Iso
     (Maybe [Behavior])
     (Maybe [Behavior])
     (Maybe [Behavior])
     (Maybe [Behavior])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Behavior] [Behavior] [Behavior] [Behavior]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The time the security profile was last modified.
describeSecurityProfileResponse_lastModifiedDate :: Lens.Lens' DescribeSecurityProfileResponse (Prelude.Maybe Prelude.UTCTime)
describeSecurityProfileResponse_lastModifiedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeSecurityProfileResponse
-> f DescribeSecurityProfileResponse
describeSecurityProfileResponse_lastModifiedDate = (DescribeSecurityProfileResponse -> Maybe POSIX)
-> (DescribeSecurityProfileResponse
    -> Maybe POSIX -> DescribeSecurityProfileResponse)
-> Lens
     DescribeSecurityProfileResponse
     DescribeSecurityProfileResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecurityProfileResponse' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:DescribeSecurityProfileResponse' :: DescribeSecurityProfileResponse -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: DescribeSecurityProfileResponse
s@DescribeSecurityProfileResponse' {} Maybe POSIX
a -> DescribeSecurityProfileResponse
s {$sel:lastModifiedDate:DescribeSecurityProfileResponse' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: DescribeSecurityProfileResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeSecurityProfileResponse
 -> f DescribeSecurityProfileResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeSecurityProfileResponse
-> f DescribeSecurityProfileResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The version of the security profile. A new version is generated whenever
-- the security profile is updated.
describeSecurityProfileResponse_version :: Lens.Lens' DescribeSecurityProfileResponse (Prelude.Maybe Prelude.Integer)
describeSecurityProfileResponse_version :: (Maybe Integer -> f (Maybe Integer))
-> DescribeSecurityProfileResponse
-> f DescribeSecurityProfileResponse
describeSecurityProfileResponse_version = (DescribeSecurityProfileResponse -> Maybe Integer)
-> (DescribeSecurityProfileResponse
    -> Maybe Integer -> DescribeSecurityProfileResponse)
-> Lens
     DescribeSecurityProfileResponse
     DescribeSecurityProfileResponse
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecurityProfileResponse' {Maybe Integer
version :: Maybe Integer
$sel:version:DescribeSecurityProfileResponse' :: DescribeSecurityProfileResponse -> Maybe Integer
version} -> Maybe Integer
version) (\s :: DescribeSecurityProfileResponse
s@DescribeSecurityProfileResponse' {} Maybe Integer
a -> DescribeSecurityProfileResponse
s {$sel:version:DescribeSecurityProfileResponse' :: Maybe Integer
version = Maybe Integer
a} :: DescribeSecurityProfileResponse)

-- | The name of the security profile.
describeSecurityProfileResponse_securityProfileName :: Lens.Lens' DescribeSecurityProfileResponse (Prelude.Maybe Prelude.Text)
describeSecurityProfileResponse_securityProfileName :: (Maybe Text -> f (Maybe Text))
-> DescribeSecurityProfileResponse
-> f DescribeSecurityProfileResponse
describeSecurityProfileResponse_securityProfileName = (DescribeSecurityProfileResponse -> Maybe Text)
-> (DescribeSecurityProfileResponse
    -> Maybe Text -> DescribeSecurityProfileResponse)
-> Lens
     DescribeSecurityProfileResponse
     DescribeSecurityProfileResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecurityProfileResponse' {Maybe Text
securityProfileName :: Maybe Text
$sel:securityProfileName:DescribeSecurityProfileResponse' :: DescribeSecurityProfileResponse -> Maybe Text
securityProfileName} -> Maybe Text
securityProfileName) (\s :: DescribeSecurityProfileResponse
s@DescribeSecurityProfileResponse' {} Maybe Text
a -> DescribeSecurityProfileResponse
s {$sel:securityProfileName:DescribeSecurityProfileResponse' :: Maybe Text
securityProfileName = Maybe Text
a} :: DescribeSecurityProfileResponse)

-- | The time the security profile was created.
describeSecurityProfileResponse_creationDate :: Lens.Lens' DescribeSecurityProfileResponse (Prelude.Maybe Prelude.UTCTime)
describeSecurityProfileResponse_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeSecurityProfileResponse
-> f DescribeSecurityProfileResponse
describeSecurityProfileResponse_creationDate = (DescribeSecurityProfileResponse -> Maybe POSIX)
-> (DescribeSecurityProfileResponse
    -> Maybe POSIX -> DescribeSecurityProfileResponse)
-> Lens
     DescribeSecurityProfileResponse
     DescribeSecurityProfileResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecurityProfileResponse' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:DescribeSecurityProfileResponse' :: DescribeSecurityProfileResponse -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: DescribeSecurityProfileResponse
s@DescribeSecurityProfileResponse' {} Maybe POSIX
a -> DescribeSecurityProfileResponse
s {$sel:creationDate:DescribeSecurityProfileResponse' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: DescribeSecurityProfileResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeSecurityProfileResponse
 -> f DescribeSecurityProfileResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeSecurityProfileResponse
-> f DescribeSecurityProfileResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | /Please use DescribeSecurityProfileResponse$additionalMetricsToRetainV2
-- instead./
--
-- A list of metrics whose data is retained (stored). By default, data is
-- retained for any metric used in the profile\'s @behaviors@, but it is
-- also retained for any metric specified here.
describeSecurityProfileResponse_additionalMetricsToRetain :: Lens.Lens' DescribeSecurityProfileResponse (Prelude.Maybe [Prelude.Text])
describeSecurityProfileResponse_additionalMetricsToRetain :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeSecurityProfileResponse
-> f DescribeSecurityProfileResponse
describeSecurityProfileResponse_additionalMetricsToRetain = (DescribeSecurityProfileResponse -> Maybe [Text])
-> (DescribeSecurityProfileResponse
    -> Maybe [Text] -> DescribeSecurityProfileResponse)
-> Lens
     DescribeSecurityProfileResponse
     DescribeSecurityProfileResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecurityProfileResponse' {Maybe [Text]
additionalMetricsToRetain :: Maybe [Text]
$sel:additionalMetricsToRetain:DescribeSecurityProfileResponse' :: DescribeSecurityProfileResponse -> Maybe [Text]
additionalMetricsToRetain} -> Maybe [Text]
additionalMetricsToRetain) (\s :: DescribeSecurityProfileResponse
s@DescribeSecurityProfileResponse' {} Maybe [Text]
a -> DescribeSecurityProfileResponse
s {$sel:additionalMetricsToRetain:DescribeSecurityProfileResponse' :: Maybe [Text]
additionalMetricsToRetain = Maybe [Text]
a} :: DescribeSecurityProfileResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeSecurityProfileResponse
 -> f DescribeSecurityProfileResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeSecurityProfileResponse
-> f DescribeSecurityProfileResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ARN of the security profile.
describeSecurityProfileResponse_securityProfileArn :: Lens.Lens' DescribeSecurityProfileResponse (Prelude.Maybe Prelude.Text)
describeSecurityProfileResponse_securityProfileArn :: (Maybe Text -> f (Maybe Text))
-> DescribeSecurityProfileResponse
-> f DescribeSecurityProfileResponse
describeSecurityProfileResponse_securityProfileArn = (DescribeSecurityProfileResponse -> Maybe Text)
-> (DescribeSecurityProfileResponse
    -> Maybe Text -> DescribeSecurityProfileResponse)
-> Lens
     DescribeSecurityProfileResponse
     DescribeSecurityProfileResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecurityProfileResponse' {Maybe Text
securityProfileArn :: Maybe Text
$sel:securityProfileArn:DescribeSecurityProfileResponse' :: DescribeSecurityProfileResponse -> Maybe Text
securityProfileArn} -> Maybe Text
securityProfileArn) (\s :: DescribeSecurityProfileResponse
s@DescribeSecurityProfileResponse' {} Maybe Text
a -> DescribeSecurityProfileResponse
s {$sel:securityProfileArn:DescribeSecurityProfileResponse' :: Maybe Text
securityProfileArn = Maybe Text
a} :: DescribeSecurityProfileResponse)

-- | A description of the security profile (associated with the security
-- profile when it was created or updated).
describeSecurityProfileResponse_securityProfileDescription :: Lens.Lens' DescribeSecurityProfileResponse (Prelude.Maybe Prelude.Text)
describeSecurityProfileResponse_securityProfileDescription :: (Maybe Text -> f (Maybe Text))
-> DescribeSecurityProfileResponse
-> f DescribeSecurityProfileResponse
describeSecurityProfileResponse_securityProfileDescription = (DescribeSecurityProfileResponse -> Maybe Text)
-> (DescribeSecurityProfileResponse
    -> Maybe Text -> DescribeSecurityProfileResponse)
-> Lens
     DescribeSecurityProfileResponse
     DescribeSecurityProfileResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecurityProfileResponse' {Maybe Text
securityProfileDescription :: Maybe Text
$sel:securityProfileDescription:DescribeSecurityProfileResponse' :: DescribeSecurityProfileResponse -> Maybe Text
securityProfileDescription} -> Maybe Text
securityProfileDescription) (\s :: DescribeSecurityProfileResponse
s@DescribeSecurityProfileResponse' {} Maybe Text
a -> DescribeSecurityProfileResponse
s {$sel:securityProfileDescription:DescribeSecurityProfileResponse' :: Maybe Text
securityProfileDescription = Maybe Text
a} :: DescribeSecurityProfileResponse)

-- | The response's http status code.
describeSecurityProfileResponse_httpStatus :: Lens.Lens' DescribeSecurityProfileResponse Prelude.Int
describeSecurityProfileResponse_httpStatus :: (Int -> f Int)
-> DescribeSecurityProfileResponse
-> f DescribeSecurityProfileResponse
describeSecurityProfileResponse_httpStatus = (DescribeSecurityProfileResponse -> Int)
-> (DescribeSecurityProfileResponse
    -> Int -> DescribeSecurityProfileResponse)
-> Lens
     DescribeSecurityProfileResponse
     DescribeSecurityProfileResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecurityProfileResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeSecurityProfileResponse' :: DescribeSecurityProfileResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeSecurityProfileResponse
s@DescribeSecurityProfileResponse' {} Int
a -> DescribeSecurityProfileResponse
s {$sel:httpStatus:DescribeSecurityProfileResponse' :: Int
httpStatus = Int
a} :: DescribeSecurityProfileResponse)

instance
  Prelude.NFData
    DescribeSecurityProfileResponse