{-# 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.ImportServerCatalog
(
ImportServerCatalog (..),
newImportServerCatalog,
ImportServerCatalogResponse (..),
newImportServerCatalogResponse,
importServerCatalogResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SMS.Types
data ImportServerCatalog = ImportServerCatalog'
{
}
deriving (ImportServerCatalog -> ImportServerCatalog -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportServerCatalog -> ImportServerCatalog -> Bool
$c/= :: ImportServerCatalog -> ImportServerCatalog -> Bool
== :: ImportServerCatalog -> ImportServerCatalog -> Bool
$c== :: ImportServerCatalog -> ImportServerCatalog -> Bool
Prelude.Eq, ReadPrec [ImportServerCatalog]
ReadPrec ImportServerCatalog
Int -> ReadS ImportServerCatalog
ReadS [ImportServerCatalog]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImportServerCatalog]
$creadListPrec :: ReadPrec [ImportServerCatalog]
readPrec :: ReadPrec ImportServerCatalog
$creadPrec :: ReadPrec ImportServerCatalog
readList :: ReadS [ImportServerCatalog]
$creadList :: ReadS [ImportServerCatalog]
readsPrec :: Int -> ReadS ImportServerCatalog
$creadsPrec :: Int -> ReadS ImportServerCatalog
Prelude.Read, Int -> ImportServerCatalog -> ShowS
[ImportServerCatalog] -> ShowS
ImportServerCatalog -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImportServerCatalog] -> ShowS
$cshowList :: [ImportServerCatalog] -> ShowS
show :: ImportServerCatalog -> String
$cshow :: ImportServerCatalog -> String
showsPrec :: Int -> ImportServerCatalog -> ShowS
$cshowsPrec :: Int -> ImportServerCatalog -> ShowS
Prelude.Show, forall x. Rep ImportServerCatalog x -> ImportServerCatalog
forall x. ImportServerCatalog -> Rep ImportServerCatalog x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImportServerCatalog x -> ImportServerCatalog
$cfrom :: forall x. ImportServerCatalog -> Rep ImportServerCatalog x
Prelude.Generic)
newImportServerCatalog ::
ImportServerCatalog
newImportServerCatalog :: ImportServerCatalog
newImportServerCatalog = ImportServerCatalog
ImportServerCatalog'
instance Core.AWSRequest ImportServerCatalog where
type
AWSResponse ImportServerCatalog =
ImportServerCatalogResponse
request :: (Service -> Service)
-> ImportServerCatalog -> Request ImportServerCatalog
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 ImportServerCatalog
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ImportServerCatalog)))
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 -> ImportServerCatalogResponse
ImportServerCatalogResponse'
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 ImportServerCatalog where
hashWithSalt :: Int -> ImportServerCatalog -> Int
hashWithSalt Int
_salt ImportServerCatalog
_ =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ()
instance Prelude.NFData ImportServerCatalog where
rnf :: ImportServerCatalog -> ()
rnf ImportServerCatalog
_ = ()
instance Data.ToHeaders ImportServerCatalog where
toHeaders :: ImportServerCatalog -> 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
"AWSServerMigrationService_V2016_10_24.ImportServerCatalog" ::
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 ImportServerCatalog where
toJSON :: ImportServerCatalog -> Value
toJSON = forall a b. a -> b -> a
Prelude.const (Object -> Value
Data.Object forall a. Monoid a => a
Prelude.mempty)
instance Data.ToPath ImportServerCatalog where
toPath :: ImportServerCatalog -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery ImportServerCatalog where
toQuery :: ImportServerCatalog -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data ImportServerCatalogResponse = ImportServerCatalogResponse'
{
ImportServerCatalogResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ImportServerCatalogResponse -> ImportServerCatalogResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportServerCatalogResponse -> ImportServerCatalogResponse -> Bool
$c/= :: ImportServerCatalogResponse -> ImportServerCatalogResponse -> Bool
== :: ImportServerCatalogResponse -> ImportServerCatalogResponse -> Bool
$c== :: ImportServerCatalogResponse -> ImportServerCatalogResponse -> Bool
Prelude.Eq, ReadPrec [ImportServerCatalogResponse]
ReadPrec ImportServerCatalogResponse
Int -> ReadS ImportServerCatalogResponse
ReadS [ImportServerCatalogResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImportServerCatalogResponse]
$creadListPrec :: ReadPrec [ImportServerCatalogResponse]
readPrec :: ReadPrec ImportServerCatalogResponse
$creadPrec :: ReadPrec ImportServerCatalogResponse
readList :: ReadS [ImportServerCatalogResponse]
$creadList :: ReadS [ImportServerCatalogResponse]
readsPrec :: Int -> ReadS ImportServerCatalogResponse
$creadsPrec :: Int -> ReadS ImportServerCatalogResponse
Prelude.Read, Int -> ImportServerCatalogResponse -> ShowS
[ImportServerCatalogResponse] -> ShowS
ImportServerCatalogResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImportServerCatalogResponse] -> ShowS
$cshowList :: [ImportServerCatalogResponse] -> ShowS
show :: ImportServerCatalogResponse -> String
$cshow :: ImportServerCatalogResponse -> String
showsPrec :: Int -> ImportServerCatalogResponse -> ShowS
$cshowsPrec :: Int -> ImportServerCatalogResponse -> ShowS
Prelude.Show, forall x.
Rep ImportServerCatalogResponse x -> ImportServerCatalogResponse
forall x.
ImportServerCatalogResponse -> Rep ImportServerCatalogResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ImportServerCatalogResponse x -> ImportServerCatalogResponse
$cfrom :: forall x.
ImportServerCatalogResponse -> Rep ImportServerCatalogResponse x
Prelude.Generic)
newImportServerCatalogResponse ::
Prelude.Int ->
ImportServerCatalogResponse
newImportServerCatalogResponse :: Int -> ImportServerCatalogResponse
newImportServerCatalogResponse Int
pHttpStatus_ =
ImportServerCatalogResponse'
{ $sel:httpStatus:ImportServerCatalogResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
importServerCatalogResponse_httpStatus :: Lens.Lens' ImportServerCatalogResponse Prelude.Int
importServerCatalogResponse_httpStatus :: Lens' ImportServerCatalogResponse Int
importServerCatalogResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportServerCatalogResponse' {Int
httpStatus :: Int
$sel:httpStatus:ImportServerCatalogResponse' :: ImportServerCatalogResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ImportServerCatalogResponse
s@ImportServerCatalogResponse' {} Int
a -> ImportServerCatalogResponse
s {$sel:httpStatus:ImportServerCatalogResponse' :: Int
httpStatus = Int
a} :: ImportServerCatalogResponse)
instance Prelude.NFData ImportServerCatalogResponse where
rnf :: ImportServerCatalogResponse -> ()
rnf ImportServerCatalogResponse' {Int
httpStatus :: Int
$sel:httpStatus:ImportServerCatalogResponse' :: ImportServerCatalogResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus