{-# 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.CloudFront.UpdateFieldLevelEncryptionConfig
-- 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)
--
-- Update a field-level encryption configuration.
module Amazonka.CloudFront.UpdateFieldLevelEncryptionConfig
  ( -- * Creating a Request
    UpdateFieldLevelEncryptionConfig (..),
    newUpdateFieldLevelEncryptionConfig,

    -- * Request Lenses
    updateFieldLevelEncryptionConfig_ifMatch,
    updateFieldLevelEncryptionConfig_fieldLevelEncryptionConfig,
    updateFieldLevelEncryptionConfig_id,

    -- * Destructuring the Response
    UpdateFieldLevelEncryptionConfigResponse (..),
    newUpdateFieldLevelEncryptionConfigResponse,

    -- * Response Lenses
    updateFieldLevelEncryptionConfigResponse_eTag,
    updateFieldLevelEncryptionConfigResponse_fieldLevelEncryption,
    updateFieldLevelEncryptionConfigResponse_httpStatus,
  )
where

import Amazonka.CloudFront.Types
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

-- | /See:/ 'newUpdateFieldLevelEncryptionConfig' smart constructor.
data UpdateFieldLevelEncryptionConfig = UpdateFieldLevelEncryptionConfig'
  { -- | The value of the @ETag@ header that you received when retrieving the
    -- configuration identity to update. For example: @E2QWRUHAPOMQZL@.
    UpdateFieldLevelEncryptionConfig -> Maybe Text
ifMatch :: Prelude.Maybe Prelude.Text,
    -- | Request to update a field-level encryption configuration.
    UpdateFieldLevelEncryptionConfig -> FieldLevelEncryptionConfig
fieldLevelEncryptionConfig :: FieldLevelEncryptionConfig,
    -- | The ID of the configuration you want to update.
    UpdateFieldLevelEncryptionConfig -> Text
id :: Prelude.Text
  }
  deriving (UpdateFieldLevelEncryptionConfig
-> UpdateFieldLevelEncryptionConfig -> Bool
(UpdateFieldLevelEncryptionConfig
 -> UpdateFieldLevelEncryptionConfig -> Bool)
-> (UpdateFieldLevelEncryptionConfig
    -> UpdateFieldLevelEncryptionConfig -> Bool)
-> Eq UpdateFieldLevelEncryptionConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateFieldLevelEncryptionConfig
-> UpdateFieldLevelEncryptionConfig -> Bool
$c/= :: UpdateFieldLevelEncryptionConfig
-> UpdateFieldLevelEncryptionConfig -> Bool
== :: UpdateFieldLevelEncryptionConfig
-> UpdateFieldLevelEncryptionConfig -> Bool
$c== :: UpdateFieldLevelEncryptionConfig
-> UpdateFieldLevelEncryptionConfig -> Bool
Prelude.Eq, ReadPrec [UpdateFieldLevelEncryptionConfig]
ReadPrec UpdateFieldLevelEncryptionConfig
Int -> ReadS UpdateFieldLevelEncryptionConfig
ReadS [UpdateFieldLevelEncryptionConfig]
(Int -> ReadS UpdateFieldLevelEncryptionConfig)
-> ReadS [UpdateFieldLevelEncryptionConfig]
-> ReadPrec UpdateFieldLevelEncryptionConfig
-> ReadPrec [UpdateFieldLevelEncryptionConfig]
-> Read UpdateFieldLevelEncryptionConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateFieldLevelEncryptionConfig]
$creadListPrec :: ReadPrec [UpdateFieldLevelEncryptionConfig]
readPrec :: ReadPrec UpdateFieldLevelEncryptionConfig
$creadPrec :: ReadPrec UpdateFieldLevelEncryptionConfig
readList :: ReadS [UpdateFieldLevelEncryptionConfig]
$creadList :: ReadS [UpdateFieldLevelEncryptionConfig]
readsPrec :: Int -> ReadS UpdateFieldLevelEncryptionConfig
$creadsPrec :: Int -> ReadS UpdateFieldLevelEncryptionConfig
Prelude.Read, Int -> UpdateFieldLevelEncryptionConfig -> ShowS
[UpdateFieldLevelEncryptionConfig] -> ShowS
UpdateFieldLevelEncryptionConfig -> String
(Int -> UpdateFieldLevelEncryptionConfig -> ShowS)
-> (UpdateFieldLevelEncryptionConfig -> String)
-> ([UpdateFieldLevelEncryptionConfig] -> ShowS)
-> Show UpdateFieldLevelEncryptionConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateFieldLevelEncryptionConfig] -> ShowS
$cshowList :: [UpdateFieldLevelEncryptionConfig] -> ShowS
show :: UpdateFieldLevelEncryptionConfig -> String
$cshow :: UpdateFieldLevelEncryptionConfig -> String
showsPrec :: Int -> UpdateFieldLevelEncryptionConfig -> ShowS
$cshowsPrec :: Int -> UpdateFieldLevelEncryptionConfig -> ShowS
Prelude.Show, (forall x.
 UpdateFieldLevelEncryptionConfig
 -> Rep UpdateFieldLevelEncryptionConfig x)
-> (forall x.
    Rep UpdateFieldLevelEncryptionConfig x
    -> UpdateFieldLevelEncryptionConfig)
-> Generic UpdateFieldLevelEncryptionConfig
forall x.
Rep UpdateFieldLevelEncryptionConfig x
-> UpdateFieldLevelEncryptionConfig
forall x.
UpdateFieldLevelEncryptionConfig
-> Rep UpdateFieldLevelEncryptionConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateFieldLevelEncryptionConfig x
-> UpdateFieldLevelEncryptionConfig
$cfrom :: forall x.
UpdateFieldLevelEncryptionConfig
-> Rep UpdateFieldLevelEncryptionConfig x
Prelude.Generic)

-- |
-- Create a value of 'UpdateFieldLevelEncryptionConfig' 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:
--
-- 'ifMatch', 'updateFieldLevelEncryptionConfig_ifMatch' - The value of the @ETag@ header that you received when retrieving the
-- configuration identity to update. For example: @E2QWRUHAPOMQZL@.
--
-- 'fieldLevelEncryptionConfig', 'updateFieldLevelEncryptionConfig_fieldLevelEncryptionConfig' - Request to update a field-level encryption configuration.
--
-- 'id', 'updateFieldLevelEncryptionConfig_id' - The ID of the configuration you want to update.
newUpdateFieldLevelEncryptionConfig ::
  -- | 'fieldLevelEncryptionConfig'
  FieldLevelEncryptionConfig ->
  -- | 'id'
  Prelude.Text ->
  UpdateFieldLevelEncryptionConfig
newUpdateFieldLevelEncryptionConfig :: FieldLevelEncryptionConfig
-> Text -> UpdateFieldLevelEncryptionConfig
newUpdateFieldLevelEncryptionConfig
  FieldLevelEncryptionConfig
pFieldLevelEncryptionConfig_
  Text
pId_ =
    UpdateFieldLevelEncryptionConfig' :: Maybe Text
-> FieldLevelEncryptionConfig
-> Text
-> UpdateFieldLevelEncryptionConfig
UpdateFieldLevelEncryptionConfig'
      { $sel:ifMatch:UpdateFieldLevelEncryptionConfig' :: Maybe Text
ifMatch =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:fieldLevelEncryptionConfig:UpdateFieldLevelEncryptionConfig' :: FieldLevelEncryptionConfig
fieldLevelEncryptionConfig =
          FieldLevelEncryptionConfig
pFieldLevelEncryptionConfig_,
        $sel:id:UpdateFieldLevelEncryptionConfig' :: Text
id = Text
pId_
      }

-- | The value of the @ETag@ header that you received when retrieving the
-- configuration identity to update. For example: @E2QWRUHAPOMQZL@.
updateFieldLevelEncryptionConfig_ifMatch :: Lens.Lens' UpdateFieldLevelEncryptionConfig (Prelude.Maybe Prelude.Text)
updateFieldLevelEncryptionConfig_ifMatch :: (Maybe Text -> f (Maybe Text))
-> UpdateFieldLevelEncryptionConfig
-> f UpdateFieldLevelEncryptionConfig
updateFieldLevelEncryptionConfig_ifMatch = (UpdateFieldLevelEncryptionConfig -> Maybe Text)
-> (UpdateFieldLevelEncryptionConfig
    -> Maybe Text -> UpdateFieldLevelEncryptionConfig)
-> Lens
     UpdateFieldLevelEncryptionConfig
     UpdateFieldLevelEncryptionConfig
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFieldLevelEncryptionConfig' {Maybe Text
ifMatch :: Maybe Text
$sel:ifMatch:UpdateFieldLevelEncryptionConfig' :: UpdateFieldLevelEncryptionConfig -> Maybe Text
ifMatch} -> Maybe Text
ifMatch) (\s :: UpdateFieldLevelEncryptionConfig
s@UpdateFieldLevelEncryptionConfig' {} Maybe Text
a -> UpdateFieldLevelEncryptionConfig
s {$sel:ifMatch:UpdateFieldLevelEncryptionConfig' :: Maybe Text
ifMatch = Maybe Text
a} :: UpdateFieldLevelEncryptionConfig)

-- | Request to update a field-level encryption configuration.
updateFieldLevelEncryptionConfig_fieldLevelEncryptionConfig :: Lens.Lens' UpdateFieldLevelEncryptionConfig FieldLevelEncryptionConfig
updateFieldLevelEncryptionConfig_fieldLevelEncryptionConfig :: (FieldLevelEncryptionConfig -> f FieldLevelEncryptionConfig)
-> UpdateFieldLevelEncryptionConfig
-> f UpdateFieldLevelEncryptionConfig
updateFieldLevelEncryptionConfig_fieldLevelEncryptionConfig = (UpdateFieldLevelEncryptionConfig -> FieldLevelEncryptionConfig)
-> (UpdateFieldLevelEncryptionConfig
    -> FieldLevelEncryptionConfig -> UpdateFieldLevelEncryptionConfig)
-> Lens
     UpdateFieldLevelEncryptionConfig
     UpdateFieldLevelEncryptionConfig
     FieldLevelEncryptionConfig
     FieldLevelEncryptionConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFieldLevelEncryptionConfig' {FieldLevelEncryptionConfig
fieldLevelEncryptionConfig :: FieldLevelEncryptionConfig
$sel:fieldLevelEncryptionConfig:UpdateFieldLevelEncryptionConfig' :: UpdateFieldLevelEncryptionConfig -> FieldLevelEncryptionConfig
fieldLevelEncryptionConfig} -> FieldLevelEncryptionConfig
fieldLevelEncryptionConfig) (\s :: UpdateFieldLevelEncryptionConfig
s@UpdateFieldLevelEncryptionConfig' {} FieldLevelEncryptionConfig
a -> UpdateFieldLevelEncryptionConfig
s {$sel:fieldLevelEncryptionConfig:UpdateFieldLevelEncryptionConfig' :: FieldLevelEncryptionConfig
fieldLevelEncryptionConfig = FieldLevelEncryptionConfig
a} :: UpdateFieldLevelEncryptionConfig)

-- | The ID of the configuration you want to update.
updateFieldLevelEncryptionConfig_id :: Lens.Lens' UpdateFieldLevelEncryptionConfig Prelude.Text
updateFieldLevelEncryptionConfig_id :: (Text -> f Text)
-> UpdateFieldLevelEncryptionConfig
-> f UpdateFieldLevelEncryptionConfig
updateFieldLevelEncryptionConfig_id = (UpdateFieldLevelEncryptionConfig -> Text)
-> (UpdateFieldLevelEncryptionConfig
    -> Text -> UpdateFieldLevelEncryptionConfig)
-> Lens
     UpdateFieldLevelEncryptionConfig
     UpdateFieldLevelEncryptionConfig
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFieldLevelEncryptionConfig' {Text
id :: Text
$sel:id:UpdateFieldLevelEncryptionConfig' :: UpdateFieldLevelEncryptionConfig -> Text
id} -> Text
id) (\s :: UpdateFieldLevelEncryptionConfig
s@UpdateFieldLevelEncryptionConfig' {} Text
a -> UpdateFieldLevelEncryptionConfig
s {$sel:id:UpdateFieldLevelEncryptionConfig' :: Text
id = Text
a} :: UpdateFieldLevelEncryptionConfig)

instance
  Core.AWSRequest
    UpdateFieldLevelEncryptionConfig
  where
  type
    AWSResponse UpdateFieldLevelEncryptionConfig =
      UpdateFieldLevelEncryptionConfigResponse
  request :: UpdateFieldLevelEncryptionConfig
-> Request UpdateFieldLevelEncryptionConfig
request = Service
-> UpdateFieldLevelEncryptionConfig
-> Request UpdateFieldLevelEncryptionConfig
forall a. (ToRequest a, ToElement a) => Service -> a -> Request a
Request.putXML Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateFieldLevelEncryptionConfig
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse UpdateFieldLevelEncryptionConfig)))
response =
    (Int
 -> ResponseHeaders
 -> [Node]
 -> Either String (AWSResponse UpdateFieldLevelEncryptionConfig))
-> Logger
-> Service
-> Proxy UpdateFieldLevelEncryptionConfig
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse UpdateFieldLevelEncryptionConfig)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe FieldLevelEncryption
-> Int
-> UpdateFieldLevelEncryptionConfigResponse
UpdateFieldLevelEncryptionConfigResponse'
            (Maybe Text
 -> Maybe FieldLevelEncryption
 -> Int
 -> UpdateFieldLevelEncryptionConfigResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe FieldLevelEncryption
      -> Int -> UpdateFieldLevelEncryptionConfigResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"ETag")
            Either
  String
  (Maybe FieldLevelEncryption
   -> Int -> UpdateFieldLevelEncryptionConfigResponse)
-> Either String (Maybe FieldLevelEncryption)
-> Either String (Int -> UpdateFieldLevelEncryptionConfigResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node] -> Either String (Maybe FieldLevelEncryption)
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)
            Either String (Int -> UpdateFieldLevelEncryptionConfigResponse)
-> Either String Int
-> Either String UpdateFieldLevelEncryptionConfigResponse
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
    UpdateFieldLevelEncryptionConfig

instance
  Prelude.NFData
    UpdateFieldLevelEncryptionConfig

instance
  Core.ToElement
    UpdateFieldLevelEncryptionConfig
  where
  toElement :: UpdateFieldLevelEncryptionConfig -> Element
toElement UpdateFieldLevelEncryptionConfig' {Maybe Text
Text
FieldLevelEncryptionConfig
id :: Text
fieldLevelEncryptionConfig :: FieldLevelEncryptionConfig
ifMatch :: Maybe Text
$sel:id:UpdateFieldLevelEncryptionConfig' :: UpdateFieldLevelEncryptionConfig -> Text
$sel:fieldLevelEncryptionConfig:UpdateFieldLevelEncryptionConfig' :: UpdateFieldLevelEncryptionConfig -> FieldLevelEncryptionConfig
$sel:ifMatch:UpdateFieldLevelEncryptionConfig' :: UpdateFieldLevelEncryptionConfig -> Maybe Text
..} =
    Name -> FieldLevelEncryptionConfig -> Element
forall a. ToXML a => Name -> a -> Element
Core.mkElement
      Name
"{http://cloudfront.amazonaws.com/doc/2020-05-31/}FieldLevelEncryptionConfig"
      FieldLevelEncryptionConfig
fieldLevelEncryptionConfig

instance
  Core.ToHeaders
    UpdateFieldLevelEncryptionConfig
  where
  toHeaders :: UpdateFieldLevelEncryptionConfig -> ResponseHeaders
toHeaders UpdateFieldLevelEncryptionConfig' {Maybe Text
Text
FieldLevelEncryptionConfig
id :: Text
fieldLevelEncryptionConfig :: FieldLevelEncryptionConfig
ifMatch :: Maybe Text
$sel:id:UpdateFieldLevelEncryptionConfig' :: UpdateFieldLevelEncryptionConfig -> Text
$sel:fieldLevelEncryptionConfig:UpdateFieldLevelEncryptionConfig' :: UpdateFieldLevelEncryptionConfig -> FieldLevelEncryptionConfig
$sel:ifMatch:UpdateFieldLevelEncryptionConfig' :: UpdateFieldLevelEncryptionConfig -> Maybe Text
..} =
    [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat [HeaderName
"If-Match" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
ifMatch]

instance Core.ToPath UpdateFieldLevelEncryptionConfig where
  toPath :: UpdateFieldLevelEncryptionConfig -> ByteString
toPath UpdateFieldLevelEncryptionConfig' {Maybe Text
Text
FieldLevelEncryptionConfig
id :: Text
fieldLevelEncryptionConfig :: FieldLevelEncryptionConfig
ifMatch :: Maybe Text
$sel:id:UpdateFieldLevelEncryptionConfig' :: UpdateFieldLevelEncryptionConfig -> Text
$sel:fieldLevelEncryptionConfig:UpdateFieldLevelEncryptionConfig' :: UpdateFieldLevelEncryptionConfig -> FieldLevelEncryptionConfig
$sel:ifMatch:UpdateFieldLevelEncryptionConfig' :: UpdateFieldLevelEncryptionConfig -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/2020-05-31/field-level-encryption/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
id,
        ByteString
"/config"
      ]

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

-- | /See:/ 'newUpdateFieldLevelEncryptionConfigResponse' smart constructor.
data UpdateFieldLevelEncryptionConfigResponse = UpdateFieldLevelEncryptionConfigResponse'
  { -- | The value of the @ETag@ header that you received when updating the
    -- configuration. For example: @E2QWRUHAPOMQZL@.
    UpdateFieldLevelEncryptionConfigResponse -> Maybe Text
eTag :: Prelude.Maybe Prelude.Text,
    -- | Return the results of updating the configuration.
    UpdateFieldLevelEncryptionConfigResponse
-> Maybe FieldLevelEncryption
fieldLevelEncryption :: Prelude.Maybe FieldLevelEncryption,
    -- | The response's http status code.
    UpdateFieldLevelEncryptionConfigResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateFieldLevelEncryptionConfigResponse
-> UpdateFieldLevelEncryptionConfigResponse -> Bool
(UpdateFieldLevelEncryptionConfigResponse
 -> UpdateFieldLevelEncryptionConfigResponse -> Bool)
-> (UpdateFieldLevelEncryptionConfigResponse
    -> UpdateFieldLevelEncryptionConfigResponse -> Bool)
-> Eq UpdateFieldLevelEncryptionConfigResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateFieldLevelEncryptionConfigResponse
-> UpdateFieldLevelEncryptionConfigResponse -> Bool
$c/= :: UpdateFieldLevelEncryptionConfigResponse
-> UpdateFieldLevelEncryptionConfigResponse -> Bool
== :: UpdateFieldLevelEncryptionConfigResponse
-> UpdateFieldLevelEncryptionConfigResponse -> Bool
$c== :: UpdateFieldLevelEncryptionConfigResponse
-> UpdateFieldLevelEncryptionConfigResponse -> Bool
Prelude.Eq, ReadPrec [UpdateFieldLevelEncryptionConfigResponse]
ReadPrec UpdateFieldLevelEncryptionConfigResponse
Int -> ReadS UpdateFieldLevelEncryptionConfigResponse
ReadS [UpdateFieldLevelEncryptionConfigResponse]
(Int -> ReadS UpdateFieldLevelEncryptionConfigResponse)
-> ReadS [UpdateFieldLevelEncryptionConfigResponse]
-> ReadPrec UpdateFieldLevelEncryptionConfigResponse
-> ReadPrec [UpdateFieldLevelEncryptionConfigResponse]
-> Read UpdateFieldLevelEncryptionConfigResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateFieldLevelEncryptionConfigResponse]
$creadListPrec :: ReadPrec [UpdateFieldLevelEncryptionConfigResponse]
readPrec :: ReadPrec UpdateFieldLevelEncryptionConfigResponse
$creadPrec :: ReadPrec UpdateFieldLevelEncryptionConfigResponse
readList :: ReadS [UpdateFieldLevelEncryptionConfigResponse]
$creadList :: ReadS [UpdateFieldLevelEncryptionConfigResponse]
readsPrec :: Int -> ReadS UpdateFieldLevelEncryptionConfigResponse
$creadsPrec :: Int -> ReadS UpdateFieldLevelEncryptionConfigResponse
Prelude.Read, Int -> UpdateFieldLevelEncryptionConfigResponse -> ShowS
[UpdateFieldLevelEncryptionConfigResponse] -> ShowS
UpdateFieldLevelEncryptionConfigResponse -> String
(Int -> UpdateFieldLevelEncryptionConfigResponse -> ShowS)
-> (UpdateFieldLevelEncryptionConfigResponse -> String)
-> ([UpdateFieldLevelEncryptionConfigResponse] -> ShowS)
-> Show UpdateFieldLevelEncryptionConfigResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateFieldLevelEncryptionConfigResponse] -> ShowS
$cshowList :: [UpdateFieldLevelEncryptionConfigResponse] -> ShowS
show :: UpdateFieldLevelEncryptionConfigResponse -> String
$cshow :: UpdateFieldLevelEncryptionConfigResponse -> String
showsPrec :: Int -> UpdateFieldLevelEncryptionConfigResponse -> ShowS
$cshowsPrec :: Int -> UpdateFieldLevelEncryptionConfigResponse -> ShowS
Prelude.Show, (forall x.
 UpdateFieldLevelEncryptionConfigResponse
 -> Rep UpdateFieldLevelEncryptionConfigResponse x)
-> (forall x.
    Rep UpdateFieldLevelEncryptionConfigResponse x
    -> UpdateFieldLevelEncryptionConfigResponse)
-> Generic UpdateFieldLevelEncryptionConfigResponse
forall x.
Rep UpdateFieldLevelEncryptionConfigResponse x
-> UpdateFieldLevelEncryptionConfigResponse
forall x.
UpdateFieldLevelEncryptionConfigResponse
-> Rep UpdateFieldLevelEncryptionConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateFieldLevelEncryptionConfigResponse x
-> UpdateFieldLevelEncryptionConfigResponse
$cfrom :: forall x.
UpdateFieldLevelEncryptionConfigResponse
-> Rep UpdateFieldLevelEncryptionConfigResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateFieldLevelEncryptionConfigResponse' 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:
--
-- 'eTag', 'updateFieldLevelEncryptionConfigResponse_eTag' - The value of the @ETag@ header that you received when updating the
-- configuration. For example: @E2QWRUHAPOMQZL@.
--
-- 'fieldLevelEncryption', 'updateFieldLevelEncryptionConfigResponse_fieldLevelEncryption' - Return the results of updating the configuration.
--
-- 'httpStatus', 'updateFieldLevelEncryptionConfigResponse_httpStatus' - The response's http status code.
newUpdateFieldLevelEncryptionConfigResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateFieldLevelEncryptionConfigResponse
newUpdateFieldLevelEncryptionConfigResponse :: Int -> UpdateFieldLevelEncryptionConfigResponse
newUpdateFieldLevelEncryptionConfigResponse
  Int
pHttpStatus_ =
    UpdateFieldLevelEncryptionConfigResponse' :: Maybe Text
-> Maybe FieldLevelEncryption
-> Int
-> UpdateFieldLevelEncryptionConfigResponse
UpdateFieldLevelEncryptionConfigResponse'
      { $sel:eTag:UpdateFieldLevelEncryptionConfigResponse' :: Maybe Text
eTag =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:fieldLevelEncryption:UpdateFieldLevelEncryptionConfigResponse' :: Maybe FieldLevelEncryption
fieldLevelEncryption =
          Maybe FieldLevelEncryption
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:UpdateFieldLevelEncryptionConfigResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The value of the @ETag@ header that you received when updating the
-- configuration. For example: @E2QWRUHAPOMQZL@.
updateFieldLevelEncryptionConfigResponse_eTag :: Lens.Lens' UpdateFieldLevelEncryptionConfigResponse (Prelude.Maybe Prelude.Text)
updateFieldLevelEncryptionConfigResponse_eTag :: (Maybe Text -> f (Maybe Text))
-> UpdateFieldLevelEncryptionConfigResponse
-> f UpdateFieldLevelEncryptionConfigResponse
updateFieldLevelEncryptionConfigResponse_eTag = (UpdateFieldLevelEncryptionConfigResponse -> Maybe Text)
-> (UpdateFieldLevelEncryptionConfigResponse
    -> Maybe Text -> UpdateFieldLevelEncryptionConfigResponse)
-> Lens
     UpdateFieldLevelEncryptionConfigResponse
     UpdateFieldLevelEncryptionConfigResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFieldLevelEncryptionConfigResponse' {Maybe Text
eTag :: Maybe Text
$sel:eTag:UpdateFieldLevelEncryptionConfigResponse' :: UpdateFieldLevelEncryptionConfigResponse -> Maybe Text
eTag} -> Maybe Text
eTag) (\s :: UpdateFieldLevelEncryptionConfigResponse
s@UpdateFieldLevelEncryptionConfigResponse' {} Maybe Text
a -> UpdateFieldLevelEncryptionConfigResponse
s {$sel:eTag:UpdateFieldLevelEncryptionConfigResponse' :: Maybe Text
eTag = Maybe Text
a} :: UpdateFieldLevelEncryptionConfigResponse)

-- | Return the results of updating the configuration.
updateFieldLevelEncryptionConfigResponse_fieldLevelEncryption :: Lens.Lens' UpdateFieldLevelEncryptionConfigResponse (Prelude.Maybe FieldLevelEncryption)
updateFieldLevelEncryptionConfigResponse_fieldLevelEncryption :: (Maybe FieldLevelEncryption -> f (Maybe FieldLevelEncryption))
-> UpdateFieldLevelEncryptionConfigResponse
-> f UpdateFieldLevelEncryptionConfigResponse
updateFieldLevelEncryptionConfigResponse_fieldLevelEncryption = (UpdateFieldLevelEncryptionConfigResponse
 -> Maybe FieldLevelEncryption)
-> (UpdateFieldLevelEncryptionConfigResponse
    -> Maybe FieldLevelEncryption
    -> UpdateFieldLevelEncryptionConfigResponse)
-> Lens
     UpdateFieldLevelEncryptionConfigResponse
     UpdateFieldLevelEncryptionConfigResponse
     (Maybe FieldLevelEncryption)
     (Maybe FieldLevelEncryption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFieldLevelEncryptionConfigResponse' {Maybe FieldLevelEncryption
fieldLevelEncryption :: Maybe FieldLevelEncryption
$sel:fieldLevelEncryption:UpdateFieldLevelEncryptionConfigResponse' :: UpdateFieldLevelEncryptionConfigResponse
-> Maybe FieldLevelEncryption
fieldLevelEncryption} -> Maybe FieldLevelEncryption
fieldLevelEncryption) (\s :: UpdateFieldLevelEncryptionConfigResponse
s@UpdateFieldLevelEncryptionConfigResponse' {} Maybe FieldLevelEncryption
a -> UpdateFieldLevelEncryptionConfigResponse
s {$sel:fieldLevelEncryption:UpdateFieldLevelEncryptionConfigResponse' :: Maybe FieldLevelEncryption
fieldLevelEncryption = Maybe FieldLevelEncryption
a} :: UpdateFieldLevelEncryptionConfigResponse)

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

instance
  Prelude.NFData
    UpdateFieldLevelEncryptionConfigResponse