{-# 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.RDS.StopActivityStream
(
StopActivityStream (..),
newStopActivityStream,
stopActivityStream_applyImmediately,
stopActivityStream_resourceArn,
StopActivityStreamResponse (..),
newStopActivityStreamResponse,
stopActivityStreamResponse_status,
stopActivityStreamResponse_kinesisStreamName,
stopActivityStreamResponse_kmsKeyId,
stopActivityStreamResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RDS.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data StopActivityStream = StopActivityStream'
{
StopActivityStream -> Maybe Bool
applyImmediately :: Prelude.Maybe Prelude.Bool,
StopActivityStream -> Text
resourceArn :: Prelude.Text
}
deriving (StopActivityStream -> StopActivityStream -> Bool
(StopActivityStream -> StopActivityStream -> Bool)
-> (StopActivityStream -> StopActivityStream -> Bool)
-> Eq StopActivityStream
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StopActivityStream -> StopActivityStream -> Bool
$c/= :: StopActivityStream -> StopActivityStream -> Bool
== :: StopActivityStream -> StopActivityStream -> Bool
$c== :: StopActivityStream -> StopActivityStream -> Bool
Prelude.Eq, ReadPrec [StopActivityStream]
ReadPrec StopActivityStream
Int -> ReadS StopActivityStream
ReadS [StopActivityStream]
(Int -> ReadS StopActivityStream)
-> ReadS [StopActivityStream]
-> ReadPrec StopActivityStream
-> ReadPrec [StopActivityStream]
-> Read StopActivityStream
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StopActivityStream]
$creadListPrec :: ReadPrec [StopActivityStream]
readPrec :: ReadPrec StopActivityStream
$creadPrec :: ReadPrec StopActivityStream
readList :: ReadS [StopActivityStream]
$creadList :: ReadS [StopActivityStream]
readsPrec :: Int -> ReadS StopActivityStream
$creadsPrec :: Int -> ReadS StopActivityStream
Prelude.Read, Int -> StopActivityStream -> ShowS
[StopActivityStream] -> ShowS
StopActivityStream -> String
(Int -> StopActivityStream -> ShowS)
-> (StopActivityStream -> String)
-> ([StopActivityStream] -> ShowS)
-> Show StopActivityStream
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StopActivityStream] -> ShowS
$cshowList :: [StopActivityStream] -> ShowS
show :: StopActivityStream -> String
$cshow :: StopActivityStream -> String
showsPrec :: Int -> StopActivityStream -> ShowS
$cshowsPrec :: Int -> StopActivityStream -> ShowS
Prelude.Show, (forall x. StopActivityStream -> Rep StopActivityStream x)
-> (forall x. Rep StopActivityStream x -> StopActivityStream)
-> Generic StopActivityStream
forall x. Rep StopActivityStream x -> StopActivityStream
forall x. StopActivityStream -> Rep StopActivityStream x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StopActivityStream x -> StopActivityStream
$cfrom :: forall x. StopActivityStream -> Rep StopActivityStream x
Prelude.Generic)
newStopActivityStream ::
Prelude.Text ->
StopActivityStream
newStopActivityStream :: Text -> StopActivityStream
newStopActivityStream Text
pResourceArn_ =
StopActivityStream' :: Maybe Bool -> Text -> StopActivityStream
StopActivityStream'
{ $sel:applyImmediately:StopActivityStream' :: Maybe Bool
applyImmediately =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:resourceArn:StopActivityStream' :: Text
resourceArn = Text
pResourceArn_
}
stopActivityStream_applyImmediately :: Lens.Lens' StopActivityStream (Prelude.Maybe Prelude.Bool)
stopActivityStream_applyImmediately :: (Maybe Bool -> f (Maybe Bool))
-> StopActivityStream -> f StopActivityStream
stopActivityStream_applyImmediately = (StopActivityStream -> Maybe Bool)
-> (StopActivityStream -> Maybe Bool -> StopActivityStream)
-> Lens
StopActivityStream StopActivityStream (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopActivityStream' {Maybe Bool
applyImmediately :: Maybe Bool
$sel:applyImmediately:StopActivityStream' :: StopActivityStream -> Maybe Bool
applyImmediately} -> Maybe Bool
applyImmediately) (\s :: StopActivityStream
s@StopActivityStream' {} Maybe Bool
a -> StopActivityStream
s {$sel:applyImmediately:StopActivityStream' :: Maybe Bool
applyImmediately = Maybe Bool
a} :: StopActivityStream)
stopActivityStream_resourceArn :: Lens.Lens' StopActivityStream Prelude.Text
stopActivityStream_resourceArn :: (Text -> f Text) -> StopActivityStream -> f StopActivityStream
stopActivityStream_resourceArn = (StopActivityStream -> Text)
-> (StopActivityStream -> Text -> StopActivityStream)
-> Lens StopActivityStream StopActivityStream Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopActivityStream' {Text
resourceArn :: Text
$sel:resourceArn:StopActivityStream' :: StopActivityStream -> Text
resourceArn} -> Text
resourceArn) (\s :: StopActivityStream
s@StopActivityStream' {} Text
a -> StopActivityStream
s {$sel:resourceArn:StopActivityStream' :: Text
resourceArn = Text
a} :: StopActivityStream)
instance Core.AWSRequest StopActivityStream where
type
AWSResponse StopActivityStream =
StopActivityStreamResponse
request :: StopActivityStream -> Request StopActivityStream
request = Service -> StopActivityStream -> Request StopActivityStream
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy StopActivityStream
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StopActivityStream)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse StopActivityStream))
-> Logger
-> Service
-> Proxy StopActivityStream
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StopActivityStream)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"StopActivityStreamResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe ActivityStreamStatus
-> Maybe Text -> Maybe Text -> Int -> StopActivityStreamResponse
StopActivityStreamResponse'
(Maybe ActivityStreamStatus
-> Maybe Text -> Maybe Text -> Int -> StopActivityStreamResponse)
-> Either String (Maybe ActivityStreamStatus)
-> Either
String
(Maybe Text -> Maybe Text -> Int -> StopActivityStreamResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe ActivityStreamStatus)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Status")
Either
String
(Maybe Text -> Maybe Text -> Int -> StopActivityStreamResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> StopActivityStreamResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"KinesisStreamName")
Either String (Maybe Text -> Int -> StopActivityStreamResponse)
-> Either String (Maybe Text)
-> Either String (Int -> StopActivityStreamResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"KmsKeyId")
Either String (Int -> StopActivityStreamResponse)
-> Either String Int -> Either String StopActivityStreamResponse
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 StopActivityStream
instance Prelude.NFData StopActivityStream
instance Core.ToHeaders StopActivityStream where
toHeaders :: StopActivityStream -> ResponseHeaders
toHeaders = ResponseHeaders -> StopActivityStream -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath StopActivityStream where
toPath :: StopActivityStream -> ByteString
toPath = ByteString -> StopActivityStream -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery StopActivityStream where
toQuery :: StopActivityStream -> QueryString
toQuery StopActivityStream' {Maybe Bool
Text
resourceArn :: Text
applyImmediately :: Maybe Bool
$sel:resourceArn:StopActivityStream' :: StopActivityStream -> Text
$sel:applyImmediately:StopActivityStream' :: StopActivityStream -> Maybe Bool
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"StopActivityStream" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
ByteString
"ApplyImmediately" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
applyImmediately,
ByteString
"ResourceArn" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
resourceArn
]
data StopActivityStreamResponse = StopActivityStreamResponse'
{
StopActivityStreamResponse -> Maybe ActivityStreamStatus
status :: Prelude.Maybe ActivityStreamStatus,
StopActivityStreamResponse -> Maybe Text
kinesisStreamName :: Prelude.Maybe Prelude.Text,
StopActivityStreamResponse -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
StopActivityStreamResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StopActivityStreamResponse -> StopActivityStreamResponse -> Bool
(StopActivityStreamResponse -> StopActivityStreamResponse -> Bool)
-> (StopActivityStreamResponse
-> StopActivityStreamResponse -> Bool)
-> Eq StopActivityStreamResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StopActivityStreamResponse -> StopActivityStreamResponse -> Bool
$c/= :: StopActivityStreamResponse -> StopActivityStreamResponse -> Bool
== :: StopActivityStreamResponse -> StopActivityStreamResponse -> Bool
$c== :: StopActivityStreamResponse -> StopActivityStreamResponse -> Bool
Prelude.Eq, ReadPrec [StopActivityStreamResponse]
ReadPrec StopActivityStreamResponse
Int -> ReadS StopActivityStreamResponse
ReadS [StopActivityStreamResponse]
(Int -> ReadS StopActivityStreamResponse)
-> ReadS [StopActivityStreamResponse]
-> ReadPrec StopActivityStreamResponse
-> ReadPrec [StopActivityStreamResponse]
-> Read StopActivityStreamResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StopActivityStreamResponse]
$creadListPrec :: ReadPrec [StopActivityStreamResponse]
readPrec :: ReadPrec StopActivityStreamResponse
$creadPrec :: ReadPrec StopActivityStreamResponse
readList :: ReadS [StopActivityStreamResponse]
$creadList :: ReadS [StopActivityStreamResponse]
readsPrec :: Int -> ReadS StopActivityStreamResponse
$creadsPrec :: Int -> ReadS StopActivityStreamResponse
Prelude.Read, Int -> StopActivityStreamResponse -> ShowS
[StopActivityStreamResponse] -> ShowS
StopActivityStreamResponse -> String
(Int -> StopActivityStreamResponse -> ShowS)
-> (StopActivityStreamResponse -> String)
-> ([StopActivityStreamResponse] -> ShowS)
-> Show StopActivityStreamResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StopActivityStreamResponse] -> ShowS
$cshowList :: [StopActivityStreamResponse] -> ShowS
show :: StopActivityStreamResponse -> String
$cshow :: StopActivityStreamResponse -> String
showsPrec :: Int -> StopActivityStreamResponse -> ShowS
$cshowsPrec :: Int -> StopActivityStreamResponse -> ShowS
Prelude.Show, (forall x.
StopActivityStreamResponse -> Rep StopActivityStreamResponse x)
-> (forall x.
Rep StopActivityStreamResponse x -> StopActivityStreamResponse)
-> Generic StopActivityStreamResponse
forall x.
Rep StopActivityStreamResponse x -> StopActivityStreamResponse
forall x.
StopActivityStreamResponse -> Rep StopActivityStreamResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StopActivityStreamResponse x -> StopActivityStreamResponse
$cfrom :: forall x.
StopActivityStreamResponse -> Rep StopActivityStreamResponse x
Prelude.Generic)
newStopActivityStreamResponse ::
Prelude.Int ->
StopActivityStreamResponse
newStopActivityStreamResponse :: Int -> StopActivityStreamResponse
newStopActivityStreamResponse Int
pHttpStatus_ =
StopActivityStreamResponse' :: Maybe ActivityStreamStatus
-> Maybe Text -> Maybe Text -> Int -> StopActivityStreamResponse
StopActivityStreamResponse'
{ $sel:status:StopActivityStreamResponse' :: Maybe ActivityStreamStatus
status =
Maybe ActivityStreamStatus
forall a. Maybe a
Prelude.Nothing,
$sel:kinesisStreamName:StopActivityStreamResponse' :: Maybe Text
kinesisStreamName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:kmsKeyId:StopActivityStreamResponse' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StopActivityStreamResponse' :: Int
httpStatus = Int
pHttpStatus_
}
stopActivityStreamResponse_status :: Lens.Lens' StopActivityStreamResponse (Prelude.Maybe ActivityStreamStatus)
stopActivityStreamResponse_status :: (Maybe ActivityStreamStatus -> f (Maybe ActivityStreamStatus))
-> StopActivityStreamResponse -> f StopActivityStreamResponse
stopActivityStreamResponse_status = (StopActivityStreamResponse -> Maybe ActivityStreamStatus)
-> (StopActivityStreamResponse
-> Maybe ActivityStreamStatus -> StopActivityStreamResponse)
-> Lens
StopActivityStreamResponse
StopActivityStreamResponse
(Maybe ActivityStreamStatus)
(Maybe ActivityStreamStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopActivityStreamResponse' {Maybe ActivityStreamStatus
status :: Maybe ActivityStreamStatus
$sel:status:StopActivityStreamResponse' :: StopActivityStreamResponse -> Maybe ActivityStreamStatus
status} -> Maybe ActivityStreamStatus
status) (\s :: StopActivityStreamResponse
s@StopActivityStreamResponse' {} Maybe ActivityStreamStatus
a -> StopActivityStreamResponse
s {$sel:status:StopActivityStreamResponse' :: Maybe ActivityStreamStatus
status = Maybe ActivityStreamStatus
a} :: StopActivityStreamResponse)
stopActivityStreamResponse_kinesisStreamName :: Lens.Lens' StopActivityStreamResponse (Prelude.Maybe Prelude.Text)
stopActivityStreamResponse_kinesisStreamName :: (Maybe Text -> f (Maybe Text))
-> StopActivityStreamResponse -> f StopActivityStreamResponse
stopActivityStreamResponse_kinesisStreamName = (StopActivityStreamResponse -> Maybe Text)
-> (StopActivityStreamResponse
-> Maybe Text -> StopActivityStreamResponse)
-> Lens
StopActivityStreamResponse
StopActivityStreamResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopActivityStreamResponse' {Maybe Text
kinesisStreamName :: Maybe Text
$sel:kinesisStreamName:StopActivityStreamResponse' :: StopActivityStreamResponse -> Maybe Text
kinesisStreamName} -> Maybe Text
kinesisStreamName) (\s :: StopActivityStreamResponse
s@StopActivityStreamResponse' {} Maybe Text
a -> StopActivityStreamResponse
s {$sel:kinesisStreamName:StopActivityStreamResponse' :: Maybe Text
kinesisStreamName = Maybe Text
a} :: StopActivityStreamResponse)
stopActivityStreamResponse_kmsKeyId :: Lens.Lens' StopActivityStreamResponse (Prelude.Maybe Prelude.Text)
stopActivityStreamResponse_kmsKeyId :: (Maybe Text -> f (Maybe Text))
-> StopActivityStreamResponse -> f StopActivityStreamResponse
stopActivityStreamResponse_kmsKeyId = (StopActivityStreamResponse -> Maybe Text)
-> (StopActivityStreamResponse
-> Maybe Text -> StopActivityStreamResponse)
-> Lens
StopActivityStreamResponse
StopActivityStreamResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopActivityStreamResponse' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:StopActivityStreamResponse' :: StopActivityStreamResponse -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: StopActivityStreamResponse
s@StopActivityStreamResponse' {} Maybe Text
a -> StopActivityStreamResponse
s {$sel:kmsKeyId:StopActivityStreamResponse' :: Maybe Text
kmsKeyId = Maybe Text
a} :: StopActivityStreamResponse)
stopActivityStreamResponse_httpStatus :: Lens.Lens' StopActivityStreamResponse Prelude.Int
stopActivityStreamResponse_httpStatus :: (Int -> f Int)
-> StopActivityStreamResponse -> f StopActivityStreamResponse
stopActivityStreamResponse_httpStatus = (StopActivityStreamResponse -> Int)
-> (StopActivityStreamResponse
-> Int -> StopActivityStreamResponse)
-> Lens
StopActivityStreamResponse StopActivityStreamResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopActivityStreamResponse' {Int
httpStatus :: Int
$sel:httpStatus:StopActivityStreamResponse' :: StopActivityStreamResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StopActivityStreamResponse
s@StopActivityStreamResponse' {} Int
a -> StopActivityStreamResponse
s {$sel:httpStatus:StopActivityStreamResponse' :: Int
httpStatus = Int
a} :: StopActivityStreamResponse)
instance Prelude.NFData StopActivityStreamResponse