{-# 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.UpdateFirewallRuleGroupAssociation
-- 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)
--
-- Changes the association of a FirewallRuleGroup with a VPC. The
-- association enables DNS filtering for the VPC.
module Amazonka.Route53Resolver.UpdateFirewallRuleGroupAssociation
  ( -- * Creating a Request
    UpdateFirewallRuleGroupAssociation (..),
    newUpdateFirewallRuleGroupAssociation,

    -- * Request Lenses
    updateFirewallRuleGroupAssociation_mutationProtection,
    updateFirewallRuleGroupAssociation_priority,
    updateFirewallRuleGroupAssociation_name,
    updateFirewallRuleGroupAssociation_firewallRuleGroupAssociationId,

    -- * Destructuring the Response
    UpdateFirewallRuleGroupAssociationResponse (..),
    newUpdateFirewallRuleGroupAssociationResponse,

    -- * Response Lenses
    updateFirewallRuleGroupAssociationResponse_firewallRuleGroupAssociation,
    updateFirewallRuleGroupAssociationResponse_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:/ 'newUpdateFirewallRuleGroupAssociation' smart constructor.
data UpdateFirewallRuleGroupAssociation = UpdateFirewallRuleGroupAssociation'
  { -- | If enabled, this setting disallows modification or removal of the
    -- association, to help prevent against accidentally altering DNS firewall
    -- protections.
    UpdateFirewallRuleGroupAssociation
-> Maybe MutationProtectionStatus
mutationProtection :: Prelude.Maybe MutationProtectionStatus,
    -- | The setting that determines the processing order of the rule group among
    -- the rule groups that you associate with the specified VPC. DNS Firewall
    -- filters VPC traffic starting from the rule group with the lowest numeric
    -- priority setting.
    --
    -- You must specify a unique priority for each rule group that you
    -- associate with a single VPC. To make it easier to insert rule groups
    -- later, leave space between the numbers, for example, use 100, 200, and
    -- so on. You can change the priority setting for a rule group association
    -- after you create it.
    UpdateFirewallRuleGroupAssociation -> Maybe Int
priority :: Prelude.Maybe Prelude.Int,
    -- | The name of the rule group association.
    UpdateFirewallRuleGroupAssociation -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the FirewallRuleGroupAssociation.
    UpdateFirewallRuleGroupAssociation -> Text
firewallRuleGroupAssociationId :: Prelude.Text
  }
  deriving (UpdateFirewallRuleGroupAssociation
-> UpdateFirewallRuleGroupAssociation -> Bool
(UpdateFirewallRuleGroupAssociation
 -> UpdateFirewallRuleGroupAssociation -> Bool)
-> (UpdateFirewallRuleGroupAssociation
    -> UpdateFirewallRuleGroupAssociation -> Bool)
-> Eq UpdateFirewallRuleGroupAssociation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateFirewallRuleGroupAssociation
-> UpdateFirewallRuleGroupAssociation -> Bool
$c/= :: UpdateFirewallRuleGroupAssociation
-> UpdateFirewallRuleGroupAssociation -> Bool
== :: UpdateFirewallRuleGroupAssociation
-> UpdateFirewallRuleGroupAssociation -> Bool
$c== :: UpdateFirewallRuleGroupAssociation
-> UpdateFirewallRuleGroupAssociation -> Bool
Prelude.Eq, ReadPrec [UpdateFirewallRuleGroupAssociation]
ReadPrec UpdateFirewallRuleGroupAssociation
Int -> ReadS UpdateFirewallRuleGroupAssociation
ReadS [UpdateFirewallRuleGroupAssociation]
(Int -> ReadS UpdateFirewallRuleGroupAssociation)
-> ReadS [UpdateFirewallRuleGroupAssociation]
-> ReadPrec UpdateFirewallRuleGroupAssociation
-> ReadPrec [UpdateFirewallRuleGroupAssociation]
-> Read UpdateFirewallRuleGroupAssociation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateFirewallRuleGroupAssociation]
$creadListPrec :: ReadPrec [UpdateFirewallRuleGroupAssociation]
readPrec :: ReadPrec UpdateFirewallRuleGroupAssociation
$creadPrec :: ReadPrec UpdateFirewallRuleGroupAssociation
readList :: ReadS [UpdateFirewallRuleGroupAssociation]
$creadList :: ReadS [UpdateFirewallRuleGroupAssociation]
readsPrec :: Int -> ReadS UpdateFirewallRuleGroupAssociation
$creadsPrec :: Int -> ReadS UpdateFirewallRuleGroupAssociation
Prelude.Read, Int -> UpdateFirewallRuleGroupAssociation -> ShowS
[UpdateFirewallRuleGroupAssociation] -> ShowS
UpdateFirewallRuleGroupAssociation -> String
(Int -> UpdateFirewallRuleGroupAssociation -> ShowS)
-> (UpdateFirewallRuleGroupAssociation -> String)
-> ([UpdateFirewallRuleGroupAssociation] -> ShowS)
-> Show UpdateFirewallRuleGroupAssociation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateFirewallRuleGroupAssociation] -> ShowS
$cshowList :: [UpdateFirewallRuleGroupAssociation] -> ShowS
show :: UpdateFirewallRuleGroupAssociation -> String
$cshow :: UpdateFirewallRuleGroupAssociation -> String
showsPrec :: Int -> UpdateFirewallRuleGroupAssociation -> ShowS
$cshowsPrec :: Int -> UpdateFirewallRuleGroupAssociation -> ShowS
Prelude.Show, (forall x.
 UpdateFirewallRuleGroupAssociation
 -> Rep UpdateFirewallRuleGroupAssociation x)
-> (forall x.
    Rep UpdateFirewallRuleGroupAssociation x
    -> UpdateFirewallRuleGroupAssociation)
-> Generic UpdateFirewallRuleGroupAssociation
forall x.
Rep UpdateFirewallRuleGroupAssociation x
-> UpdateFirewallRuleGroupAssociation
forall x.
UpdateFirewallRuleGroupAssociation
-> Rep UpdateFirewallRuleGroupAssociation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateFirewallRuleGroupAssociation x
-> UpdateFirewallRuleGroupAssociation
$cfrom :: forall x.
UpdateFirewallRuleGroupAssociation
-> Rep UpdateFirewallRuleGroupAssociation x
Prelude.Generic)

-- |
-- Create a value of 'UpdateFirewallRuleGroupAssociation' 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:
--
-- 'mutationProtection', 'updateFirewallRuleGroupAssociation_mutationProtection' - If enabled, this setting disallows modification or removal of the
-- association, to help prevent against accidentally altering DNS firewall
-- protections.
--
-- 'priority', 'updateFirewallRuleGroupAssociation_priority' - The setting that determines the processing order of the rule group among
-- the rule groups that you associate with the specified VPC. DNS Firewall
-- filters VPC traffic starting from the rule group with the lowest numeric
-- priority setting.
--
-- You must specify a unique priority for each rule group that you
-- associate with a single VPC. To make it easier to insert rule groups
-- later, leave space between the numbers, for example, use 100, 200, and
-- so on. You can change the priority setting for a rule group association
-- after you create it.
--
-- 'name', 'updateFirewallRuleGroupAssociation_name' - The name of the rule group association.
--
-- 'firewallRuleGroupAssociationId', 'updateFirewallRuleGroupAssociation_firewallRuleGroupAssociationId' - The identifier of the FirewallRuleGroupAssociation.
newUpdateFirewallRuleGroupAssociation ::
  -- | 'firewallRuleGroupAssociationId'
  Prelude.Text ->
  UpdateFirewallRuleGroupAssociation
newUpdateFirewallRuleGroupAssociation :: Text -> UpdateFirewallRuleGroupAssociation
newUpdateFirewallRuleGroupAssociation
  Text
pFirewallRuleGroupAssociationId_ =
    UpdateFirewallRuleGroupAssociation' :: Maybe MutationProtectionStatus
-> Maybe Int
-> Maybe Text
-> Text
-> UpdateFirewallRuleGroupAssociation
UpdateFirewallRuleGroupAssociation'
      { $sel:mutationProtection:UpdateFirewallRuleGroupAssociation' :: Maybe MutationProtectionStatus
mutationProtection =
          Maybe MutationProtectionStatus
forall a. Maybe a
Prelude.Nothing,
        $sel:priority:UpdateFirewallRuleGroupAssociation' :: Maybe Int
priority = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:name:UpdateFirewallRuleGroupAssociation' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:firewallRuleGroupAssociationId:UpdateFirewallRuleGroupAssociation' :: Text
firewallRuleGroupAssociationId =
          Text
pFirewallRuleGroupAssociationId_
      }

-- | If enabled, this setting disallows modification or removal of the
-- association, to help prevent against accidentally altering DNS firewall
-- protections.
updateFirewallRuleGroupAssociation_mutationProtection :: Lens.Lens' UpdateFirewallRuleGroupAssociation (Prelude.Maybe MutationProtectionStatus)
updateFirewallRuleGroupAssociation_mutationProtection :: (Maybe MutationProtectionStatus
 -> f (Maybe MutationProtectionStatus))
-> UpdateFirewallRuleGroupAssociation
-> f UpdateFirewallRuleGroupAssociation
updateFirewallRuleGroupAssociation_mutationProtection = (UpdateFirewallRuleGroupAssociation
 -> Maybe MutationProtectionStatus)
-> (UpdateFirewallRuleGroupAssociation
    -> Maybe MutationProtectionStatus
    -> UpdateFirewallRuleGroupAssociation)
-> Lens
     UpdateFirewallRuleGroupAssociation
     UpdateFirewallRuleGroupAssociation
     (Maybe MutationProtectionStatus)
     (Maybe MutationProtectionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallRuleGroupAssociation' {Maybe MutationProtectionStatus
mutationProtection :: Maybe MutationProtectionStatus
$sel:mutationProtection:UpdateFirewallRuleGroupAssociation' :: UpdateFirewallRuleGroupAssociation
-> Maybe MutationProtectionStatus
mutationProtection} -> Maybe MutationProtectionStatus
mutationProtection) (\s :: UpdateFirewallRuleGroupAssociation
s@UpdateFirewallRuleGroupAssociation' {} Maybe MutationProtectionStatus
a -> UpdateFirewallRuleGroupAssociation
s {$sel:mutationProtection:UpdateFirewallRuleGroupAssociation' :: Maybe MutationProtectionStatus
mutationProtection = Maybe MutationProtectionStatus
a} :: UpdateFirewallRuleGroupAssociation)

-- | The setting that determines the processing order of the rule group among
-- the rule groups that you associate with the specified VPC. DNS Firewall
-- filters VPC traffic starting from the rule group with the lowest numeric
-- priority setting.
--
-- You must specify a unique priority for each rule group that you
-- associate with a single VPC. To make it easier to insert rule groups
-- later, leave space between the numbers, for example, use 100, 200, and
-- so on. You can change the priority setting for a rule group association
-- after you create it.
updateFirewallRuleGroupAssociation_priority :: Lens.Lens' UpdateFirewallRuleGroupAssociation (Prelude.Maybe Prelude.Int)
updateFirewallRuleGroupAssociation_priority :: (Maybe Int -> f (Maybe Int))
-> UpdateFirewallRuleGroupAssociation
-> f UpdateFirewallRuleGroupAssociation
updateFirewallRuleGroupAssociation_priority = (UpdateFirewallRuleGroupAssociation -> Maybe Int)
-> (UpdateFirewallRuleGroupAssociation
    -> Maybe Int -> UpdateFirewallRuleGroupAssociation)
-> Lens
     UpdateFirewallRuleGroupAssociation
     UpdateFirewallRuleGroupAssociation
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallRuleGroupAssociation' {Maybe Int
priority :: Maybe Int
$sel:priority:UpdateFirewallRuleGroupAssociation' :: UpdateFirewallRuleGroupAssociation -> Maybe Int
priority} -> Maybe Int
priority) (\s :: UpdateFirewallRuleGroupAssociation
s@UpdateFirewallRuleGroupAssociation' {} Maybe Int
a -> UpdateFirewallRuleGroupAssociation
s {$sel:priority:UpdateFirewallRuleGroupAssociation' :: Maybe Int
priority = Maybe Int
a} :: UpdateFirewallRuleGroupAssociation)

-- | The name of the rule group association.
updateFirewallRuleGroupAssociation_name :: Lens.Lens' UpdateFirewallRuleGroupAssociation (Prelude.Maybe Prelude.Text)
updateFirewallRuleGroupAssociation_name :: (Maybe Text -> f (Maybe Text))
-> UpdateFirewallRuleGroupAssociation
-> f UpdateFirewallRuleGroupAssociation
updateFirewallRuleGroupAssociation_name = (UpdateFirewallRuleGroupAssociation -> Maybe Text)
-> (UpdateFirewallRuleGroupAssociation
    -> Maybe Text -> UpdateFirewallRuleGroupAssociation)
-> Lens
     UpdateFirewallRuleGroupAssociation
     UpdateFirewallRuleGroupAssociation
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallRuleGroupAssociation' {Maybe Text
name :: Maybe Text
$sel:name:UpdateFirewallRuleGroupAssociation' :: UpdateFirewallRuleGroupAssociation -> Maybe Text
name} -> Maybe Text
name) (\s :: UpdateFirewallRuleGroupAssociation
s@UpdateFirewallRuleGroupAssociation' {} Maybe Text
a -> UpdateFirewallRuleGroupAssociation
s {$sel:name:UpdateFirewallRuleGroupAssociation' :: Maybe Text
name = Maybe Text
a} :: UpdateFirewallRuleGroupAssociation)

-- | The identifier of the FirewallRuleGroupAssociation.
updateFirewallRuleGroupAssociation_firewallRuleGroupAssociationId :: Lens.Lens' UpdateFirewallRuleGroupAssociation Prelude.Text
updateFirewallRuleGroupAssociation_firewallRuleGroupAssociationId :: (Text -> f Text)
-> UpdateFirewallRuleGroupAssociation
-> f UpdateFirewallRuleGroupAssociation
updateFirewallRuleGroupAssociation_firewallRuleGroupAssociationId = (UpdateFirewallRuleGroupAssociation -> Text)
-> (UpdateFirewallRuleGroupAssociation
    -> Text -> UpdateFirewallRuleGroupAssociation)
-> Lens
     UpdateFirewallRuleGroupAssociation
     UpdateFirewallRuleGroupAssociation
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallRuleGroupAssociation' {Text
firewallRuleGroupAssociationId :: Text
$sel:firewallRuleGroupAssociationId:UpdateFirewallRuleGroupAssociation' :: UpdateFirewallRuleGroupAssociation -> Text
firewallRuleGroupAssociationId} -> Text
firewallRuleGroupAssociationId) (\s :: UpdateFirewallRuleGroupAssociation
s@UpdateFirewallRuleGroupAssociation' {} Text
a -> UpdateFirewallRuleGroupAssociation
s {$sel:firewallRuleGroupAssociationId:UpdateFirewallRuleGroupAssociation' :: Text
firewallRuleGroupAssociationId = Text
a} :: UpdateFirewallRuleGroupAssociation)

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

instance
  Prelude.NFData
    UpdateFirewallRuleGroupAssociation

instance
  Core.ToHeaders
    UpdateFirewallRuleGroupAssociation
  where
  toHeaders :: UpdateFirewallRuleGroupAssociation -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> UpdateFirewallRuleGroupAssociation -> 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.UpdateFirewallRuleGroupAssociation" ::
                          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
    UpdateFirewallRuleGroupAssociation
  where
  toJSON :: UpdateFirewallRuleGroupAssociation -> Value
toJSON UpdateFirewallRuleGroupAssociation' {Maybe Int
Maybe Text
Maybe MutationProtectionStatus
Text
firewallRuleGroupAssociationId :: Text
name :: Maybe Text
priority :: Maybe Int
mutationProtection :: Maybe MutationProtectionStatus
$sel:firewallRuleGroupAssociationId:UpdateFirewallRuleGroupAssociation' :: UpdateFirewallRuleGroupAssociation -> Text
$sel:name:UpdateFirewallRuleGroupAssociation' :: UpdateFirewallRuleGroupAssociation -> Maybe Text
$sel:priority:UpdateFirewallRuleGroupAssociation' :: UpdateFirewallRuleGroupAssociation -> Maybe Int
$sel:mutationProtection:UpdateFirewallRuleGroupAssociation' :: UpdateFirewallRuleGroupAssociation
-> Maybe MutationProtectionStatus
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"MutationProtection" Text -> MutationProtectionStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (MutationProtectionStatus -> Pair)
-> Maybe MutationProtectionStatus -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MutationProtectionStatus
mutationProtection,
            (Text
"Priority" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
priority,
            (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"FirewallRuleGroupAssociationId"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
firewallRuleGroupAssociationId
              )
          ]
      )

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

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

-- | /See:/ 'newUpdateFirewallRuleGroupAssociationResponse' smart constructor.
data UpdateFirewallRuleGroupAssociationResponse = UpdateFirewallRuleGroupAssociationResponse'
  { -- | The association that you just updated.
    UpdateFirewallRuleGroupAssociationResponse
-> Maybe FirewallRuleGroupAssociation
firewallRuleGroupAssociation :: Prelude.Maybe FirewallRuleGroupAssociation,
    -- | The response's http status code.
    UpdateFirewallRuleGroupAssociationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateFirewallRuleGroupAssociationResponse
-> UpdateFirewallRuleGroupAssociationResponse -> Bool
(UpdateFirewallRuleGroupAssociationResponse
 -> UpdateFirewallRuleGroupAssociationResponse -> Bool)
-> (UpdateFirewallRuleGroupAssociationResponse
    -> UpdateFirewallRuleGroupAssociationResponse -> Bool)
-> Eq UpdateFirewallRuleGroupAssociationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateFirewallRuleGroupAssociationResponse
-> UpdateFirewallRuleGroupAssociationResponse -> Bool
$c/= :: UpdateFirewallRuleGroupAssociationResponse
-> UpdateFirewallRuleGroupAssociationResponse -> Bool
== :: UpdateFirewallRuleGroupAssociationResponse
-> UpdateFirewallRuleGroupAssociationResponse -> Bool
$c== :: UpdateFirewallRuleGroupAssociationResponse
-> UpdateFirewallRuleGroupAssociationResponse -> Bool
Prelude.Eq, ReadPrec [UpdateFirewallRuleGroupAssociationResponse]
ReadPrec UpdateFirewallRuleGroupAssociationResponse
Int -> ReadS UpdateFirewallRuleGroupAssociationResponse
ReadS [UpdateFirewallRuleGroupAssociationResponse]
(Int -> ReadS UpdateFirewallRuleGroupAssociationResponse)
-> ReadS [UpdateFirewallRuleGroupAssociationResponse]
-> ReadPrec UpdateFirewallRuleGroupAssociationResponse
-> ReadPrec [UpdateFirewallRuleGroupAssociationResponse]
-> Read UpdateFirewallRuleGroupAssociationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateFirewallRuleGroupAssociationResponse]
$creadListPrec :: ReadPrec [UpdateFirewallRuleGroupAssociationResponse]
readPrec :: ReadPrec UpdateFirewallRuleGroupAssociationResponse
$creadPrec :: ReadPrec UpdateFirewallRuleGroupAssociationResponse
readList :: ReadS [UpdateFirewallRuleGroupAssociationResponse]
$creadList :: ReadS [UpdateFirewallRuleGroupAssociationResponse]
readsPrec :: Int -> ReadS UpdateFirewallRuleGroupAssociationResponse
$creadsPrec :: Int -> ReadS UpdateFirewallRuleGroupAssociationResponse
Prelude.Read, Int -> UpdateFirewallRuleGroupAssociationResponse -> ShowS
[UpdateFirewallRuleGroupAssociationResponse] -> ShowS
UpdateFirewallRuleGroupAssociationResponse -> String
(Int -> UpdateFirewallRuleGroupAssociationResponse -> ShowS)
-> (UpdateFirewallRuleGroupAssociationResponse -> String)
-> ([UpdateFirewallRuleGroupAssociationResponse] -> ShowS)
-> Show UpdateFirewallRuleGroupAssociationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateFirewallRuleGroupAssociationResponse] -> ShowS
$cshowList :: [UpdateFirewallRuleGroupAssociationResponse] -> ShowS
show :: UpdateFirewallRuleGroupAssociationResponse -> String
$cshow :: UpdateFirewallRuleGroupAssociationResponse -> String
showsPrec :: Int -> UpdateFirewallRuleGroupAssociationResponse -> ShowS
$cshowsPrec :: Int -> UpdateFirewallRuleGroupAssociationResponse -> ShowS
Prelude.Show, (forall x.
 UpdateFirewallRuleGroupAssociationResponse
 -> Rep UpdateFirewallRuleGroupAssociationResponse x)
-> (forall x.
    Rep UpdateFirewallRuleGroupAssociationResponse x
    -> UpdateFirewallRuleGroupAssociationResponse)
-> Generic UpdateFirewallRuleGroupAssociationResponse
forall x.
Rep UpdateFirewallRuleGroupAssociationResponse x
-> UpdateFirewallRuleGroupAssociationResponse
forall x.
UpdateFirewallRuleGroupAssociationResponse
-> Rep UpdateFirewallRuleGroupAssociationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateFirewallRuleGroupAssociationResponse x
-> UpdateFirewallRuleGroupAssociationResponse
$cfrom :: forall x.
UpdateFirewallRuleGroupAssociationResponse
-> Rep UpdateFirewallRuleGroupAssociationResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateFirewallRuleGroupAssociationResponse' 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:
--
-- 'firewallRuleGroupAssociation', 'updateFirewallRuleGroupAssociationResponse_firewallRuleGroupAssociation' - The association that you just updated.
--
-- 'httpStatus', 'updateFirewallRuleGroupAssociationResponse_httpStatus' - The response's http status code.
newUpdateFirewallRuleGroupAssociationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateFirewallRuleGroupAssociationResponse
newUpdateFirewallRuleGroupAssociationResponse :: Int -> UpdateFirewallRuleGroupAssociationResponse
newUpdateFirewallRuleGroupAssociationResponse
  Int
pHttpStatus_ =
    UpdateFirewallRuleGroupAssociationResponse' :: Maybe FirewallRuleGroupAssociation
-> Int -> UpdateFirewallRuleGroupAssociationResponse
UpdateFirewallRuleGroupAssociationResponse'
      { $sel:firewallRuleGroupAssociation:UpdateFirewallRuleGroupAssociationResponse' :: Maybe FirewallRuleGroupAssociation
firewallRuleGroupAssociation =
          Maybe FirewallRuleGroupAssociation
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:UpdateFirewallRuleGroupAssociationResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The association that you just updated.
updateFirewallRuleGroupAssociationResponse_firewallRuleGroupAssociation :: Lens.Lens' UpdateFirewallRuleGroupAssociationResponse (Prelude.Maybe FirewallRuleGroupAssociation)
updateFirewallRuleGroupAssociationResponse_firewallRuleGroupAssociation :: (Maybe FirewallRuleGroupAssociation
 -> f (Maybe FirewallRuleGroupAssociation))
-> UpdateFirewallRuleGroupAssociationResponse
-> f UpdateFirewallRuleGroupAssociationResponse
updateFirewallRuleGroupAssociationResponse_firewallRuleGroupAssociation = (UpdateFirewallRuleGroupAssociationResponse
 -> Maybe FirewallRuleGroupAssociation)
-> (UpdateFirewallRuleGroupAssociationResponse
    -> Maybe FirewallRuleGroupAssociation
    -> UpdateFirewallRuleGroupAssociationResponse)
-> Lens
     UpdateFirewallRuleGroupAssociationResponse
     UpdateFirewallRuleGroupAssociationResponse
     (Maybe FirewallRuleGroupAssociation)
     (Maybe FirewallRuleGroupAssociation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallRuleGroupAssociationResponse' {Maybe FirewallRuleGroupAssociation
firewallRuleGroupAssociation :: Maybe FirewallRuleGroupAssociation
$sel:firewallRuleGroupAssociation:UpdateFirewallRuleGroupAssociationResponse' :: UpdateFirewallRuleGroupAssociationResponse
-> Maybe FirewallRuleGroupAssociation
firewallRuleGroupAssociation} -> Maybe FirewallRuleGroupAssociation
firewallRuleGroupAssociation) (\s :: UpdateFirewallRuleGroupAssociationResponse
s@UpdateFirewallRuleGroupAssociationResponse' {} Maybe FirewallRuleGroupAssociation
a -> UpdateFirewallRuleGroupAssociationResponse
s {$sel:firewallRuleGroupAssociation:UpdateFirewallRuleGroupAssociationResponse' :: Maybe FirewallRuleGroupAssociation
firewallRuleGroupAssociation = Maybe FirewallRuleGroupAssociation
a} :: UpdateFirewallRuleGroupAssociationResponse)

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

instance
  Prelude.NFData
    UpdateFirewallRuleGroupAssociationResponse