{-# 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.UpdateFieldLevelEncryptionProfile
-- 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 profile.
module Amazonka.CloudFront.UpdateFieldLevelEncryptionProfile
  ( -- * Creating a Request
    UpdateFieldLevelEncryptionProfile (..),
    newUpdateFieldLevelEncryptionProfile,

    -- * Request Lenses
    updateFieldLevelEncryptionProfile_ifMatch,
    updateFieldLevelEncryptionProfile_fieldLevelEncryptionProfileConfig,
    updateFieldLevelEncryptionProfile_id,

    -- * Destructuring the Response
    UpdateFieldLevelEncryptionProfileResponse (..),
    newUpdateFieldLevelEncryptionProfileResponse,

    -- * Response Lenses
    updateFieldLevelEncryptionProfileResponse_eTag,
    updateFieldLevelEncryptionProfileResponse_fieldLevelEncryptionProfile,
    updateFieldLevelEncryptionProfileResponse_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:/ 'newUpdateFieldLevelEncryptionProfile' smart constructor.
data UpdateFieldLevelEncryptionProfile = UpdateFieldLevelEncryptionProfile'
  { -- | The value of the @ETag@ header that you received when retrieving the
    -- profile identity to update. For example: @E2QWRUHAPOMQZL@.
    UpdateFieldLevelEncryptionProfile -> Maybe Text
ifMatch :: Prelude.Maybe Prelude.Text,
    -- | Request to update a field-level encryption profile.
    UpdateFieldLevelEncryptionProfile
-> FieldLevelEncryptionProfileConfig
fieldLevelEncryptionProfileConfig :: FieldLevelEncryptionProfileConfig,
    -- | The ID of the field-level encryption profile request.
    UpdateFieldLevelEncryptionProfile -> Text
id :: Prelude.Text
  }
  deriving (UpdateFieldLevelEncryptionProfile
-> UpdateFieldLevelEncryptionProfile -> Bool
(UpdateFieldLevelEncryptionProfile
 -> UpdateFieldLevelEncryptionProfile -> Bool)
-> (UpdateFieldLevelEncryptionProfile
    -> UpdateFieldLevelEncryptionProfile -> Bool)
-> Eq UpdateFieldLevelEncryptionProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateFieldLevelEncryptionProfile
-> UpdateFieldLevelEncryptionProfile -> Bool
$c/= :: UpdateFieldLevelEncryptionProfile
-> UpdateFieldLevelEncryptionProfile -> Bool
== :: UpdateFieldLevelEncryptionProfile
-> UpdateFieldLevelEncryptionProfile -> Bool
$c== :: UpdateFieldLevelEncryptionProfile
-> UpdateFieldLevelEncryptionProfile -> Bool
Prelude.Eq, ReadPrec [UpdateFieldLevelEncryptionProfile]
ReadPrec UpdateFieldLevelEncryptionProfile
Int -> ReadS UpdateFieldLevelEncryptionProfile
ReadS [UpdateFieldLevelEncryptionProfile]
(Int -> ReadS UpdateFieldLevelEncryptionProfile)
-> ReadS [UpdateFieldLevelEncryptionProfile]
-> ReadPrec UpdateFieldLevelEncryptionProfile
-> ReadPrec [UpdateFieldLevelEncryptionProfile]
-> Read UpdateFieldLevelEncryptionProfile
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateFieldLevelEncryptionProfile]
$creadListPrec :: ReadPrec [UpdateFieldLevelEncryptionProfile]
readPrec :: ReadPrec UpdateFieldLevelEncryptionProfile
$creadPrec :: ReadPrec UpdateFieldLevelEncryptionProfile
readList :: ReadS [UpdateFieldLevelEncryptionProfile]
$creadList :: ReadS [UpdateFieldLevelEncryptionProfile]
readsPrec :: Int -> ReadS UpdateFieldLevelEncryptionProfile
$creadsPrec :: Int -> ReadS UpdateFieldLevelEncryptionProfile
Prelude.Read, Int -> UpdateFieldLevelEncryptionProfile -> ShowS
[UpdateFieldLevelEncryptionProfile] -> ShowS
UpdateFieldLevelEncryptionProfile -> String
(Int -> UpdateFieldLevelEncryptionProfile -> ShowS)
-> (UpdateFieldLevelEncryptionProfile -> String)
-> ([UpdateFieldLevelEncryptionProfile] -> ShowS)
-> Show UpdateFieldLevelEncryptionProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateFieldLevelEncryptionProfile] -> ShowS
$cshowList :: [UpdateFieldLevelEncryptionProfile] -> ShowS
show :: UpdateFieldLevelEncryptionProfile -> String
$cshow :: UpdateFieldLevelEncryptionProfile -> String
showsPrec :: Int -> UpdateFieldLevelEncryptionProfile -> ShowS
$cshowsPrec :: Int -> UpdateFieldLevelEncryptionProfile -> ShowS
Prelude.Show, (forall x.
 UpdateFieldLevelEncryptionProfile
 -> Rep UpdateFieldLevelEncryptionProfile x)
-> (forall x.
    Rep UpdateFieldLevelEncryptionProfile x
    -> UpdateFieldLevelEncryptionProfile)
-> Generic UpdateFieldLevelEncryptionProfile
forall x.
Rep UpdateFieldLevelEncryptionProfile x
-> UpdateFieldLevelEncryptionProfile
forall x.
UpdateFieldLevelEncryptionProfile
-> Rep UpdateFieldLevelEncryptionProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateFieldLevelEncryptionProfile x
-> UpdateFieldLevelEncryptionProfile
$cfrom :: forall x.
UpdateFieldLevelEncryptionProfile
-> Rep UpdateFieldLevelEncryptionProfile x
Prelude.Generic)

-- |
-- Create a value of 'UpdateFieldLevelEncryptionProfile' 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', 'updateFieldLevelEncryptionProfile_ifMatch' - The value of the @ETag@ header that you received when retrieving the
-- profile identity to update. For example: @E2QWRUHAPOMQZL@.
--
-- 'fieldLevelEncryptionProfileConfig', 'updateFieldLevelEncryptionProfile_fieldLevelEncryptionProfileConfig' - Request to update a field-level encryption profile.
--
-- 'id', 'updateFieldLevelEncryptionProfile_id' - The ID of the field-level encryption profile request.
newUpdateFieldLevelEncryptionProfile ::
  -- | 'fieldLevelEncryptionProfileConfig'
  FieldLevelEncryptionProfileConfig ->
  -- | 'id'
  Prelude.Text ->
  UpdateFieldLevelEncryptionProfile
newUpdateFieldLevelEncryptionProfile :: FieldLevelEncryptionProfileConfig
-> Text -> UpdateFieldLevelEncryptionProfile
newUpdateFieldLevelEncryptionProfile
  FieldLevelEncryptionProfileConfig
pFieldLevelEncryptionProfileConfig_
  Text
pId_ =
    UpdateFieldLevelEncryptionProfile' :: Maybe Text
-> FieldLevelEncryptionProfileConfig
-> Text
-> UpdateFieldLevelEncryptionProfile
UpdateFieldLevelEncryptionProfile'
      { $sel:ifMatch:UpdateFieldLevelEncryptionProfile' :: Maybe Text
ifMatch =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:fieldLevelEncryptionProfileConfig:UpdateFieldLevelEncryptionProfile' :: FieldLevelEncryptionProfileConfig
fieldLevelEncryptionProfileConfig =
          FieldLevelEncryptionProfileConfig
pFieldLevelEncryptionProfileConfig_,
        $sel:id:UpdateFieldLevelEncryptionProfile' :: Text
id = Text
pId_
      }

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

-- | Request to update a field-level encryption profile.
updateFieldLevelEncryptionProfile_fieldLevelEncryptionProfileConfig :: Lens.Lens' UpdateFieldLevelEncryptionProfile FieldLevelEncryptionProfileConfig
updateFieldLevelEncryptionProfile_fieldLevelEncryptionProfileConfig :: (FieldLevelEncryptionProfileConfig
 -> f FieldLevelEncryptionProfileConfig)
-> UpdateFieldLevelEncryptionProfile
-> f UpdateFieldLevelEncryptionProfile
updateFieldLevelEncryptionProfile_fieldLevelEncryptionProfileConfig = (UpdateFieldLevelEncryptionProfile
 -> FieldLevelEncryptionProfileConfig)
-> (UpdateFieldLevelEncryptionProfile
    -> FieldLevelEncryptionProfileConfig
    -> UpdateFieldLevelEncryptionProfile)
-> Lens
     UpdateFieldLevelEncryptionProfile
     UpdateFieldLevelEncryptionProfile
     FieldLevelEncryptionProfileConfig
     FieldLevelEncryptionProfileConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFieldLevelEncryptionProfile' {FieldLevelEncryptionProfileConfig
fieldLevelEncryptionProfileConfig :: FieldLevelEncryptionProfileConfig
$sel:fieldLevelEncryptionProfileConfig:UpdateFieldLevelEncryptionProfile' :: UpdateFieldLevelEncryptionProfile
-> FieldLevelEncryptionProfileConfig
fieldLevelEncryptionProfileConfig} -> FieldLevelEncryptionProfileConfig
fieldLevelEncryptionProfileConfig) (\s :: UpdateFieldLevelEncryptionProfile
s@UpdateFieldLevelEncryptionProfile' {} FieldLevelEncryptionProfileConfig
a -> UpdateFieldLevelEncryptionProfile
s {$sel:fieldLevelEncryptionProfileConfig:UpdateFieldLevelEncryptionProfile' :: FieldLevelEncryptionProfileConfig
fieldLevelEncryptionProfileConfig = FieldLevelEncryptionProfileConfig
a} :: UpdateFieldLevelEncryptionProfile)

-- | The ID of the field-level encryption profile request.
updateFieldLevelEncryptionProfile_id :: Lens.Lens' UpdateFieldLevelEncryptionProfile Prelude.Text
updateFieldLevelEncryptionProfile_id :: (Text -> f Text)
-> UpdateFieldLevelEncryptionProfile
-> f UpdateFieldLevelEncryptionProfile
updateFieldLevelEncryptionProfile_id = (UpdateFieldLevelEncryptionProfile -> Text)
-> (UpdateFieldLevelEncryptionProfile
    -> Text -> UpdateFieldLevelEncryptionProfile)
-> Lens
     UpdateFieldLevelEncryptionProfile
     UpdateFieldLevelEncryptionProfile
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFieldLevelEncryptionProfile' {Text
id :: Text
$sel:id:UpdateFieldLevelEncryptionProfile' :: UpdateFieldLevelEncryptionProfile -> Text
id} -> Text
id) (\s :: UpdateFieldLevelEncryptionProfile
s@UpdateFieldLevelEncryptionProfile' {} Text
a -> UpdateFieldLevelEncryptionProfile
s {$sel:id:UpdateFieldLevelEncryptionProfile' :: Text
id = Text
a} :: UpdateFieldLevelEncryptionProfile)

instance
  Core.AWSRequest
    UpdateFieldLevelEncryptionProfile
  where
  type
    AWSResponse UpdateFieldLevelEncryptionProfile =
      UpdateFieldLevelEncryptionProfileResponse
  request :: UpdateFieldLevelEncryptionProfile
-> Request UpdateFieldLevelEncryptionProfile
request = Service
-> UpdateFieldLevelEncryptionProfile
-> Request UpdateFieldLevelEncryptionProfile
forall a. (ToRequest a, ToElement a) => Service -> a -> Request a
Request.putXML Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateFieldLevelEncryptionProfile
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse UpdateFieldLevelEncryptionProfile)))
response =
    (Int
 -> ResponseHeaders
 -> [Node]
 -> Either String (AWSResponse UpdateFieldLevelEncryptionProfile))
-> Logger
-> Service
-> Proxy UpdateFieldLevelEncryptionProfile
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse UpdateFieldLevelEncryptionProfile)))
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 FieldLevelEncryptionProfile
-> Int
-> UpdateFieldLevelEncryptionProfileResponse
UpdateFieldLevelEncryptionProfileResponse'
            (Maybe Text
 -> Maybe FieldLevelEncryptionProfile
 -> Int
 -> UpdateFieldLevelEncryptionProfileResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe FieldLevelEncryptionProfile
      -> Int -> UpdateFieldLevelEncryptionProfileResponse)
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 FieldLevelEncryptionProfile
   -> Int -> UpdateFieldLevelEncryptionProfileResponse)
-> Either String (Maybe FieldLevelEncryptionProfile)
-> Either String (Int -> UpdateFieldLevelEncryptionProfileResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node] -> Either String (Maybe FieldLevelEncryptionProfile)
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)
              Either String (Int -> UpdateFieldLevelEncryptionProfileResponse)
-> Either String Int
-> Either String UpdateFieldLevelEncryptionProfileResponse
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
    UpdateFieldLevelEncryptionProfile

instance
  Prelude.NFData
    UpdateFieldLevelEncryptionProfile

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

instance
  Core.ToHeaders
    UpdateFieldLevelEncryptionProfile
  where
  toHeaders :: UpdateFieldLevelEncryptionProfile -> ResponseHeaders
toHeaders UpdateFieldLevelEncryptionProfile' {Maybe Text
Text
FieldLevelEncryptionProfileConfig
id :: Text
fieldLevelEncryptionProfileConfig :: FieldLevelEncryptionProfileConfig
ifMatch :: Maybe Text
$sel:id:UpdateFieldLevelEncryptionProfile' :: UpdateFieldLevelEncryptionProfile -> Text
$sel:fieldLevelEncryptionProfileConfig:UpdateFieldLevelEncryptionProfile' :: UpdateFieldLevelEncryptionProfile
-> FieldLevelEncryptionProfileConfig
$sel:ifMatch:UpdateFieldLevelEncryptionProfile' :: UpdateFieldLevelEncryptionProfile -> 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
    UpdateFieldLevelEncryptionProfile
  where
  toPath :: UpdateFieldLevelEncryptionProfile -> ByteString
toPath UpdateFieldLevelEncryptionProfile' {Maybe Text
Text
FieldLevelEncryptionProfileConfig
id :: Text
fieldLevelEncryptionProfileConfig :: FieldLevelEncryptionProfileConfig
ifMatch :: Maybe Text
$sel:id:UpdateFieldLevelEncryptionProfile' :: UpdateFieldLevelEncryptionProfile -> Text
$sel:fieldLevelEncryptionProfileConfig:UpdateFieldLevelEncryptionProfile' :: UpdateFieldLevelEncryptionProfile
-> FieldLevelEncryptionProfileConfig
$sel:ifMatch:UpdateFieldLevelEncryptionProfile' :: UpdateFieldLevelEncryptionProfile -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/2020-05-31/field-level-encryption-profile/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
id,
        ByteString
"/config"
      ]

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

-- | /See:/ 'newUpdateFieldLevelEncryptionProfileResponse' smart constructor.
data UpdateFieldLevelEncryptionProfileResponse = UpdateFieldLevelEncryptionProfileResponse'
  { -- | The result of the field-level encryption profile request.
    UpdateFieldLevelEncryptionProfileResponse -> Maybe Text
eTag :: Prelude.Maybe Prelude.Text,
    -- | Return the results of updating the profile.
    UpdateFieldLevelEncryptionProfileResponse
-> Maybe FieldLevelEncryptionProfile
fieldLevelEncryptionProfile :: Prelude.Maybe FieldLevelEncryptionProfile,
    -- | The response's http status code.
    UpdateFieldLevelEncryptionProfileResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateFieldLevelEncryptionProfileResponse
-> UpdateFieldLevelEncryptionProfileResponse -> Bool
(UpdateFieldLevelEncryptionProfileResponse
 -> UpdateFieldLevelEncryptionProfileResponse -> Bool)
-> (UpdateFieldLevelEncryptionProfileResponse
    -> UpdateFieldLevelEncryptionProfileResponse -> Bool)
-> Eq UpdateFieldLevelEncryptionProfileResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateFieldLevelEncryptionProfileResponse
-> UpdateFieldLevelEncryptionProfileResponse -> Bool
$c/= :: UpdateFieldLevelEncryptionProfileResponse
-> UpdateFieldLevelEncryptionProfileResponse -> Bool
== :: UpdateFieldLevelEncryptionProfileResponse
-> UpdateFieldLevelEncryptionProfileResponse -> Bool
$c== :: UpdateFieldLevelEncryptionProfileResponse
-> UpdateFieldLevelEncryptionProfileResponse -> Bool
Prelude.Eq, ReadPrec [UpdateFieldLevelEncryptionProfileResponse]
ReadPrec UpdateFieldLevelEncryptionProfileResponse
Int -> ReadS UpdateFieldLevelEncryptionProfileResponse
ReadS [UpdateFieldLevelEncryptionProfileResponse]
(Int -> ReadS UpdateFieldLevelEncryptionProfileResponse)
-> ReadS [UpdateFieldLevelEncryptionProfileResponse]
-> ReadPrec UpdateFieldLevelEncryptionProfileResponse
-> ReadPrec [UpdateFieldLevelEncryptionProfileResponse]
-> Read UpdateFieldLevelEncryptionProfileResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateFieldLevelEncryptionProfileResponse]
$creadListPrec :: ReadPrec [UpdateFieldLevelEncryptionProfileResponse]
readPrec :: ReadPrec UpdateFieldLevelEncryptionProfileResponse
$creadPrec :: ReadPrec UpdateFieldLevelEncryptionProfileResponse
readList :: ReadS [UpdateFieldLevelEncryptionProfileResponse]
$creadList :: ReadS [UpdateFieldLevelEncryptionProfileResponse]
readsPrec :: Int -> ReadS UpdateFieldLevelEncryptionProfileResponse
$creadsPrec :: Int -> ReadS UpdateFieldLevelEncryptionProfileResponse
Prelude.Read, Int -> UpdateFieldLevelEncryptionProfileResponse -> ShowS
[UpdateFieldLevelEncryptionProfileResponse] -> ShowS
UpdateFieldLevelEncryptionProfileResponse -> String
(Int -> UpdateFieldLevelEncryptionProfileResponse -> ShowS)
-> (UpdateFieldLevelEncryptionProfileResponse -> String)
-> ([UpdateFieldLevelEncryptionProfileResponse] -> ShowS)
-> Show UpdateFieldLevelEncryptionProfileResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateFieldLevelEncryptionProfileResponse] -> ShowS
$cshowList :: [UpdateFieldLevelEncryptionProfileResponse] -> ShowS
show :: UpdateFieldLevelEncryptionProfileResponse -> String
$cshow :: UpdateFieldLevelEncryptionProfileResponse -> String
showsPrec :: Int -> UpdateFieldLevelEncryptionProfileResponse -> ShowS
$cshowsPrec :: Int -> UpdateFieldLevelEncryptionProfileResponse -> ShowS
Prelude.Show, (forall x.
 UpdateFieldLevelEncryptionProfileResponse
 -> Rep UpdateFieldLevelEncryptionProfileResponse x)
-> (forall x.
    Rep UpdateFieldLevelEncryptionProfileResponse x
    -> UpdateFieldLevelEncryptionProfileResponse)
-> Generic UpdateFieldLevelEncryptionProfileResponse
forall x.
Rep UpdateFieldLevelEncryptionProfileResponse x
-> UpdateFieldLevelEncryptionProfileResponse
forall x.
UpdateFieldLevelEncryptionProfileResponse
-> Rep UpdateFieldLevelEncryptionProfileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateFieldLevelEncryptionProfileResponse x
-> UpdateFieldLevelEncryptionProfileResponse
$cfrom :: forall x.
UpdateFieldLevelEncryptionProfileResponse
-> Rep UpdateFieldLevelEncryptionProfileResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateFieldLevelEncryptionProfileResponse' 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', 'updateFieldLevelEncryptionProfileResponse_eTag' - The result of the field-level encryption profile request.
--
-- 'fieldLevelEncryptionProfile', 'updateFieldLevelEncryptionProfileResponse_fieldLevelEncryptionProfile' - Return the results of updating the profile.
--
-- 'httpStatus', 'updateFieldLevelEncryptionProfileResponse_httpStatus' - The response's http status code.
newUpdateFieldLevelEncryptionProfileResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateFieldLevelEncryptionProfileResponse
newUpdateFieldLevelEncryptionProfileResponse :: Int -> UpdateFieldLevelEncryptionProfileResponse
newUpdateFieldLevelEncryptionProfileResponse
  Int
pHttpStatus_ =
    UpdateFieldLevelEncryptionProfileResponse' :: Maybe Text
-> Maybe FieldLevelEncryptionProfile
-> Int
-> UpdateFieldLevelEncryptionProfileResponse
UpdateFieldLevelEncryptionProfileResponse'
      { $sel:eTag:UpdateFieldLevelEncryptionProfileResponse' :: Maybe Text
eTag =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:fieldLevelEncryptionProfile:UpdateFieldLevelEncryptionProfileResponse' :: Maybe FieldLevelEncryptionProfile
fieldLevelEncryptionProfile =
          Maybe FieldLevelEncryptionProfile
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:UpdateFieldLevelEncryptionProfileResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The result of the field-level encryption profile request.
updateFieldLevelEncryptionProfileResponse_eTag :: Lens.Lens' UpdateFieldLevelEncryptionProfileResponse (Prelude.Maybe Prelude.Text)
updateFieldLevelEncryptionProfileResponse_eTag :: (Maybe Text -> f (Maybe Text))
-> UpdateFieldLevelEncryptionProfileResponse
-> f UpdateFieldLevelEncryptionProfileResponse
updateFieldLevelEncryptionProfileResponse_eTag = (UpdateFieldLevelEncryptionProfileResponse -> Maybe Text)
-> (UpdateFieldLevelEncryptionProfileResponse
    -> Maybe Text -> UpdateFieldLevelEncryptionProfileResponse)
-> Lens
     UpdateFieldLevelEncryptionProfileResponse
     UpdateFieldLevelEncryptionProfileResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFieldLevelEncryptionProfileResponse' {Maybe Text
eTag :: Maybe Text
$sel:eTag:UpdateFieldLevelEncryptionProfileResponse' :: UpdateFieldLevelEncryptionProfileResponse -> Maybe Text
eTag} -> Maybe Text
eTag) (\s :: UpdateFieldLevelEncryptionProfileResponse
s@UpdateFieldLevelEncryptionProfileResponse' {} Maybe Text
a -> UpdateFieldLevelEncryptionProfileResponse
s {$sel:eTag:UpdateFieldLevelEncryptionProfileResponse' :: Maybe Text
eTag = Maybe Text
a} :: UpdateFieldLevelEncryptionProfileResponse)

-- | Return the results of updating the profile.
updateFieldLevelEncryptionProfileResponse_fieldLevelEncryptionProfile :: Lens.Lens' UpdateFieldLevelEncryptionProfileResponse (Prelude.Maybe FieldLevelEncryptionProfile)
updateFieldLevelEncryptionProfileResponse_fieldLevelEncryptionProfile :: (Maybe FieldLevelEncryptionProfile
 -> f (Maybe FieldLevelEncryptionProfile))
-> UpdateFieldLevelEncryptionProfileResponse
-> f UpdateFieldLevelEncryptionProfileResponse
updateFieldLevelEncryptionProfileResponse_fieldLevelEncryptionProfile = (UpdateFieldLevelEncryptionProfileResponse
 -> Maybe FieldLevelEncryptionProfile)
-> (UpdateFieldLevelEncryptionProfileResponse
    -> Maybe FieldLevelEncryptionProfile
    -> UpdateFieldLevelEncryptionProfileResponse)
-> Lens
     UpdateFieldLevelEncryptionProfileResponse
     UpdateFieldLevelEncryptionProfileResponse
     (Maybe FieldLevelEncryptionProfile)
     (Maybe FieldLevelEncryptionProfile)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFieldLevelEncryptionProfileResponse' {Maybe FieldLevelEncryptionProfile
fieldLevelEncryptionProfile :: Maybe FieldLevelEncryptionProfile
$sel:fieldLevelEncryptionProfile:UpdateFieldLevelEncryptionProfileResponse' :: UpdateFieldLevelEncryptionProfileResponse
-> Maybe FieldLevelEncryptionProfile
fieldLevelEncryptionProfile} -> Maybe FieldLevelEncryptionProfile
fieldLevelEncryptionProfile) (\s :: UpdateFieldLevelEncryptionProfileResponse
s@UpdateFieldLevelEncryptionProfileResponse' {} Maybe FieldLevelEncryptionProfile
a -> UpdateFieldLevelEncryptionProfileResponse
s {$sel:fieldLevelEncryptionProfile:UpdateFieldLevelEncryptionProfileResponse' :: Maybe FieldLevelEncryptionProfile
fieldLevelEncryptionProfile = Maybe FieldLevelEncryptionProfile
a} :: UpdateFieldLevelEncryptionProfileResponse)

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

instance
  Prelude.NFData
    UpdateFieldLevelEncryptionProfileResponse