{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Firehose.Types.DeliveryStreamEncryptionConfiguration where
import qualified Amazonka.Core as Core
import Amazonka.Firehose.Types.DeliveryStreamEncryptionStatus
import Amazonka.Firehose.Types.FailureDescription
import Amazonka.Firehose.Types.KeyType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DeliveryStreamEncryptionConfiguration = DeliveryStreamEncryptionConfiguration'
{
DeliveryStreamEncryptionConfiguration
-> Maybe DeliveryStreamEncryptionStatus
status :: Prelude.Maybe DeliveryStreamEncryptionStatus,
DeliveryStreamEncryptionConfiguration -> Maybe KeyType
keyType :: Prelude.Maybe KeyType,
DeliveryStreamEncryptionConfiguration -> Maybe Text
keyARN :: Prelude.Maybe Prelude.Text,
DeliveryStreamEncryptionConfiguration -> Maybe FailureDescription
failureDescription :: Prelude.Maybe FailureDescription
}
deriving (DeliveryStreamEncryptionConfiguration
-> DeliveryStreamEncryptionConfiguration -> Bool
(DeliveryStreamEncryptionConfiguration
-> DeliveryStreamEncryptionConfiguration -> Bool)
-> (DeliveryStreamEncryptionConfiguration
-> DeliveryStreamEncryptionConfiguration -> Bool)
-> Eq DeliveryStreamEncryptionConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeliveryStreamEncryptionConfiguration
-> DeliveryStreamEncryptionConfiguration -> Bool
$c/= :: DeliveryStreamEncryptionConfiguration
-> DeliveryStreamEncryptionConfiguration -> Bool
== :: DeliveryStreamEncryptionConfiguration
-> DeliveryStreamEncryptionConfiguration -> Bool
$c== :: DeliveryStreamEncryptionConfiguration
-> DeliveryStreamEncryptionConfiguration -> Bool
Prelude.Eq, ReadPrec [DeliveryStreamEncryptionConfiguration]
ReadPrec DeliveryStreamEncryptionConfiguration
Int -> ReadS DeliveryStreamEncryptionConfiguration
ReadS [DeliveryStreamEncryptionConfiguration]
(Int -> ReadS DeliveryStreamEncryptionConfiguration)
-> ReadS [DeliveryStreamEncryptionConfiguration]
-> ReadPrec DeliveryStreamEncryptionConfiguration
-> ReadPrec [DeliveryStreamEncryptionConfiguration]
-> Read DeliveryStreamEncryptionConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeliveryStreamEncryptionConfiguration]
$creadListPrec :: ReadPrec [DeliveryStreamEncryptionConfiguration]
readPrec :: ReadPrec DeliveryStreamEncryptionConfiguration
$creadPrec :: ReadPrec DeliveryStreamEncryptionConfiguration
readList :: ReadS [DeliveryStreamEncryptionConfiguration]
$creadList :: ReadS [DeliveryStreamEncryptionConfiguration]
readsPrec :: Int -> ReadS DeliveryStreamEncryptionConfiguration
$creadsPrec :: Int -> ReadS DeliveryStreamEncryptionConfiguration
Prelude.Read, Int -> DeliveryStreamEncryptionConfiguration -> ShowS
[DeliveryStreamEncryptionConfiguration] -> ShowS
DeliveryStreamEncryptionConfiguration -> String
(Int -> DeliveryStreamEncryptionConfiguration -> ShowS)
-> (DeliveryStreamEncryptionConfiguration -> String)
-> ([DeliveryStreamEncryptionConfiguration] -> ShowS)
-> Show DeliveryStreamEncryptionConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeliveryStreamEncryptionConfiguration] -> ShowS
$cshowList :: [DeliveryStreamEncryptionConfiguration] -> ShowS
show :: DeliveryStreamEncryptionConfiguration -> String
$cshow :: DeliveryStreamEncryptionConfiguration -> String
showsPrec :: Int -> DeliveryStreamEncryptionConfiguration -> ShowS
$cshowsPrec :: Int -> DeliveryStreamEncryptionConfiguration -> ShowS
Prelude.Show, (forall x.
DeliveryStreamEncryptionConfiguration
-> Rep DeliveryStreamEncryptionConfiguration x)
-> (forall x.
Rep DeliveryStreamEncryptionConfiguration x
-> DeliveryStreamEncryptionConfiguration)
-> Generic DeliveryStreamEncryptionConfiguration
forall x.
Rep DeliveryStreamEncryptionConfiguration x
-> DeliveryStreamEncryptionConfiguration
forall x.
DeliveryStreamEncryptionConfiguration
-> Rep DeliveryStreamEncryptionConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeliveryStreamEncryptionConfiguration x
-> DeliveryStreamEncryptionConfiguration
$cfrom :: forall x.
DeliveryStreamEncryptionConfiguration
-> Rep DeliveryStreamEncryptionConfiguration x
Prelude.Generic)
newDeliveryStreamEncryptionConfiguration ::
DeliveryStreamEncryptionConfiguration
newDeliveryStreamEncryptionConfiguration :: DeliveryStreamEncryptionConfiguration
newDeliveryStreamEncryptionConfiguration =
DeliveryStreamEncryptionConfiguration' :: Maybe DeliveryStreamEncryptionStatus
-> Maybe KeyType
-> Maybe Text
-> Maybe FailureDescription
-> DeliveryStreamEncryptionConfiguration
DeliveryStreamEncryptionConfiguration'
{ $sel:status:DeliveryStreamEncryptionConfiguration' :: Maybe DeliveryStreamEncryptionStatus
status =
Maybe DeliveryStreamEncryptionStatus
forall a. Maybe a
Prelude.Nothing,
$sel:keyType:DeliveryStreamEncryptionConfiguration' :: Maybe KeyType
keyType = Maybe KeyType
forall a. Maybe a
Prelude.Nothing,
$sel:keyARN:DeliveryStreamEncryptionConfiguration' :: Maybe Text
keyARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:failureDescription:DeliveryStreamEncryptionConfiguration' :: Maybe FailureDescription
failureDescription = Maybe FailureDescription
forall a. Maybe a
Prelude.Nothing
}
deliveryStreamEncryptionConfiguration_status :: Lens.Lens' DeliveryStreamEncryptionConfiguration (Prelude.Maybe DeliveryStreamEncryptionStatus)
deliveryStreamEncryptionConfiguration_status :: (Maybe DeliveryStreamEncryptionStatus
-> f (Maybe DeliveryStreamEncryptionStatus))
-> DeliveryStreamEncryptionConfiguration
-> f DeliveryStreamEncryptionConfiguration
deliveryStreamEncryptionConfiguration_status = (DeliveryStreamEncryptionConfiguration
-> Maybe DeliveryStreamEncryptionStatus)
-> (DeliveryStreamEncryptionConfiguration
-> Maybe DeliveryStreamEncryptionStatus
-> DeliveryStreamEncryptionConfiguration)
-> Lens
DeliveryStreamEncryptionConfiguration
DeliveryStreamEncryptionConfiguration
(Maybe DeliveryStreamEncryptionStatus)
(Maybe DeliveryStreamEncryptionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeliveryStreamEncryptionConfiguration' {Maybe DeliveryStreamEncryptionStatus
status :: Maybe DeliveryStreamEncryptionStatus
$sel:status:DeliveryStreamEncryptionConfiguration' :: DeliveryStreamEncryptionConfiguration
-> Maybe DeliveryStreamEncryptionStatus
status} -> Maybe DeliveryStreamEncryptionStatus
status) (\s :: DeliveryStreamEncryptionConfiguration
s@DeliveryStreamEncryptionConfiguration' {} Maybe DeliveryStreamEncryptionStatus
a -> DeliveryStreamEncryptionConfiguration
s {$sel:status:DeliveryStreamEncryptionConfiguration' :: Maybe DeliveryStreamEncryptionStatus
status = Maybe DeliveryStreamEncryptionStatus
a} :: DeliveryStreamEncryptionConfiguration)
deliveryStreamEncryptionConfiguration_keyType :: Lens.Lens' DeliveryStreamEncryptionConfiguration (Prelude.Maybe KeyType)
deliveryStreamEncryptionConfiguration_keyType :: (Maybe KeyType -> f (Maybe KeyType))
-> DeliveryStreamEncryptionConfiguration
-> f DeliveryStreamEncryptionConfiguration
deliveryStreamEncryptionConfiguration_keyType = (DeliveryStreamEncryptionConfiguration -> Maybe KeyType)
-> (DeliveryStreamEncryptionConfiguration
-> Maybe KeyType -> DeliveryStreamEncryptionConfiguration)
-> Lens
DeliveryStreamEncryptionConfiguration
DeliveryStreamEncryptionConfiguration
(Maybe KeyType)
(Maybe KeyType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeliveryStreamEncryptionConfiguration' {Maybe KeyType
keyType :: Maybe KeyType
$sel:keyType:DeliveryStreamEncryptionConfiguration' :: DeliveryStreamEncryptionConfiguration -> Maybe KeyType
keyType} -> Maybe KeyType
keyType) (\s :: DeliveryStreamEncryptionConfiguration
s@DeliveryStreamEncryptionConfiguration' {} Maybe KeyType
a -> DeliveryStreamEncryptionConfiguration
s {$sel:keyType:DeliveryStreamEncryptionConfiguration' :: Maybe KeyType
keyType = Maybe KeyType
a} :: DeliveryStreamEncryptionConfiguration)
deliveryStreamEncryptionConfiguration_keyARN :: Lens.Lens' DeliveryStreamEncryptionConfiguration (Prelude.Maybe Prelude.Text)
deliveryStreamEncryptionConfiguration_keyARN :: (Maybe Text -> f (Maybe Text))
-> DeliveryStreamEncryptionConfiguration
-> f DeliveryStreamEncryptionConfiguration
deliveryStreamEncryptionConfiguration_keyARN = (DeliveryStreamEncryptionConfiguration -> Maybe Text)
-> (DeliveryStreamEncryptionConfiguration
-> Maybe Text -> DeliveryStreamEncryptionConfiguration)
-> Lens
DeliveryStreamEncryptionConfiguration
DeliveryStreamEncryptionConfiguration
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeliveryStreamEncryptionConfiguration' {Maybe Text
keyARN :: Maybe Text
$sel:keyARN:DeliveryStreamEncryptionConfiguration' :: DeliveryStreamEncryptionConfiguration -> Maybe Text
keyARN} -> Maybe Text
keyARN) (\s :: DeliveryStreamEncryptionConfiguration
s@DeliveryStreamEncryptionConfiguration' {} Maybe Text
a -> DeliveryStreamEncryptionConfiguration
s {$sel:keyARN:DeliveryStreamEncryptionConfiguration' :: Maybe Text
keyARN = Maybe Text
a} :: DeliveryStreamEncryptionConfiguration)
deliveryStreamEncryptionConfiguration_failureDescription :: Lens.Lens' DeliveryStreamEncryptionConfiguration (Prelude.Maybe FailureDescription)
deliveryStreamEncryptionConfiguration_failureDescription :: (Maybe FailureDescription -> f (Maybe FailureDescription))
-> DeliveryStreamEncryptionConfiguration
-> f DeliveryStreamEncryptionConfiguration
deliveryStreamEncryptionConfiguration_failureDescription = (DeliveryStreamEncryptionConfiguration -> Maybe FailureDescription)
-> (DeliveryStreamEncryptionConfiguration
-> Maybe FailureDescription
-> DeliveryStreamEncryptionConfiguration)
-> Lens
DeliveryStreamEncryptionConfiguration
DeliveryStreamEncryptionConfiguration
(Maybe FailureDescription)
(Maybe FailureDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeliveryStreamEncryptionConfiguration' {Maybe FailureDescription
failureDescription :: Maybe FailureDescription
$sel:failureDescription:DeliveryStreamEncryptionConfiguration' :: DeliveryStreamEncryptionConfiguration -> Maybe FailureDescription
failureDescription} -> Maybe FailureDescription
failureDescription) (\s :: DeliveryStreamEncryptionConfiguration
s@DeliveryStreamEncryptionConfiguration' {} Maybe FailureDescription
a -> DeliveryStreamEncryptionConfiguration
s {$sel:failureDescription:DeliveryStreamEncryptionConfiguration' :: Maybe FailureDescription
failureDescription = Maybe FailureDescription
a} :: DeliveryStreamEncryptionConfiguration)
instance
Core.FromJSON
DeliveryStreamEncryptionConfiguration
where
parseJSON :: Value -> Parser DeliveryStreamEncryptionConfiguration
parseJSON =
String
-> (Object -> Parser DeliveryStreamEncryptionConfiguration)
-> Value
-> Parser DeliveryStreamEncryptionConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DeliveryStreamEncryptionConfiguration"
( \Object
x ->
Maybe DeliveryStreamEncryptionStatus
-> Maybe KeyType
-> Maybe Text
-> Maybe FailureDescription
-> DeliveryStreamEncryptionConfiguration
DeliveryStreamEncryptionConfiguration'
(Maybe DeliveryStreamEncryptionStatus
-> Maybe KeyType
-> Maybe Text
-> Maybe FailureDescription
-> DeliveryStreamEncryptionConfiguration)
-> Parser (Maybe DeliveryStreamEncryptionStatus)
-> Parser
(Maybe KeyType
-> Maybe Text
-> Maybe FailureDescription
-> DeliveryStreamEncryptionConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe DeliveryStreamEncryptionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe KeyType
-> Maybe Text
-> Maybe FailureDescription
-> DeliveryStreamEncryptionConfiguration)
-> Parser (Maybe KeyType)
-> Parser
(Maybe Text
-> Maybe FailureDescription
-> DeliveryStreamEncryptionConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe KeyType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"KeyType")
Parser
(Maybe Text
-> Maybe FailureDescription
-> DeliveryStreamEncryptionConfiguration)
-> Parser (Maybe Text)
-> Parser
(Maybe FailureDescription -> DeliveryStreamEncryptionConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"KeyARN")
Parser
(Maybe FailureDescription -> DeliveryStreamEncryptionConfiguration)
-> Parser (Maybe FailureDescription)
-> Parser DeliveryStreamEncryptionConfiguration
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe FailureDescription)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FailureDescription")
)
instance
Prelude.Hashable
DeliveryStreamEncryptionConfiguration
instance
Prelude.NFData
DeliveryStreamEncryptionConfiguration