{-# 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.IoTSiteWise.DescribeDefaultEncryptionConfiguration
-- 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)
--
-- Retrieves information about the default encryption configuration for the
-- Amazon Web Services account in the default or specified Region. For more
-- information, see
-- <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/key-management.html Key management>
-- in the /IoT SiteWise User Guide/.
module Amazonka.IoTSiteWise.DescribeDefaultEncryptionConfiguration
  ( -- * Creating a Request
    DescribeDefaultEncryptionConfiguration (..),
    newDescribeDefaultEncryptionConfiguration,

    -- * Destructuring the Response
    DescribeDefaultEncryptionConfigurationResponse (..),
    newDescribeDefaultEncryptionConfigurationResponse,

    -- * Response Lenses
    describeDefaultEncryptionConfigurationResponse_kmsKeyArn,
    describeDefaultEncryptionConfigurationResponse_httpStatus,
    describeDefaultEncryptionConfigurationResponse_encryptionType,
    describeDefaultEncryptionConfigurationResponse_configurationStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IoTSiteWise.Types
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:/ 'newDescribeDefaultEncryptionConfiguration' smart constructor.
data DescribeDefaultEncryptionConfiguration = DescribeDefaultEncryptionConfiguration'
  {
  }
  deriving (DescribeDefaultEncryptionConfiguration
-> DescribeDefaultEncryptionConfiguration -> Bool
(DescribeDefaultEncryptionConfiguration
 -> DescribeDefaultEncryptionConfiguration -> Bool)
-> (DescribeDefaultEncryptionConfiguration
    -> DescribeDefaultEncryptionConfiguration -> Bool)
-> Eq DescribeDefaultEncryptionConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDefaultEncryptionConfiguration
-> DescribeDefaultEncryptionConfiguration -> Bool
$c/= :: DescribeDefaultEncryptionConfiguration
-> DescribeDefaultEncryptionConfiguration -> Bool
== :: DescribeDefaultEncryptionConfiguration
-> DescribeDefaultEncryptionConfiguration -> Bool
$c== :: DescribeDefaultEncryptionConfiguration
-> DescribeDefaultEncryptionConfiguration -> Bool
Prelude.Eq, ReadPrec [DescribeDefaultEncryptionConfiguration]
ReadPrec DescribeDefaultEncryptionConfiguration
Int -> ReadS DescribeDefaultEncryptionConfiguration
ReadS [DescribeDefaultEncryptionConfiguration]
(Int -> ReadS DescribeDefaultEncryptionConfiguration)
-> ReadS [DescribeDefaultEncryptionConfiguration]
-> ReadPrec DescribeDefaultEncryptionConfiguration
-> ReadPrec [DescribeDefaultEncryptionConfiguration]
-> Read DescribeDefaultEncryptionConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDefaultEncryptionConfiguration]
$creadListPrec :: ReadPrec [DescribeDefaultEncryptionConfiguration]
readPrec :: ReadPrec DescribeDefaultEncryptionConfiguration
$creadPrec :: ReadPrec DescribeDefaultEncryptionConfiguration
readList :: ReadS [DescribeDefaultEncryptionConfiguration]
$creadList :: ReadS [DescribeDefaultEncryptionConfiguration]
readsPrec :: Int -> ReadS DescribeDefaultEncryptionConfiguration
$creadsPrec :: Int -> ReadS DescribeDefaultEncryptionConfiguration
Prelude.Read, Int -> DescribeDefaultEncryptionConfiguration -> ShowS
[DescribeDefaultEncryptionConfiguration] -> ShowS
DescribeDefaultEncryptionConfiguration -> String
(Int -> DescribeDefaultEncryptionConfiguration -> ShowS)
-> (DescribeDefaultEncryptionConfiguration -> String)
-> ([DescribeDefaultEncryptionConfiguration] -> ShowS)
-> Show DescribeDefaultEncryptionConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDefaultEncryptionConfiguration] -> ShowS
$cshowList :: [DescribeDefaultEncryptionConfiguration] -> ShowS
show :: DescribeDefaultEncryptionConfiguration -> String
$cshow :: DescribeDefaultEncryptionConfiguration -> String
showsPrec :: Int -> DescribeDefaultEncryptionConfiguration -> ShowS
$cshowsPrec :: Int -> DescribeDefaultEncryptionConfiguration -> ShowS
Prelude.Show, (forall x.
 DescribeDefaultEncryptionConfiguration
 -> Rep DescribeDefaultEncryptionConfiguration x)
-> (forall x.
    Rep DescribeDefaultEncryptionConfiguration x
    -> DescribeDefaultEncryptionConfiguration)
-> Generic DescribeDefaultEncryptionConfiguration
forall x.
Rep DescribeDefaultEncryptionConfiguration x
-> DescribeDefaultEncryptionConfiguration
forall x.
DescribeDefaultEncryptionConfiguration
-> Rep DescribeDefaultEncryptionConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDefaultEncryptionConfiguration x
-> DescribeDefaultEncryptionConfiguration
$cfrom :: forall x.
DescribeDefaultEncryptionConfiguration
-> Rep DescribeDefaultEncryptionConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDefaultEncryptionConfiguration' 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.
newDescribeDefaultEncryptionConfiguration ::
  DescribeDefaultEncryptionConfiguration
newDescribeDefaultEncryptionConfiguration :: DescribeDefaultEncryptionConfiguration
newDescribeDefaultEncryptionConfiguration =
  DescribeDefaultEncryptionConfiguration
DescribeDefaultEncryptionConfiguration'

instance
  Core.AWSRequest
    DescribeDefaultEncryptionConfiguration
  where
  type
    AWSResponse
      DescribeDefaultEncryptionConfiguration =
      DescribeDefaultEncryptionConfigurationResponse
  request :: DescribeDefaultEncryptionConfiguration
-> Request DescribeDefaultEncryptionConfiguration
request = Service
-> DescribeDefaultEncryptionConfiguration
-> Request DescribeDefaultEncryptionConfiguration
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeDefaultEncryptionConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DescribeDefaultEncryptionConfiguration)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either
      String (AWSResponse DescribeDefaultEncryptionConfiguration))
-> Logger
-> Service
-> Proxy DescribeDefaultEncryptionConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DescribeDefaultEncryptionConfiguration)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Int
-> EncryptionType
-> ConfigurationStatus
-> DescribeDefaultEncryptionConfigurationResponse
DescribeDefaultEncryptionConfigurationResponse'
            (Maybe Text
 -> Int
 -> EncryptionType
 -> ConfigurationStatus
 -> DescribeDefaultEncryptionConfigurationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Int
      -> EncryptionType
      -> ConfigurationStatus
      -> DescribeDefaultEncryptionConfigurationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"kmsKeyArn")
              Either
  String
  (Int
   -> EncryptionType
   -> ConfigurationStatus
   -> DescribeDefaultEncryptionConfigurationResponse)
-> Either String Int
-> Either
     String
     (EncryptionType
      -> ConfigurationStatus
      -> DescribeDefaultEncryptionConfigurationResponse)
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))
              Either
  String
  (EncryptionType
   -> ConfigurationStatus
   -> DescribeDefaultEncryptionConfigurationResponse)
-> Either String EncryptionType
-> Either
     String
     (ConfigurationStatus
      -> DescribeDefaultEncryptionConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String EncryptionType
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"encryptionType")
              Either
  String
  (ConfigurationStatus
   -> DescribeDefaultEncryptionConfigurationResponse)
-> Either String ConfigurationStatus
-> Either String DescribeDefaultEncryptionConfigurationResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String ConfigurationStatus
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"configurationStatus")
      )

instance
  Prelude.Hashable
    DescribeDefaultEncryptionConfiguration

instance
  Prelude.NFData
    DescribeDefaultEncryptionConfiguration

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

instance
  Core.ToPath
    DescribeDefaultEncryptionConfiguration
  where
  toPath :: DescribeDefaultEncryptionConfiguration -> ByteString
toPath =
    ByteString -> DescribeDefaultEncryptionConfiguration -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/configuration/account/encryption"

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

-- | /See:/ 'newDescribeDefaultEncryptionConfigurationResponse' smart constructor.
data DescribeDefaultEncryptionConfigurationResponse = DescribeDefaultEncryptionConfigurationResponse'
  { -- | The key ARN of the customer managed customer master key (CMK) used for
    -- KMS encryption if you use @KMS_BASED_ENCRYPTION@.
    DescribeDefaultEncryptionConfigurationResponse -> Maybe Text
kmsKeyArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeDefaultEncryptionConfigurationResponse -> Int
httpStatus :: Prelude.Int,
    -- | The type of encryption used for the encryption configuration.
    DescribeDefaultEncryptionConfigurationResponse -> EncryptionType
encryptionType :: EncryptionType,
    -- | The status of the account configuration. This contains the
    -- @ConfigurationState@. If there\'s an error, it also contains the
    -- @ErrorDetails@.
    DescribeDefaultEncryptionConfigurationResponse
-> ConfigurationStatus
configurationStatus :: ConfigurationStatus
  }
  deriving (DescribeDefaultEncryptionConfigurationResponse
-> DescribeDefaultEncryptionConfigurationResponse -> Bool
(DescribeDefaultEncryptionConfigurationResponse
 -> DescribeDefaultEncryptionConfigurationResponse -> Bool)
-> (DescribeDefaultEncryptionConfigurationResponse
    -> DescribeDefaultEncryptionConfigurationResponse -> Bool)
-> Eq DescribeDefaultEncryptionConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDefaultEncryptionConfigurationResponse
-> DescribeDefaultEncryptionConfigurationResponse -> Bool
$c/= :: DescribeDefaultEncryptionConfigurationResponse
-> DescribeDefaultEncryptionConfigurationResponse -> Bool
== :: DescribeDefaultEncryptionConfigurationResponse
-> DescribeDefaultEncryptionConfigurationResponse -> Bool
$c== :: DescribeDefaultEncryptionConfigurationResponse
-> DescribeDefaultEncryptionConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDefaultEncryptionConfigurationResponse]
ReadPrec DescribeDefaultEncryptionConfigurationResponse
Int -> ReadS DescribeDefaultEncryptionConfigurationResponse
ReadS [DescribeDefaultEncryptionConfigurationResponse]
(Int -> ReadS DescribeDefaultEncryptionConfigurationResponse)
-> ReadS [DescribeDefaultEncryptionConfigurationResponse]
-> ReadPrec DescribeDefaultEncryptionConfigurationResponse
-> ReadPrec [DescribeDefaultEncryptionConfigurationResponse]
-> Read DescribeDefaultEncryptionConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDefaultEncryptionConfigurationResponse]
$creadListPrec :: ReadPrec [DescribeDefaultEncryptionConfigurationResponse]
readPrec :: ReadPrec DescribeDefaultEncryptionConfigurationResponse
$creadPrec :: ReadPrec DescribeDefaultEncryptionConfigurationResponse
readList :: ReadS [DescribeDefaultEncryptionConfigurationResponse]
$creadList :: ReadS [DescribeDefaultEncryptionConfigurationResponse]
readsPrec :: Int -> ReadS DescribeDefaultEncryptionConfigurationResponse
$creadsPrec :: Int -> ReadS DescribeDefaultEncryptionConfigurationResponse
Prelude.Read, Int -> DescribeDefaultEncryptionConfigurationResponse -> ShowS
[DescribeDefaultEncryptionConfigurationResponse] -> ShowS
DescribeDefaultEncryptionConfigurationResponse -> String
(Int -> DescribeDefaultEncryptionConfigurationResponse -> ShowS)
-> (DescribeDefaultEncryptionConfigurationResponse -> String)
-> ([DescribeDefaultEncryptionConfigurationResponse] -> ShowS)
-> Show DescribeDefaultEncryptionConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDefaultEncryptionConfigurationResponse] -> ShowS
$cshowList :: [DescribeDefaultEncryptionConfigurationResponse] -> ShowS
show :: DescribeDefaultEncryptionConfigurationResponse -> String
$cshow :: DescribeDefaultEncryptionConfigurationResponse -> String
showsPrec :: Int -> DescribeDefaultEncryptionConfigurationResponse -> ShowS
$cshowsPrec :: Int -> DescribeDefaultEncryptionConfigurationResponse -> ShowS
Prelude.Show, (forall x.
 DescribeDefaultEncryptionConfigurationResponse
 -> Rep DescribeDefaultEncryptionConfigurationResponse x)
-> (forall x.
    Rep DescribeDefaultEncryptionConfigurationResponse x
    -> DescribeDefaultEncryptionConfigurationResponse)
-> Generic DescribeDefaultEncryptionConfigurationResponse
forall x.
Rep DescribeDefaultEncryptionConfigurationResponse x
-> DescribeDefaultEncryptionConfigurationResponse
forall x.
DescribeDefaultEncryptionConfigurationResponse
-> Rep DescribeDefaultEncryptionConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDefaultEncryptionConfigurationResponse x
-> DescribeDefaultEncryptionConfigurationResponse
$cfrom :: forall x.
DescribeDefaultEncryptionConfigurationResponse
-> Rep DescribeDefaultEncryptionConfigurationResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDefaultEncryptionConfigurationResponse' 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:
--
-- 'kmsKeyArn', 'describeDefaultEncryptionConfigurationResponse_kmsKeyArn' - The key ARN of the customer managed customer master key (CMK) used for
-- KMS encryption if you use @KMS_BASED_ENCRYPTION@.
--
-- 'httpStatus', 'describeDefaultEncryptionConfigurationResponse_httpStatus' - The response's http status code.
--
-- 'encryptionType', 'describeDefaultEncryptionConfigurationResponse_encryptionType' - The type of encryption used for the encryption configuration.
--
-- 'configurationStatus', 'describeDefaultEncryptionConfigurationResponse_configurationStatus' - The status of the account configuration. This contains the
-- @ConfigurationState@. If there\'s an error, it also contains the
-- @ErrorDetails@.
newDescribeDefaultEncryptionConfigurationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'encryptionType'
  EncryptionType ->
  -- | 'configurationStatus'
  ConfigurationStatus ->
  DescribeDefaultEncryptionConfigurationResponse
newDescribeDefaultEncryptionConfigurationResponse :: Int
-> EncryptionType
-> ConfigurationStatus
-> DescribeDefaultEncryptionConfigurationResponse
newDescribeDefaultEncryptionConfigurationResponse
  Int
pHttpStatus_
  EncryptionType
pEncryptionType_
  ConfigurationStatus
pConfigurationStatus_ =
    DescribeDefaultEncryptionConfigurationResponse' :: Maybe Text
-> Int
-> EncryptionType
-> ConfigurationStatus
-> DescribeDefaultEncryptionConfigurationResponse
DescribeDefaultEncryptionConfigurationResponse'
      { $sel:kmsKeyArn:DescribeDefaultEncryptionConfigurationResponse' :: Maybe Text
kmsKeyArn =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeDefaultEncryptionConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:encryptionType:DescribeDefaultEncryptionConfigurationResponse' :: EncryptionType
encryptionType =
          EncryptionType
pEncryptionType_,
        $sel:configurationStatus:DescribeDefaultEncryptionConfigurationResponse' :: ConfigurationStatus
configurationStatus =
          ConfigurationStatus
pConfigurationStatus_
      }

-- | The key ARN of the customer managed customer master key (CMK) used for
-- KMS encryption if you use @KMS_BASED_ENCRYPTION@.
describeDefaultEncryptionConfigurationResponse_kmsKeyArn :: Lens.Lens' DescribeDefaultEncryptionConfigurationResponse (Prelude.Maybe Prelude.Text)
describeDefaultEncryptionConfigurationResponse_kmsKeyArn :: (Maybe Text -> f (Maybe Text))
-> DescribeDefaultEncryptionConfigurationResponse
-> f DescribeDefaultEncryptionConfigurationResponse
describeDefaultEncryptionConfigurationResponse_kmsKeyArn = (DescribeDefaultEncryptionConfigurationResponse -> Maybe Text)
-> (DescribeDefaultEncryptionConfigurationResponse
    -> Maybe Text -> DescribeDefaultEncryptionConfigurationResponse)
-> Lens
     DescribeDefaultEncryptionConfigurationResponse
     DescribeDefaultEncryptionConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDefaultEncryptionConfigurationResponse' {Maybe Text
kmsKeyArn :: Maybe Text
$sel:kmsKeyArn:DescribeDefaultEncryptionConfigurationResponse' :: DescribeDefaultEncryptionConfigurationResponse -> Maybe Text
kmsKeyArn} -> Maybe Text
kmsKeyArn) (\s :: DescribeDefaultEncryptionConfigurationResponse
s@DescribeDefaultEncryptionConfigurationResponse' {} Maybe Text
a -> DescribeDefaultEncryptionConfigurationResponse
s {$sel:kmsKeyArn:DescribeDefaultEncryptionConfigurationResponse' :: Maybe Text
kmsKeyArn = Maybe Text
a} :: DescribeDefaultEncryptionConfigurationResponse)

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

-- | The type of encryption used for the encryption configuration.
describeDefaultEncryptionConfigurationResponse_encryptionType :: Lens.Lens' DescribeDefaultEncryptionConfigurationResponse EncryptionType
describeDefaultEncryptionConfigurationResponse_encryptionType :: (EncryptionType -> f EncryptionType)
-> DescribeDefaultEncryptionConfigurationResponse
-> f DescribeDefaultEncryptionConfigurationResponse
describeDefaultEncryptionConfigurationResponse_encryptionType = (DescribeDefaultEncryptionConfigurationResponse -> EncryptionType)
-> (DescribeDefaultEncryptionConfigurationResponse
    -> EncryptionType
    -> DescribeDefaultEncryptionConfigurationResponse)
-> Lens
     DescribeDefaultEncryptionConfigurationResponse
     DescribeDefaultEncryptionConfigurationResponse
     EncryptionType
     EncryptionType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDefaultEncryptionConfigurationResponse' {EncryptionType
encryptionType :: EncryptionType
$sel:encryptionType:DescribeDefaultEncryptionConfigurationResponse' :: DescribeDefaultEncryptionConfigurationResponse -> EncryptionType
encryptionType} -> EncryptionType
encryptionType) (\s :: DescribeDefaultEncryptionConfigurationResponse
s@DescribeDefaultEncryptionConfigurationResponse' {} EncryptionType
a -> DescribeDefaultEncryptionConfigurationResponse
s {$sel:encryptionType:DescribeDefaultEncryptionConfigurationResponse' :: EncryptionType
encryptionType = EncryptionType
a} :: DescribeDefaultEncryptionConfigurationResponse)

-- | The status of the account configuration. This contains the
-- @ConfigurationState@. If there\'s an error, it also contains the
-- @ErrorDetails@.
describeDefaultEncryptionConfigurationResponse_configurationStatus :: Lens.Lens' DescribeDefaultEncryptionConfigurationResponse ConfigurationStatus
describeDefaultEncryptionConfigurationResponse_configurationStatus :: (ConfigurationStatus -> f ConfigurationStatus)
-> DescribeDefaultEncryptionConfigurationResponse
-> f DescribeDefaultEncryptionConfigurationResponse
describeDefaultEncryptionConfigurationResponse_configurationStatus = (DescribeDefaultEncryptionConfigurationResponse
 -> ConfigurationStatus)
-> (DescribeDefaultEncryptionConfigurationResponse
    -> ConfigurationStatus
    -> DescribeDefaultEncryptionConfigurationResponse)
-> Lens
     DescribeDefaultEncryptionConfigurationResponse
     DescribeDefaultEncryptionConfigurationResponse
     ConfigurationStatus
     ConfigurationStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDefaultEncryptionConfigurationResponse' {ConfigurationStatus
configurationStatus :: ConfigurationStatus
$sel:configurationStatus:DescribeDefaultEncryptionConfigurationResponse' :: DescribeDefaultEncryptionConfigurationResponse
-> ConfigurationStatus
configurationStatus} -> ConfigurationStatus
configurationStatus) (\s :: DescribeDefaultEncryptionConfigurationResponse
s@DescribeDefaultEncryptionConfigurationResponse' {} ConfigurationStatus
a -> DescribeDefaultEncryptionConfigurationResponse
s {$sel:configurationStatus:DescribeDefaultEncryptionConfigurationResponse' :: ConfigurationStatus
configurationStatus = ConfigurationStatus
a} :: DescribeDefaultEncryptionConfigurationResponse)

instance
  Prelude.NFData
    DescribeDefaultEncryptionConfigurationResponse