{-# 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.Route53Resolver.CreateFirewallRuleGroup
-- 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)
--
-- Creates an empty DNS Firewall rule group for filtering DNS network
-- traffic in a VPC. You can add rules to the new rule group by calling
-- CreateFirewallRule.
module Amazonka.Route53Resolver.CreateFirewallRuleGroup
  ( -- * Creating a Request
    CreateFirewallRuleGroup (..),
    newCreateFirewallRuleGroup,

    -- * Request Lenses
    createFirewallRuleGroup_tags,
    createFirewallRuleGroup_creatorRequestId,
    createFirewallRuleGroup_name,

    -- * Destructuring the Response
    CreateFirewallRuleGroupResponse (..),
    newCreateFirewallRuleGroupResponse,

    -- * Response Lenses
    createFirewallRuleGroupResponse_firewallRuleGroup,
    createFirewallRuleGroupResponse_httpStatus,
  )
where

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

-- | /See:/ 'newCreateFirewallRuleGroup' smart constructor.
data CreateFirewallRuleGroup = CreateFirewallRuleGroup'
  { -- | A list of the tag keys and values that you want to associate with the
    -- rule group.
    CreateFirewallRuleGroup -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | A unique string defined by you to identify the request. This allows you
    -- to retry failed requests without the risk of running the operation
    -- twice. This can be any unique string, for example, a timestamp.
    CreateFirewallRuleGroup -> Text
creatorRequestId :: Prelude.Text,
    -- | A name that lets you identify the rule group, to manage and use it.
    CreateFirewallRuleGroup -> Text
name :: Prelude.Text
  }
  deriving (CreateFirewallRuleGroup -> CreateFirewallRuleGroup -> Bool
(CreateFirewallRuleGroup -> CreateFirewallRuleGroup -> Bool)
-> (CreateFirewallRuleGroup -> CreateFirewallRuleGroup -> Bool)
-> Eq CreateFirewallRuleGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFirewallRuleGroup -> CreateFirewallRuleGroup -> Bool
$c/= :: CreateFirewallRuleGroup -> CreateFirewallRuleGroup -> Bool
== :: CreateFirewallRuleGroup -> CreateFirewallRuleGroup -> Bool
$c== :: CreateFirewallRuleGroup -> CreateFirewallRuleGroup -> Bool
Prelude.Eq, ReadPrec [CreateFirewallRuleGroup]
ReadPrec CreateFirewallRuleGroup
Int -> ReadS CreateFirewallRuleGroup
ReadS [CreateFirewallRuleGroup]
(Int -> ReadS CreateFirewallRuleGroup)
-> ReadS [CreateFirewallRuleGroup]
-> ReadPrec CreateFirewallRuleGroup
-> ReadPrec [CreateFirewallRuleGroup]
-> Read CreateFirewallRuleGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFirewallRuleGroup]
$creadListPrec :: ReadPrec [CreateFirewallRuleGroup]
readPrec :: ReadPrec CreateFirewallRuleGroup
$creadPrec :: ReadPrec CreateFirewallRuleGroup
readList :: ReadS [CreateFirewallRuleGroup]
$creadList :: ReadS [CreateFirewallRuleGroup]
readsPrec :: Int -> ReadS CreateFirewallRuleGroup
$creadsPrec :: Int -> ReadS CreateFirewallRuleGroup
Prelude.Read, Int -> CreateFirewallRuleGroup -> ShowS
[CreateFirewallRuleGroup] -> ShowS
CreateFirewallRuleGroup -> String
(Int -> CreateFirewallRuleGroup -> ShowS)
-> (CreateFirewallRuleGroup -> String)
-> ([CreateFirewallRuleGroup] -> ShowS)
-> Show CreateFirewallRuleGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFirewallRuleGroup] -> ShowS
$cshowList :: [CreateFirewallRuleGroup] -> ShowS
show :: CreateFirewallRuleGroup -> String
$cshow :: CreateFirewallRuleGroup -> String
showsPrec :: Int -> CreateFirewallRuleGroup -> ShowS
$cshowsPrec :: Int -> CreateFirewallRuleGroup -> ShowS
Prelude.Show, (forall x.
 CreateFirewallRuleGroup -> Rep CreateFirewallRuleGroup x)
-> (forall x.
    Rep CreateFirewallRuleGroup x -> CreateFirewallRuleGroup)
-> Generic CreateFirewallRuleGroup
forall x. Rep CreateFirewallRuleGroup x -> CreateFirewallRuleGroup
forall x. CreateFirewallRuleGroup -> Rep CreateFirewallRuleGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateFirewallRuleGroup x -> CreateFirewallRuleGroup
$cfrom :: forall x. CreateFirewallRuleGroup -> Rep CreateFirewallRuleGroup x
Prelude.Generic)

-- |
-- Create a value of 'CreateFirewallRuleGroup' 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:
--
-- 'tags', 'createFirewallRuleGroup_tags' - A list of the tag keys and values that you want to associate with the
-- rule group.
--
-- 'creatorRequestId', 'createFirewallRuleGroup_creatorRequestId' - A unique string defined by you to identify the request. This allows you
-- to retry failed requests without the risk of running the operation
-- twice. This can be any unique string, for example, a timestamp.
--
-- 'name', 'createFirewallRuleGroup_name' - A name that lets you identify the rule group, to manage and use it.
newCreateFirewallRuleGroup ::
  -- | 'creatorRequestId'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  CreateFirewallRuleGroup
newCreateFirewallRuleGroup :: Text -> Text -> CreateFirewallRuleGroup
newCreateFirewallRuleGroup Text
pCreatorRequestId_ Text
pName_ =
  CreateFirewallRuleGroup' :: Maybe [Tag] -> Text -> Text -> CreateFirewallRuleGroup
CreateFirewallRuleGroup'
    { $sel:tags:CreateFirewallRuleGroup' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:creatorRequestId:CreateFirewallRuleGroup' :: Text
creatorRequestId = Text
pCreatorRequestId_,
      $sel:name:CreateFirewallRuleGroup' :: Text
name = Text
pName_
    }

-- | A list of the tag keys and values that you want to associate with the
-- rule group.
createFirewallRuleGroup_tags :: Lens.Lens' CreateFirewallRuleGroup (Prelude.Maybe [Tag])
createFirewallRuleGroup_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateFirewallRuleGroup -> f CreateFirewallRuleGroup
createFirewallRuleGroup_tags = (CreateFirewallRuleGroup -> Maybe [Tag])
-> (CreateFirewallRuleGroup
    -> Maybe [Tag] -> CreateFirewallRuleGroup)
-> Lens
     CreateFirewallRuleGroup
     CreateFirewallRuleGroup
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFirewallRuleGroup' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateFirewallRuleGroup' :: CreateFirewallRuleGroup -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateFirewallRuleGroup
s@CreateFirewallRuleGroup' {} Maybe [Tag]
a -> CreateFirewallRuleGroup
s {$sel:tags:CreateFirewallRuleGroup' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateFirewallRuleGroup) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateFirewallRuleGroup -> f CreateFirewallRuleGroup)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateFirewallRuleGroup
-> f CreateFirewallRuleGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A unique string defined by you to identify the request. This allows you
-- to retry failed requests without the risk of running the operation
-- twice. This can be any unique string, for example, a timestamp.
createFirewallRuleGroup_creatorRequestId :: Lens.Lens' CreateFirewallRuleGroup Prelude.Text
createFirewallRuleGroup_creatorRequestId :: (Text -> f Text)
-> CreateFirewallRuleGroup -> f CreateFirewallRuleGroup
createFirewallRuleGroup_creatorRequestId = (CreateFirewallRuleGroup -> Text)
-> (CreateFirewallRuleGroup -> Text -> CreateFirewallRuleGroup)
-> Lens CreateFirewallRuleGroup CreateFirewallRuleGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFirewallRuleGroup' {Text
creatorRequestId :: Text
$sel:creatorRequestId:CreateFirewallRuleGroup' :: CreateFirewallRuleGroup -> Text
creatorRequestId} -> Text
creatorRequestId) (\s :: CreateFirewallRuleGroup
s@CreateFirewallRuleGroup' {} Text
a -> CreateFirewallRuleGroup
s {$sel:creatorRequestId:CreateFirewallRuleGroup' :: Text
creatorRequestId = Text
a} :: CreateFirewallRuleGroup)

-- | A name that lets you identify the rule group, to manage and use it.
createFirewallRuleGroup_name :: Lens.Lens' CreateFirewallRuleGroup Prelude.Text
createFirewallRuleGroup_name :: (Text -> f Text)
-> CreateFirewallRuleGroup -> f CreateFirewallRuleGroup
createFirewallRuleGroup_name = (CreateFirewallRuleGroup -> Text)
-> (CreateFirewallRuleGroup -> Text -> CreateFirewallRuleGroup)
-> Lens CreateFirewallRuleGroup CreateFirewallRuleGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFirewallRuleGroup' {Text
name :: Text
$sel:name:CreateFirewallRuleGroup' :: CreateFirewallRuleGroup -> Text
name} -> Text
name) (\s :: CreateFirewallRuleGroup
s@CreateFirewallRuleGroup' {} Text
a -> CreateFirewallRuleGroup
s {$sel:name:CreateFirewallRuleGroup' :: Text
name = Text
a} :: CreateFirewallRuleGroup)

instance Core.AWSRequest CreateFirewallRuleGroup where
  type
    AWSResponse CreateFirewallRuleGroup =
      CreateFirewallRuleGroupResponse
  request :: CreateFirewallRuleGroup -> Request CreateFirewallRuleGroup
request = Service
-> CreateFirewallRuleGroup -> Request CreateFirewallRuleGroup
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateFirewallRuleGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateFirewallRuleGroup)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateFirewallRuleGroup))
-> Logger
-> Service
-> Proxy CreateFirewallRuleGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateFirewallRuleGroup)))
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 FirewallRuleGroup -> Int -> CreateFirewallRuleGroupResponse
CreateFirewallRuleGroupResponse'
            (Maybe FirewallRuleGroup -> Int -> CreateFirewallRuleGroupResponse)
-> Either String (Maybe FirewallRuleGroup)
-> Either String (Int -> CreateFirewallRuleGroupResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe FirewallRuleGroup)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"FirewallRuleGroup")
            Either String (Int -> CreateFirewallRuleGroupResponse)
-> Either String Int
-> Either String CreateFirewallRuleGroupResponse
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 CreateFirewallRuleGroup

instance Prelude.NFData CreateFirewallRuleGroup

instance Core.ToHeaders CreateFirewallRuleGroup where
  toHeaders :: CreateFirewallRuleGroup -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateFirewallRuleGroup -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"Route53Resolver.CreateFirewallRuleGroup" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON CreateFirewallRuleGroup where
  toJSON :: CreateFirewallRuleGroup -> Value
toJSON CreateFirewallRuleGroup' {Maybe [Tag]
Text
name :: Text
creatorRequestId :: Text
tags :: Maybe [Tag]
$sel:name:CreateFirewallRuleGroup' :: CreateFirewallRuleGroup -> Text
$sel:creatorRequestId:CreateFirewallRuleGroup' :: CreateFirewallRuleGroup -> Text
$sel:tags:CreateFirewallRuleGroup' :: CreateFirewallRuleGroup -> Maybe [Tag]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"CreatorRequestId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
creatorRequestId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)
          ]
      )

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

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

-- | /See:/ 'newCreateFirewallRuleGroupResponse' smart constructor.
data CreateFirewallRuleGroupResponse = CreateFirewallRuleGroupResponse'
  { -- | A collection of rules used to filter DNS network traffic.
    CreateFirewallRuleGroupResponse -> Maybe FirewallRuleGroup
firewallRuleGroup :: Prelude.Maybe FirewallRuleGroup,
    -- | The response's http status code.
    CreateFirewallRuleGroupResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateFirewallRuleGroupResponse
-> CreateFirewallRuleGroupResponse -> Bool
(CreateFirewallRuleGroupResponse
 -> CreateFirewallRuleGroupResponse -> Bool)
-> (CreateFirewallRuleGroupResponse
    -> CreateFirewallRuleGroupResponse -> Bool)
-> Eq CreateFirewallRuleGroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFirewallRuleGroupResponse
-> CreateFirewallRuleGroupResponse -> Bool
$c/= :: CreateFirewallRuleGroupResponse
-> CreateFirewallRuleGroupResponse -> Bool
== :: CreateFirewallRuleGroupResponse
-> CreateFirewallRuleGroupResponse -> Bool
$c== :: CreateFirewallRuleGroupResponse
-> CreateFirewallRuleGroupResponse -> Bool
Prelude.Eq, ReadPrec [CreateFirewallRuleGroupResponse]
ReadPrec CreateFirewallRuleGroupResponse
Int -> ReadS CreateFirewallRuleGroupResponse
ReadS [CreateFirewallRuleGroupResponse]
(Int -> ReadS CreateFirewallRuleGroupResponse)
-> ReadS [CreateFirewallRuleGroupResponse]
-> ReadPrec CreateFirewallRuleGroupResponse
-> ReadPrec [CreateFirewallRuleGroupResponse]
-> Read CreateFirewallRuleGroupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFirewallRuleGroupResponse]
$creadListPrec :: ReadPrec [CreateFirewallRuleGroupResponse]
readPrec :: ReadPrec CreateFirewallRuleGroupResponse
$creadPrec :: ReadPrec CreateFirewallRuleGroupResponse
readList :: ReadS [CreateFirewallRuleGroupResponse]
$creadList :: ReadS [CreateFirewallRuleGroupResponse]
readsPrec :: Int -> ReadS CreateFirewallRuleGroupResponse
$creadsPrec :: Int -> ReadS CreateFirewallRuleGroupResponse
Prelude.Read, Int -> CreateFirewallRuleGroupResponse -> ShowS
[CreateFirewallRuleGroupResponse] -> ShowS
CreateFirewallRuleGroupResponse -> String
(Int -> CreateFirewallRuleGroupResponse -> ShowS)
-> (CreateFirewallRuleGroupResponse -> String)
-> ([CreateFirewallRuleGroupResponse] -> ShowS)
-> Show CreateFirewallRuleGroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFirewallRuleGroupResponse] -> ShowS
$cshowList :: [CreateFirewallRuleGroupResponse] -> ShowS
show :: CreateFirewallRuleGroupResponse -> String
$cshow :: CreateFirewallRuleGroupResponse -> String
showsPrec :: Int -> CreateFirewallRuleGroupResponse -> ShowS
$cshowsPrec :: Int -> CreateFirewallRuleGroupResponse -> ShowS
Prelude.Show, (forall x.
 CreateFirewallRuleGroupResponse
 -> Rep CreateFirewallRuleGroupResponse x)
-> (forall x.
    Rep CreateFirewallRuleGroupResponse x
    -> CreateFirewallRuleGroupResponse)
-> Generic CreateFirewallRuleGroupResponse
forall x.
Rep CreateFirewallRuleGroupResponse x
-> CreateFirewallRuleGroupResponse
forall x.
CreateFirewallRuleGroupResponse
-> Rep CreateFirewallRuleGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateFirewallRuleGroupResponse x
-> CreateFirewallRuleGroupResponse
$cfrom :: forall x.
CreateFirewallRuleGroupResponse
-> Rep CreateFirewallRuleGroupResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateFirewallRuleGroupResponse' 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:
--
-- 'firewallRuleGroup', 'createFirewallRuleGroupResponse_firewallRuleGroup' - A collection of rules used to filter DNS network traffic.
--
-- 'httpStatus', 'createFirewallRuleGroupResponse_httpStatus' - The response's http status code.
newCreateFirewallRuleGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateFirewallRuleGroupResponse
newCreateFirewallRuleGroupResponse :: Int -> CreateFirewallRuleGroupResponse
newCreateFirewallRuleGroupResponse Int
pHttpStatus_ =
  CreateFirewallRuleGroupResponse' :: Maybe FirewallRuleGroup -> Int -> CreateFirewallRuleGroupResponse
CreateFirewallRuleGroupResponse'
    { $sel:firewallRuleGroup:CreateFirewallRuleGroupResponse' :: Maybe FirewallRuleGroup
firewallRuleGroup =
        Maybe FirewallRuleGroup
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateFirewallRuleGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A collection of rules used to filter DNS network traffic.
createFirewallRuleGroupResponse_firewallRuleGroup :: Lens.Lens' CreateFirewallRuleGroupResponse (Prelude.Maybe FirewallRuleGroup)
createFirewallRuleGroupResponse_firewallRuleGroup :: (Maybe FirewallRuleGroup -> f (Maybe FirewallRuleGroup))
-> CreateFirewallRuleGroupResponse
-> f CreateFirewallRuleGroupResponse
createFirewallRuleGroupResponse_firewallRuleGroup = (CreateFirewallRuleGroupResponse -> Maybe FirewallRuleGroup)
-> (CreateFirewallRuleGroupResponse
    -> Maybe FirewallRuleGroup -> CreateFirewallRuleGroupResponse)
-> Lens
     CreateFirewallRuleGroupResponse
     CreateFirewallRuleGroupResponse
     (Maybe FirewallRuleGroup)
     (Maybe FirewallRuleGroup)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFirewallRuleGroupResponse' {Maybe FirewallRuleGroup
firewallRuleGroup :: Maybe FirewallRuleGroup
$sel:firewallRuleGroup:CreateFirewallRuleGroupResponse' :: CreateFirewallRuleGroupResponse -> Maybe FirewallRuleGroup
firewallRuleGroup} -> Maybe FirewallRuleGroup
firewallRuleGroup) (\s :: CreateFirewallRuleGroupResponse
s@CreateFirewallRuleGroupResponse' {} Maybe FirewallRuleGroup
a -> CreateFirewallRuleGroupResponse
s {$sel:firewallRuleGroup:CreateFirewallRuleGroupResponse' :: Maybe FirewallRuleGroup
firewallRuleGroup = Maybe FirewallRuleGroup
a} :: CreateFirewallRuleGroupResponse)

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

instance
  Prelude.NFData
    CreateFirewallRuleGroupResponse