{-# 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.CreateFieldLevelEncryptionConfig
-- 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)
--
-- Create a new field-level encryption configuration.
module Amazonka.CloudFront.CreateFieldLevelEncryptionConfig
  ( -- * Creating a Request
    CreateFieldLevelEncryptionConfig (..),
    newCreateFieldLevelEncryptionConfig,

    -- * Request Lenses
    createFieldLevelEncryptionConfig_fieldLevelEncryptionConfig,

    -- * Destructuring the Response
    CreateFieldLevelEncryptionConfigResponse (..),
    newCreateFieldLevelEncryptionConfigResponse,

    -- * Response Lenses
    createFieldLevelEncryptionConfigResponse_eTag,
    createFieldLevelEncryptionConfigResponse_location,
    createFieldLevelEncryptionConfigResponse_fieldLevelEncryption,
    createFieldLevelEncryptionConfigResponse_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:/ 'newCreateFieldLevelEncryptionConfig' smart constructor.
data CreateFieldLevelEncryptionConfig = CreateFieldLevelEncryptionConfig'
  { -- | The request to create a new field-level encryption configuration.
    CreateFieldLevelEncryptionConfig -> FieldLevelEncryptionConfig
fieldLevelEncryptionConfig :: FieldLevelEncryptionConfig
  }
  deriving (CreateFieldLevelEncryptionConfig
-> CreateFieldLevelEncryptionConfig -> Bool
(CreateFieldLevelEncryptionConfig
 -> CreateFieldLevelEncryptionConfig -> Bool)
-> (CreateFieldLevelEncryptionConfig
    -> CreateFieldLevelEncryptionConfig -> Bool)
-> Eq CreateFieldLevelEncryptionConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFieldLevelEncryptionConfig
-> CreateFieldLevelEncryptionConfig -> Bool
$c/= :: CreateFieldLevelEncryptionConfig
-> CreateFieldLevelEncryptionConfig -> Bool
== :: CreateFieldLevelEncryptionConfig
-> CreateFieldLevelEncryptionConfig -> Bool
$c== :: CreateFieldLevelEncryptionConfig
-> CreateFieldLevelEncryptionConfig -> Bool
Prelude.Eq, ReadPrec [CreateFieldLevelEncryptionConfig]
ReadPrec CreateFieldLevelEncryptionConfig
Int -> ReadS CreateFieldLevelEncryptionConfig
ReadS [CreateFieldLevelEncryptionConfig]
(Int -> ReadS CreateFieldLevelEncryptionConfig)
-> ReadS [CreateFieldLevelEncryptionConfig]
-> ReadPrec CreateFieldLevelEncryptionConfig
-> ReadPrec [CreateFieldLevelEncryptionConfig]
-> Read CreateFieldLevelEncryptionConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFieldLevelEncryptionConfig]
$creadListPrec :: ReadPrec [CreateFieldLevelEncryptionConfig]
readPrec :: ReadPrec CreateFieldLevelEncryptionConfig
$creadPrec :: ReadPrec CreateFieldLevelEncryptionConfig
readList :: ReadS [CreateFieldLevelEncryptionConfig]
$creadList :: ReadS [CreateFieldLevelEncryptionConfig]
readsPrec :: Int -> ReadS CreateFieldLevelEncryptionConfig
$creadsPrec :: Int -> ReadS CreateFieldLevelEncryptionConfig
Prelude.Read, Int -> CreateFieldLevelEncryptionConfig -> ShowS
[CreateFieldLevelEncryptionConfig] -> ShowS
CreateFieldLevelEncryptionConfig -> String
(Int -> CreateFieldLevelEncryptionConfig -> ShowS)
-> (CreateFieldLevelEncryptionConfig -> String)
-> ([CreateFieldLevelEncryptionConfig] -> ShowS)
-> Show CreateFieldLevelEncryptionConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFieldLevelEncryptionConfig] -> ShowS
$cshowList :: [CreateFieldLevelEncryptionConfig] -> ShowS
show :: CreateFieldLevelEncryptionConfig -> String
$cshow :: CreateFieldLevelEncryptionConfig -> String
showsPrec :: Int -> CreateFieldLevelEncryptionConfig -> ShowS
$cshowsPrec :: Int -> CreateFieldLevelEncryptionConfig -> ShowS
Prelude.Show, (forall x.
 CreateFieldLevelEncryptionConfig
 -> Rep CreateFieldLevelEncryptionConfig x)
-> (forall x.
    Rep CreateFieldLevelEncryptionConfig x
    -> CreateFieldLevelEncryptionConfig)
-> Generic CreateFieldLevelEncryptionConfig
forall x.
Rep CreateFieldLevelEncryptionConfig x
-> CreateFieldLevelEncryptionConfig
forall x.
CreateFieldLevelEncryptionConfig
-> Rep CreateFieldLevelEncryptionConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateFieldLevelEncryptionConfig x
-> CreateFieldLevelEncryptionConfig
$cfrom :: forall x.
CreateFieldLevelEncryptionConfig
-> Rep CreateFieldLevelEncryptionConfig x
Prelude.Generic)

-- |
-- Create a value of 'CreateFieldLevelEncryptionConfig' 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:
--
-- 'fieldLevelEncryptionConfig', 'createFieldLevelEncryptionConfig_fieldLevelEncryptionConfig' - The request to create a new field-level encryption configuration.
newCreateFieldLevelEncryptionConfig ::
  -- | 'fieldLevelEncryptionConfig'
  FieldLevelEncryptionConfig ->
  CreateFieldLevelEncryptionConfig
newCreateFieldLevelEncryptionConfig :: FieldLevelEncryptionConfig -> CreateFieldLevelEncryptionConfig
newCreateFieldLevelEncryptionConfig
  FieldLevelEncryptionConfig
pFieldLevelEncryptionConfig_ =
    CreateFieldLevelEncryptionConfig' :: FieldLevelEncryptionConfig -> CreateFieldLevelEncryptionConfig
CreateFieldLevelEncryptionConfig'
      { $sel:fieldLevelEncryptionConfig:CreateFieldLevelEncryptionConfig' :: FieldLevelEncryptionConfig
fieldLevelEncryptionConfig =
          FieldLevelEncryptionConfig
pFieldLevelEncryptionConfig_
      }

-- | The request to create a new field-level encryption configuration.
createFieldLevelEncryptionConfig_fieldLevelEncryptionConfig :: Lens.Lens' CreateFieldLevelEncryptionConfig FieldLevelEncryptionConfig
createFieldLevelEncryptionConfig_fieldLevelEncryptionConfig :: (FieldLevelEncryptionConfig -> f FieldLevelEncryptionConfig)
-> CreateFieldLevelEncryptionConfig
-> f CreateFieldLevelEncryptionConfig
createFieldLevelEncryptionConfig_fieldLevelEncryptionConfig = (CreateFieldLevelEncryptionConfig -> FieldLevelEncryptionConfig)
-> (CreateFieldLevelEncryptionConfig
    -> FieldLevelEncryptionConfig -> CreateFieldLevelEncryptionConfig)
-> Lens
     CreateFieldLevelEncryptionConfig
     CreateFieldLevelEncryptionConfig
     FieldLevelEncryptionConfig
     FieldLevelEncryptionConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFieldLevelEncryptionConfig' {FieldLevelEncryptionConfig
fieldLevelEncryptionConfig :: FieldLevelEncryptionConfig
$sel:fieldLevelEncryptionConfig:CreateFieldLevelEncryptionConfig' :: CreateFieldLevelEncryptionConfig -> FieldLevelEncryptionConfig
fieldLevelEncryptionConfig} -> FieldLevelEncryptionConfig
fieldLevelEncryptionConfig) (\s :: CreateFieldLevelEncryptionConfig
s@CreateFieldLevelEncryptionConfig' {} FieldLevelEncryptionConfig
a -> CreateFieldLevelEncryptionConfig
s {$sel:fieldLevelEncryptionConfig:CreateFieldLevelEncryptionConfig' :: FieldLevelEncryptionConfig
fieldLevelEncryptionConfig = FieldLevelEncryptionConfig
a} :: CreateFieldLevelEncryptionConfig)

instance
  Core.AWSRequest
    CreateFieldLevelEncryptionConfig
  where
  type
    AWSResponse CreateFieldLevelEncryptionConfig =
      CreateFieldLevelEncryptionConfigResponse
  request :: CreateFieldLevelEncryptionConfig
-> Request CreateFieldLevelEncryptionConfig
request = Service
-> CreateFieldLevelEncryptionConfig
-> Request CreateFieldLevelEncryptionConfig
forall a. (ToRequest a, ToElement a) => Service -> a -> Request a
Request.postXML Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateFieldLevelEncryptionConfig
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse CreateFieldLevelEncryptionConfig)))
response =
    (Int
 -> ResponseHeaders
 -> [Node]
 -> Either String (AWSResponse CreateFieldLevelEncryptionConfig))
-> Logger
-> Service
-> Proxy CreateFieldLevelEncryptionConfig
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse CreateFieldLevelEncryptionConfig)))
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 Text
-> Maybe FieldLevelEncryption
-> Int
-> CreateFieldLevelEncryptionConfigResponse
CreateFieldLevelEncryptionConfigResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe FieldLevelEncryption
 -> Int
 -> CreateFieldLevelEncryptionConfigResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe FieldLevelEncryption
      -> Int
      -> CreateFieldLevelEncryptionConfigResponse)
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 Text
   -> Maybe FieldLevelEncryption
   -> Int
   -> CreateFieldLevelEncryptionConfigResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe FieldLevelEncryption
      -> Int -> CreateFieldLevelEncryptionConfigResponse)
forall (f :: * -> *) a b. Applicative f => 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
"Location")
            Either
  String
  (Maybe FieldLevelEncryption
   -> Int -> CreateFieldLevelEncryptionConfigResponse)
-> Either String (Maybe FieldLevelEncryption)
-> Either String (Int -> CreateFieldLevelEncryptionConfigResponse)
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 -> CreateFieldLevelEncryptionConfigResponse)
-> Either String Int
-> Either String CreateFieldLevelEncryptionConfigResponse
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
    CreateFieldLevelEncryptionConfig

instance
  Prelude.NFData
    CreateFieldLevelEncryptionConfig

instance
  Core.ToElement
    CreateFieldLevelEncryptionConfig
  where
  toElement :: CreateFieldLevelEncryptionConfig -> Element
toElement CreateFieldLevelEncryptionConfig' {FieldLevelEncryptionConfig
fieldLevelEncryptionConfig :: FieldLevelEncryptionConfig
$sel:fieldLevelEncryptionConfig:CreateFieldLevelEncryptionConfig' :: CreateFieldLevelEncryptionConfig -> FieldLevelEncryptionConfig
..} =
    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
    CreateFieldLevelEncryptionConfig
  where
  toHeaders :: CreateFieldLevelEncryptionConfig -> ResponseHeaders
toHeaders = ResponseHeaders
-> CreateFieldLevelEncryptionConfig -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath CreateFieldLevelEncryptionConfig where
  toPath :: CreateFieldLevelEncryptionConfig -> ByteString
toPath =
    ByteString -> CreateFieldLevelEncryptionConfig -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/2020-05-31/field-level-encryption"

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

-- | /See:/ 'newCreateFieldLevelEncryptionConfigResponse' smart constructor.
data CreateFieldLevelEncryptionConfigResponse = CreateFieldLevelEncryptionConfigResponse'
  { -- | The current version of the field level encryption configuration. For
    -- example: @E2QWRUHAPOMQZL@.
    CreateFieldLevelEncryptionConfigResponse -> Maybe Text
eTag :: Prelude.Maybe Prelude.Text,
    -- | The fully qualified URI of the new configuration resource just created.
    CreateFieldLevelEncryptionConfigResponse -> Maybe Text
location :: Prelude.Maybe Prelude.Text,
    -- | Returned when you create a new field-level encryption configuration.
    CreateFieldLevelEncryptionConfigResponse
-> Maybe FieldLevelEncryption
fieldLevelEncryption :: Prelude.Maybe FieldLevelEncryption,
    -- | The response's http status code.
    CreateFieldLevelEncryptionConfigResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateFieldLevelEncryptionConfigResponse
-> CreateFieldLevelEncryptionConfigResponse -> Bool
(CreateFieldLevelEncryptionConfigResponse
 -> CreateFieldLevelEncryptionConfigResponse -> Bool)
-> (CreateFieldLevelEncryptionConfigResponse
    -> CreateFieldLevelEncryptionConfigResponse -> Bool)
-> Eq CreateFieldLevelEncryptionConfigResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFieldLevelEncryptionConfigResponse
-> CreateFieldLevelEncryptionConfigResponse -> Bool
$c/= :: CreateFieldLevelEncryptionConfigResponse
-> CreateFieldLevelEncryptionConfigResponse -> Bool
== :: CreateFieldLevelEncryptionConfigResponse
-> CreateFieldLevelEncryptionConfigResponse -> Bool
$c== :: CreateFieldLevelEncryptionConfigResponse
-> CreateFieldLevelEncryptionConfigResponse -> Bool
Prelude.Eq, ReadPrec [CreateFieldLevelEncryptionConfigResponse]
ReadPrec CreateFieldLevelEncryptionConfigResponse
Int -> ReadS CreateFieldLevelEncryptionConfigResponse
ReadS [CreateFieldLevelEncryptionConfigResponse]
(Int -> ReadS CreateFieldLevelEncryptionConfigResponse)
-> ReadS [CreateFieldLevelEncryptionConfigResponse]
-> ReadPrec CreateFieldLevelEncryptionConfigResponse
-> ReadPrec [CreateFieldLevelEncryptionConfigResponse]
-> Read CreateFieldLevelEncryptionConfigResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFieldLevelEncryptionConfigResponse]
$creadListPrec :: ReadPrec [CreateFieldLevelEncryptionConfigResponse]
readPrec :: ReadPrec CreateFieldLevelEncryptionConfigResponse
$creadPrec :: ReadPrec CreateFieldLevelEncryptionConfigResponse
readList :: ReadS [CreateFieldLevelEncryptionConfigResponse]
$creadList :: ReadS [CreateFieldLevelEncryptionConfigResponse]
readsPrec :: Int -> ReadS CreateFieldLevelEncryptionConfigResponse
$creadsPrec :: Int -> ReadS CreateFieldLevelEncryptionConfigResponse
Prelude.Read, Int -> CreateFieldLevelEncryptionConfigResponse -> ShowS
[CreateFieldLevelEncryptionConfigResponse] -> ShowS
CreateFieldLevelEncryptionConfigResponse -> String
(Int -> CreateFieldLevelEncryptionConfigResponse -> ShowS)
-> (CreateFieldLevelEncryptionConfigResponse -> String)
-> ([CreateFieldLevelEncryptionConfigResponse] -> ShowS)
-> Show CreateFieldLevelEncryptionConfigResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFieldLevelEncryptionConfigResponse] -> ShowS
$cshowList :: [CreateFieldLevelEncryptionConfigResponse] -> ShowS
show :: CreateFieldLevelEncryptionConfigResponse -> String
$cshow :: CreateFieldLevelEncryptionConfigResponse -> String
showsPrec :: Int -> CreateFieldLevelEncryptionConfigResponse -> ShowS
$cshowsPrec :: Int -> CreateFieldLevelEncryptionConfigResponse -> ShowS
Prelude.Show, (forall x.
 CreateFieldLevelEncryptionConfigResponse
 -> Rep CreateFieldLevelEncryptionConfigResponse x)
-> (forall x.
    Rep CreateFieldLevelEncryptionConfigResponse x
    -> CreateFieldLevelEncryptionConfigResponse)
-> Generic CreateFieldLevelEncryptionConfigResponse
forall x.
Rep CreateFieldLevelEncryptionConfigResponse x
-> CreateFieldLevelEncryptionConfigResponse
forall x.
CreateFieldLevelEncryptionConfigResponse
-> Rep CreateFieldLevelEncryptionConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateFieldLevelEncryptionConfigResponse x
-> CreateFieldLevelEncryptionConfigResponse
$cfrom :: forall x.
CreateFieldLevelEncryptionConfigResponse
-> Rep CreateFieldLevelEncryptionConfigResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateFieldLevelEncryptionConfigResponse' 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', 'createFieldLevelEncryptionConfigResponse_eTag' - The current version of the field level encryption configuration. For
-- example: @E2QWRUHAPOMQZL@.
--
-- 'location', 'createFieldLevelEncryptionConfigResponse_location' - The fully qualified URI of the new configuration resource just created.
--
-- 'fieldLevelEncryption', 'createFieldLevelEncryptionConfigResponse_fieldLevelEncryption' - Returned when you create a new field-level encryption configuration.
--
-- 'httpStatus', 'createFieldLevelEncryptionConfigResponse_httpStatus' - The response's http status code.
newCreateFieldLevelEncryptionConfigResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateFieldLevelEncryptionConfigResponse
newCreateFieldLevelEncryptionConfigResponse :: Int -> CreateFieldLevelEncryptionConfigResponse
newCreateFieldLevelEncryptionConfigResponse
  Int
pHttpStatus_ =
    CreateFieldLevelEncryptionConfigResponse' :: Maybe Text
-> Maybe Text
-> Maybe FieldLevelEncryption
-> Int
-> CreateFieldLevelEncryptionConfigResponse
CreateFieldLevelEncryptionConfigResponse'
      { $sel:eTag:CreateFieldLevelEncryptionConfigResponse' :: Maybe Text
eTag =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:location:CreateFieldLevelEncryptionConfigResponse' :: Maybe Text
location = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:fieldLevelEncryption:CreateFieldLevelEncryptionConfigResponse' :: Maybe FieldLevelEncryption
fieldLevelEncryption =
          Maybe FieldLevelEncryption
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:CreateFieldLevelEncryptionConfigResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The current version of the field level encryption configuration. For
-- example: @E2QWRUHAPOMQZL@.
createFieldLevelEncryptionConfigResponse_eTag :: Lens.Lens' CreateFieldLevelEncryptionConfigResponse (Prelude.Maybe Prelude.Text)
createFieldLevelEncryptionConfigResponse_eTag :: (Maybe Text -> f (Maybe Text))
-> CreateFieldLevelEncryptionConfigResponse
-> f CreateFieldLevelEncryptionConfigResponse
createFieldLevelEncryptionConfigResponse_eTag = (CreateFieldLevelEncryptionConfigResponse -> Maybe Text)
-> (CreateFieldLevelEncryptionConfigResponse
    -> Maybe Text -> CreateFieldLevelEncryptionConfigResponse)
-> Lens
     CreateFieldLevelEncryptionConfigResponse
     CreateFieldLevelEncryptionConfigResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFieldLevelEncryptionConfigResponse' {Maybe Text
eTag :: Maybe Text
$sel:eTag:CreateFieldLevelEncryptionConfigResponse' :: CreateFieldLevelEncryptionConfigResponse -> Maybe Text
eTag} -> Maybe Text
eTag) (\s :: CreateFieldLevelEncryptionConfigResponse
s@CreateFieldLevelEncryptionConfigResponse' {} Maybe Text
a -> CreateFieldLevelEncryptionConfigResponse
s {$sel:eTag:CreateFieldLevelEncryptionConfigResponse' :: Maybe Text
eTag = Maybe Text
a} :: CreateFieldLevelEncryptionConfigResponse)

-- | The fully qualified URI of the new configuration resource just created.
createFieldLevelEncryptionConfigResponse_location :: Lens.Lens' CreateFieldLevelEncryptionConfigResponse (Prelude.Maybe Prelude.Text)
createFieldLevelEncryptionConfigResponse_location :: (Maybe Text -> f (Maybe Text))
-> CreateFieldLevelEncryptionConfigResponse
-> f CreateFieldLevelEncryptionConfigResponse
createFieldLevelEncryptionConfigResponse_location = (CreateFieldLevelEncryptionConfigResponse -> Maybe Text)
-> (CreateFieldLevelEncryptionConfigResponse
    -> Maybe Text -> CreateFieldLevelEncryptionConfigResponse)
-> Lens
     CreateFieldLevelEncryptionConfigResponse
     CreateFieldLevelEncryptionConfigResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFieldLevelEncryptionConfigResponse' {Maybe Text
location :: Maybe Text
$sel:location:CreateFieldLevelEncryptionConfigResponse' :: CreateFieldLevelEncryptionConfigResponse -> Maybe Text
location} -> Maybe Text
location) (\s :: CreateFieldLevelEncryptionConfigResponse
s@CreateFieldLevelEncryptionConfigResponse' {} Maybe Text
a -> CreateFieldLevelEncryptionConfigResponse
s {$sel:location:CreateFieldLevelEncryptionConfigResponse' :: Maybe Text
location = Maybe Text
a} :: CreateFieldLevelEncryptionConfigResponse)

-- | Returned when you create a new field-level encryption configuration.
createFieldLevelEncryptionConfigResponse_fieldLevelEncryption :: Lens.Lens' CreateFieldLevelEncryptionConfigResponse (Prelude.Maybe FieldLevelEncryption)
createFieldLevelEncryptionConfigResponse_fieldLevelEncryption :: (Maybe FieldLevelEncryption -> f (Maybe FieldLevelEncryption))
-> CreateFieldLevelEncryptionConfigResponse
-> f CreateFieldLevelEncryptionConfigResponse
createFieldLevelEncryptionConfigResponse_fieldLevelEncryption = (CreateFieldLevelEncryptionConfigResponse
 -> Maybe FieldLevelEncryption)
-> (CreateFieldLevelEncryptionConfigResponse
    -> Maybe FieldLevelEncryption
    -> CreateFieldLevelEncryptionConfigResponse)
-> Lens
     CreateFieldLevelEncryptionConfigResponse
     CreateFieldLevelEncryptionConfigResponse
     (Maybe FieldLevelEncryption)
     (Maybe FieldLevelEncryption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFieldLevelEncryptionConfigResponse' {Maybe FieldLevelEncryption
fieldLevelEncryption :: Maybe FieldLevelEncryption
$sel:fieldLevelEncryption:CreateFieldLevelEncryptionConfigResponse' :: CreateFieldLevelEncryptionConfigResponse
-> Maybe FieldLevelEncryption
fieldLevelEncryption} -> Maybe FieldLevelEncryption
fieldLevelEncryption) (\s :: CreateFieldLevelEncryptionConfigResponse
s@CreateFieldLevelEncryptionConfigResponse' {} Maybe FieldLevelEncryption
a -> CreateFieldLevelEncryptionConfigResponse
s {$sel:fieldLevelEncryption:CreateFieldLevelEncryptionConfigResponse' :: Maybe FieldLevelEncryption
fieldLevelEncryption = Maybe FieldLevelEncryption
a} :: CreateFieldLevelEncryptionConfigResponse)

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

instance
  Prelude.NFData
    CreateFieldLevelEncryptionConfigResponse