{-# 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.DescribeAccountAuditConfiguration
-- 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 the Device Defender audit settings for this
-- account. Settings include how audit notifications are sent and which
-- audit checks are enabled or disabled.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions DescribeAccountAuditConfiguration>
-- action.
module Amazonka.IoT.DescribeAccountAuditConfiguration
  ( -- * Creating a Request
    DescribeAccountAuditConfiguration (..),
    newDescribeAccountAuditConfiguration,

    -- * Destructuring the Response
    DescribeAccountAuditConfigurationResponse (..),
    newDescribeAccountAuditConfigurationResponse,

    -- * Response Lenses
    describeAccountAuditConfigurationResponse_auditCheckConfigurations,
    describeAccountAuditConfigurationResponse_auditNotificationTargetConfigurations,
    describeAccountAuditConfigurationResponse_roleArn,
    describeAccountAuditConfigurationResponse_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:/ 'newDescribeAccountAuditConfiguration' smart constructor.
data DescribeAccountAuditConfiguration = DescribeAccountAuditConfiguration'
  {
  }
  deriving (DescribeAccountAuditConfiguration
-> DescribeAccountAuditConfiguration -> Bool
(DescribeAccountAuditConfiguration
 -> DescribeAccountAuditConfiguration -> Bool)
-> (DescribeAccountAuditConfiguration
    -> DescribeAccountAuditConfiguration -> Bool)
-> Eq DescribeAccountAuditConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAccountAuditConfiguration
-> DescribeAccountAuditConfiguration -> Bool
$c/= :: DescribeAccountAuditConfiguration
-> DescribeAccountAuditConfiguration -> Bool
== :: DescribeAccountAuditConfiguration
-> DescribeAccountAuditConfiguration -> Bool
$c== :: DescribeAccountAuditConfiguration
-> DescribeAccountAuditConfiguration -> Bool
Prelude.Eq, ReadPrec [DescribeAccountAuditConfiguration]
ReadPrec DescribeAccountAuditConfiguration
Int -> ReadS DescribeAccountAuditConfiguration
ReadS [DescribeAccountAuditConfiguration]
(Int -> ReadS DescribeAccountAuditConfiguration)
-> ReadS [DescribeAccountAuditConfiguration]
-> ReadPrec DescribeAccountAuditConfiguration
-> ReadPrec [DescribeAccountAuditConfiguration]
-> Read DescribeAccountAuditConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAccountAuditConfiguration]
$creadListPrec :: ReadPrec [DescribeAccountAuditConfiguration]
readPrec :: ReadPrec DescribeAccountAuditConfiguration
$creadPrec :: ReadPrec DescribeAccountAuditConfiguration
readList :: ReadS [DescribeAccountAuditConfiguration]
$creadList :: ReadS [DescribeAccountAuditConfiguration]
readsPrec :: Int -> ReadS DescribeAccountAuditConfiguration
$creadsPrec :: Int -> ReadS DescribeAccountAuditConfiguration
Prelude.Read, Int -> DescribeAccountAuditConfiguration -> ShowS
[DescribeAccountAuditConfiguration] -> ShowS
DescribeAccountAuditConfiguration -> String
(Int -> DescribeAccountAuditConfiguration -> ShowS)
-> (DescribeAccountAuditConfiguration -> String)
-> ([DescribeAccountAuditConfiguration] -> ShowS)
-> Show DescribeAccountAuditConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAccountAuditConfiguration] -> ShowS
$cshowList :: [DescribeAccountAuditConfiguration] -> ShowS
show :: DescribeAccountAuditConfiguration -> String
$cshow :: DescribeAccountAuditConfiguration -> String
showsPrec :: Int -> DescribeAccountAuditConfiguration -> ShowS
$cshowsPrec :: Int -> DescribeAccountAuditConfiguration -> ShowS
Prelude.Show, (forall x.
 DescribeAccountAuditConfiguration
 -> Rep DescribeAccountAuditConfiguration x)
-> (forall x.
    Rep DescribeAccountAuditConfiguration x
    -> DescribeAccountAuditConfiguration)
-> Generic DescribeAccountAuditConfiguration
forall x.
Rep DescribeAccountAuditConfiguration x
-> DescribeAccountAuditConfiguration
forall x.
DescribeAccountAuditConfiguration
-> Rep DescribeAccountAuditConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAccountAuditConfiguration x
-> DescribeAccountAuditConfiguration
$cfrom :: forall x.
DescribeAccountAuditConfiguration
-> Rep DescribeAccountAuditConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'DescribeAccountAuditConfiguration' 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.
newDescribeAccountAuditConfiguration ::
  DescribeAccountAuditConfiguration
newDescribeAccountAuditConfiguration :: DescribeAccountAuditConfiguration
newDescribeAccountAuditConfiguration =
  DescribeAccountAuditConfiguration
DescribeAccountAuditConfiguration'

instance
  Core.AWSRequest
    DescribeAccountAuditConfiguration
  where
  type
    AWSResponse DescribeAccountAuditConfiguration =
      DescribeAccountAuditConfigurationResponse
  request :: DescribeAccountAuditConfiguration
-> Request DescribeAccountAuditConfiguration
request = Service
-> DescribeAccountAuditConfiguration
-> Request DescribeAccountAuditConfiguration
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeAccountAuditConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DescribeAccountAuditConfiguration)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeAccountAuditConfiguration))
-> Logger
-> Service
-> Proxy DescribeAccountAuditConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DescribeAccountAuditConfiguration)))
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 Text AuditCheckConfiguration)
-> Maybe (HashMap AuditNotificationType AuditNotificationTarget)
-> Maybe Text
-> Int
-> DescribeAccountAuditConfigurationResponse
DescribeAccountAuditConfigurationResponse'
            (Maybe (HashMap Text AuditCheckConfiguration)
 -> Maybe (HashMap AuditNotificationType AuditNotificationTarget)
 -> Maybe Text
 -> Int
 -> DescribeAccountAuditConfigurationResponse)
-> Either String (Maybe (HashMap Text AuditCheckConfiguration))
-> Either
     String
     (Maybe (HashMap AuditNotificationType AuditNotificationTarget)
      -> Maybe Text -> Int -> DescribeAccountAuditConfigurationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text
-> Either
     String (Maybe (Maybe (HashMap Text AuditCheckConfiguration)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"auditCheckConfigurations"
                            Either
  String (Maybe (Maybe (HashMap Text AuditCheckConfiguration)))
-> Maybe (HashMap Text AuditCheckConfiguration)
-> Either String (Maybe (HashMap Text AuditCheckConfiguration))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text AuditCheckConfiguration)
forall a. Monoid a => a
Prelude.mempty
                        )
              Either
  String
  (Maybe (HashMap AuditNotificationType AuditNotificationTarget)
   -> Maybe Text -> Int -> DescribeAccountAuditConfigurationResponse)
-> Either
     String
     (Maybe (HashMap AuditNotificationType AuditNotificationTarget))
-> Either
     String
     (Maybe Text -> Int -> DescribeAccountAuditConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Either
     String
     (Maybe
        (Maybe (HashMap AuditNotificationType AuditNotificationTarget)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"auditNotificationTargetConfigurations"
                              Either
  String
  (Maybe
     (Maybe (HashMap AuditNotificationType AuditNotificationTarget)))
-> Maybe (HashMap AuditNotificationType AuditNotificationTarget)
-> Either
     String
     (Maybe (HashMap AuditNotificationType AuditNotificationTarget))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap AuditNotificationType AuditNotificationTarget)
forall a. Monoid a => a
Prelude.mempty
                          )
              Either
  String
  (Maybe Text -> Int -> DescribeAccountAuditConfigurationResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeAccountAuditConfigurationResponse)
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
"roleArn")
              Either String (Int -> DescribeAccountAuditConfigurationResponse)
-> Either String Int
-> Either String DescribeAccountAuditConfigurationResponse
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
    DescribeAccountAuditConfiguration

instance
  Prelude.NFData
    DescribeAccountAuditConfiguration

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

instance
  Core.ToPath
    DescribeAccountAuditConfiguration
  where
  toPath :: DescribeAccountAuditConfiguration -> ByteString
toPath = ByteString -> DescribeAccountAuditConfiguration -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/audit/configuration"

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

-- | /See:/ 'newDescribeAccountAuditConfigurationResponse' smart constructor.
data DescribeAccountAuditConfigurationResponse = DescribeAccountAuditConfigurationResponse'
  { -- | Which audit checks are enabled and disabled for this account.
    DescribeAccountAuditConfigurationResponse
-> Maybe (HashMap Text AuditCheckConfiguration)
auditCheckConfigurations :: Prelude.Maybe (Prelude.HashMap Prelude.Text AuditCheckConfiguration),
    -- | Information about the targets to which audit notifications are sent for
    -- this account.
    DescribeAccountAuditConfigurationResponse
-> Maybe (HashMap AuditNotificationType AuditNotificationTarget)
auditNotificationTargetConfigurations :: Prelude.Maybe (Prelude.HashMap AuditNotificationType AuditNotificationTarget),
    -- | The ARN of the role that grants permission to IoT to access information
    -- about your devices, policies, certificates, and other items as required
    -- when performing an audit.
    --
    -- On the first call to @UpdateAccountAuditConfiguration@, this parameter
    -- is required.
    DescribeAccountAuditConfigurationResponse -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeAccountAuditConfigurationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeAccountAuditConfigurationResponse
-> DescribeAccountAuditConfigurationResponse -> Bool
(DescribeAccountAuditConfigurationResponse
 -> DescribeAccountAuditConfigurationResponse -> Bool)
-> (DescribeAccountAuditConfigurationResponse
    -> DescribeAccountAuditConfigurationResponse -> Bool)
-> Eq DescribeAccountAuditConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAccountAuditConfigurationResponse
-> DescribeAccountAuditConfigurationResponse -> Bool
$c/= :: DescribeAccountAuditConfigurationResponse
-> DescribeAccountAuditConfigurationResponse -> Bool
== :: DescribeAccountAuditConfigurationResponse
-> DescribeAccountAuditConfigurationResponse -> Bool
$c== :: DescribeAccountAuditConfigurationResponse
-> DescribeAccountAuditConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [DescribeAccountAuditConfigurationResponse]
ReadPrec DescribeAccountAuditConfigurationResponse
Int -> ReadS DescribeAccountAuditConfigurationResponse
ReadS [DescribeAccountAuditConfigurationResponse]
(Int -> ReadS DescribeAccountAuditConfigurationResponse)
-> ReadS [DescribeAccountAuditConfigurationResponse]
-> ReadPrec DescribeAccountAuditConfigurationResponse
-> ReadPrec [DescribeAccountAuditConfigurationResponse]
-> Read DescribeAccountAuditConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAccountAuditConfigurationResponse]
$creadListPrec :: ReadPrec [DescribeAccountAuditConfigurationResponse]
readPrec :: ReadPrec DescribeAccountAuditConfigurationResponse
$creadPrec :: ReadPrec DescribeAccountAuditConfigurationResponse
readList :: ReadS [DescribeAccountAuditConfigurationResponse]
$creadList :: ReadS [DescribeAccountAuditConfigurationResponse]
readsPrec :: Int -> ReadS DescribeAccountAuditConfigurationResponse
$creadsPrec :: Int -> ReadS DescribeAccountAuditConfigurationResponse
Prelude.Read, Int -> DescribeAccountAuditConfigurationResponse -> ShowS
[DescribeAccountAuditConfigurationResponse] -> ShowS
DescribeAccountAuditConfigurationResponse -> String
(Int -> DescribeAccountAuditConfigurationResponse -> ShowS)
-> (DescribeAccountAuditConfigurationResponse -> String)
-> ([DescribeAccountAuditConfigurationResponse] -> ShowS)
-> Show DescribeAccountAuditConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAccountAuditConfigurationResponse] -> ShowS
$cshowList :: [DescribeAccountAuditConfigurationResponse] -> ShowS
show :: DescribeAccountAuditConfigurationResponse -> String
$cshow :: DescribeAccountAuditConfigurationResponse -> String
showsPrec :: Int -> DescribeAccountAuditConfigurationResponse -> ShowS
$cshowsPrec :: Int -> DescribeAccountAuditConfigurationResponse -> ShowS
Prelude.Show, (forall x.
 DescribeAccountAuditConfigurationResponse
 -> Rep DescribeAccountAuditConfigurationResponse x)
-> (forall x.
    Rep DescribeAccountAuditConfigurationResponse x
    -> DescribeAccountAuditConfigurationResponse)
-> Generic DescribeAccountAuditConfigurationResponse
forall x.
Rep DescribeAccountAuditConfigurationResponse x
-> DescribeAccountAuditConfigurationResponse
forall x.
DescribeAccountAuditConfigurationResponse
-> Rep DescribeAccountAuditConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAccountAuditConfigurationResponse x
-> DescribeAccountAuditConfigurationResponse
$cfrom :: forall x.
DescribeAccountAuditConfigurationResponse
-> Rep DescribeAccountAuditConfigurationResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeAccountAuditConfigurationResponse' 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:
--
-- 'auditCheckConfigurations', 'describeAccountAuditConfigurationResponse_auditCheckConfigurations' - Which audit checks are enabled and disabled for this account.
--
-- 'auditNotificationTargetConfigurations', 'describeAccountAuditConfigurationResponse_auditNotificationTargetConfigurations' - Information about the targets to which audit notifications are sent for
-- this account.
--
-- 'roleArn', 'describeAccountAuditConfigurationResponse_roleArn' - The ARN of the role that grants permission to IoT to access information
-- about your devices, policies, certificates, and other items as required
-- when performing an audit.
--
-- On the first call to @UpdateAccountAuditConfiguration@, this parameter
-- is required.
--
-- 'httpStatus', 'describeAccountAuditConfigurationResponse_httpStatus' - The response's http status code.
newDescribeAccountAuditConfigurationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeAccountAuditConfigurationResponse
newDescribeAccountAuditConfigurationResponse :: Int -> DescribeAccountAuditConfigurationResponse
newDescribeAccountAuditConfigurationResponse
  Int
pHttpStatus_ =
    DescribeAccountAuditConfigurationResponse' :: Maybe (HashMap Text AuditCheckConfiguration)
-> Maybe (HashMap AuditNotificationType AuditNotificationTarget)
-> Maybe Text
-> Int
-> DescribeAccountAuditConfigurationResponse
DescribeAccountAuditConfigurationResponse'
      { $sel:auditCheckConfigurations:DescribeAccountAuditConfigurationResponse' :: Maybe (HashMap Text AuditCheckConfiguration)
auditCheckConfigurations =
          Maybe (HashMap Text AuditCheckConfiguration)
forall a. Maybe a
Prelude.Nothing,
        $sel:auditNotificationTargetConfigurations:DescribeAccountAuditConfigurationResponse' :: Maybe (HashMap AuditNotificationType AuditNotificationTarget)
auditNotificationTargetConfigurations =
          Maybe (HashMap AuditNotificationType AuditNotificationTarget)
forall a. Maybe a
Prelude.Nothing,
        $sel:roleArn:DescribeAccountAuditConfigurationResponse' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeAccountAuditConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | Which audit checks are enabled and disabled for this account.
describeAccountAuditConfigurationResponse_auditCheckConfigurations :: Lens.Lens' DescribeAccountAuditConfigurationResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text AuditCheckConfiguration))
describeAccountAuditConfigurationResponse_auditCheckConfigurations :: (Maybe (HashMap Text AuditCheckConfiguration)
 -> f (Maybe (HashMap Text AuditCheckConfiguration)))
-> DescribeAccountAuditConfigurationResponse
-> f DescribeAccountAuditConfigurationResponse
describeAccountAuditConfigurationResponse_auditCheckConfigurations = (DescribeAccountAuditConfigurationResponse
 -> Maybe (HashMap Text AuditCheckConfiguration))
-> (DescribeAccountAuditConfigurationResponse
    -> Maybe (HashMap Text AuditCheckConfiguration)
    -> DescribeAccountAuditConfigurationResponse)
-> Lens
     DescribeAccountAuditConfigurationResponse
     DescribeAccountAuditConfigurationResponse
     (Maybe (HashMap Text AuditCheckConfiguration))
     (Maybe (HashMap Text AuditCheckConfiguration))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAccountAuditConfigurationResponse' {Maybe (HashMap Text AuditCheckConfiguration)
auditCheckConfigurations :: Maybe (HashMap Text AuditCheckConfiguration)
$sel:auditCheckConfigurations:DescribeAccountAuditConfigurationResponse' :: DescribeAccountAuditConfigurationResponse
-> Maybe (HashMap Text AuditCheckConfiguration)
auditCheckConfigurations} -> Maybe (HashMap Text AuditCheckConfiguration)
auditCheckConfigurations) (\s :: DescribeAccountAuditConfigurationResponse
s@DescribeAccountAuditConfigurationResponse' {} Maybe (HashMap Text AuditCheckConfiguration)
a -> DescribeAccountAuditConfigurationResponse
s {$sel:auditCheckConfigurations:DescribeAccountAuditConfigurationResponse' :: Maybe (HashMap Text AuditCheckConfiguration)
auditCheckConfigurations = Maybe (HashMap Text AuditCheckConfiguration)
a} :: DescribeAccountAuditConfigurationResponse) ((Maybe (HashMap Text AuditCheckConfiguration)
  -> f (Maybe (HashMap Text AuditCheckConfiguration)))
 -> DescribeAccountAuditConfigurationResponse
 -> f DescribeAccountAuditConfigurationResponse)
-> ((Maybe (HashMap Text AuditCheckConfiguration)
     -> f (Maybe (HashMap Text AuditCheckConfiguration)))
    -> Maybe (HashMap Text AuditCheckConfiguration)
    -> f (Maybe (HashMap Text AuditCheckConfiguration)))
-> (Maybe (HashMap Text AuditCheckConfiguration)
    -> f (Maybe (HashMap Text AuditCheckConfiguration)))
-> DescribeAccountAuditConfigurationResponse
-> f DescribeAccountAuditConfigurationResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text AuditCheckConfiguration)
  (HashMap Text AuditCheckConfiguration)
  (HashMap Text AuditCheckConfiguration)
  (HashMap Text AuditCheckConfiguration)
-> Iso
     (Maybe (HashMap Text AuditCheckConfiguration))
     (Maybe (HashMap Text AuditCheckConfiguration))
     (Maybe (HashMap Text AuditCheckConfiguration))
     (Maybe (HashMap Text AuditCheckConfiguration))
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 Text AuditCheckConfiguration)
  (HashMap Text AuditCheckConfiguration)
  (HashMap Text AuditCheckConfiguration)
  (HashMap Text AuditCheckConfiguration)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Information about the targets to which audit notifications are sent for
-- this account.
describeAccountAuditConfigurationResponse_auditNotificationTargetConfigurations :: Lens.Lens' DescribeAccountAuditConfigurationResponse (Prelude.Maybe (Prelude.HashMap AuditNotificationType AuditNotificationTarget))
describeAccountAuditConfigurationResponse_auditNotificationTargetConfigurations :: (Maybe (HashMap AuditNotificationType AuditNotificationTarget)
 -> f (Maybe
         (HashMap AuditNotificationType AuditNotificationTarget)))
-> DescribeAccountAuditConfigurationResponse
-> f DescribeAccountAuditConfigurationResponse
describeAccountAuditConfigurationResponse_auditNotificationTargetConfigurations = (DescribeAccountAuditConfigurationResponse
 -> Maybe (HashMap AuditNotificationType AuditNotificationTarget))
-> (DescribeAccountAuditConfigurationResponse
    -> Maybe (HashMap AuditNotificationType AuditNotificationTarget)
    -> DescribeAccountAuditConfigurationResponse)
-> Lens
     DescribeAccountAuditConfigurationResponse
     DescribeAccountAuditConfigurationResponse
     (Maybe (HashMap AuditNotificationType AuditNotificationTarget))
     (Maybe (HashMap AuditNotificationType AuditNotificationTarget))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAccountAuditConfigurationResponse' {Maybe (HashMap AuditNotificationType AuditNotificationTarget)
auditNotificationTargetConfigurations :: Maybe (HashMap AuditNotificationType AuditNotificationTarget)
$sel:auditNotificationTargetConfigurations:DescribeAccountAuditConfigurationResponse' :: DescribeAccountAuditConfigurationResponse
-> Maybe (HashMap AuditNotificationType AuditNotificationTarget)
auditNotificationTargetConfigurations} -> Maybe (HashMap AuditNotificationType AuditNotificationTarget)
auditNotificationTargetConfigurations) (\s :: DescribeAccountAuditConfigurationResponse
s@DescribeAccountAuditConfigurationResponse' {} Maybe (HashMap AuditNotificationType AuditNotificationTarget)
a -> DescribeAccountAuditConfigurationResponse
s {$sel:auditNotificationTargetConfigurations:DescribeAccountAuditConfigurationResponse' :: Maybe (HashMap AuditNotificationType AuditNotificationTarget)
auditNotificationTargetConfigurations = Maybe (HashMap AuditNotificationType AuditNotificationTarget)
a} :: DescribeAccountAuditConfigurationResponse) ((Maybe (HashMap AuditNotificationType AuditNotificationTarget)
  -> f (Maybe
          (HashMap AuditNotificationType AuditNotificationTarget)))
 -> DescribeAccountAuditConfigurationResponse
 -> f DescribeAccountAuditConfigurationResponse)
-> ((Maybe (HashMap AuditNotificationType AuditNotificationTarget)
     -> f (Maybe
             (HashMap AuditNotificationType AuditNotificationTarget)))
    -> Maybe (HashMap AuditNotificationType AuditNotificationTarget)
    -> f (Maybe
            (HashMap AuditNotificationType AuditNotificationTarget)))
-> (Maybe (HashMap AuditNotificationType AuditNotificationTarget)
    -> f (Maybe
            (HashMap AuditNotificationType AuditNotificationTarget)))
-> DescribeAccountAuditConfigurationResponse
-> f DescribeAccountAuditConfigurationResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap AuditNotificationType AuditNotificationTarget)
  (HashMap AuditNotificationType AuditNotificationTarget)
  (HashMap AuditNotificationType AuditNotificationTarget)
  (HashMap AuditNotificationType AuditNotificationTarget)
-> Iso
     (Maybe (HashMap AuditNotificationType AuditNotificationTarget))
     (Maybe (HashMap AuditNotificationType AuditNotificationTarget))
     (Maybe (HashMap AuditNotificationType AuditNotificationTarget))
     (Maybe (HashMap AuditNotificationType AuditNotificationTarget))
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 AuditNotificationType AuditNotificationTarget)
  (HashMap AuditNotificationType AuditNotificationTarget)
  (HashMap AuditNotificationType AuditNotificationTarget)
  (HashMap AuditNotificationType AuditNotificationTarget)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ARN of the role that grants permission to IoT to access information
-- about your devices, policies, certificates, and other items as required
-- when performing an audit.
--
-- On the first call to @UpdateAccountAuditConfiguration@, this parameter
-- is required.
describeAccountAuditConfigurationResponse_roleArn :: Lens.Lens' DescribeAccountAuditConfigurationResponse (Prelude.Maybe Prelude.Text)
describeAccountAuditConfigurationResponse_roleArn :: (Maybe Text -> f (Maybe Text))
-> DescribeAccountAuditConfigurationResponse
-> f DescribeAccountAuditConfigurationResponse
describeAccountAuditConfigurationResponse_roleArn = (DescribeAccountAuditConfigurationResponse -> Maybe Text)
-> (DescribeAccountAuditConfigurationResponse
    -> Maybe Text -> DescribeAccountAuditConfigurationResponse)
-> Lens
     DescribeAccountAuditConfigurationResponse
     DescribeAccountAuditConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAccountAuditConfigurationResponse' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:DescribeAccountAuditConfigurationResponse' :: DescribeAccountAuditConfigurationResponse -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: DescribeAccountAuditConfigurationResponse
s@DescribeAccountAuditConfigurationResponse' {} Maybe Text
a -> DescribeAccountAuditConfigurationResponse
s {$sel:roleArn:DescribeAccountAuditConfigurationResponse' :: Maybe Text
roleArn = Maybe Text
a} :: DescribeAccountAuditConfigurationResponse)

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

instance
  Prelude.NFData
    DescribeAccountAuditConfigurationResponse