{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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.
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'
{ $sel:dryRun:DeleteProgressUpdateStream' :: Maybe Bool
dryRun =
forall a. Maybe a
Prelude.Nothing,
$sel:progressUpdateStreamName:DeleteProgressUpdateStream' :: Text
progressUpdateStreamName =
Text
pProgressUpdateStreamName_
}
deleteProgressUpdateStream_dryRun :: Lens.Lens' DeleteProgressUpdateStream (Prelude.Maybe Prelude.Bool)
deleteProgressUpdateStream_dryRun :: Lens' DeleteProgressUpdateStream (Maybe Bool)
deleteProgressUpdateStream_dryRun = 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 :: Lens' DeleteProgressUpdateStream Text
deleteProgressUpdateStream_progressUpdateStreamName = 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 :: (Service -> Service)
-> DeleteProgressUpdateStream -> Request DeleteProgressUpdateStream
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteProgressUpdateStream
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteProgressUpdateStream)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteProgressUpdateStreamResponse
DeleteProgressUpdateStreamResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable DeleteProgressUpdateStream where
hashWithSalt :: Int -> DeleteProgressUpdateStream -> Int
hashWithSalt Int
_salt DeleteProgressUpdateStream' {Maybe Bool
Text
progressUpdateStreamName :: Text
dryRun :: Maybe Bool
$sel:progressUpdateStreamName:DeleteProgressUpdateStream' :: DeleteProgressUpdateStream -> Text
$sel:dryRun:DeleteProgressUpdateStream' :: DeleteProgressUpdateStream -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
progressUpdateStreamName
instance Prelude.NFData DeleteProgressUpdateStream where
rnf :: DeleteProgressUpdateStream -> ()
rnf DeleteProgressUpdateStream' {Maybe Bool
Text
progressUpdateStreamName :: Text
dryRun :: Maybe Bool
$sel:progressUpdateStreamName:DeleteProgressUpdateStream' :: DeleteProgressUpdateStream -> Text
$sel:dryRun:DeleteProgressUpdateStream' :: DeleteProgressUpdateStream -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dryRun
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
progressUpdateStreamName
instance Data.ToHeaders DeleteProgressUpdateStream where
toHeaders :: DeleteProgressUpdateStream -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AWSMigrationHub.DeleteProgressUpdateStream" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.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
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"DryRun" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
dryRun,
forall a. a -> Maybe a
Prelude.Just
( Key
"ProgressUpdateStreamName"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
progressUpdateStreamName
)
]
)
instance Data.ToPath DeleteProgressUpdateStream where
toPath :: DeleteProgressUpdateStream -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeleteProgressUpdateStream where
toQuery :: DeleteProgressUpdateStream -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteProgressUpdateStreamResponse = DeleteProgressUpdateStreamResponse'
{
DeleteProgressUpdateStreamResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteProgressUpdateStreamResponse
-> DeleteProgressUpdateStreamResponse -> Bool
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]
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
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.
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'
{ $sel:httpStatus:DeleteProgressUpdateStreamResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteProgressUpdateStreamResponse_httpStatus :: Lens.Lens' DeleteProgressUpdateStreamResponse Prelude.Int
deleteProgressUpdateStreamResponse_httpStatus :: Lens' DeleteProgressUpdateStreamResponse Int
deleteProgressUpdateStreamResponse_httpStatus = 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
where
rnf :: DeleteProgressUpdateStreamResponse -> ()
rnf DeleteProgressUpdateStreamResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteProgressUpdateStreamResponse' :: DeleteProgressUpdateStreamResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus