{-# 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.NetworkFirewall.UpdateLoggingConfiguration
-- 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)
--
-- Sets the logging configuration for the specified firewall.
--
-- To change the logging configuration, retrieve the LoggingConfiguration
-- by calling DescribeLoggingConfiguration, then change it and provide the
-- modified object to this update call. You must change the logging
-- configuration one LogDestinationConfig at a time inside the retrieved
-- LoggingConfiguration object.
--
-- You can perform only one of the following actions in any call to
-- @UpdateLoggingConfiguration@:
--
-- -   Create a new log destination object by adding a single
--     @LogDestinationConfig@ array element to @LogDestinationConfigs@.
--
-- -   Delete a log destination object by removing a single
--     @LogDestinationConfig@ array element from @LogDestinationConfigs@.
--
-- -   Change the @LogDestination@ setting in a single
--     @LogDestinationConfig@ array element.
--
-- You can\'t change the @LogDestinationType@ or @LogType@ in a
-- @LogDestinationConfig@. To change these settings, delete the existing
-- @LogDestinationConfig@ object and create a new one, using two separate
-- calls to this update operation.
module Amazonka.NetworkFirewall.UpdateLoggingConfiguration
  ( -- * Creating a Request
    UpdateLoggingConfiguration (..),
    newUpdateLoggingConfiguration,

    -- * Request Lenses
    updateLoggingConfiguration_firewallArn,
    updateLoggingConfiguration_loggingConfiguration,
    updateLoggingConfiguration_firewallName,

    -- * Destructuring the Response
    UpdateLoggingConfigurationResponse (..),
    newUpdateLoggingConfigurationResponse,

    -- * Response Lenses
    updateLoggingConfigurationResponse_firewallArn,
    updateLoggingConfigurationResponse_loggingConfiguration,
    updateLoggingConfigurationResponse_firewallName,
    updateLoggingConfigurationResponse_httpStatus,
  )
where

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

-- | /See:/ 'newUpdateLoggingConfiguration' smart constructor.
data UpdateLoggingConfiguration = UpdateLoggingConfiguration'
  { -- | The Amazon Resource Name (ARN) of the firewall.
    --
    -- You must specify the ARN or the name, and you can specify both.
    UpdateLoggingConfiguration -> Maybe Text
firewallArn :: Prelude.Maybe Prelude.Text,
    -- | Defines how Network Firewall performs logging for a firewall. If you
    -- omit this setting, Network Firewall disables logging for the firewall.
    UpdateLoggingConfiguration -> Maybe LoggingConfiguration
loggingConfiguration :: Prelude.Maybe LoggingConfiguration,
    -- | The descriptive name of the firewall. You can\'t change the name of a
    -- firewall after you create it.
    --
    -- You must specify the ARN or the name, and you can specify both.
    UpdateLoggingConfiguration -> Maybe Text
firewallName :: Prelude.Maybe Prelude.Text
  }
  deriving (UpdateLoggingConfiguration -> UpdateLoggingConfiguration -> Bool
(UpdateLoggingConfiguration -> UpdateLoggingConfiguration -> Bool)
-> (UpdateLoggingConfiguration
    -> UpdateLoggingConfiguration -> Bool)
-> Eq UpdateLoggingConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateLoggingConfiguration -> UpdateLoggingConfiguration -> Bool
$c/= :: UpdateLoggingConfiguration -> UpdateLoggingConfiguration -> Bool
== :: UpdateLoggingConfiguration -> UpdateLoggingConfiguration -> Bool
$c== :: UpdateLoggingConfiguration -> UpdateLoggingConfiguration -> Bool
Prelude.Eq, ReadPrec [UpdateLoggingConfiguration]
ReadPrec UpdateLoggingConfiguration
Int -> ReadS UpdateLoggingConfiguration
ReadS [UpdateLoggingConfiguration]
(Int -> ReadS UpdateLoggingConfiguration)
-> ReadS [UpdateLoggingConfiguration]
-> ReadPrec UpdateLoggingConfiguration
-> ReadPrec [UpdateLoggingConfiguration]
-> Read UpdateLoggingConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateLoggingConfiguration]
$creadListPrec :: ReadPrec [UpdateLoggingConfiguration]
readPrec :: ReadPrec UpdateLoggingConfiguration
$creadPrec :: ReadPrec UpdateLoggingConfiguration
readList :: ReadS [UpdateLoggingConfiguration]
$creadList :: ReadS [UpdateLoggingConfiguration]
readsPrec :: Int -> ReadS UpdateLoggingConfiguration
$creadsPrec :: Int -> ReadS UpdateLoggingConfiguration
Prelude.Read, Int -> UpdateLoggingConfiguration -> ShowS
[UpdateLoggingConfiguration] -> ShowS
UpdateLoggingConfiguration -> String
(Int -> UpdateLoggingConfiguration -> ShowS)
-> (UpdateLoggingConfiguration -> String)
-> ([UpdateLoggingConfiguration] -> ShowS)
-> Show UpdateLoggingConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateLoggingConfiguration] -> ShowS
$cshowList :: [UpdateLoggingConfiguration] -> ShowS
show :: UpdateLoggingConfiguration -> String
$cshow :: UpdateLoggingConfiguration -> String
showsPrec :: Int -> UpdateLoggingConfiguration -> ShowS
$cshowsPrec :: Int -> UpdateLoggingConfiguration -> ShowS
Prelude.Show, (forall x.
 UpdateLoggingConfiguration -> Rep UpdateLoggingConfiguration x)
-> (forall x.
    Rep UpdateLoggingConfiguration x -> UpdateLoggingConfiguration)
-> Generic UpdateLoggingConfiguration
forall x.
Rep UpdateLoggingConfiguration x -> UpdateLoggingConfiguration
forall x.
UpdateLoggingConfiguration -> Rep UpdateLoggingConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateLoggingConfiguration x -> UpdateLoggingConfiguration
$cfrom :: forall x.
UpdateLoggingConfiguration -> Rep UpdateLoggingConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'UpdateLoggingConfiguration' 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:
--
-- 'firewallArn', 'updateLoggingConfiguration_firewallArn' - The Amazon Resource Name (ARN) of the firewall.
--
-- You must specify the ARN or the name, and you can specify both.
--
-- 'loggingConfiguration', 'updateLoggingConfiguration_loggingConfiguration' - Defines how Network Firewall performs logging for a firewall. If you
-- omit this setting, Network Firewall disables logging for the firewall.
--
-- 'firewallName', 'updateLoggingConfiguration_firewallName' - The descriptive name of the firewall. You can\'t change the name of a
-- firewall after you create it.
--
-- You must specify the ARN or the name, and you can specify both.
newUpdateLoggingConfiguration ::
  UpdateLoggingConfiguration
newUpdateLoggingConfiguration :: UpdateLoggingConfiguration
newUpdateLoggingConfiguration =
  UpdateLoggingConfiguration' :: Maybe Text
-> Maybe LoggingConfiguration
-> Maybe Text
-> UpdateLoggingConfiguration
UpdateLoggingConfiguration'
    { $sel:firewallArn:UpdateLoggingConfiguration' :: Maybe Text
firewallArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:loggingConfiguration:UpdateLoggingConfiguration' :: Maybe LoggingConfiguration
loggingConfiguration = Maybe LoggingConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:firewallName:UpdateLoggingConfiguration' :: Maybe Text
firewallName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) of the firewall.
--
-- You must specify the ARN or the name, and you can specify both.
updateLoggingConfiguration_firewallArn :: Lens.Lens' UpdateLoggingConfiguration (Prelude.Maybe Prelude.Text)
updateLoggingConfiguration_firewallArn :: (Maybe Text -> f (Maybe Text))
-> UpdateLoggingConfiguration -> f UpdateLoggingConfiguration
updateLoggingConfiguration_firewallArn = (UpdateLoggingConfiguration -> Maybe Text)
-> (UpdateLoggingConfiguration
    -> Maybe Text -> UpdateLoggingConfiguration)
-> Lens
     UpdateLoggingConfiguration
     UpdateLoggingConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLoggingConfiguration' {Maybe Text
firewallArn :: Maybe Text
$sel:firewallArn:UpdateLoggingConfiguration' :: UpdateLoggingConfiguration -> Maybe Text
firewallArn} -> Maybe Text
firewallArn) (\s :: UpdateLoggingConfiguration
s@UpdateLoggingConfiguration' {} Maybe Text
a -> UpdateLoggingConfiguration
s {$sel:firewallArn:UpdateLoggingConfiguration' :: Maybe Text
firewallArn = Maybe Text
a} :: UpdateLoggingConfiguration)

-- | Defines how Network Firewall performs logging for a firewall. If you
-- omit this setting, Network Firewall disables logging for the firewall.
updateLoggingConfiguration_loggingConfiguration :: Lens.Lens' UpdateLoggingConfiguration (Prelude.Maybe LoggingConfiguration)
updateLoggingConfiguration_loggingConfiguration :: (Maybe LoggingConfiguration -> f (Maybe LoggingConfiguration))
-> UpdateLoggingConfiguration -> f UpdateLoggingConfiguration
updateLoggingConfiguration_loggingConfiguration = (UpdateLoggingConfiguration -> Maybe LoggingConfiguration)
-> (UpdateLoggingConfiguration
    -> Maybe LoggingConfiguration -> UpdateLoggingConfiguration)
-> Lens
     UpdateLoggingConfiguration
     UpdateLoggingConfiguration
     (Maybe LoggingConfiguration)
     (Maybe LoggingConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLoggingConfiguration' {Maybe LoggingConfiguration
loggingConfiguration :: Maybe LoggingConfiguration
$sel:loggingConfiguration:UpdateLoggingConfiguration' :: UpdateLoggingConfiguration -> Maybe LoggingConfiguration
loggingConfiguration} -> Maybe LoggingConfiguration
loggingConfiguration) (\s :: UpdateLoggingConfiguration
s@UpdateLoggingConfiguration' {} Maybe LoggingConfiguration
a -> UpdateLoggingConfiguration
s {$sel:loggingConfiguration:UpdateLoggingConfiguration' :: Maybe LoggingConfiguration
loggingConfiguration = Maybe LoggingConfiguration
a} :: UpdateLoggingConfiguration)

-- | The descriptive name of the firewall. You can\'t change the name of a
-- firewall after you create it.
--
-- You must specify the ARN or the name, and you can specify both.
updateLoggingConfiguration_firewallName :: Lens.Lens' UpdateLoggingConfiguration (Prelude.Maybe Prelude.Text)
updateLoggingConfiguration_firewallName :: (Maybe Text -> f (Maybe Text))
-> UpdateLoggingConfiguration -> f UpdateLoggingConfiguration
updateLoggingConfiguration_firewallName = (UpdateLoggingConfiguration -> Maybe Text)
-> (UpdateLoggingConfiguration
    -> Maybe Text -> UpdateLoggingConfiguration)
-> Lens
     UpdateLoggingConfiguration
     UpdateLoggingConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLoggingConfiguration' {Maybe Text
firewallName :: Maybe Text
$sel:firewallName:UpdateLoggingConfiguration' :: UpdateLoggingConfiguration -> Maybe Text
firewallName} -> Maybe Text
firewallName) (\s :: UpdateLoggingConfiguration
s@UpdateLoggingConfiguration' {} Maybe Text
a -> UpdateLoggingConfiguration
s {$sel:firewallName:UpdateLoggingConfiguration' :: Maybe Text
firewallName = Maybe Text
a} :: UpdateLoggingConfiguration)

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

instance Prelude.NFData UpdateLoggingConfiguration

instance Core.ToHeaders UpdateLoggingConfiguration where
  toHeaders :: UpdateLoggingConfiguration -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateLoggingConfiguration -> 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
"NetworkFirewall_20201112.UpdateLoggingConfiguration" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON UpdateLoggingConfiguration where
  toJSON :: UpdateLoggingConfiguration -> Value
toJSON UpdateLoggingConfiguration' {Maybe Text
Maybe LoggingConfiguration
firewallName :: Maybe Text
loggingConfiguration :: Maybe LoggingConfiguration
firewallArn :: Maybe Text
$sel:firewallName:UpdateLoggingConfiguration' :: UpdateLoggingConfiguration -> Maybe Text
$sel:loggingConfiguration:UpdateLoggingConfiguration' :: UpdateLoggingConfiguration -> Maybe LoggingConfiguration
$sel:firewallArn:UpdateLoggingConfiguration' :: UpdateLoggingConfiguration -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"FirewallArn" 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
firewallArn,
            (Text
"LoggingConfiguration" Text -> LoggingConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (LoggingConfiguration -> Pair)
-> Maybe LoggingConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LoggingConfiguration
loggingConfiguration,
            (Text
"FirewallName" 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
firewallName
          ]
      )

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

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

-- | /See:/ 'newUpdateLoggingConfigurationResponse' smart constructor.
data UpdateLoggingConfigurationResponse = UpdateLoggingConfigurationResponse'
  { -- | The Amazon Resource Name (ARN) of the firewall.
    UpdateLoggingConfigurationResponse -> Maybe Text
firewallArn :: Prelude.Maybe Prelude.Text,
    UpdateLoggingConfigurationResponse -> Maybe LoggingConfiguration
loggingConfiguration :: Prelude.Maybe LoggingConfiguration,
    -- | The descriptive name of the firewall. You can\'t change the name of a
    -- firewall after you create it.
    UpdateLoggingConfigurationResponse -> Maybe Text
firewallName :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateLoggingConfigurationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateLoggingConfigurationResponse
-> UpdateLoggingConfigurationResponse -> Bool
(UpdateLoggingConfigurationResponse
 -> UpdateLoggingConfigurationResponse -> Bool)
-> (UpdateLoggingConfigurationResponse
    -> UpdateLoggingConfigurationResponse -> Bool)
-> Eq UpdateLoggingConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateLoggingConfigurationResponse
-> UpdateLoggingConfigurationResponse -> Bool
$c/= :: UpdateLoggingConfigurationResponse
-> UpdateLoggingConfigurationResponse -> Bool
== :: UpdateLoggingConfigurationResponse
-> UpdateLoggingConfigurationResponse -> Bool
$c== :: UpdateLoggingConfigurationResponse
-> UpdateLoggingConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [UpdateLoggingConfigurationResponse]
ReadPrec UpdateLoggingConfigurationResponse
Int -> ReadS UpdateLoggingConfigurationResponse
ReadS [UpdateLoggingConfigurationResponse]
(Int -> ReadS UpdateLoggingConfigurationResponse)
-> ReadS [UpdateLoggingConfigurationResponse]
-> ReadPrec UpdateLoggingConfigurationResponse
-> ReadPrec [UpdateLoggingConfigurationResponse]
-> Read UpdateLoggingConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateLoggingConfigurationResponse]
$creadListPrec :: ReadPrec [UpdateLoggingConfigurationResponse]
readPrec :: ReadPrec UpdateLoggingConfigurationResponse
$creadPrec :: ReadPrec UpdateLoggingConfigurationResponse
readList :: ReadS [UpdateLoggingConfigurationResponse]
$creadList :: ReadS [UpdateLoggingConfigurationResponse]
readsPrec :: Int -> ReadS UpdateLoggingConfigurationResponse
$creadsPrec :: Int -> ReadS UpdateLoggingConfigurationResponse
Prelude.Read, Int -> UpdateLoggingConfigurationResponse -> ShowS
[UpdateLoggingConfigurationResponse] -> ShowS
UpdateLoggingConfigurationResponse -> String
(Int -> UpdateLoggingConfigurationResponse -> ShowS)
-> (UpdateLoggingConfigurationResponse -> String)
-> ([UpdateLoggingConfigurationResponse] -> ShowS)
-> Show UpdateLoggingConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateLoggingConfigurationResponse] -> ShowS
$cshowList :: [UpdateLoggingConfigurationResponse] -> ShowS
show :: UpdateLoggingConfigurationResponse -> String
$cshow :: UpdateLoggingConfigurationResponse -> String
showsPrec :: Int -> UpdateLoggingConfigurationResponse -> ShowS
$cshowsPrec :: Int -> UpdateLoggingConfigurationResponse -> ShowS
Prelude.Show, (forall x.
 UpdateLoggingConfigurationResponse
 -> Rep UpdateLoggingConfigurationResponse x)
-> (forall x.
    Rep UpdateLoggingConfigurationResponse x
    -> UpdateLoggingConfigurationResponse)
-> Generic UpdateLoggingConfigurationResponse
forall x.
Rep UpdateLoggingConfigurationResponse x
-> UpdateLoggingConfigurationResponse
forall x.
UpdateLoggingConfigurationResponse
-> Rep UpdateLoggingConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateLoggingConfigurationResponse x
-> UpdateLoggingConfigurationResponse
$cfrom :: forall x.
UpdateLoggingConfigurationResponse
-> Rep UpdateLoggingConfigurationResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateLoggingConfigurationResponse' 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:
--
-- 'firewallArn', 'updateLoggingConfigurationResponse_firewallArn' - The Amazon Resource Name (ARN) of the firewall.
--
-- 'loggingConfiguration', 'updateLoggingConfigurationResponse_loggingConfiguration' - Undocumented member.
--
-- 'firewallName', 'updateLoggingConfigurationResponse_firewallName' - The descriptive name of the firewall. You can\'t change the name of a
-- firewall after you create it.
--
-- 'httpStatus', 'updateLoggingConfigurationResponse_httpStatus' - The response's http status code.
newUpdateLoggingConfigurationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateLoggingConfigurationResponse
newUpdateLoggingConfigurationResponse :: Int -> UpdateLoggingConfigurationResponse
newUpdateLoggingConfigurationResponse Int
pHttpStatus_ =
  UpdateLoggingConfigurationResponse' :: Maybe Text
-> Maybe LoggingConfiguration
-> Maybe Text
-> Int
-> UpdateLoggingConfigurationResponse
UpdateLoggingConfigurationResponse'
    { $sel:firewallArn:UpdateLoggingConfigurationResponse' :: Maybe Text
firewallArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:loggingConfiguration:UpdateLoggingConfigurationResponse' :: Maybe LoggingConfiguration
loggingConfiguration = Maybe LoggingConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:firewallName:UpdateLoggingConfigurationResponse' :: Maybe Text
firewallName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateLoggingConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the firewall.
updateLoggingConfigurationResponse_firewallArn :: Lens.Lens' UpdateLoggingConfigurationResponse (Prelude.Maybe Prelude.Text)
updateLoggingConfigurationResponse_firewallArn :: (Maybe Text -> f (Maybe Text))
-> UpdateLoggingConfigurationResponse
-> f UpdateLoggingConfigurationResponse
updateLoggingConfigurationResponse_firewallArn = (UpdateLoggingConfigurationResponse -> Maybe Text)
-> (UpdateLoggingConfigurationResponse
    -> Maybe Text -> UpdateLoggingConfigurationResponse)
-> Lens
     UpdateLoggingConfigurationResponse
     UpdateLoggingConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLoggingConfigurationResponse' {Maybe Text
firewallArn :: Maybe Text
$sel:firewallArn:UpdateLoggingConfigurationResponse' :: UpdateLoggingConfigurationResponse -> Maybe Text
firewallArn} -> Maybe Text
firewallArn) (\s :: UpdateLoggingConfigurationResponse
s@UpdateLoggingConfigurationResponse' {} Maybe Text
a -> UpdateLoggingConfigurationResponse
s {$sel:firewallArn:UpdateLoggingConfigurationResponse' :: Maybe Text
firewallArn = Maybe Text
a} :: UpdateLoggingConfigurationResponse)

-- | Undocumented member.
updateLoggingConfigurationResponse_loggingConfiguration :: Lens.Lens' UpdateLoggingConfigurationResponse (Prelude.Maybe LoggingConfiguration)
updateLoggingConfigurationResponse_loggingConfiguration :: (Maybe LoggingConfiguration -> f (Maybe LoggingConfiguration))
-> UpdateLoggingConfigurationResponse
-> f UpdateLoggingConfigurationResponse
updateLoggingConfigurationResponse_loggingConfiguration = (UpdateLoggingConfigurationResponse -> Maybe LoggingConfiguration)
-> (UpdateLoggingConfigurationResponse
    -> Maybe LoggingConfiguration
    -> UpdateLoggingConfigurationResponse)
-> Lens
     UpdateLoggingConfigurationResponse
     UpdateLoggingConfigurationResponse
     (Maybe LoggingConfiguration)
     (Maybe LoggingConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLoggingConfigurationResponse' {Maybe LoggingConfiguration
loggingConfiguration :: Maybe LoggingConfiguration
$sel:loggingConfiguration:UpdateLoggingConfigurationResponse' :: UpdateLoggingConfigurationResponse -> Maybe LoggingConfiguration
loggingConfiguration} -> Maybe LoggingConfiguration
loggingConfiguration) (\s :: UpdateLoggingConfigurationResponse
s@UpdateLoggingConfigurationResponse' {} Maybe LoggingConfiguration
a -> UpdateLoggingConfigurationResponse
s {$sel:loggingConfiguration:UpdateLoggingConfigurationResponse' :: Maybe LoggingConfiguration
loggingConfiguration = Maybe LoggingConfiguration
a} :: UpdateLoggingConfigurationResponse)

-- | The descriptive name of the firewall. You can\'t change the name of a
-- firewall after you create it.
updateLoggingConfigurationResponse_firewallName :: Lens.Lens' UpdateLoggingConfigurationResponse (Prelude.Maybe Prelude.Text)
updateLoggingConfigurationResponse_firewallName :: (Maybe Text -> f (Maybe Text))
-> UpdateLoggingConfigurationResponse
-> f UpdateLoggingConfigurationResponse
updateLoggingConfigurationResponse_firewallName = (UpdateLoggingConfigurationResponse -> Maybe Text)
-> (UpdateLoggingConfigurationResponse
    -> Maybe Text -> UpdateLoggingConfigurationResponse)
-> Lens
     UpdateLoggingConfigurationResponse
     UpdateLoggingConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLoggingConfigurationResponse' {Maybe Text
firewallName :: Maybe Text
$sel:firewallName:UpdateLoggingConfigurationResponse' :: UpdateLoggingConfigurationResponse -> Maybe Text
firewallName} -> Maybe Text
firewallName) (\s :: UpdateLoggingConfigurationResponse
s@UpdateLoggingConfigurationResponse' {} Maybe Text
a -> UpdateLoggingConfigurationResponse
s {$sel:firewallName:UpdateLoggingConfigurationResponse' :: Maybe Text
firewallName = Maybe Text
a} :: UpdateLoggingConfigurationResponse)

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

instance
  Prelude.NFData
    UpdateLoggingConfigurationResponse