{-# 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.SES.DescribeActiveReceiptRuleSet
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns the metadata and receipt rules for the receipt rule set that is
-- currently active.
--
-- For information about setting up receipt rule sets, see the
-- <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rule-set.html Amazon SES Developer Guide>.
--
-- You can execute this operation no more than once per second.
module Amazonka.SES.DescribeActiveReceiptRuleSet
  ( -- * Creating a Request
    DescribeActiveReceiptRuleSet (..),
    newDescribeActiveReceiptRuleSet,

    -- * Destructuring the Response
    DescribeActiveReceiptRuleSetResponse (..),
    newDescribeActiveReceiptRuleSetResponse,

    -- * Response Lenses
    describeActiveReceiptRuleSetResponse_metadata,
    describeActiveReceiptRuleSetResponse_rules,
    describeActiveReceiptRuleSetResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SES.Types

-- | Represents a request to return the metadata and receipt rules for the
-- receipt rule set that is currently active. You use receipt rule sets to
-- receive email with Amazon SES. For more information, see the
-- <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html Amazon SES Developer Guide>.
--
-- /See:/ 'newDescribeActiveReceiptRuleSet' smart constructor.
data DescribeActiveReceiptRuleSet = DescribeActiveReceiptRuleSet'
  {
  }
  deriving (DescribeActiveReceiptRuleSet
-> DescribeActiveReceiptRuleSet -> Bool
(DescribeActiveReceiptRuleSet
 -> DescribeActiveReceiptRuleSet -> Bool)
-> (DescribeActiveReceiptRuleSet
    -> DescribeActiveReceiptRuleSet -> Bool)
-> Eq DescribeActiveReceiptRuleSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DescribeActiveReceiptRuleSet
-> DescribeActiveReceiptRuleSet -> Bool
== :: DescribeActiveReceiptRuleSet
-> DescribeActiveReceiptRuleSet -> Bool
$c/= :: DescribeActiveReceiptRuleSet
-> DescribeActiveReceiptRuleSet -> Bool
/= :: DescribeActiveReceiptRuleSet
-> DescribeActiveReceiptRuleSet -> Bool
Prelude.Eq, ReadPrec [DescribeActiveReceiptRuleSet]
ReadPrec DescribeActiveReceiptRuleSet
Int -> ReadS DescribeActiveReceiptRuleSet
ReadS [DescribeActiveReceiptRuleSet]
(Int -> ReadS DescribeActiveReceiptRuleSet)
-> ReadS [DescribeActiveReceiptRuleSet]
-> ReadPrec DescribeActiveReceiptRuleSet
-> ReadPrec [DescribeActiveReceiptRuleSet]
-> Read DescribeActiveReceiptRuleSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS DescribeActiveReceiptRuleSet
readsPrec :: Int -> ReadS DescribeActiveReceiptRuleSet
$creadList :: ReadS [DescribeActiveReceiptRuleSet]
readList :: ReadS [DescribeActiveReceiptRuleSet]
$creadPrec :: ReadPrec DescribeActiveReceiptRuleSet
readPrec :: ReadPrec DescribeActiveReceiptRuleSet
$creadListPrec :: ReadPrec [DescribeActiveReceiptRuleSet]
readListPrec :: ReadPrec [DescribeActiveReceiptRuleSet]
Prelude.Read, Int -> DescribeActiveReceiptRuleSet -> ShowS
[DescribeActiveReceiptRuleSet] -> ShowS
DescribeActiveReceiptRuleSet -> String
(Int -> DescribeActiveReceiptRuleSet -> ShowS)
-> (DescribeActiveReceiptRuleSet -> String)
-> ([DescribeActiveReceiptRuleSet] -> ShowS)
-> Show DescribeActiveReceiptRuleSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DescribeActiveReceiptRuleSet -> ShowS
showsPrec :: Int -> DescribeActiveReceiptRuleSet -> ShowS
$cshow :: DescribeActiveReceiptRuleSet -> String
show :: DescribeActiveReceiptRuleSet -> String
$cshowList :: [DescribeActiveReceiptRuleSet] -> ShowS
showList :: [DescribeActiveReceiptRuleSet] -> ShowS
Prelude.Show, (forall x.
 DescribeActiveReceiptRuleSet -> Rep DescribeActiveReceiptRuleSet x)
-> (forall x.
    Rep DescribeActiveReceiptRuleSet x -> DescribeActiveReceiptRuleSet)
-> Generic DescribeActiveReceiptRuleSet
forall x.
Rep DescribeActiveReceiptRuleSet x -> DescribeActiveReceiptRuleSet
forall x.
DescribeActiveReceiptRuleSet -> Rep DescribeActiveReceiptRuleSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
DescribeActiveReceiptRuleSet -> Rep DescribeActiveReceiptRuleSet x
from :: forall x.
DescribeActiveReceiptRuleSet -> Rep DescribeActiveReceiptRuleSet x
$cto :: forall x.
Rep DescribeActiveReceiptRuleSet x -> DescribeActiveReceiptRuleSet
to :: forall x.
Rep DescribeActiveReceiptRuleSet x -> DescribeActiveReceiptRuleSet
Prelude.Generic)

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

instance Core.AWSRequest DescribeActiveReceiptRuleSet where
  type
    AWSResponse DescribeActiveReceiptRuleSet =
      DescribeActiveReceiptRuleSetResponse
  request :: (Service -> Service)
-> DescribeActiveReceiptRuleSet
-> Request DescribeActiveReceiptRuleSet
request Service -> Service
overrides =
    Service
-> DescribeActiveReceiptRuleSet
-> Request DescribeActiveReceiptRuleSet
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeActiveReceiptRuleSet
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeActiveReceiptRuleSet)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse DescribeActiveReceiptRuleSet))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeActiveReceiptRuleSet
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeActiveReceiptRuleSet)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"DescribeActiveReceiptRuleSetResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe ReceiptRuleSetMetadata
-> Maybe [ReceiptRule]
-> Int
-> DescribeActiveReceiptRuleSetResponse
DescribeActiveReceiptRuleSetResponse'
            (Maybe ReceiptRuleSetMetadata
 -> Maybe [ReceiptRule]
 -> Int
 -> DescribeActiveReceiptRuleSetResponse)
-> Either String (Maybe ReceiptRuleSetMetadata)
-> Either
     String
     (Maybe [ReceiptRule]
      -> Int -> DescribeActiveReceiptRuleSetResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe ReceiptRuleSetMetadata)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Metadata")
            Either
  String
  (Maybe [ReceiptRule]
   -> Int -> DescribeActiveReceiptRuleSetResponse)
-> Either String (Maybe [ReceiptRule])
-> Either String (Int -> DescribeActiveReceiptRuleSetResponse)
forall a b.
Either String (a -> b) -> Either String a -> Either String b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                            [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Rules"
                            Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String (Maybe [ReceiptRule]))
-> Either String (Maybe [ReceiptRule])
forall a b.
Either String a -> (a -> Either String b) -> Either String b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [ReceiptRule])
-> [Node] -> Either String (Maybe [ReceiptRule])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [ReceiptRule]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member")
                        )
            Either String (Int -> DescribeActiveReceiptRuleSetResponse)
-> Either String Int
-> Either String DescribeActiveReceiptRuleSetResponse
forall a b.
Either String (a -> b) -> Either String a -> Either String b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall a. a -> Either String a
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
    DescribeActiveReceiptRuleSet
  where
  hashWithSalt :: Int -> DescribeActiveReceiptRuleSet -> Int
hashWithSalt Int
_salt DescribeActiveReceiptRuleSet
_ =
    Int
_salt Int -> () -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ()

instance Prelude.NFData DescribeActiveReceiptRuleSet where
  rnf :: DescribeActiveReceiptRuleSet -> ()
rnf DescribeActiveReceiptRuleSet
_ = ()

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

instance Data.ToPath DescribeActiveReceiptRuleSet where
  toPath :: DescribeActiveReceiptRuleSet -> ByteString
toPath = ByteString -> DescribeActiveReceiptRuleSet -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.ToQuery DescribeActiveReceiptRuleSet where
  toQuery :: DescribeActiveReceiptRuleSet -> QueryString
toQuery =
    QueryString -> DescribeActiveReceiptRuleSet -> QueryString
forall a b. a -> b -> a
Prelude.const
      ( [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ ByteString
"Action"
              ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"DescribeActiveReceiptRuleSet" ::
                          Prelude.ByteString
                      ),
            ByteString
"Version"
              ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-12-01" :: Prelude.ByteString)
          ]
      )

-- | Represents the metadata and receipt rules for the receipt rule set that
-- is currently active.
--
-- /See:/ 'newDescribeActiveReceiptRuleSetResponse' smart constructor.
data DescribeActiveReceiptRuleSetResponse = DescribeActiveReceiptRuleSetResponse'
  { -- | The metadata for the currently active receipt rule set. The metadata
    -- consists of the rule set name and a timestamp of when the rule set was
    -- created.
    DescribeActiveReceiptRuleSetResponse
-> Maybe ReceiptRuleSetMetadata
metadata :: Prelude.Maybe ReceiptRuleSetMetadata,
    -- | The receipt rules that belong to the active rule set.
    DescribeActiveReceiptRuleSetResponse -> Maybe [ReceiptRule]
rules :: Prelude.Maybe [ReceiptRule],
    -- | The response's http status code.
    DescribeActiveReceiptRuleSetResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeActiveReceiptRuleSetResponse
-> DescribeActiveReceiptRuleSetResponse -> Bool
(DescribeActiveReceiptRuleSetResponse
 -> DescribeActiveReceiptRuleSetResponse -> Bool)
-> (DescribeActiveReceiptRuleSetResponse
    -> DescribeActiveReceiptRuleSetResponse -> Bool)
-> Eq DescribeActiveReceiptRuleSetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DescribeActiveReceiptRuleSetResponse
-> DescribeActiveReceiptRuleSetResponse -> Bool
== :: DescribeActiveReceiptRuleSetResponse
-> DescribeActiveReceiptRuleSetResponse -> Bool
$c/= :: DescribeActiveReceiptRuleSetResponse
-> DescribeActiveReceiptRuleSetResponse -> Bool
/= :: DescribeActiveReceiptRuleSetResponse
-> DescribeActiveReceiptRuleSetResponse -> Bool
Prelude.Eq, ReadPrec [DescribeActiveReceiptRuleSetResponse]
ReadPrec DescribeActiveReceiptRuleSetResponse
Int -> ReadS DescribeActiveReceiptRuleSetResponse
ReadS [DescribeActiveReceiptRuleSetResponse]
(Int -> ReadS DescribeActiveReceiptRuleSetResponse)
-> ReadS [DescribeActiveReceiptRuleSetResponse]
-> ReadPrec DescribeActiveReceiptRuleSetResponse
-> ReadPrec [DescribeActiveReceiptRuleSetResponse]
-> Read DescribeActiveReceiptRuleSetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS DescribeActiveReceiptRuleSetResponse
readsPrec :: Int -> ReadS DescribeActiveReceiptRuleSetResponse
$creadList :: ReadS [DescribeActiveReceiptRuleSetResponse]
readList :: ReadS [DescribeActiveReceiptRuleSetResponse]
$creadPrec :: ReadPrec DescribeActiveReceiptRuleSetResponse
readPrec :: ReadPrec DescribeActiveReceiptRuleSetResponse
$creadListPrec :: ReadPrec [DescribeActiveReceiptRuleSetResponse]
readListPrec :: ReadPrec [DescribeActiveReceiptRuleSetResponse]
Prelude.Read, Int -> DescribeActiveReceiptRuleSetResponse -> ShowS
[DescribeActiveReceiptRuleSetResponse] -> ShowS
DescribeActiveReceiptRuleSetResponse -> String
(Int -> DescribeActiveReceiptRuleSetResponse -> ShowS)
-> (DescribeActiveReceiptRuleSetResponse -> String)
-> ([DescribeActiveReceiptRuleSetResponse] -> ShowS)
-> Show DescribeActiveReceiptRuleSetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DescribeActiveReceiptRuleSetResponse -> ShowS
showsPrec :: Int -> DescribeActiveReceiptRuleSetResponse -> ShowS
$cshow :: DescribeActiveReceiptRuleSetResponse -> String
show :: DescribeActiveReceiptRuleSetResponse -> String
$cshowList :: [DescribeActiveReceiptRuleSetResponse] -> ShowS
showList :: [DescribeActiveReceiptRuleSetResponse] -> ShowS
Prelude.Show, (forall x.
 DescribeActiveReceiptRuleSetResponse
 -> Rep DescribeActiveReceiptRuleSetResponse x)
-> (forall x.
    Rep DescribeActiveReceiptRuleSetResponse x
    -> DescribeActiveReceiptRuleSetResponse)
-> Generic DescribeActiveReceiptRuleSetResponse
forall x.
Rep DescribeActiveReceiptRuleSetResponse x
-> DescribeActiveReceiptRuleSetResponse
forall x.
DescribeActiveReceiptRuleSetResponse
-> Rep DescribeActiveReceiptRuleSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
DescribeActiveReceiptRuleSetResponse
-> Rep DescribeActiveReceiptRuleSetResponse x
from :: forall x.
DescribeActiveReceiptRuleSetResponse
-> Rep DescribeActiveReceiptRuleSetResponse x
$cto :: forall x.
Rep DescribeActiveReceiptRuleSetResponse x
-> DescribeActiveReceiptRuleSetResponse
to :: forall x.
Rep DescribeActiveReceiptRuleSetResponse x
-> DescribeActiveReceiptRuleSetResponse
Prelude.Generic)

-- |
-- Create a value of 'DescribeActiveReceiptRuleSetResponse' 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:
--
-- 'metadata', 'describeActiveReceiptRuleSetResponse_metadata' - The metadata for the currently active receipt rule set. The metadata
-- consists of the rule set name and a timestamp of when the rule set was
-- created.
--
-- 'rules', 'describeActiveReceiptRuleSetResponse_rules' - The receipt rules that belong to the active rule set.
--
-- 'httpStatus', 'describeActiveReceiptRuleSetResponse_httpStatus' - The response's http status code.
newDescribeActiveReceiptRuleSetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeActiveReceiptRuleSetResponse
newDescribeActiveReceiptRuleSetResponse :: Int -> DescribeActiveReceiptRuleSetResponse
newDescribeActiveReceiptRuleSetResponse Int
pHttpStatus_ =
  DescribeActiveReceiptRuleSetResponse'
    { $sel:metadata:DescribeActiveReceiptRuleSetResponse' :: Maybe ReceiptRuleSetMetadata
metadata =
        Maybe ReceiptRuleSetMetadata
forall a. Maybe a
Prelude.Nothing,
      $sel:rules:DescribeActiveReceiptRuleSetResponse' :: Maybe [ReceiptRule]
rules = Maybe [ReceiptRule]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeActiveReceiptRuleSetResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The metadata for the currently active receipt rule set. The metadata
-- consists of the rule set name and a timestamp of when the rule set was
-- created.
describeActiveReceiptRuleSetResponse_metadata :: Lens.Lens' DescribeActiveReceiptRuleSetResponse (Prelude.Maybe ReceiptRuleSetMetadata)
describeActiveReceiptRuleSetResponse_metadata :: Lens'
  DescribeActiveReceiptRuleSetResponse (Maybe ReceiptRuleSetMetadata)
describeActiveReceiptRuleSetResponse_metadata = (DescribeActiveReceiptRuleSetResponse
 -> Maybe ReceiptRuleSetMetadata)
-> (DescribeActiveReceiptRuleSetResponse
    -> Maybe ReceiptRuleSetMetadata
    -> DescribeActiveReceiptRuleSetResponse)
-> Lens'
     DescribeActiveReceiptRuleSetResponse (Maybe ReceiptRuleSetMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeActiveReceiptRuleSetResponse' {Maybe ReceiptRuleSetMetadata
$sel:metadata:DescribeActiveReceiptRuleSetResponse' :: DescribeActiveReceiptRuleSetResponse
-> Maybe ReceiptRuleSetMetadata
metadata :: Maybe ReceiptRuleSetMetadata
metadata} -> Maybe ReceiptRuleSetMetadata
metadata) (\s :: DescribeActiveReceiptRuleSetResponse
s@DescribeActiveReceiptRuleSetResponse' {} Maybe ReceiptRuleSetMetadata
a -> DescribeActiveReceiptRuleSetResponse
s {metadata = a} :: DescribeActiveReceiptRuleSetResponse)

-- | The receipt rules that belong to the active rule set.
describeActiveReceiptRuleSetResponse_rules :: Lens.Lens' DescribeActiveReceiptRuleSetResponse (Prelude.Maybe [ReceiptRule])
describeActiveReceiptRuleSetResponse_rules :: Lens' DescribeActiveReceiptRuleSetResponse (Maybe [ReceiptRule])
describeActiveReceiptRuleSetResponse_rules = (DescribeActiveReceiptRuleSetResponse -> Maybe [ReceiptRule])
-> (DescribeActiveReceiptRuleSetResponse
    -> Maybe [ReceiptRule] -> DescribeActiveReceiptRuleSetResponse)
-> Lens' DescribeActiveReceiptRuleSetResponse (Maybe [ReceiptRule])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeActiveReceiptRuleSetResponse' {Maybe [ReceiptRule]
$sel:rules:DescribeActiveReceiptRuleSetResponse' :: DescribeActiveReceiptRuleSetResponse -> Maybe [ReceiptRule]
rules :: Maybe [ReceiptRule]
rules} -> Maybe [ReceiptRule]
rules) (\s :: DescribeActiveReceiptRuleSetResponse
s@DescribeActiveReceiptRuleSetResponse' {} Maybe [ReceiptRule]
a -> DescribeActiveReceiptRuleSetResponse
s {rules = a} :: DescribeActiveReceiptRuleSetResponse) ((Maybe [ReceiptRule] -> f (Maybe [ReceiptRule]))
 -> DescribeActiveReceiptRuleSetResponse
 -> f DescribeActiveReceiptRuleSetResponse)
-> ((Maybe [ReceiptRule] -> f (Maybe [ReceiptRule]))
    -> Maybe [ReceiptRule] -> f (Maybe [ReceiptRule]))
-> (Maybe [ReceiptRule] -> f (Maybe [ReceiptRule]))
-> DescribeActiveReceiptRuleSetResponse
-> f DescribeActiveReceiptRuleSetResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [ReceiptRule] [ReceiptRule] [ReceiptRule] [ReceiptRule]
-> Iso
     (Maybe [ReceiptRule])
     (Maybe [ReceiptRule])
     (Maybe [ReceiptRule])
     (Maybe [ReceiptRule])
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 [ReceiptRule] [ReceiptRule] [ReceiptRule] [ReceiptRule]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Iso [ReceiptRule] [ReceiptRule] [ReceiptRule] [ReceiptRule]
Lens.coerced

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

instance
  Prelude.NFData
    DescribeActiveReceiptRuleSetResponse
  where
  rnf :: DescribeActiveReceiptRuleSetResponse -> ()
rnf DescribeActiveReceiptRuleSetResponse' {Int
Maybe [ReceiptRule]
Maybe ReceiptRuleSetMetadata
$sel:metadata:DescribeActiveReceiptRuleSetResponse' :: DescribeActiveReceiptRuleSetResponse
-> Maybe ReceiptRuleSetMetadata
$sel:rules:DescribeActiveReceiptRuleSetResponse' :: DescribeActiveReceiptRuleSetResponse -> Maybe [ReceiptRule]
$sel:httpStatus:DescribeActiveReceiptRuleSetResponse' :: DescribeActiveReceiptRuleSetResponse -> Int
metadata :: Maybe ReceiptRuleSetMetadata
rules :: Maybe [ReceiptRule]
httpStatus :: Int
..} =
    Maybe ReceiptRuleSetMetadata -> ()
forall a. NFData a => a -> ()
Prelude.rnf Maybe ReceiptRuleSetMetadata
metadata
      () -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Maybe [ReceiptRule] -> ()
forall a. NFData a => a -> ()
Prelude.rnf Maybe [ReceiptRule]
rules
      () -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Int -> ()
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus