{-# 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.AuditManager.UpdateSettings
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates Audit Manager settings for the current user account.
module Amazonka.AuditManager.UpdateSettings
  ( -- * Creating a Request
    UpdateSettings (..),
    newUpdateSettings,

    -- * Request Lenses
    updateSettings_defaultAssessmentReportsDestination,
    updateSettings_defaultProcessOwners,
    updateSettings_deregistrationPolicy,
    updateSettings_evidenceFinderEnabled,
    updateSettings_kmsKey,
    updateSettings_snsTopic,

    -- * Destructuring the Response
    UpdateSettingsResponse (..),
    newUpdateSettingsResponse,

    -- * Response Lenses
    updateSettingsResponse_settings,
    updateSettingsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newUpdateSettings' smart constructor.
data UpdateSettings = UpdateSettings'
  { -- | The default storage destination for assessment reports.
    UpdateSettings -> Maybe AssessmentReportsDestination
defaultAssessmentReportsDestination :: Prelude.Maybe AssessmentReportsDestination,
    -- | A list of the default audit owners.
    UpdateSettings -> Maybe [Role]
defaultProcessOwners :: Prelude.Maybe [Role],
    -- | The deregistration policy for your Audit Manager data. You can use this
    -- attribute to determine how your data is handled when you deregister
    -- Audit Manager.
    UpdateSettings -> Maybe DeregistrationPolicy
deregistrationPolicy :: Prelude.Maybe DeregistrationPolicy,
    -- | Specifies whether the evidence finder feature is enabled. Change this
    -- attribute to enable or disable evidence finder.
    --
    -- When you use this attribute to disable evidence finder, Audit Manager
    -- deletes the event data store that’s used to query your evidence data. As
    -- a result, you can’t re-enable evidence finder and use the feature again.
    -- Your only alternative is to
    -- <https://docs.aws.amazon.com/audit-manager/latest/APIReference/API_DeregisterAccount.html deregister>
    -- and then
    -- <https://docs.aws.amazon.com/audit-manager/latest/APIReference/API_RegisterAccount.html re-register>
    -- Audit Manager.
    UpdateSettings -> Maybe Bool
evidenceFinderEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The KMS key details.
    UpdateSettings -> Maybe Text
kmsKey :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Simple Notification Service (Amazon SNS) topic that Audit
    -- Manager sends notifications to.
    UpdateSettings -> Maybe Text
snsTopic :: Prelude.Maybe Prelude.Text
  }
  deriving (UpdateSettings -> UpdateSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateSettings -> UpdateSettings -> Bool
$c/= :: UpdateSettings -> UpdateSettings -> Bool
== :: UpdateSettings -> UpdateSettings -> Bool
$c== :: UpdateSettings -> UpdateSettings -> Bool
Prelude.Eq, ReadPrec [UpdateSettings]
ReadPrec UpdateSettings
Int -> ReadS UpdateSettings
ReadS [UpdateSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateSettings]
$creadListPrec :: ReadPrec [UpdateSettings]
readPrec :: ReadPrec UpdateSettings
$creadPrec :: ReadPrec UpdateSettings
readList :: ReadS [UpdateSettings]
$creadList :: ReadS [UpdateSettings]
readsPrec :: Int -> ReadS UpdateSettings
$creadsPrec :: Int -> ReadS UpdateSettings
Prelude.Read, Int -> UpdateSettings -> ShowS
[UpdateSettings] -> ShowS
UpdateSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateSettings] -> ShowS
$cshowList :: [UpdateSettings] -> ShowS
show :: UpdateSettings -> String
$cshow :: UpdateSettings -> String
showsPrec :: Int -> UpdateSettings -> ShowS
$cshowsPrec :: Int -> UpdateSettings -> ShowS
Prelude.Show, forall x. Rep UpdateSettings x -> UpdateSettings
forall x. UpdateSettings -> Rep UpdateSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateSettings x -> UpdateSettings
$cfrom :: forall x. UpdateSettings -> Rep UpdateSettings x
Prelude.Generic)

-- |
-- Create a value of 'UpdateSettings' 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:
--
-- 'defaultAssessmentReportsDestination', 'updateSettings_defaultAssessmentReportsDestination' - The default storage destination for assessment reports.
--
-- 'defaultProcessOwners', 'updateSettings_defaultProcessOwners' - A list of the default audit owners.
--
-- 'deregistrationPolicy', 'updateSettings_deregistrationPolicy' - The deregistration policy for your Audit Manager data. You can use this
-- attribute to determine how your data is handled when you deregister
-- Audit Manager.
--
-- 'evidenceFinderEnabled', 'updateSettings_evidenceFinderEnabled' - Specifies whether the evidence finder feature is enabled. Change this
-- attribute to enable or disable evidence finder.
--
-- When you use this attribute to disable evidence finder, Audit Manager
-- deletes the event data store that’s used to query your evidence data. As
-- a result, you can’t re-enable evidence finder and use the feature again.
-- Your only alternative is to
-- <https://docs.aws.amazon.com/audit-manager/latest/APIReference/API_DeregisterAccount.html deregister>
-- and then
-- <https://docs.aws.amazon.com/audit-manager/latest/APIReference/API_RegisterAccount.html re-register>
-- Audit Manager.
--
-- 'kmsKey', 'updateSettings_kmsKey' - The KMS key details.
--
-- 'snsTopic', 'updateSettings_snsTopic' - The Amazon Simple Notification Service (Amazon SNS) topic that Audit
-- Manager sends notifications to.
newUpdateSettings ::
  UpdateSettings
newUpdateSettings :: UpdateSettings
newUpdateSettings =
  UpdateSettings'
    { $sel:defaultAssessmentReportsDestination:UpdateSettings' :: Maybe AssessmentReportsDestination
defaultAssessmentReportsDestination =
        forall a. Maybe a
Prelude.Nothing,
      $sel:defaultProcessOwners:UpdateSettings' :: Maybe [Role]
defaultProcessOwners = forall a. Maybe a
Prelude.Nothing,
      $sel:deregistrationPolicy:UpdateSettings' :: Maybe DeregistrationPolicy
deregistrationPolicy = forall a. Maybe a
Prelude.Nothing,
      $sel:evidenceFinderEnabled:UpdateSettings' :: Maybe Bool
evidenceFinderEnabled = forall a. Maybe a
Prelude.Nothing,
      $sel:kmsKey:UpdateSettings' :: Maybe Text
kmsKey = forall a. Maybe a
Prelude.Nothing,
      $sel:snsTopic:UpdateSettings' :: Maybe Text
snsTopic = forall a. Maybe a
Prelude.Nothing
    }

-- | The default storage destination for assessment reports.
updateSettings_defaultAssessmentReportsDestination :: Lens.Lens' UpdateSettings (Prelude.Maybe AssessmentReportsDestination)
updateSettings_defaultAssessmentReportsDestination :: Lens' UpdateSettings (Maybe AssessmentReportsDestination)
updateSettings_defaultAssessmentReportsDestination = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSettings' {Maybe AssessmentReportsDestination
defaultAssessmentReportsDestination :: Maybe AssessmentReportsDestination
$sel:defaultAssessmentReportsDestination:UpdateSettings' :: UpdateSettings -> Maybe AssessmentReportsDestination
defaultAssessmentReportsDestination} -> Maybe AssessmentReportsDestination
defaultAssessmentReportsDestination) (\s :: UpdateSettings
s@UpdateSettings' {} Maybe AssessmentReportsDestination
a -> UpdateSettings
s {$sel:defaultAssessmentReportsDestination:UpdateSettings' :: Maybe AssessmentReportsDestination
defaultAssessmentReportsDestination = Maybe AssessmentReportsDestination
a} :: UpdateSettings)

-- | A list of the default audit owners.
updateSettings_defaultProcessOwners :: Lens.Lens' UpdateSettings (Prelude.Maybe [Role])
updateSettings_defaultProcessOwners :: Lens' UpdateSettings (Maybe [Role])
updateSettings_defaultProcessOwners = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSettings' {Maybe [Role]
defaultProcessOwners :: Maybe [Role]
$sel:defaultProcessOwners:UpdateSettings' :: UpdateSettings -> Maybe [Role]
defaultProcessOwners} -> Maybe [Role]
defaultProcessOwners) (\s :: UpdateSettings
s@UpdateSettings' {} Maybe [Role]
a -> UpdateSettings
s {$sel:defaultProcessOwners:UpdateSettings' :: Maybe [Role]
defaultProcessOwners = Maybe [Role]
a} :: UpdateSettings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The deregistration policy for your Audit Manager data. You can use this
-- attribute to determine how your data is handled when you deregister
-- Audit Manager.
updateSettings_deregistrationPolicy :: Lens.Lens' UpdateSettings (Prelude.Maybe DeregistrationPolicy)
updateSettings_deregistrationPolicy :: Lens' UpdateSettings (Maybe DeregistrationPolicy)
updateSettings_deregistrationPolicy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSettings' {Maybe DeregistrationPolicy
deregistrationPolicy :: Maybe DeregistrationPolicy
$sel:deregistrationPolicy:UpdateSettings' :: UpdateSettings -> Maybe DeregistrationPolicy
deregistrationPolicy} -> Maybe DeregistrationPolicy
deregistrationPolicy) (\s :: UpdateSettings
s@UpdateSettings' {} Maybe DeregistrationPolicy
a -> UpdateSettings
s {$sel:deregistrationPolicy:UpdateSettings' :: Maybe DeregistrationPolicy
deregistrationPolicy = Maybe DeregistrationPolicy
a} :: UpdateSettings)

-- | Specifies whether the evidence finder feature is enabled. Change this
-- attribute to enable or disable evidence finder.
--
-- When you use this attribute to disable evidence finder, Audit Manager
-- deletes the event data store that’s used to query your evidence data. As
-- a result, you can’t re-enable evidence finder and use the feature again.
-- Your only alternative is to
-- <https://docs.aws.amazon.com/audit-manager/latest/APIReference/API_DeregisterAccount.html deregister>
-- and then
-- <https://docs.aws.amazon.com/audit-manager/latest/APIReference/API_RegisterAccount.html re-register>
-- Audit Manager.
updateSettings_evidenceFinderEnabled :: Lens.Lens' UpdateSettings (Prelude.Maybe Prelude.Bool)
updateSettings_evidenceFinderEnabled :: Lens' UpdateSettings (Maybe Bool)
updateSettings_evidenceFinderEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSettings' {Maybe Bool
evidenceFinderEnabled :: Maybe Bool
$sel:evidenceFinderEnabled:UpdateSettings' :: UpdateSettings -> Maybe Bool
evidenceFinderEnabled} -> Maybe Bool
evidenceFinderEnabled) (\s :: UpdateSettings
s@UpdateSettings' {} Maybe Bool
a -> UpdateSettings
s {$sel:evidenceFinderEnabled:UpdateSettings' :: Maybe Bool
evidenceFinderEnabled = Maybe Bool
a} :: UpdateSettings)

-- | The KMS key details.
updateSettings_kmsKey :: Lens.Lens' UpdateSettings (Prelude.Maybe Prelude.Text)
updateSettings_kmsKey :: Lens' UpdateSettings (Maybe Text)
updateSettings_kmsKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSettings' {Maybe Text
kmsKey :: Maybe Text
$sel:kmsKey:UpdateSettings' :: UpdateSettings -> Maybe Text
kmsKey} -> Maybe Text
kmsKey) (\s :: UpdateSettings
s@UpdateSettings' {} Maybe Text
a -> UpdateSettings
s {$sel:kmsKey:UpdateSettings' :: Maybe Text
kmsKey = Maybe Text
a} :: UpdateSettings)

-- | The Amazon Simple Notification Service (Amazon SNS) topic that Audit
-- Manager sends notifications to.
updateSettings_snsTopic :: Lens.Lens' UpdateSettings (Prelude.Maybe Prelude.Text)
updateSettings_snsTopic :: Lens' UpdateSettings (Maybe Text)
updateSettings_snsTopic = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSettings' {Maybe Text
snsTopic :: Maybe Text
$sel:snsTopic:UpdateSettings' :: UpdateSettings -> Maybe Text
snsTopic} -> Maybe Text
snsTopic) (\s :: UpdateSettings
s@UpdateSettings' {} Maybe Text
a -> UpdateSettings
s {$sel:snsTopic:UpdateSettings' :: Maybe Text
snsTopic = Maybe Text
a} :: UpdateSettings)

instance Core.AWSRequest UpdateSettings where
  type
    AWSResponse UpdateSettings =
      UpdateSettingsResponse
  request :: (Service -> Service) -> UpdateSettings -> Request UpdateSettings
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateSettings
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateSettings)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Settings -> Int -> UpdateSettingsResponse
UpdateSettingsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"settings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable UpdateSettings where
  hashWithSalt :: Int -> UpdateSettings -> Int
hashWithSalt Int
_salt UpdateSettings' {Maybe Bool
Maybe [Role]
Maybe Text
Maybe AssessmentReportsDestination
Maybe DeregistrationPolicy
snsTopic :: Maybe Text
kmsKey :: Maybe Text
evidenceFinderEnabled :: Maybe Bool
deregistrationPolicy :: Maybe DeregistrationPolicy
defaultProcessOwners :: Maybe [Role]
defaultAssessmentReportsDestination :: Maybe AssessmentReportsDestination
$sel:snsTopic:UpdateSettings' :: UpdateSettings -> Maybe Text
$sel:kmsKey:UpdateSettings' :: UpdateSettings -> Maybe Text
$sel:evidenceFinderEnabled:UpdateSettings' :: UpdateSettings -> Maybe Bool
$sel:deregistrationPolicy:UpdateSettings' :: UpdateSettings -> Maybe DeregistrationPolicy
$sel:defaultProcessOwners:UpdateSettings' :: UpdateSettings -> Maybe [Role]
$sel:defaultAssessmentReportsDestination:UpdateSettings' :: UpdateSettings -> Maybe AssessmentReportsDestination
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AssessmentReportsDestination
defaultAssessmentReportsDestination
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Role]
defaultProcessOwners
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DeregistrationPolicy
deregistrationPolicy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
evidenceFinderEnabled
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
kmsKey
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
snsTopic

instance Prelude.NFData UpdateSettings where
  rnf :: UpdateSettings -> ()
rnf UpdateSettings' {Maybe Bool
Maybe [Role]
Maybe Text
Maybe AssessmentReportsDestination
Maybe DeregistrationPolicy
snsTopic :: Maybe Text
kmsKey :: Maybe Text
evidenceFinderEnabled :: Maybe Bool
deregistrationPolicy :: Maybe DeregistrationPolicy
defaultProcessOwners :: Maybe [Role]
defaultAssessmentReportsDestination :: Maybe AssessmentReportsDestination
$sel:snsTopic:UpdateSettings' :: UpdateSettings -> Maybe Text
$sel:kmsKey:UpdateSettings' :: UpdateSettings -> Maybe Text
$sel:evidenceFinderEnabled:UpdateSettings' :: UpdateSettings -> Maybe Bool
$sel:deregistrationPolicy:UpdateSettings' :: UpdateSettings -> Maybe DeregistrationPolicy
$sel:defaultProcessOwners:UpdateSettings' :: UpdateSettings -> Maybe [Role]
$sel:defaultAssessmentReportsDestination:UpdateSettings' :: UpdateSettings -> Maybe AssessmentReportsDestination
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AssessmentReportsDestination
defaultAssessmentReportsDestination
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Role]
defaultProcessOwners
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DeregistrationPolicy
deregistrationPolicy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
evidenceFinderEnabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
kmsKey
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
snsTopic

instance Data.ToHeaders UpdateSettings where
  toHeaders :: UpdateSettings -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON UpdateSettings where
  toJSON :: UpdateSettings -> Value
toJSON UpdateSettings' {Maybe Bool
Maybe [Role]
Maybe Text
Maybe AssessmentReportsDestination
Maybe DeregistrationPolicy
snsTopic :: Maybe Text
kmsKey :: Maybe Text
evidenceFinderEnabled :: Maybe Bool
deregistrationPolicy :: Maybe DeregistrationPolicy
defaultProcessOwners :: Maybe [Role]
defaultAssessmentReportsDestination :: Maybe AssessmentReportsDestination
$sel:snsTopic:UpdateSettings' :: UpdateSettings -> Maybe Text
$sel:kmsKey:UpdateSettings' :: UpdateSettings -> Maybe Text
$sel:evidenceFinderEnabled:UpdateSettings' :: UpdateSettings -> Maybe Bool
$sel:deregistrationPolicy:UpdateSettings' :: UpdateSettings -> Maybe DeregistrationPolicy
$sel:defaultProcessOwners:UpdateSettings' :: UpdateSettings -> Maybe [Role]
$sel:defaultAssessmentReportsDestination:UpdateSettings' :: UpdateSettings -> Maybe AssessmentReportsDestination
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"defaultAssessmentReportsDestination" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AssessmentReportsDestination
defaultAssessmentReportsDestination,
            (Key
"defaultProcessOwners" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Role]
defaultProcessOwners,
            (Key
"deregistrationPolicy" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DeregistrationPolicy
deregistrationPolicy,
            (Key
"evidenceFinderEnabled" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
evidenceFinderEnabled,
            (Key
"kmsKey" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
kmsKey,
            (Key
"snsTopic" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
snsTopic
          ]
      )

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

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

-- | /See:/ 'newUpdateSettingsResponse' smart constructor.
data UpdateSettingsResponse = UpdateSettingsResponse'
  { -- | The current list of settings.
    UpdateSettingsResponse -> Maybe Settings
settings :: Prelude.Maybe Settings,
    -- | The response's http status code.
    UpdateSettingsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateSettingsResponse -> UpdateSettingsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateSettingsResponse -> UpdateSettingsResponse -> Bool
$c/= :: UpdateSettingsResponse -> UpdateSettingsResponse -> Bool
== :: UpdateSettingsResponse -> UpdateSettingsResponse -> Bool
$c== :: UpdateSettingsResponse -> UpdateSettingsResponse -> Bool
Prelude.Eq, ReadPrec [UpdateSettingsResponse]
ReadPrec UpdateSettingsResponse
Int -> ReadS UpdateSettingsResponse
ReadS [UpdateSettingsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateSettingsResponse]
$creadListPrec :: ReadPrec [UpdateSettingsResponse]
readPrec :: ReadPrec UpdateSettingsResponse
$creadPrec :: ReadPrec UpdateSettingsResponse
readList :: ReadS [UpdateSettingsResponse]
$creadList :: ReadS [UpdateSettingsResponse]
readsPrec :: Int -> ReadS UpdateSettingsResponse
$creadsPrec :: Int -> ReadS UpdateSettingsResponse
Prelude.Read, Int -> UpdateSettingsResponse -> ShowS
[UpdateSettingsResponse] -> ShowS
UpdateSettingsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateSettingsResponse] -> ShowS
$cshowList :: [UpdateSettingsResponse] -> ShowS
show :: UpdateSettingsResponse -> String
$cshow :: UpdateSettingsResponse -> String
showsPrec :: Int -> UpdateSettingsResponse -> ShowS
$cshowsPrec :: Int -> UpdateSettingsResponse -> ShowS
Prelude.Show, forall x. Rep UpdateSettingsResponse x -> UpdateSettingsResponse
forall x. UpdateSettingsResponse -> Rep UpdateSettingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateSettingsResponse x -> UpdateSettingsResponse
$cfrom :: forall x. UpdateSettingsResponse -> Rep UpdateSettingsResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateSettingsResponse' 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:
--
-- 'settings', 'updateSettingsResponse_settings' - The current list of settings.
--
-- 'httpStatus', 'updateSettingsResponse_httpStatus' - The response's http status code.
newUpdateSettingsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateSettingsResponse
newUpdateSettingsResponse :: Int -> UpdateSettingsResponse
newUpdateSettingsResponse Int
pHttpStatus_ =
  UpdateSettingsResponse'
    { $sel:settings:UpdateSettingsResponse' :: Maybe Settings
settings = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateSettingsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The current list of settings.
updateSettingsResponse_settings :: Lens.Lens' UpdateSettingsResponse (Prelude.Maybe Settings)
updateSettingsResponse_settings :: Lens' UpdateSettingsResponse (Maybe Settings)
updateSettingsResponse_settings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSettingsResponse' {Maybe Settings
settings :: Maybe Settings
$sel:settings:UpdateSettingsResponse' :: UpdateSettingsResponse -> Maybe Settings
settings} -> Maybe Settings
settings) (\s :: UpdateSettingsResponse
s@UpdateSettingsResponse' {} Maybe Settings
a -> UpdateSettingsResponse
s {$sel:settings:UpdateSettingsResponse' :: Maybe Settings
settings = Maybe Settings
a} :: UpdateSettingsResponse)

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

instance Prelude.NFData UpdateSettingsResponse where
  rnf :: UpdateSettingsResponse -> ()
rnf UpdateSettingsResponse' {Int
Maybe Settings
httpStatus :: Int
settings :: Maybe Settings
$sel:httpStatus:UpdateSettingsResponse' :: UpdateSettingsResponse -> Int
$sel:settings:UpdateSettingsResponse' :: UpdateSettingsResponse -> Maybe Settings
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Settings
settings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus