{-# 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.DescribeScheduledAudit
-- 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 scheduled audit.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions DescribeScheduledAudit>
-- action.
module Amazonka.IoT.DescribeScheduledAudit
  ( -- * Creating a Request
    DescribeScheduledAudit (..),
    newDescribeScheduledAudit,

    -- * Request Lenses
    describeScheduledAudit_scheduledAuditName,

    -- * Destructuring the Response
    DescribeScheduledAuditResponse (..),
    newDescribeScheduledAuditResponse,

    -- * Response Lenses
    describeScheduledAuditResponse_frequency,
    describeScheduledAuditResponse_scheduledAuditName,
    describeScheduledAuditResponse_dayOfMonth,
    describeScheduledAuditResponse_targetCheckNames,
    describeScheduledAuditResponse_dayOfWeek,
    describeScheduledAuditResponse_scheduledAuditArn,
    describeScheduledAuditResponse_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:/ 'newDescribeScheduledAudit' smart constructor.
data DescribeScheduledAudit = DescribeScheduledAudit'
  { -- | The name of the scheduled audit whose information you want to get.
    DescribeScheduledAudit -> Text
scheduledAuditName :: Prelude.Text
  }
  deriving (DescribeScheduledAudit -> DescribeScheduledAudit -> Bool
(DescribeScheduledAudit -> DescribeScheduledAudit -> Bool)
-> (DescribeScheduledAudit -> DescribeScheduledAudit -> Bool)
-> Eq DescribeScheduledAudit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeScheduledAudit -> DescribeScheduledAudit -> Bool
$c/= :: DescribeScheduledAudit -> DescribeScheduledAudit -> Bool
== :: DescribeScheduledAudit -> DescribeScheduledAudit -> Bool
$c== :: DescribeScheduledAudit -> DescribeScheduledAudit -> Bool
Prelude.Eq, ReadPrec [DescribeScheduledAudit]
ReadPrec DescribeScheduledAudit
Int -> ReadS DescribeScheduledAudit
ReadS [DescribeScheduledAudit]
(Int -> ReadS DescribeScheduledAudit)
-> ReadS [DescribeScheduledAudit]
-> ReadPrec DescribeScheduledAudit
-> ReadPrec [DescribeScheduledAudit]
-> Read DescribeScheduledAudit
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeScheduledAudit]
$creadListPrec :: ReadPrec [DescribeScheduledAudit]
readPrec :: ReadPrec DescribeScheduledAudit
$creadPrec :: ReadPrec DescribeScheduledAudit
readList :: ReadS [DescribeScheduledAudit]
$creadList :: ReadS [DescribeScheduledAudit]
readsPrec :: Int -> ReadS DescribeScheduledAudit
$creadsPrec :: Int -> ReadS DescribeScheduledAudit
Prelude.Read, Int -> DescribeScheduledAudit -> ShowS
[DescribeScheduledAudit] -> ShowS
DescribeScheduledAudit -> String
(Int -> DescribeScheduledAudit -> ShowS)
-> (DescribeScheduledAudit -> String)
-> ([DescribeScheduledAudit] -> ShowS)
-> Show DescribeScheduledAudit
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeScheduledAudit] -> ShowS
$cshowList :: [DescribeScheduledAudit] -> ShowS
show :: DescribeScheduledAudit -> String
$cshow :: DescribeScheduledAudit -> String
showsPrec :: Int -> DescribeScheduledAudit -> ShowS
$cshowsPrec :: Int -> DescribeScheduledAudit -> ShowS
Prelude.Show, (forall x. DescribeScheduledAudit -> Rep DescribeScheduledAudit x)
-> (forall x.
    Rep DescribeScheduledAudit x -> DescribeScheduledAudit)
-> Generic DescribeScheduledAudit
forall x. Rep DescribeScheduledAudit x -> DescribeScheduledAudit
forall x. DescribeScheduledAudit -> Rep DescribeScheduledAudit x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeScheduledAudit x -> DescribeScheduledAudit
$cfrom :: forall x. DescribeScheduledAudit -> Rep DescribeScheduledAudit x
Prelude.Generic)

-- |
-- Create a value of 'DescribeScheduledAudit' 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:
--
-- 'scheduledAuditName', 'describeScheduledAudit_scheduledAuditName' - The name of the scheduled audit whose information you want to get.
newDescribeScheduledAudit ::
  -- | 'scheduledAuditName'
  Prelude.Text ->
  DescribeScheduledAudit
newDescribeScheduledAudit :: Text -> DescribeScheduledAudit
newDescribeScheduledAudit Text
pScheduledAuditName_ =
  DescribeScheduledAudit' :: Text -> DescribeScheduledAudit
DescribeScheduledAudit'
    { $sel:scheduledAuditName:DescribeScheduledAudit' :: Text
scheduledAuditName =
        Text
pScheduledAuditName_
    }

-- | The name of the scheduled audit whose information you want to get.
describeScheduledAudit_scheduledAuditName :: Lens.Lens' DescribeScheduledAudit Prelude.Text
describeScheduledAudit_scheduledAuditName :: (Text -> f Text)
-> DescribeScheduledAudit -> f DescribeScheduledAudit
describeScheduledAudit_scheduledAuditName = (DescribeScheduledAudit -> Text)
-> (DescribeScheduledAudit -> Text -> DescribeScheduledAudit)
-> Lens DescribeScheduledAudit DescribeScheduledAudit Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledAudit' {Text
scheduledAuditName :: Text
$sel:scheduledAuditName:DescribeScheduledAudit' :: DescribeScheduledAudit -> Text
scheduledAuditName} -> Text
scheduledAuditName) (\s :: DescribeScheduledAudit
s@DescribeScheduledAudit' {} Text
a -> DescribeScheduledAudit
s {$sel:scheduledAuditName:DescribeScheduledAudit' :: Text
scheduledAuditName = Text
a} :: DescribeScheduledAudit)

instance Core.AWSRequest DescribeScheduledAudit where
  type
    AWSResponse DescribeScheduledAudit =
      DescribeScheduledAuditResponse
  request :: DescribeScheduledAudit -> Request DescribeScheduledAudit
request = Service -> DescribeScheduledAudit -> Request DescribeScheduledAudit
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeScheduledAudit
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeScheduledAudit)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeScheduledAudit))
-> Logger
-> Service
-> Proxy DescribeScheduledAudit
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeScheduledAudit)))
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 AuditFrequency
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe DayOfWeek
-> Maybe Text
-> Int
-> DescribeScheduledAuditResponse
DescribeScheduledAuditResponse'
            (Maybe AuditFrequency
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe DayOfWeek
 -> Maybe Text
 -> Int
 -> DescribeScheduledAuditResponse)
-> Either String (Maybe AuditFrequency)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe DayOfWeek
      -> Maybe Text
      -> Int
      -> DescribeScheduledAuditResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe AuditFrequency)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"frequency")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe DayOfWeek
   -> Maybe Text
   -> Int
   -> DescribeScheduledAuditResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [Text]
      -> Maybe DayOfWeek
      -> Maybe Text
      -> Int
      -> DescribeScheduledAuditResponse)
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
"scheduledAuditName")
            Either
  String
  (Maybe Text
   -> Maybe [Text]
   -> Maybe DayOfWeek
   -> Maybe Text
   -> Int
   -> DescribeScheduledAuditResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Text]
      -> Maybe DayOfWeek
      -> Maybe Text
      -> Int
      -> DescribeScheduledAuditResponse)
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
"dayOfMonth")
            Either
  String
  (Maybe [Text]
   -> Maybe DayOfWeek
   -> Maybe Text
   -> Int
   -> DescribeScheduledAuditResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe DayOfWeek
      -> Maybe Text -> Int -> DescribeScheduledAuditResponse)
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
"targetCheckNames"
                            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 DayOfWeek
   -> Maybe Text -> Int -> DescribeScheduledAuditResponse)
-> Either String (Maybe DayOfWeek)
-> Either
     String (Maybe Text -> Int -> DescribeScheduledAuditResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe DayOfWeek)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"dayOfWeek")
            Either String (Maybe Text -> Int -> DescribeScheduledAuditResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeScheduledAuditResponse)
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
"scheduledAuditArn")
            Either String (Int -> DescribeScheduledAuditResponse)
-> Either String Int
-> Either String DescribeScheduledAuditResponse
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 DescribeScheduledAudit

instance Prelude.NFData DescribeScheduledAudit

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

instance Core.ToPath DescribeScheduledAudit where
  toPath :: DescribeScheduledAudit -> ByteString
toPath DescribeScheduledAudit' {Text
scheduledAuditName :: Text
$sel:scheduledAuditName:DescribeScheduledAudit' :: DescribeScheduledAudit -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/audit/scheduledaudits/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
scheduledAuditName
      ]

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

-- | /See:/ 'newDescribeScheduledAuditResponse' smart constructor.
data DescribeScheduledAuditResponse = DescribeScheduledAuditResponse'
  { -- | How often the scheduled audit takes place, either one of @DAILY@,
    -- @WEEKLY@, @BIWEEKLY@, or @MONTHLY@. The start time of each audit is
    -- determined by the system.
    DescribeScheduledAuditResponse -> Maybe AuditFrequency
frequency :: Prelude.Maybe AuditFrequency,
    -- | The name of the scheduled audit.
    DescribeScheduledAuditResponse -> Maybe Text
scheduledAuditName :: Prelude.Maybe Prelude.Text,
    -- | The day of the month on which the scheduled audit takes place. This is
    -- will be @1@ through @31@ or @LAST@. If days @29@-@31@ are specified, and
    -- the month does not have that many days, the audit takes place on the
    -- @LAST@ day of the month.
    DescribeScheduledAuditResponse -> Maybe Text
dayOfMonth :: Prelude.Maybe Prelude.Text,
    -- | Which checks are performed during the scheduled audit. Checks must be
    -- enabled for your account. (Use @DescribeAccountAuditConfiguration@ to
    -- see the list of all checks, including those that are enabled or use
    -- @UpdateAccountAuditConfiguration@ to select which checks are enabled.)
    DescribeScheduledAuditResponse -> Maybe [Text]
targetCheckNames :: Prelude.Maybe [Prelude.Text],
    -- | The day of the week on which the scheduled audit takes place, either one
    -- of @SUN@, @MON@, @TUE@, @WED@, @THU@, @FRI@, or @SAT@.
    DescribeScheduledAuditResponse -> Maybe DayOfWeek
dayOfWeek :: Prelude.Maybe DayOfWeek,
    -- | The ARN of the scheduled audit.
    DescribeScheduledAuditResponse -> Maybe Text
scheduledAuditArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeScheduledAuditResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeScheduledAuditResponse
-> DescribeScheduledAuditResponse -> Bool
(DescribeScheduledAuditResponse
 -> DescribeScheduledAuditResponse -> Bool)
-> (DescribeScheduledAuditResponse
    -> DescribeScheduledAuditResponse -> Bool)
-> Eq DescribeScheduledAuditResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeScheduledAuditResponse
-> DescribeScheduledAuditResponse -> Bool
$c/= :: DescribeScheduledAuditResponse
-> DescribeScheduledAuditResponse -> Bool
== :: DescribeScheduledAuditResponse
-> DescribeScheduledAuditResponse -> Bool
$c== :: DescribeScheduledAuditResponse
-> DescribeScheduledAuditResponse -> Bool
Prelude.Eq, ReadPrec [DescribeScheduledAuditResponse]
ReadPrec DescribeScheduledAuditResponse
Int -> ReadS DescribeScheduledAuditResponse
ReadS [DescribeScheduledAuditResponse]
(Int -> ReadS DescribeScheduledAuditResponse)
-> ReadS [DescribeScheduledAuditResponse]
-> ReadPrec DescribeScheduledAuditResponse
-> ReadPrec [DescribeScheduledAuditResponse]
-> Read DescribeScheduledAuditResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeScheduledAuditResponse]
$creadListPrec :: ReadPrec [DescribeScheduledAuditResponse]
readPrec :: ReadPrec DescribeScheduledAuditResponse
$creadPrec :: ReadPrec DescribeScheduledAuditResponse
readList :: ReadS [DescribeScheduledAuditResponse]
$creadList :: ReadS [DescribeScheduledAuditResponse]
readsPrec :: Int -> ReadS DescribeScheduledAuditResponse
$creadsPrec :: Int -> ReadS DescribeScheduledAuditResponse
Prelude.Read, Int -> DescribeScheduledAuditResponse -> ShowS
[DescribeScheduledAuditResponse] -> ShowS
DescribeScheduledAuditResponse -> String
(Int -> DescribeScheduledAuditResponse -> ShowS)
-> (DescribeScheduledAuditResponse -> String)
-> ([DescribeScheduledAuditResponse] -> ShowS)
-> Show DescribeScheduledAuditResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeScheduledAuditResponse] -> ShowS
$cshowList :: [DescribeScheduledAuditResponse] -> ShowS
show :: DescribeScheduledAuditResponse -> String
$cshow :: DescribeScheduledAuditResponse -> String
showsPrec :: Int -> DescribeScheduledAuditResponse -> ShowS
$cshowsPrec :: Int -> DescribeScheduledAuditResponse -> ShowS
Prelude.Show, (forall x.
 DescribeScheduledAuditResponse
 -> Rep DescribeScheduledAuditResponse x)
-> (forall x.
    Rep DescribeScheduledAuditResponse x
    -> DescribeScheduledAuditResponse)
-> Generic DescribeScheduledAuditResponse
forall x.
Rep DescribeScheduledAuditResponse x
-> DescribeScheduledAuditResponse
forall x.
DescribeScheduledAuditResponse
-> Rep DescribeScheduledAuditResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeScheduledAuditResponse x
-> DescribeScheduledAuditResponse
$cfrom :: forall x.
DescribeScheduledAuditResponse
-> Rep DescribeScheduledAuditResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeScheduledAuditResponse' 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:
--
-- 'frequency', 'describeScheduledAuditResponse_frequency' - How often the scheduled audit takes place, either one of @DAILY@,
-- @WEEKLY@, @BIWEEKLY@, or @MONTHLY@. The start time of each audit is
-- determined by the system.
--
-- 'scheduledAuditName', 'describeScheduledAuditResponse_scheduledAuditName' - The name of the scheduled audit.
--
-- 'dayOfMonth', 'describeScheduledAuditResponse_dayOfMonth' - The day of the month on which the scheduled audit takes place. This is
-- will be @1@ through @31@ or @LAST@. If days @29@-@31@ are specified, and
-- the month does not have that many days, the audit takes place on the
-- @LAST@ day of the month.
--
-- 'targetCheckNames', 'describeScheduledAuditResponse_targetCheckNames' - Which checks are performed during the scheduled audit. Checks must be
-- enabled for your account. (Use @DescribeAccountAuditConfiguration@ to
-- see the list of all checks, including those that are enabled or use
-- @UpdateAccountAuditConfiguration@ to select which checks are enabled.)
--
-- 'dayOfWeek', 'describeScheduledAuditResponse_dayOfWeek' - The day of the week on which the scheduled audit takes place, either one
-- of @SUN@, @MON@, @TUE@, @WED@, @THU@, @FRI@, or @SAT@.
--
-- 'scheduledAuditArn', 'describeScheduledAuditResponse_scheduledAuditArn' - The ARN of the scheduled audit.
--
-- 'httpStatus', 'describeScheduledAuditResponse_httpStatus' - The response's http status code.
newDescribeScheduledAuditResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeScheduledAuditResponse
newDescribeScheduledAuditResponse :: Int -> DescribeScheduledAuditResponse
newDescribeScheduledAuditResponse Int
pHttpStatus_ =
  DescribeScheduledAuditResponse' :: Maybe AuditFrequency
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe DayOfWeek
-> Maybe Text
-> Int
-> DescribeScheduledAuditResponse
DescribeScheduledAuditResponse'
    { $sel:frequency:DescribeScheduledAuditResponse' :: Maybe AuditFrequency
frequency =
        Maybe AuditFrequency
forall a. Maybe a
Prelude.Nothing,
      $sel:scheduledAuditName:DescribeScheduledAuditResponse' :: Maybe Text
scheduledAuditName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dayOfMonth:DescribeScheduledAuditResponse' :: Maybe Text
dayOfMonth = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:targetCheckNames:DescribeScheduledAuditResponse' :: Maybe [Text]
targetCheckNames = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:dayOfWeek:DescribeScheduledAuditResponse' :: Maybe DayOfWeek
dayOfWeek = Maybe DayOfWeek
forall a. Maybe a
Prelude.Nothing,
      $sel:scheduledAuditArn:DescribeScheduledAuditResponse' :: Maybe Text
scheduledAuditArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeScheduledAuditResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | How often the scheduled audit takes place, either one of @DAILY@,
-- @WEEKLY@, @BIWEEKLY@, or @MONTHLY@. The start time of each audit is
-- determined by the system.
describeScheduledAuditResponse_frequency :: Lens.Lens' DescribeScheduledAuditResponse (Prelude.Maybe AuditFrequency)
describeScheduledAuditResponse_frequency :: (Maybe AuditFrequency -> f (Maybe AuditFrequency))
-> DescribeScheduledAuditResponse
-> f DescribeScheduledAuditResponse
describeScheduledAuditResponse_frequency = (DescribeScheduledAuditResponse -> Maybe AuditFrequency)
-> (DescribeScheduledAuditResponse
    -> Maybe AuditFrequency -> DescribeScheduledAuditResponse)
-> Lens
     DescribeScheduledAuditResponse
     DescribeScheduledAuditResponse
     (Maybe AuditFrequency)
     (Maybe AuditFrequency)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledAuditResponse' {Maybe AuditFrequency
frequency :: Maybe AuditFrequency
$sel:frequency:DescribeScheduledAuditResponse' :: DescribeScheduledAuditResponse -> Maybe AuditFrequency
frequency} -> Maybe AuditFrequency
frequency) (\s :: DescribeScheduledAuditResponse
s@DescribeScheduledAuditResponse' {} Maybe AuditFrequency
a -> DescribeScheduledAuditResponse
s {$sel:frequency:DescribeScheduledAuditResponse' :: Maybe AuditFrequency
frequency = Maybe AuditFrequency
a} :: DescribeScheduledAuditResponse)

-- | The name of the scheduled audit.
describeScheduledAuditResponse_scheduledAuditName :: Lens.Lens' DescribeScheduledAuditResponse (Prelude.Maybe Prelude.Text)
describeScheduledAuditResponse_scheduledAuditName :: (Maybe Text -> f (Maybe Text))
-> DescribeScheduledAuditResponse
-> f DescribeScheduledAuditResponse
describeScheduledAuditResponse_scheduledAuditName = (DescribeScheduledAuditResponse -> Maybe Text)
-> (DescribeScheduledAuditResponse
    -> Maybe Text -> DescribeScheduledAuditResponse)
-> Lens
     DescribeScheduledAuditResponse
     DescribeScheduledAuditResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledAuditResponse' {Maybe Text
scheduledAuditName :: Maybe Text
$sel:scheduledAuditName:DescribeScheduledAuditResponse' :: DescribeScheduledAuditResponse -> Maybe Text
scheduledAuditName} -> Maybe Text
scheduledAuditName) (\s :: DescribeScheduledAuditResponse
s@DescribeScheduledAuditResponse' {} Maybe Text
a -> DescribeScheduledAuditResponse
s {$sel:scheduledAuditName:DescribeScheduledAuditResponse' :: Maybe Text
scheduledAuditName = Maybe Text
a} :: DescribeScheduledAuditResponse)

-- | The day of the month on which the scheduled audit takes place. This is
-- will be @1@ through @31@ or @LAST@. If days @29@-@31@ are specified, and
-- the month does not have that many days, the audit takes place on the
-- @LAST@ day of the month.
describeScheduledAuditResponse_dayOfMonth :: Lens.Lens' DescribeScheduledAuditResponse (Prelude.Maybe Prelude.Text)
describeScheduledAuditResponse_dayOfMonth :: (Maybe Text -> f (Maybe Text))
-> DescribeScheduledAuditResponse
-> f DescribeScheduledAuditResponse
describeScheduledAuditResponse_dayOfMonth = (DescribeScheduledAuditResponse -> Maybe Text)
-> (DescribeScheduledAuditResponse
    -> Maybe Text -> DescribeScheduledAuditResponse)
-> Lens
     DescribeScheduledAuditResponse
     DescribeScheduledAuditResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledAuditResponse' {Maybe Text
dayOfMonth :: Maybe Text
$sel:dayOfMonth:DescribeScheduledAuditResponse' :: DescribeScheduledAuditResponse -> Maybe Text
dayOfMonth} -> Maybe Text
dayOfMonth) (\s :: DescribeScheduledAuditResponse
s@DescribeScheduledAuditResponse' {} Maybe Text
a -> DescribeScheduledAuditResponse
s {$sel:dayOfMonth:DescribeScheduledAuditResponse' :: Maybe Text
dayOfMonth = Maybe Text
a} :: DescribeScheduledAuditResponse)

-- | Which checks are performed during the scheduled audit. Checks must be
-- enabled for your account. (Use @DescribeAccountAuditConfiguration@ to
-- see the list of all checks, including those that are enabled or use
-- @UpdateAccountAuditConfiguration@ to select which checks are enabled.)
describeScheduledAuditResponse_targetCheckNames :: Lens.Lens' DescribeScheduledAuditResponse (Prelude.Maybe [Prelude.Text])
describeScheduledAuditResponse_targetCheckNames :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeScheduledAuditResponse
-> f DescribeScheduledAuditResponse
describeScheduledAuditResponse_targetCheckNames = (DescribeScheduledAuditResponse -> Maybe [Text])
-> (DescribeScheduledAuditResponse
    -> Maybe [Text] -> DescribeScheduledAuditResponse)
-> Lens
     DescribeScheduledAuditResponse
     DescribeScheduledAuditResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledAuditResponse' {Maybe [Text]
targetCheckNames :: Maybe [Text]
$sel:targetCheckNames:DescribeScheduledAuditResponse' :: DescribeScheduledAuditResponse -> Maybe [Text]
targetCheckNames} -> Maybe [Text]
targetCheckNames) (\s :: DescribeScheduledAuditResponse
s@DescribeScheduledAuditResponse' {} Maybe [Text]
a -> DescribeScheduledAuditResponse
s {$sel:targetCheckNames:DescribeScheduledAuditResponse' :: Maybe [Text]
targetCheckNames = Maybe [Text]
a} :: DescribeScheduledAuditResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeScheduledAuditResponse
 -> f DescribeScheduledAuditResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeScheduledAuditResponse
-> f DescribeScheduledAuditResponse
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 day of the week on which the scheduled audit takes place, either one
-- of @SUN@, @MON@, @TUE@, @WED@, @THU@, @FRI@, or @SAT@.
describeScheduledAuditResponse_dayOfWeek :: Lens.Lens' DescribeScheduledAuditResponse (Prelude.Maybe DayOfWeek)
describeScheduledAuditResponse_dayOfWeek :: (Maybe DayOfWeek -> f (Maybe DayOfWeek))
-> DescribeScheduledAuditResponse
-> f DescribeScheduledAuditResponse
describeScheduledAuditResponse_dayOfWeek = (DescribeScheduledAuditResponse -> Maybe DayOfWeek)
-> (DescribeScheduledAuditResponse
    -> Maybe DayOfWeek -> DescribeScheduledAuditResponse)
-> Lens
     DescribeScheduledAuditResponse
     DescribeScheduledAuditResponse
     (Maybe DayOfWeek)
     (Maybe DayOfWeek)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledAuditResponse' {Maybe DayOfWeek
dayOfWeek :: Maybe DayOfWeek
$sel:dayOfWeek:DescribeScheduledAuditResponse' :: DescribeScheduledAuditResponse -> Maybe DayOfWeek
dayOfWeek} -> Maybe DayOfWeek
dayOfWeek) (\s :: DescribeScheduledAuditResponse
s@DescribeScheduledAuditResponse' {} Maybe DayOfWeek
a -> DescribeScheduledAuditResponse
s {$sel:dayOfWeek:DescribeScheduledAuditResponse' :: Maybe DayOfWeek
dayOfWeek = Maybe DayOfWeek
a} :: DescribeScheduledAuditResponse)

-- | The ARN of the scheduled audit.
describeScheduledAuditResponse_scheduledAuditArn :: Lens.Lens' DescribeScheduledAuditResponse (Prelude.Maybe Prelude.Text)
describeScheduledAuditResponse_scheduledAuditArn :: (Maybe Text -> f (Maybe Text))
-> DescribeScheduledAuditResponse
-> f DescribeScheduledAuditResponse
describeScheduledAuditResponse_scheduledAuditArn = (DescribeScheduledAuditResponse -> Maybe Text)
-> (DescribeScheduledAuditResponse
    -> Maybe Text -> DescribeScheduledAuditResponse)
-> Lens
     DescribeScheduledAuditResponse
     DescribeScheduledAuditResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledAuditResponse' {Maybe Text
scheduledAuditArn :: Maybe Text
$sel:scheduledAuditArn:DescribeScheduledAuditResponse' :: DescribeScheduledAuditResponse -> Maybe Text
scheduledAuditArn} -> Maybe Text
scheduledAuditArn) (\s :: DescribeScheduledAuditResponse
s@DescribeScheduledAuditResponse' {} Maybe Text
a -> DescribeScheduledAuditResponse
s {$sel:scheduledAuditArn:DescribeScheduledAuditResponse' :: Maybe Text
scheduledAuditArn = Maybe Text
a} :: DescribeScheduledAuditResponse)

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

instance
  Prelude.NFData
    DescribeScheduledAuditResponse