{-# 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.MigrationHub.DeleteProgressUpdateStream
(
DeleteProgressUpdateStream (..),
newDeleteProgressUpdateStream,
deleteProgressUpdateStream_dryRun,
deleteProgressUpdateStream_progressUpdateStreamName,
DeleteProgressUpdateStreamResponse (..),
newDeleteProgressUpdateStreamResponse,
deleteProgressUpdateStreamResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MigrationHub.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteProgressUpdateStream = DeleteProgressUpdateStream'
{
DeleteProgressUpdateStream -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
DeleteProgressUpdateStream -> Text
progressUpdateStreamName :: Prelude.Text
}
deriving (DeleteProgressUpdateStream -> DeleteProgressUpdateStream -> Bool
(DeleteProgressUpdateStream -> DeleteProgressUpdateStream -> Bool)
-> (DeleteProgressUpdateStream
-> DeleteProgressUpdateStream -> Bool)
-> Eq DeleteProgressUpdateStream
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteProgressUpdateStream -> DeleteProgressUpdateStream -> Bool
$c/= :: DeleteProgressUpdateStream -> DeleteProgressUpdateStream -> Bool
== :: DeleteProgressUpdateStream -> DeleteProgressUpdateStream -> Bool
$c== :: DeleteProgressUpdateStream -> DeleteProgressUpdateStream -> Bool
Prelude.Eq, ReadPrec [DeleteProgressUpdateStream]
ReadPrec DeleteProgressUpdateStream
Int -> ReadS DeleteProgressUpdateStream
ReadS [DeleteProgressUpdateStream]
(Int -> ReadS DeleteProgressUpdateStream)
-> ReadS [DeleteProgressUpdateStream]
-> ReadPrec DeleteProgressUpdateStream
-> ReadPrec [DeleteProgressUpdateStream]
-> Read DeleteProgressUpdateStream
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteProgressUpdateStream]
$creadListPrec :: ReadPrec [DeleteProgressUpdateStream]
readPrec :: ReadPrec DeleteProgressUpdateStream
$creadPrec :: ReadPrec DeleteProgressUpdateStream
readList :: ReadS [DeleteProgressUpdateStream]
$creadList :: ReadS [DeleteProgressUpdateStream]
readsPrec :: Int -> ReadS DeleteProgressUpdateStream
$creadsPrec :: Int -> ReadS DeleteProgressUpdateStream
Prelude.Read, Int -> DeleteProgressUpdateStream -> ShowS
[DeleteProgressUpdateStream] -> ShowS
DeleteProgressUpdateStream -> String
(Int -> DeleteProgressUpdateStream -> ShowS)
-> (DeleteProgressUpdateStream -> String)
-> ([DeleteProgressUpdateStream] -> ShowS)
-> Show DeleteProgressUpdateStream
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteProgressUpdateStream] -> ShowS
$cshowList :: [DeleteProgressUpdateStream] -> ShowS
show :: DeleteProgressUpdateStream -> String
$cshow :: DeleteProgressUpdateStream -> String
showsPrec :: Int -> DeleteProgressUpdateStream -> ShowS
$cshowsPrec :: Int -> DeleteProgressUpdateStream -> ShowS
Prelude.Show, (forall x.
DeleteProgressUpdateStream -> Rep DeleteProgressUpdateStream x)
-> (forall x.
Rep DeleteProgressUpdateStream x -> DeleteProgressUpdateStream)
-> Generic DeleteProgressUpdateStream
forall x.
Rep DeleteProgressUpdateStream x -> DeleteProgressUpdateStream
forall x.
DeleteProgressUpdateStream -> Rep DeleteProgressUpdateStream x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteProgressUpdateStream x -> DeleteProgressUpdateStream
$cfrom :: forall x.
DeleteProgressUpdateStream -> Rep DeleteProgressUpdateStream x
Prelude.Generic)
newDeleteProgressUpdateStream ::
Prelude.Text ->
DeleteProgressUpdateStream
newDeleteProgressUpdateStream :: Text -> DeleteProgressUpdateStream
newDeleteProgressUpdateStream
Text
pProgressUpdateStreamName_ =
DeleteProgressUpdateStream' :: Maybe Bool -> Text -> DeleteProgressUpdateStream
DeleteProgressUpdateStream'
{ $sel:dryRun:DeleteProgressUpdateStream' :: Maybe Bool
dryRun =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:progressUpdateStreamName:DeleteProgressUpdateStream' :: Text
progressUpdateStreamName =
Text
pProgressUpdateStreamName_
}
deleteProgressUpdateStream_dryRun :: Lens.Lens' DeleteProgressUpdateStream (Prelude.Maybe Prelude.Bool)
deleteProgressUpdateStream_dryRun :: (Maybe Bool -> f (Maybe Bool))
-> DeleteProgressUpdateStream -> f DeleteProgressUpdateStream
deleteProgressUpdateStream_dryRun = (DeleteProgressUpdateStream -> Maybe Bool)
-> (DeleteProgressUpdateStream
-> Maybe Bool -> DeleteProgressUpdateStream)
-> Lens
DeleteProgressUpdateStream
DeleteProgressUpdateStream
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteProgressUpdateStream' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:DeleteProgressUpdateStream' :: DeleteProgressUpdateStream -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: DeleteProgressUpdateStream
s@DeleteProgressUpdateStream' {} Maybe Bool
a -> DeleteProgressUpdateStream
s {$sel:dryRun:DeleteProgressUpdateStream' :: Maybe Bool
dryRun = Maybe Bool
a} :: DeleteProgressUpdateStream)
deleteProgressUpdateStream_progressUpdateStreamName :: Lens.Lens' DeleteProgressUpdateStream Prelude.Text
deleteProgressUpdateStream_progressUpdateStreamName :: (Text -> f Text)
-> DeleteProgressUpdateStream -> f DeleteProgressUpdateStream
deleteProgressUpdateStream_progressUpdateStreamName = (DeleteProgressUpdateStream -> Text)
-> (DeleteProgressUpdateStream
-> Text -> DeleteProgressUpdateStream)
-> Lens
DeleteProgressUpdateStream DeleteProgressUpdateStream Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteProgressUpdateStream' {Text
progressUpdateStreamName :: Text
$sel:progressUpdateStreamName:DeleteProgressUpdateStream' :: DeleteProgressUpdateStream -> Text
progressUpdateStreamName} -> Text
progressUpdateStreamName) (\s :: DeleteProgressUpdateStream
s@DeleteProgressUpdateStream' {} Text
a -> DeleteProgressUpdateStream
s {$sel:progressUpdateStreamName:DeleteProgressUpdateStream' :: Text
progressUpdateStreamName = Text
a} :: DeleteProgressUpdateStream)
instance Core.AWSRequest DeleteProgressUpdateStream where
type
AWSResponse DeleteProgressUpdateStream =
DeleteProgressUpdateStreamResponse
request :: DeleteProgressUpdateStream -> Request DeleteProgressUpdateStream
request = Service
-> DeleteProgressUpdateStream -> Request DeleteProgressUpdateStream
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteProgressUpdateStream
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteProgressUpdateStream)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteProgressUpdateStream))
-> Logger
-> Service
-> Proxy DeleteProgressUpdateStream
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteProgressUpdateStream)))
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 -> DeleteProgressUpdateStreamResponse
DeleteProgressUpdateStreamResponse'
(Int -> DeleteProgressUpdateStreamResponse)
-> Either String Int
-> Either String DeleteProgressUpdateStreamResponse
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 DeleteProgressUpdateStream
instance Prelude.NFData DeleteProgressUpdateStream
instance Core.ToHeaders DeleteProgressUpdateStream where
toHeaders :: DeleteProgressUpdateStream -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteProgressUpdateStream -> 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
"AWSMigrationHub.DeleteProgressUpdateStream" ::
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 DeleteProgressUpdateStream where
toJSON :: DeleteProgressUpdateStream -> Value
toJSON DeleteProgressUpdateStream' {Maybe Bool
Text
progressUpdateStreamName :: Text
dryRun :: Maybe Bool
$sel:progressUpdateStreamName:DeleteProgressUpdateStream' :: DeleteProgressUpdateStream -> Text
$sel:dryRun:DeleteProgressUpdateStream' :: DeleteProgressUpdateStream -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"DryRun" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
dryRun,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"ProgressUpdateStreamName"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
progressUpdateStreamName
)
]
)
instance Core.ToPath DeleteProgressUpdateStream where
toPath :: DeleteProgressUpdateStream -> ByteString
toPath = ByteString -> DeleteProgressUpdateStream -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteProgressUpdateStream where
toQuery :: DeleteProgressUpdateStream -> QueryString
toQuery = QueryString -> DeleteProgressUpdateStream -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteProgressUpdateStreamResponse = DeleteProgressUpdateStreamResponse'
{
DeleteProgressUpdateStreamResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteProgressUpdateStreamResponse
-> DeleteProgressUpdateStreamResponse -> Bool
(DeleteProgressUpdateStreamResponse
-> DeleteProgressUpdateStreamResponse -> Bool)
-> (DeleteProgressUpdateStreamResponse
-> DeleteProgressUpdateStreamResponse -> Bool)
-> Eq DeleteProgressUpdateStreamResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteProgressUpdateStreamResponse
-> DeleteProgressUpdateStreamResponse -> Bool
$c/= :: DeleteProgressUpdateStreamResponse
-> DeleteProgressUpdateStreamResponse -> Bool
== :: DeleteProgressUpdateStreamResponse
-> DeleteProgressUpdateStreamResponse -> Bool
$c== :: DeleteProgressUpdateStreamResponse
-> DeleteProgressUpdateStreamResponse -> Bool
Prelude.Eq, ReadPrec [DeleteProgressUpdateStreamResponse]
ReadPrec DeleteProgressUpdateStreamResponse
Int -> ReadS DeleteProgressUpdateStreamResponse
ReadS [DeleteProgressUpdateStreamResponse]
(Int -> ReadS DeleteProgressUpdateStreamResponse)
-> ReadS [DeleteProgressUpdateStreamResponse]
-> ReadPrec DeleteProgressUpdateStreamResponse
-> ReadPrec [DeleteProgressUpdateStreamResponse]
-> Read DeleteProgressUpdateStreamResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteProgressUpdateStreamResponse]
$creadListPrec :: ReadPrec [DeleteProgressUpdateStreamResponse]
readPrec :: ReadPrec DeleteProgressUpdateStreamResponse
$creadPrec :: ReadPrec DeleteProgressUpdateStreamResponse
readList :: ReadS [DeleteProgressUpdateStreamResponse]
$creadList :: ReadS [DeleteProgressUpdateStreamResponse]
readsPrec :: Int -> ReadS DeleteProgressUpdateStreamResponse
$creadsPrec :: Int -> ReadS DeleteProgressUpdateStreamResponse
Prelude.Read, Int -> DeleteProgressUpdateStreamResponse -> ShowS
[DeleteProgressUpdateStreamResponse] -> ShowS
DeleteProgressUpdateStreamResponse -> String
(Int -> DeleteProgressUpdateStreamResponse -> ShowS)
-> (DeleteProgressUpdateStreamResponse -> String)
-> ([DeleteProgressUpdateStreamResponse] -> ShowS)
-> Show DeleteProgressUpdateStreamResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteProgressUpdateStreamResponse] -> ShowS
$cshowList :: [DeleteProgressUpdateStreamResponse] -> ShowS
show :: DeleteProgressUpdateStreamResponse -> String
$cshow :: DeleteProgressUpdateStreamResponse -> String
showsPrec :: Int -> DeleteProgressUpdateStreamResponse -> ShowS
$cshowsPrec :: Int -> DeleteProgressUpdateStreamResponse -> ShowS
Prelude.Show, (forall x.
DeleteProgressUpdateStreamResponse
-> Rep DeleteProgressUpdateStreamResponse x)
-> (forall x.
Rep DeleteProgressUpdateStreamResponse x
-> DeleteProgressUpdateStreamResponse)
-> Generic DeleteProgressUpdateStreamResponse
forall x.
Rep DeleteProgressUpdateStreamResponse x
-> DeleteProgressUpdateStreamResponse
forall x.
DeleteProgressUpdateStreamResponse
-> Rep DeleteProgressUpdateStreamResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteProgressUpdateStreamResponse x
-> DeleteProgressUpdateStreamResponse
$cfrom :: forall x.
DeleteProgressUpdateStreamResponse
-> Rep DeleteProgressUpdateStreamResponse x
Prelude.Generic)
newDeleteProgressUpdateStreamResponse ::
Prelude.Int ->
DeleteProgressUpdateStreamResponse
newDeleteProgressUpdateStreamResponse :: Int -> DeleteProgressUpdateStreamResponse
newDeleteProgressUpdateStreamResponse Int
pHttpStatus_ =
DeleteProgressUpdateStreamResponse' :: Int -> DeleteProgressUpdateStreamResponse
DeleteProgressUpdateStreamResponse'
{ $sel:httpStatus:DeleteProgressUpdateStreamResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteProgressUpdateStreamResponse_httpStatus :: Lens.Lens' DeleteProgressUpdateStreamResponse Prelude.Int
deleteProgressUpdateStreamResponse_httpStatus :: (Int -> f Int)
-> DeleteProgressUpdateStreamResponse
-> f DeleteProgressUpdateStreamResponse
deleteProgressUpdateStreamResponse_httpStatus = (DeleteProgressUpdateStreamResponse -> Int)
-> (DeleteProgressUpdateStreamResponse
-> Int -> DeleteProgressUpdateStreamResponse)
-> Lens
DeleteProgressUpdateStreamResponse
DeleteProgressUpdateStreamResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteProgressUpdateStreamResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteProgressUpdateStreamResponse' :: DeleteProgressUpdateStreamResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteProgressUpdateStreamResponse
s@DeleteProgressUpdateStreamResponse' {} Int
a -> DeleteProgressUpdateStreamResponse
s {$sel:httpStatus:DeleteProgressUpdateStreamResponse' :: Int
httpStatus = Int
a} :: DeleteProgressUpdateStreamResponse)
instance
Prelude.NFData
DeleteProgressUpdateStreamResponse