{-# 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 #-}
module Amazonka.Firehose.StopDeliveryStreamEncryption
(
StopDeliveryStreamEncryption (..),
newStopDeliveryStreamEncryption,
stopDeliveryStreamEncryption_deliveryStreamName,
StopDeliveryStreamEncryptionResponse (..),
newStopDeliveryStreamEncryptionResponse,
stopDeliveryStreamEncryptionResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Firehose.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
data StopDeliveryStreamEncryption = StopDeliveryStreamEncryption'
{
StopDeliveryStreamEncryption -> Text
deliveryStreamName :: Prelude.Text
}
deriving (StopDeliveryStreamEncryption
-> StopDeliveryStreamEncryption -> Bool
(StopDeliveryStreamEncryption
-> StopDeliveryStreamEncryption -> Bool)
-> (StopDeliveryStreamEncryption
-> StopDeliveryStreamEncryption -> Bool)
-> Eq StopDeliveryStreamEncryption
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StopDeliveryStreamEncryption
-> StopDeliveryStreamEncryption -> Bool
$c/= :: StopDeliveryStreamEncryption
-> StopDeliveryStreamEncryption -> Bool
== :: StopDeliveryStreamEncryption
-> StopDeliveryStreamEncryption -> Bool
$c== :: StopDeliveryStreamEncryption
-> StopDeliveryStreamEncryption -> Bool
Prelude.Eq, ReadPrec [StopDeliveryStreamEncryption]
ReadPrec StopDeliveryStreamEncryption
Int -> ReadS StopDeliveryStreamEncryption
ReadS [StopDeliveryStreamEncryption]
(Int -> ReadS StopDeliveryStreamEncryption)
-> ReadS [StopDeliveryStreamEncryption]
-> ReadPrec StopDeliveryStreamEncryption
-> ReadPrec [StopDeliveryStreamEncryption]
-> Read StopDeliveryStreamEncryption
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StopDeliveryStreamEncryption]
$creadListPrec :: ReadPrec [StopDeliveryStreamEncryption]
readPrec :: ReadPrec StopDeliveryStreamEncryption
$creadPrec :: ReadPrec StopDeliveryStreamEncryption
readList :: ReadS [StopDeliveryStreamEncryption]
$creadList :: ReadS [StopDeliveryStreamEncryption]
readsPrec :: Int -> ReadS StopDeliveryStreamEncryption
$creadsPrec :: Int -> ReadS StopDeliveryStreamEncryption
Prelude.Read, Int -> StopDeliveryStreamEncryption -> ShowS
[StopDeliveryStreamEncryption] -> ShowS
StopDeliveryStreamEncryption -> String
(Int -> StopDeliveryStreamEncryption -> ShowS)
-> (StopDeliveryStreamEncryption -> String)
-> ([StopDeliveryStreamEncryption] -> ShowS)
-> Show StopDeliveryStreamEncryption
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StopDeliveryStreamEncryption] -> ShowS
$cshowList :: [StopDeliveryStreamEncryption] -> ShowS
show :: StopDeliveryStreamEncryption -> String
$cshow :: StopDeliveryStreamEncryption -> String
showsPrec :: Int -> StopDeliveryStreamEncryption -> ShowS
$cshowsPrec :: Int -> StopDeliveryStreamEncryption -> ShowS
Prelude.Show, (forall x.
StopDeliveryStreamEncryption -> Rep StopDeliveryStreamEncryption x)
-> (forall x.
Rep StopDeliveryStreamEncryption x -> StopDeliveryStreamEncryption)
-> Generic StopDeliveryStreamEncryption
forall x.
Rep StopDeliveryStreamEncryption x -> StopDeliveryStreamEncryption
forall x.
StopDeliveryStreamEncryption -> Rep StopDeliveryStreamEncryption x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StopDeliveryStreamEncryption x -> StopDeliveryStreamEncryption
$cfrom :: forall x.
StopDeliveryStreamEncryption -> Rep StopDeliveryStreamEncryption x
Prelude.Generic)
newStopDeliveryStreamEncryption ::
Prelude.Text ->
StopDeliveryStreamEncryption
newStopDeliveryStreamEncryption :: Text -> StopDeliveryStreamEncryption
newStopDeliveryStreamEncryption Text
pDeliveryStreamName_ =
StopDeliveryStreamEncryption' :: Text -> StopDeliveryStreamEncryption
StopDeliveryStreamEncryption'
{ $sel:deliveryStreamName:StopDeliveryStreamEncryption' :: Text
deliveryStreamName =
Text
pDeliveryStreamName_
}
stopDeliveryStreamEncryption_deliveryStreamName :: Lens.Lens' StopDeliveryStreamEncryption Prelude.Text
stopDeliveryStreamEncryption_deliveryStreamName :: (Text -> f Text)
-> StopDeliveryStreamEncryption -> f StopDeliveryStreamEncryption
stopDeliveryStreamEncryption_deliveryStreamName = (StopDeliveryStreamEncryption -> Text)
-> (StopDeliveryStreamEncryption
-> Text -> StopDeliveryStreamEncryption)
-> Lens
StopDeliveryStreamEncryption StopDeliveryStreamEncryption Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopDeliveryStreamEncryption' {Text
deliveryStreamName :: Text
$sel:deliveryStreamName:StopDeliveryStreamEncryption' :: StopDeliveryStreamEncryption -> Text
deliveryStreamName} -> Text
deliveryStreamName) (\s :: StopDeliveryStreamEncryption
s@StopDeliveryStreamEncryption' {} Text
a -> StopDeliveryStreamEncryption
s {$sel:deliveryStreamName:StopDeliveryStreamEncryption' :: Text
deliveryStreamName = Text
a} :: StopDeliveryStreamEncryption)
instance Core.AWSRequest StopDeliveryStreamEncryption where
type
AWSResponse StopDeliveryStreamEncryption =
StopDeliveryStreamEncryptionResponse
request :: StopDeliveryStreamEncryption
-> Request StopDeliveryStreamEncryption
request = Service
-> StopDeliveryStreamEncryption
-> Request StopDeliveryStreamEncryption
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy StopDeliveryStreamEncryption
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StopDeliveryStreamEncryption)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse StopDeliveryStreamEncryption))
-> Logger
-> Service
-> Proxy StopDeliveryStreamEncryption
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StopDeliveryStreamEncryption)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> StopDeliveryStreamEncryptionResponse
StopDeliveryStreamEncryptionResponse'
(Int -> StopDeliveryStreamEncryptionResponse)
-> Either String Int
-> Either String StopDeliveryStreamEncryptionResponse
forall (f :: * -> *) a b. Functor 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
StopDeliveryStreamEncryption
instance Prelude.NFData StopDeliveryStreamEncryption
instance Core.ToHeaders StopDeliveryStreamEncryption where
toHeaders :: StopDeliveryStreamEncryption -> ResponseHeaders
toHeaders =
ResponseHeaders -> StopDeliveryStreamEncryption -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"Firehose_20150804.StopDeliveryStreamEncryption" ::
Prelude.ByteString
),
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.ToJSON StopDeliveryStreamEncryption where
toJSON :: StopDeliveryStreamEncryption -> Value
toJSON StopDeliveryStreamEncryption' {Text
deliveryStreamName :: Text
$sel:deliveryStreamName:StopDeliveryStreamEncryption' :: StopDeliveryStreamEncryption -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"DeliveryStreamName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
deliveryStreamName)
]
)
instance Core.ToPath StopDeliveryStreamEncryption where
toPath :: StopDeliveryStreamEncryption -> ByteString
toPath = ByteString -> StopDeliveryStreamEncryption -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery StopDeliveryStreamEncryption where
toQuery :: StopDeliveryStreamEncryption -> QueryString
toQuery = QueryString -> StopDeliveryStreamEncryption -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data StopDeliveryStreamEncryptionResponse = StopDeliveryStreamEncryptionResponse'
{
StopDeliveryStreamEncryptionResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StopDeliveryStreamEncryptionResponse
-> StopDeliveryStreamEncryptionResponse -> Bool
(StopDeliveryStreamEncryptionResponse
-> StopDeliveryStreamEncryptionResponse -> Bool)
-> (StopDeliveryStreamEncryptionResponse
-> StopDeliveryStreamEncryptionResponse -> Bool)
-> Eq StopDeliveryStreamEncryptionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StopDeliveryStreamEncryptionResponse
-> StopDeliveryStreamEncryptionResponse -> Bool
$c/= :: StopDeliveryStreamEncryptionResponse
-> StopDeliveryStreamEncryptionResponse -> Bool
== :: StopDeliveryStreamEncryptionResponse
-> StopDeliveryStreamEncryptionResponse -> Bool
$c== :: StopDeliveryStreamEncryptionResponse
-> StopDeliveryStreamEncryptionResponse -> Bool
Prelude.Eq, ReadPrec [StopDeliveryStreamEncryptionResponse]
ReadPrec StopDeliveryStreamEncryptionResponse
Int -> ReadS StopDeliveryStreamEncryptionResponse
ReadS [StopDeliveryStreamEncryptionResponse]
(Int -> ReadS StopDeliveryStreamEncryptionResponse)
-> ReadS [StopDeliveryStreamEncryptionResponse]
-> ReadPrec StopDeliveryStreamEncryptionResponse
-> ReadPrec [StopDeliveryStreamEncryptionResponse]
-> Read StopDeliveryStreamEncryptionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StopDeliveryStreamEncryptionResponse]
$creadListPrec :: ReadPrec [StopDeliveryStreamEncryptionResponse]
readPrec :: ReadPrec StopDeliveryStreamEncryptionResponse
$creadPrec :: ReadPrec StopDeliveryStreamEncryptionResponse
readList :: ReadS [StopDeliveryStreamEncryptionResponse]
$creadList :: ReadS [StopDeliveryStreamEncryptionResponse]
readsPrec :: Int -> ReadS StopDeliveryStreamEncryptionResponse
$creadsPrec :: Int -> ReadS StopDeliveryStreamEncryptionResponse
Prelude.Read, Int -> StopDeliveryStreamEncryptionResponse -> ShowS
[StopDeliveryStreamEncryptionResponse] -> ShowS
StopDeliveryStreamEncryptionResponse -> String
(Int -> StopDeliveryStreamEncryptionResponse -> ShowS)
-> (StopDeliveryStreamEncryptionResponse -> String)
-> ([StopDeliveryStreamEncryptionResponse] -> ShowS)
-> Show StopDeliveryStreamEncryptionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StopDeliveryStreamEncryptionResponse] -> ShowS
$cshowList :: [StopDeliveryStreamEncryptionResponse] -> ShowS
show :: StopDeliveryStreamEncryptionResponse -> String
$cshow :: StopDeliveryStreamEncryptionResponse -> String
showsPrec :: Int -> StopDeliveryStreamEncryptionResponse -> ShowS
$cshowsPrec :: Int -> StopDeliveryStreamEncryptionResponse -> ShowS
Prelude.Show, (forall x.
StopDeliveryStreamEncryptionResponse
-> Rep StopDeliveryStreamEncryptionResponse x)
-> (forall x.
Rep StopDeliveryStreamEncryptionResponse x
-> StopDeliveryStreamEncryptionResponse)
-> Generic StopDeliveryStreamEncryptionResponse
forall x.
Rep StopDeliveryStreamEncryptionResponse x
-> StopDeliveryStreamEncryptionResponse
forall x.
StopDeliveryStreamEncryptionResponse
-> Rep StopDeliveryStreamEncryptionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StopDeliveryStreamEncryptionResponse x
-> StopDeliveryStreamEncryptionResponse
$cfrom :: forall x.
StopDeliveryStreamEncryptionResponse
-> Rep StopDeliveryStreamEncryptionResponse x
Prelude.Generic)
newStopDeliveryStreamEncryptionResponse ::
Prelude.Int ->
StopDeliveryStreamEncryptionResponse
newStopDeliveryStreamEncryptionResponse :: Int -> StopDeliveryStreamEncryptionResponse
newStopDeliveryStreamEncryptionResponse Int
pHttpStatus_ =
StopDeliveryStreamEncryptionResponse' :: Int -> StopDeliveryStreamEncryptionResponse
StopDeliveryStreamEncryptionResponse'
{ $sel:httpStatus:StopDeliveryStreamEncryptionResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
stopDeliveryStreamEncryptionResponse_httpStatus :: Lens.Lens' StopDeliveryStreamEncryptionResponse Prelude.Int
stopDeliveryStreamEncryptionResponse_httpStatus :: (Int -> f Int)
-> StopDeliveryStreamEncryptionResponse
-> f StopDeliveryStreamEncryptionResponse
stopDeliveryStreamEncryptionResponse_httpStatus = (StopDeliveryStreamEncryptionResponse -> Int)
-> (StopDeliveryStreamEncryptionResponse
-> Int -> StopDeliveryStreamEncryptionResponse)
-> Lens
StopDeliveryStreamEncryptionResponse
StopDeliveryStreamEncryptionResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopDeliveryStreamEncryptionResponse' {Int
httpStatus :: Int
$sel:httpStatus:StopDeliveryStreamEncryptionResponse' :: StopDeliveryStreamEncryptionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StopDeliveryStreamEncryptionResponse
s@StopDeliveryStreamEncryptionResponse' {} Int
a -> StopDeliveryStreamEncryptionResponse
s {$sel:httpStatus:StopDeliveryStreamEncryptionResponse' :: Int
httpStatus = Int
a} :: StopDeliveryStreamEncryptionResponse)
instance
Prelude.NFData
StopDeliveryStreamEncryptionResponse