{-# 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.UpdateFirewallDomains
-- 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)
--
-- Updates the firewall domain list from an array of domain specifications.
module Amazonka.Route53Resolver.UpdateFirewallDomains
  ( -- * Creating a Request
    UpdateFirewallDomains (..),
    newUpdateFirewallDomains,

    -- * Request Lenses
    updateFirewallDomains_firewallDomainListId,
    updateFirewallDomains_operation,
    updateFirewallDomains_domains,

    -- * Destructuring the Response
    UpdateFirewallDomainsResponse (..),
    newUpdateFirewallDomainsResponse,

    -- * Response Lenses
    updateFirewallDomainsResponse_status,
    updateFirewallDomainsResponse_statusMessage,
    updateFirewallDomainsResponse_name,
    updateFirewallDomainsResponse_id,
    updateFirewallDomainsResponse_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:/ 'newUpdateFirewallDomains' smart constructor.
data UpdateFirewallDomains = UpdateFirewallDomains'
  { -- | The ID of the domain list whose domains you want to update.
    UpdateFirewallDomains -> Text
firewallDomainListId :: Prelude.Text,
    -- | What you want DNS Firewall to do with the domains that you are
    -- providing:
    --
    -- -   @ADD@ - Add the domains to the ones that are already in the domain
    --     list.
    --
    -- -   @REMOVE@ - Search the domain list for the domains and remove them
    --     from the list.
    --
    -- -   @REPLACE@ - Update the domain list to exactly match the list that
    --     you are providing.
    UpdateFirewallDomains -> FirewallDomainUpdateOperation
operation :: FirewallDomainUpdateOperation,
    -- | A list of domains to use in the update operation.
    --
    -- Each domain specification in your domain list must satisfy the following
    -- requirements:
    --
    -- -   It can optionally start with @*@ (asterisk).
    --
    -- -   With the exception of the optional starting asterisk, it must only
    --     contain the following characters: @A-Z@, @a-z@, @0-9@, @-@ (hyphen).
    --
    -- -   It must be from 1-255 characters in length.
    UpdateFirewallDomains -> [Text]
domains :: [Prelude.Text]
  }
  deriving (UpdateFirewallDomains -> UpdateFirewallDomains -> Bool
(UpdateFirewallDomains -> UpdateFirewallDomains -> Bool)
-> (UpdateFirewallDomains -> UpdateFirewallDomains -> Bool)
-> Eq UpdateFirewallDomains
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateFirewallDomains -> UpdateFirewallDomains -> Bool
$c/= :: UpdateFirewallDomains -> UpdateFirewallDomains -> Bool
== :: UpdateFirewallDomains -> UpdateFirewallDomains -> Bool
$c== :: UpdateFirewallDomains -> UpdateFirewallDomains -> Bool
Prelude.Eq, ReadPrec [UpdateFirewallDomains]
ReadPrec UpdateFirewallDomains
Int -> ReadS UpdateFirewallDomains
ReadS [UpdateFirewallDomains]
(Int -> ReadS UpdateFirewallDomains)
-> ReadS [UpdateFirewallDomains]
-> ReadPrec UpdateFirewallDomains
-> ReadPrec [UpdateFirewallDomains]
-> Read UpdateFirewallDomains
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateFirewallDomains]
$creadListPrec :: ReadPrec [UpdateFirewallDomains]
readPrec :: ReadPrec UpdateFirewallDomains
$creadPrec :: ReadPrec UpdateFirewallDomains
readList :: ReadS [UpdateFirewallDomains]
$creadList :: ReadS [UpdateFirewallDomains]
readsPrec :: Int -> ReadS UpdateFirewallDomains
$creadsPrec :: Int -> ReadS UpdateFirewallDomains
Prelude.Read, Int -> UpdateFirewallDomains -> ShowS
[UpdateFirewallDomains] -> ShowS
UpdateFirewallDomains -> String
(Int -> UpdateFirewallDomains -> ShowS)
-> (UpdateFirewallDomains -> String)
-> ([UpdateFirewallDomains] -> ShowS)
-> Show UpdateFirewallDomains
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateFirewallDomains] -> ShowS
$cshowList :: [UpdateFirewallDomains] -> ShowS
show :: UpdateFirewallDomains -> String
$cshow :: UpdateFirewallDomains -> String
showsPrec :: Int -> UpdateFirewallDomains -> ShowS
$cshowsPrec :: Int -> UpdateFirewallDomains -> ShowS
Prelude.Show, (forall x. UpdateFirewallDomains -> Rep UpdateFirewallDomains x)
-> (forall x. Rep UpdateFirewallDomains x -> UpdateFirewallDomains)
-> Generic UpdateFirewallDomains
forall x. Rep UpdateFirewallDomains x -> UpdateFirewallDomains
forall x. UpdateFirewallDomains -> Rep UpdateFirewallDomains x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateFirewallDomains x -> UpdateFirewallDomains
$cfrom :: forall x. UpdateFirewallDomains -> Rep UpdateFirewallDomains x
Prelude.Generic)

-- |
-- Create a value of 'UpdateFirewallDomains' 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:
--
-- 'firewallDomainListId', 'updateFirewallDomains_firewallDomainListId' - The ID of the domain list whose domains you want to update.
--
-- 'operation', 'updateFirewallDomains_operation' - What you want DNS Firewall to do with the domains that you are
-- providing:
--
-- -   @ADD@ - Add the domains to the ones that are already in the domain
--     list.
--
-- -   @REMOVE@ - Search the domain list for the domains and remove them
--     from the list.
--
-- -   @REPLACE@ - Update the domain list to exactly match the list that
--     you are providing.
--
-- 'domains', 'updateFirewallDomains_domains' - A list of domains to use in the update operation.
--
-- Each domain specification in your domain list must satisfy the following
-- requirements:
--
-- -   It can optionally start with @*@ (asterisk).
--
-- -   With the exception of the optional starting asterisk, it must only
--     contain the following characters: @A-Z@, @a-z@, @0-9@, @-@ (hyphen).
--
-- -   It must be from 1-255 characters in length.
newUpdateFirewallDomains ::
  -- | 'firewallDomainListId'
  Prelude.Text ->
  -- | 'operation'
  FirewallDomainUpdateOperation ->
  UpdateFirewallDomains
newUpdateFirewallDomains :: Text -> FirewallDomainUpdateOperation -> UpdateFirewallDomains
newUpdateFirewallDomains
  Text
pFirewallDomainListId_
  FirewallDomainUpdateOperation
pOperation_ =
    UpdateFirewallDomains' :: Text
-> FirewallDomainUpdateOperation -> [Text] -> UpdateFirewallDomains
UpdateFirewallDomains'
      { $sel:firewallDomainListId:UpdateFirewallDomains' :: Text
firewallDomainListId =
          Text
pFirewallDomainListId_,
        $sel:operation:UpdateFirewallDomains' :: FirewallDomainUpdateOperation
operation = FirewallDomainUpdateOperation
pOperation_,
        $sel:domains:UpdateFirewallDomains' :: [Text]
domains = [Text]
forall a. Monoid a => a
Prelude.mempty
      }

-- | The ID of the domain list whose domains you want to update.
updateFirewallDomains_firewallDomainListId :: Lens.Lens' UpdateFirewallDomains Prelude.Text
updateFirewallDomains_firewallDomainListId :: (Text -> f Text)
-> UpdateFirewallDomains -> f UpdateFirewallDomains
updateFirewallDomains_firewallDomainListId = (UpdateFirewallDomains -> Text)
-> (UpdateFirewallDomains -> Text -> UpdateFirewallDomains)
-> Lens UpdateFirewallDomains UpdateFirewallDomains Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallDomains' {Text
firewallDomainListId :: Text
$sel:firewallDomainListId:UpdateFirewallDomains' :: UpdateFirewallDomains -> Text
firewallDomainListId} -> Text
firewallDomainListId) (\s :: UpdateFirewallDomains
s@UpdateFirewallDomains' {} Text
a -> UpdateFirewallDomains
s {$sel:firewallDomainListId:UpdateFirewallDomains' :: Text
firewallDomainListId = Text
a} :: UpdateFirewallDomains)

-- | What you want DNS Firewall to do with the domains that you are
-- providing:
--
-- -   @ADD@ - Add the domains to the ones that are already in the domain
--     list.
--
-- -   @REMOVE@ - Search the domain list for the domains and remove them
--     from the list.
--
-- -   @REPLACE@ - Update the domain list to exactly match the list that
--     you are providing.
updateFirewallDomains_operation :: Lens.Lens' UpdateFirewallDomains FirewallDomainUpdateOperation
updateFirewallDomains_operation :: (FirewallDomainUpdateOperation -> f FirewallDomainUpdateOperation)
-> UpdateFirewallDomains -> f UpdateFirewallDomains
updateFirewallDomains_operation = (UpdateFirewallDomains -> FirewallDomainUpdateOperation)
-> (UpdateFirewallDomains
    -> FirewallDomainUpdateOperation -> UpdateFirewallDomains)
-> Lens
     UpdateFirewallDomains
     UpdateFirewallDomains
     FirewallDomainUpdateOperation
     FirewallDomainUpdateOperation
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallDomains' {FirewallDomainUpdateOperation
operation :: FirewallDomainUpdateOperation
$sel:operation:UpdateFirewallDomains' :: UpdateFirewallDomains -> FirewallDomainUpdateOperation
operation} -> FirewallDomainUpdateOperation
operation) (\s :: UpdateFirewallDomains
s@UpdateFirewallDomains' {} FirewallDomainUpdateOperation
a -> UpdateFirewallDomains
s {$sel:operation:UpdateFirewallDomains' :: FirewallDomainUpdateOperation
operation = FirewallDomainUpdateOperation
a} :: UpdateFirewallDomains)

-- | A list of domains to use in the update operation.
--
-- Each domain specification in your domain list must satisfy the following
-- requirements:
--
-- -   It can optionally start with @*@ (asterisk).
--
-- -   With the exception of the optional starting asterisk, it must only
--     contain the following characters: @A-Z@, @a-z@, @0-9@, @-@ (hyphen).
--
-- -   It must be from 1-255 characters in length.
updateFirewallDomains_domains :: Lens.Lens' UpdateFirewallDomains [Prelude.Text]
updateFirewallDomains_domains :: ([Text] -> f [Text])
-> UpdateFirewallDomains -> f UpdateFirewallDomains
updateFirewallDomains_domains = (UpdateFirewallDomains -> [Text])
-> (UpdateFirewallDomains -> [Text] -> UpdateFirewallDomains)
-> Lens UpdateFirewallDomains UpdateFirewallDomains [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallDomains' {[Text]
domains :: [Text]
$sel:domains:UpdateFirewallDomains' :: UpdateFirewallDomains -> [Text]
domains} -> [Text]
domains) (\s :: UpdateFirewallDomains
s@UpdateFirewallDomains' {} [Text]
a -> UpdateFirewallDomains
s {$sel:domains:UpdateFirewallDomains' :: [Text]
domains = [Text]
a} :: UpdateFirewallDomains) (([Text] -> f [Text])
 -> UpdateFirewallDomains -> f UpdateFirewallDomains)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> UpdateFirewallDomains
-> f UpdateFirewallDomains
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData UpdateFirewallDomains

instance Core.ToHeaders UpdateFirewallDomains where
  toHeaders :: UpdateFirewallDomains -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateFirewallDomains -> 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.UpdateFirewallDomains" ::
                          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 UpdateFirewallDomains where
  toJSON :: UpdateFirewallDomains -> Value
toJSON UpdateFirewallDomains' {[Text]
Text
FirewallDomainUpdateOperation
domains :: [Text]
operation :: FirewallDomainUpdateOperation
firewallDomainListId :: Text
$sel:domains:UpdateFirewallDomains' :: UpdateFirewallDomains -> [Text]
$sel:operation:UpdateFirewallDomains' :: UpdateFirewallDomains -> FirewallDomainUpdateOperation
$sel:firewallDomainListId:UpdateFirewallDomains' :: UpdateFirewallDomains -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"FirewallDomainListId"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
firewallDomainListId
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Operation" Text -> FirewallDomainUpdateOperation -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= FirewallDomainUpdateOperation
operation),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Domains" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
domains)
          ]
      )

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

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

-- | /See:/ 'newUpdateFirewallDomainsResponse' smart constructor.
data UpdateFirewallDomainsResponse = UpdateFirewallDomainsResponse'
  { UpdateFirewallDomainsResponse -> Maybe FirewallDomainListStatus
status :: Prelude.Maybe FirewallDomainListStatus,
    -- | Additional information about the status of the list, if available.
    UpdateFirewallDomainsResponse -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
    -- | The name of the domain list.
    UpdateFirewallDomainsResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The ID of the firewall domain list that DNS Firewall just updated.
    UpdateFirewallDomainsResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateFirewallDomainsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateFirewallDomainsResponse
-> UpdateFirewallDomainsResponse -> Bool
(UpdateFirewallDomainsResponse
 -> UpdateFirewallDomainsResponse -> Bool)
-> (UpdateFirewallDomainsResponse
    -> UpdateFirewallDomainsResponse -> Bool)
-> Eq UpdateFirewallDomainsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateFirewallDomainsResponse
-> UpdateFirewallDomainsResponse -> Bool
$c/= :: UpdateFirewallDomainsResponse
-> UpdateFirewallDomainsResponse -> Bool
== :: UpdateFirewallDomainsResponse
-> UpdateFirewallDomainsResponse -> Bool
$c== :: UpdateFirewallDomainsResponse
-> UpdateFirewallDomainsResponse -> Bool
Prelude.Eq, ReadPrec [UpdateFirewallDomainsResponse]
ReadPrec UpdateFirewallDomainsResponse
Int -> ReadS UpdateFirewallDomainsResponse
ReadS [UpdateFirewallDomainsResponse]
(Int -> ReadS UpdateFirewallDomainsResponse)
-> ReadS [UpdateFirewallDomainsResponse]
-> ReadPrec UpdateFirewallDomainsResponse
-> ReadPrec [UpdateFirewallDomainsResponse]
-> Read UpdateFirewallDomainsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateFirewallDomainsResponse]
$creadListPrec :: ReadPrec [UpdateFirewallDomainsResponse]
readPrec :: ReadPrec UpdateFirewallDomainsResponse
$creadPrec :: ReadPrec UpdateFirewallDomainsResponse
readList :: ReadS [UpdateFirewallDomainsResponse]
$creadList :: ReadS [UpdateFirewallDomainsResponse]
readsPrec :: Int -> ReadS UpdateFirewallDomainsResponse
$creadsPrec :: Int -> ReadS UpdateFirewallDomainsResponse
Prelude.Read, Int -> UpdateFirewallDomainsResponse -> ShowS
[UpdateFirewallDomainsResponse] -> ShowS
UpdateFirewallDomainsResponse -> String
(Int -> UpdateFirewallDomainsResponse -> ShowS)
-> (UpdateFirewallDomainsResponse -> String)
-> ([UpdateFirewallDomainsResponse] -> ShowS)
-> Show UpdateFirewallDomainsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateFirewallDomainsResponse] -> ShowS
$cshowList :: [UpdateFirewallDomainsResponse] -> ShowS
show :: UpdateFirewallDomainsResponse -> String
$cshow :: UpdateFirewallDomainsResponse -> String
showsPrec :: Int -> UpdateFirewallDomainsResponse -> ShowS
$cshowsPrec :: Int -> UpdateFirewallDomainsResponse -> ShowS
Prelude.Show, (forall x.
 UpdateFirewallDomainsResponse
 -> Rep UpdateFirewallDomainsResponse x)
-> (forall x.
    Rep UpdateFirewallDomainsResponse x
    -> UpdateFirewallDomainsResponse)
-> Generic UpdateFirewallDomainsResponse
forall x.
Rep UpdateFirewallDomainsResponse x
-> UpdateFirewallDomainsResponse
forall x.
UpdateFirewallDomainsResponse
-> Rep UpdateFirewallDomainsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateFirewallDomainsResponse x
-> UpdateFirewallDomainsResponse
$cfrom :: forall x.
UpdateFirewallDomainsResponse
-> Rep UpdateFirewallDomainsResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateFirewallDomainsResponse' 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:
--
-- 'status', 'updateFirewallDomainsResponse_status' -
--
-- 'statusMessage', 'updateFirewallDomainsResponse_statusMessage' - Additional information about the status of the list, if available.
--
-- 'name', 'updateFirewallDomainsResponse_name' - The name of the domain list.
--
-- 'id', 'updateFirewallDomainsResponse_id' - The ID of the firewall domain list that DNS Firewall just updated.
--
-- 'httpStatus', 'updateFirewallDomainsResponse_httpStatus' - The response's http status code.
newUpdateFirewallDomainsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateFirewallDomainsResponse
newUpdateFirewallDomainsResponse :: Int -> UpdateFirewallDomainsResponse
newUpdateFirewallDomainsResponse Int
pHttpStatus_ =
  UpdateFirewallDomainsResponse' :: Maybe FirewallDomainListStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> UpdateFirewallDomainsResponse
UpdateFirewallDomainsResponse'
    { $sel:status:UpdateFirewallDomainsResponse' :: Maybe FirewallDomainListStatus
status =
        Maybe FirewallDomainListStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:statusMessage:UpdateFirewallDomainsResponse' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdateFirewallDomainsResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:UpdateFirewallDomainsResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateFirewallDomainsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- |
updateFirewallDomainsResponse_status :: Lens.Lens' UpdateFirewallDomainsResponse (Prelude.Maybe FirewallDomainListStatus)
updateFirewallDomainsResponse_status :: (Maybe FirewallDomainListStatus
 -> f (Maybe FirewallDomainListStatus))
-> UpdateFirewallDomainsResponse -> f UpdateFirewallDomainsResponse
updateFirewallDomainsResponse_status = (UpdateFirewallDomainsResponse -> Maybe FirewallDomainListStatus)
-> (UpdateFirewallDomainsResponse
    -> Maybe FirewallDomainListStatus -> UpdateFirewallDomainsResponse)
-> Lens
     UpdateFirewallDomainsResponse
     UpdateFirewallDomainsResponse
     (Maybe FirewallDomainListStatus)
     (Maybe FirewallDomainListStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallDomainsResponse' {Maybe FirewallDomainListStatus
status :: Maybe FirewallDomainListStatus
$sel:status:UpdateFirewallDomainsResponse' :: UpdateFirewallDomainsResponse -> Maybe FirewallDomainListStatus
status} -> Maybe FirewallDomainListStatus
status) (\s :: UpdateFirewallDomainsResponse
s@UpdateFirewallDomainsResponse' {} Maybe FirewallDomainListStatus
a -> UpdateFirewallDomainsResponse
s {$sel:status:UpdateFirewallDomainsResponse' :: Maybe FirewallDomainListStatus
status = Maybe FirewallDomainListStatus
a} :: UpdateFirewallDomainsResponse)

-- | Additional information about the status of the list, if available.
updateFirewallDomainsResponse_statusMessage :: Lens.Lens' UpdateFirewallDomainsResponse (Prelude.Maybe Prelude.Text)
updateFirewallDomainsResponse_statusMessage :: (Maybe Text -> f (Maybe Text))
-> UpdateFirewallDomainsResponse -> f UpdateFirewallDomainsResponse
updateFirewallDomainsResponse_statusMessage = (UpdateFirewallDomainsResponse -> Maybe Text)
-> (UpdateFirewallDomainsResponse
    -> Maybe Text -> UpdateFirewallDomainsResponse)
-> Lens
     UpdateFirewallDomainsResponse
     UpdateFirewallDomainsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallDomainsResponse' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:UpdateFirewallDomainsResponse' :: UpdateFirewallDomainsResponse -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: UpdateFirewallDomainsResponse
s@UpdateFirewallDomainsResponse' {} Maybe Text
a -> UpdateFirewallDomainsResponse
s {$sel:statusMessage:UpdateFirewallDomainsResponse' :: Maybe Text
statusMessage = Maybe Text
a} :: UpdateFirewallDomainsResponse)

-- | The name of the domain list.
updateFirewallDomainsResponse_name :: Lens.Lens' UpdateFirewallDomainsResponse (Prelude.Maybe Prelude.Text)
updateFirewallDomainsResponse_name :: (Maybe Text -> f (Maybe Text))
-> UpdateFirewallDomainsResponse -> f UpdateFirewallDomainsResponse
updateFirewallDomainsResponse_name = (UpdateFirewallDomainsResponse -> Maybe Text)
-> (UpdateFirewallDomainsResponse
    -> Maybe Text -> UpdateFirewallDomainsResponse)
-> Lens
     UpdateFirewallDomainsResponse
     UpdateFirewallDomainsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallDomainsResponse' {Maybe Text
name :: Maybe Text
$sel:name:UpdateFirewallDomainsResponse' :: UpdateFirewallDomainsResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: UpdateFirewallDomainsResponse
s@UpdateFirewallDomainsResponse' {} Maybe Text
a -> UpdateFirewallDomainsResponse
s {$sel:name:UpdateFirewallDomainsResponse' :: Maybe Text
name = Maybe Text
a} :: UpdateFirewallDomainsResponse)

-- | The ID of the firewall domain list that DNS Firewall just updated.
updateFirewallDomainsResponse_id :: Lens.Lens' UpdateFirewallDomainsResponse (Prelude.Maybe Prelude.Text)
updateFirewallDomainsResponse_id :: (Maybe Text -> f (Maybe Text))
-> UpdateFirewallDomainsResponse -> f UpdateFirewallDomainsResponse
updateFirewallDomainsResponse_id = (UpdateFirewallDomainsResponse -> Maybe Text)
-> (UpdateFirewallDomainsResponse
    -> Maybe Text -> UpdateFirewallDomainsResponse)
-> Lens
     UpdateFirewallDomainsResponse
     UpdateFirewallDomainsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallDomainsResponse' {Maybe Text
id :: Maybe Text
$sel:id:UpdateFirewallDomainsResponse' :: UpdateFirewallDomainsResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: UpdateFirewallDomainsResponse
s@UpdateFirewallDomainsResponse' {} Maybe Text
a -> UpdateFirewallDomainsResponse
s {$sel:id:UpdateFirewallDomainsResponse' :: Maybe Text
id = Maybe Text
a} :: UpdateFirewallDomainsResponse)

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

instance Prelude.NFData UpdateFirewallDomainsResponse