{-# 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.SMS.DeleteServerCatalog
(
DeleteServerCatalog (..),
newDeleteServerCatalog,
DeleteServerCatalogResponse (..),
newDeleteServerCatalogResponse,
deleteServerCatalogResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SMS.Types
data DeleteServerCatalog = DeleteServerCatalog'
{
}
deriving (DeleteServerCatalog -> DeleteServerCatalog -> Bool
(DeleteServerCatalog -> DeleteServerCatalog -> Bool)
-> (DeleteServerCatalog -> DeleteServerCatalog -> Bool)
-> Eq DeleteServerCatalog
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteServerCatalog -> DeleteServerCatalog -> Bool
$c/= :: DeleteServerCatalog -> DeleteServerCatalog -> Bool
== :: DeleteServerCatalog -> DeleteServerCatalog -> Bool
$c== :: DeleteServerCatalog -> DeleteServerCatalog -> Bool
Prelude.Eq, ReadPrec [DeleteServerCatalog]
ReadPrec DeleteServerCatalog
Int -> ReadS DeleteServerCatalog
ReadS [DeleteServerCatalog]
(Int -> ReadS DeleteServerCatalog)
-> ReadS [DeleteServerCatalog]
-> ReadPrec DeleteServerCatalog
-> ReadPrec [DeleteServerCatalog]
-> Read DeleteServerCatalog
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteServerCatalog]
$creadListPrec :: ReadPrec [DeleteServerCatalog]
readPrec :: ReadPrec DeleteServerCatalog
$creadPrec :: ReadPrec DeleteServerCatalog
readList :: ReadS [DeleteServerCatalog]
$creadList :: ReadS [DeleteServerCatalog]
readsPrec :: Int -> ReadS DeleteServerCatalog
$creadsPrec :: Int -> ReadS DeleteServerCatalog
Prelude.Read, Int -> DeleteServerCatalog -> ShowS
[DeleteServerCatalog] -> ShowS
DeleteServerCatalog -> String
(Int -> DeleteServerCatalog -> ShowS)
-> (DeleteServerCatalog -> String)
-> ([DeleteServerCatalog] -> ShowS)
-> Show DeleteServerCatalog
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteServerCatalog] -> ShowS
$cshowList :: [DeleteServerCatalog] -> ShowS
show :: DeleteServerCatalog -> String
$cshow :: DeleteServerCatalog -> String
showsPrec :: Int -> DeleteServerCatalog -> ShowS
$cshowsPrec :: Int -> DeleteServerCatalog -> ShowS
Prelude.Show, (forall x. DeleteServerCatalog -> Rep DeleteServerCatalog x)
-> (forall x. Rep DeleteServerCatalog x -> DeleteServerCatalog)
-> Generic DeleteServerCatalog
forall x. Rep DeleteServerCatalog x -> DeleteServerCatalog
forall x. DeleteServerCatalog -> Rep DeleteServerCatalog x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteServerCatalog x -> DeleteServerCatalog
$cfrom :: forall x. DeleteServerCatalog -> Rep DeleteServerCatalog x
Prelude.Generic)
newDeleteServerCatalog ::
DeleteServerCatalog
newDeleteServerCatalog :: DeleteServerCatalog
newDeleteServerCatalog = DeleteServerCatalog
DeleteServerCatalog'
instance Core.AWSRequest DeleteServerCatalog where
type
AWSResponse DeleteServerCatalog =
DeleteServerCatalogResponse
request :: DeleteServerCatalog -> Request DeleteServerCatalog
request = Service -> DeleteServerCatalog -> Request DeleteServerCatalog
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteServerCatalog
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteServerCatalog)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteServerCatalog))
-> Logger
-> Service
-> Proxy DeleteServerCatalog
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteServerCatalog)))
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 -> DeleteServerCatalogResponse
DeleteServerCatalogResponse'
(Int -> DeleteServerCatalogResponse)
-> Either String Int -> Either String DeleteServerCatalogResponse
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 DeleteServerCatalog
instance Prelude.NFData DeleteServerCatalog
instance Core.ToHeaders DeleteServerCatalog where
toHeaders :: DeleteServerCatalog -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteServerCatalog -> 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
"AWSServerMigrationService_V2016_10_24.DeleteServerCatalog" ::
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 DeleteServerCatalog where
toJSON :: DeleteServerCatalog -> Value
toJSON = Value -> DeleteServerCatalog -> Value
forall a b. a -> b -> a
Prelude.const (Object -> Value
Core.Object Object
forall a. Monoid a => a
Prelude.mempty)
instance Core.ToPath DeleteServerCatalog where
toPath :: DeleteServerCatalog -> ByteString
toPath = ByteString -> DeleteServerCatalog -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteServerCatalog where
toQuery :: DeleteServerCatalog -> QueryString
toQuery = QueryString -> DeleteServerCatalog -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteServerCatalogResponse = DeleteServerCatalogResponse'
{
DeleteServerCatalogResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteServerCatalogResponse -> DeleteServerCatalogResponse -> Bool
(DeleteServerCatalogResponse
-> DeleteServerCatalogResponse -> Bool)
-> (DeleteServerCatalogResponse
-> DeleteServerCatalogResponse -> Bool)
-> Eq DeleteServerCatalogResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteServerCatalogResponse -> DeleteServerCatalogResponse -> Bool
$c/= :: DeleteServerCatalogResponse -> DeleteServerCatalogResponse -> Bool
== :: DeleteServerCatalogResponse -> DeleteServerCatalogResponse -> Bool
$c== :: DeleteServerCatalogResponse -> DeleteServerCatalogResponse -> Bool
Prelude.Eq, ReadPrec [DeleteServerCatalogResponse]
ReadPrec DeleteServerCatalogResponse
Int -> ReadS DeleteServerCatalogResponse
ReadS [DeleteServerCatalogResponse]
(Int -> ReadS DeleteServerCatalogResponse)
-> ReadS [DeleteServerCatalogResponse]
-> ReadPrec DeleteServerCatalogResponse
-> ReadPrec [DeleteServerCatalogResponse]
-> Read DeleteServerCatalogResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteServerCatalogResponse]
$creadListPrec :: ReadPrec [DeleteServerCatalogResponse]
readPrec :: ReadPrec DeleteServerCatalogResponse
$creadPrec :: ReadPrec DeleteServerCatalogResponse
readList :: ReadS [DeleteServerCatalogResponse]
$creadList :: ReadS [DeleteServerCatalogResponse]
readsPrec :: Int -> ReadS DeleteServerCatalogResponse
$creadsPrec :: Int -> ReadS DeleteServerCatalogResponse
Prelude.Read, Int -> DeleteServerCatalogResponse -> ShowS
[DeleteServerCatalogResponse] -> ShowS
DeleteServerCatalogResponse -> String
(Int -> DeleteServerCatalogResponse -> ShowS)
-> (DeleteServerCatalogResponse -> String)
-> ([DeleteServerCatalogResponse] -> ShowS)
-> Show DeleteServerCatalogResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteServerCatalogResponse] -> ShowS
$cshowList :: [DeleteServerCatalogResponse] -> ShowS
show :: DeleteServerCatalogResponse -> String
$cshow :: DeleteServerCatalogResponse -> String
showsPrec :: Int -> DeleteServerCatalogResponse -> ShowS
$cshowsPrec :: Int -> DeleteServerCatalogResponse -> ShowS
Prelude.Show, (forall x.
DeleteServerCatalogResponse -> Rep DeleteServerCatalogResponse x)
-> (forall x.
Rep DeleteServerCatalogResponse x -> DeleteServerCatalogResponse)
-> Generic DeleteServerCatalogResponse
forall x.
Rep DeleteServerCatalogResponse x -> DeleteServerCatalogResponse
forall x.
DeleteServerCatalogResponse -> Rep DeleteServerCatalogResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteServerCatalogResponse x -> DeleteServerCatalogResponse
$cfrom :: forall x.
DeleteServerCatalogResponse -> Rep DeleteServerCatalogResponse x
Prelude.Generic)
newDeleteServerCatalogResponse ::
Prelude.Int ->
DeleteServerCatalogResponse
newDeleteServerCatalogResponse :: Int -> DeleteServerCatalogResponse
newDeleteServerCatalogResponse Int
pHttpStatus_ =
DeleteServerCatalogResponse' :: Int -> DeleteServerCatalogResponse
DeleteServerCatalogResponse'
{ $sel:httpStatus:DeleteServerCatalogResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteServerCatalogResponse_httpStatus :: Lens.Lens' DeleteServerCatalogResponse Prelude.Int
deleteServerCatalogResponse_httpStatus :: (Int -> f Int)
-> DeleteServerCatalogResponse -> f DeleteServerCatalogResponse
deleteServerCatalogResponse_httpStatus = (DeleteServerCatalogResponse -> Int)
-> (DeleteServerCatalogResponse
-> Int -> DeleteServerCatalogResponse)
-> Lens
DeleteServerCatalogResponse DeleteServerCatalogResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteServerCatalogResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteServerCatalogResponse' :: DeleteServerCatalogResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteServerCatalogResponse
s@DeleteServerCatalogResponse' {} Int
a -> DeleteServerCatalogResponse
s {$sel:httpStatus:DeleteServerCatalogResponse' :: Int
httpStatus = Int
a} :: DeleteServerCatalogResponse)
instance Prelude.NFData DeleteServerCatalogResponse