{-# 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.ImportAppCatalog
(
ImportAppCatalog (..),
newImportAppCatalog,
importAppCatalog_roleName,
ImportAppCatalogResponse (..),
newImportAppCatalogResponse,
importAppCatalogResponse_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 ImportAppCatalog = ImportAppCatalog'
{
ImportAppCatalog -> Maybe Text
roleName :: Prelude.Maybe Prelude.Text
}
deriving (ImportAppCatalog -> ImportAppCatalog -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportAppCatalog -> ImportAppCatalog -> Bool
$c/= :: ImportAppCatalog -> ImportAppCatalog -> Bool
== :: ImportAppCatalog -> ImportAppCatalog -> Bool
$c== :: ImportAppCatalog -> ImportAppCatalog -> Bool
Prelude.Eq, ReadPrec [ImportAppCatalog]
ReadPrec ImportAppCatalog
Int -> ReadS ImportAppCatalog
ReadS [ImportAppCatalog]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImportAppCatalog]
$creadListPrec :: ReadPrec [ImportAppCatalog]
readPrec :: ReadPrec ImportAppCatalog
$creadPrec :: ReadPrec ImportAppCatalog
readList :: ReadS [ImportAppCatalog]
$creadList :: ReadS [ImportAppCatalog]
readsPrec :: Int -> ReadS ImportAppCatalog
$creadsPrec :: Int -> ReadS ImportAppCatalog
Prelude.Read, Int -> ImportAppCatalog -> ShowS
[ImportAppCatalog] -> ShowS
ImportAppCatalog -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImportAppCatalog] -> ShowS
$cshowList :: [ImportAppCatalog] -> ShowS
show :: ImportAppCatalog -> String
$cshow :: ImportAppCatalog -> String
showsPrec :: Int -> ImportAppCatalog -> ShowS
$cshowsPrec :: Int -> ImportAppCatalog -> ShowS
Prelude.Show, forall x. Rep ImportAppCatalog x -> ImportAppCatalog
forall x. ImportAppCatalog -> Rep ImportAppCatalog x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImportAppCatalog x -> ImportAppCatalog
$cfrom :: forall x. ImportAppCatalog -> Rep ImportAppCatalog x
Prelude.Generic)
newImportAppCatalog ::
ImportAppCatalog
newImportAppCatalog :: ImportAppCatalog
newImportAppCatalog =
ImportAppCatalog' {$sel:roleName:ImportAppCatalog' :: Maybe Text
roleName = forall a. Maybe a
Prelude.Nothing}
importAppCatalog_roleName :: Lens.Lens' ImportAppCatalog (Prelude.Maybe Prelude.Text)
importAppCatalog_roleName :: Lens' ImportAppCatalog (Maybe Text)
importAppCatalog_roleName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportAppCatalog' {Maybe Text
roleName :: Maybe Text
$sel:roleName:ImportAppCatalog' :: ImportAppCatalog -> Maybe Text
roleName} -> Maybe Text
roleName) (\s :: ImportAppCatalog
s@ImportAppCatalog' {} Maybe Text
a -> ImportAppCatalog
s {$sel:roleName:ImportAppCatalog' :: Maybe Text
roleName = Maybe Text
a} :: ImportAppCatalog)
instance Core.AWSRequest ImportAppCatalog where
type
AWSResponse ImportAppCatalog =
ImportAppCatalogResponse
request :: (Service -> Service)
-> ImportAppCatalog -> Request ImportAppCatalog
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 ImportAppCatalog
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ImportAppCatalog)))
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 -> ImportAppCatalogResponse
ImportAppCatalogResponse'
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 ImportAppCatalog where
hashWithSalt :: Int -> ImportAppCatalog -> Int
hashWithSalt Int
_salt ImportAppCatalog' {Maybe Text
roleName :: Maybe Text
$sel:roleName:ImportAppCatalog' :: ImportAppCatalog -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
roleName
instance Prelude.NFData ImportAppCatalog where
rnf :: ImportAppCatalog -> ()
rnf ImportAppCatalog' {Maybe Text
roleName :: Maybe Text
$sel:roleName:ImportAppCatalog' :: ImportAppCatalog -> Maybe Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
roleName
instance Data.ToHeaders ImportAppCatalog where
toHeaders :: ImportAppCatalog -> 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.ImportAppCatalog" ::
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 ImportAppCatalog where
toJSON :: ImportAppCatalog -> Value
toJSON ImportAppCatalog' {Maybe Text
roleName :: Maybe Text
$sel:roleName:ImportAppCatalog' :: ImportAppCatalog -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"roleName" 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 Text
roleName]
)
instance Data.ToPath ImportAppCatalog where
toPath :: ImportAppCatalog -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery ImportAppCatalog where
toQuery :: ImportAppCatalog -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data ImportAppCatalogResponse = ImportAppCatalogResponse'
{
ImportAppCatalogResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ImportAppCatalogResponse -> ImportAppCatalogResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportAppCatalogResponse -> ImportAppCatalogResponse -> Bool
$c/= :: ImportAppCatalogResponse -> ImportAppCatalogResponse -> Bool
== :: ImportAppCatalogResponse -> ImportAppCatalogResponse -> Bool
$c== :: ImportAppCatalogResponse -> ImportAppCatalogResponse -> Bool
Prelude.Eq, ReadPrec [ImportAppCatalogResponse]
ReadPrec ImportAppCatalogResponse
Int -> ReadS ImportAppCatalogResponse
ReadS [ImportAppCatalogResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImportAppCatalogResponse]
$creadListPrec :: ReadPrec [ImportAppCatalogResponse]
readPrec :: ReadPrec ImportAppCatalogResponse
$creadPrec :: ReadPrec ImportAppCatalogResponse
readList :: ReadS [ImportAppCatalogResponse]
$creadList :: ReadS [ImportAppCatalogResponse]
readsPrec :: Int -> ReadS ImportAppCatalogResponse
$creadsPrec :: Int -> ReadS ImportAppCatalogResponse
Prelude.Read, Int -> ImportAppCatalogResponse -> ShowS
[ImportAppCatalogResponse] -> ShowS
ImportAppCatalogResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImportAppCatalogResponse] -> ShowS
$cshowList :: [ImportAppCatalogResponse] -> ShowS
show :: ImportAppCatalogResponse -> String
$cshow :: ImportAppCatalogResponse -> String
showsPrec :: Int -> ImportAppCatalogResponse -> ShowS
$cshowsPrec :: Int -> ImportAppCatalogResponse -> ShowS
Prelude.Show, forall x.
Rep ImportAppCatalogResponse x -> ImportAppCatalogResponse
forall x.
ImportAppCatalogResponse -> Rep ImportAppCatalogResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ImportAppCatalogResponse x -> ImportAppCatalogResponse
$cfrom :: forall x.
ImportAppCatalogResponse -> Rep ImportAppCatalogResponse x
Prelude.Generic)
newImportAppCatalogResponse ::
Prelude.Int ->
ImportAppCatalogResponse
newImportAppCatalogResponse :: Int -> ImportAppCatalogResponse
newImportAppCatalogResponse Int
pHttpStatus_ =
ImportAppCatalogResponse'
{ $sel:httpStatus:ImportAppCatalogResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
importAppCatalogResponse_httpStatus :: Lens.Lens' ImportAppCatalogResponse Prelude.Int
importAppCatalogResponse_httpStatus :: Lens' ImportAppCatalogResponse Int
importAppCatalogResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportAppCatalogResponse' {Int
httpStatus :: Int
$sel:httpStatus:ImportAppCatalogResponse' :: ImportAppCatalogResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ImportAppCatalogResponse
s@ImportAppCatalogResponse' {} Int
a -> ImportAppCatalogResponse
s {$sel:httpStatus:ImportAppCatalogResponse' :: Int
httpStatus = Int
a} :: ImportAppCatalogResponse)
instance Prelude.NFData ImportAppCatalogResponse where
rnf :: ImportAppCatalogResponse -> ()
rnf ImportAppCatalogResponse' {Int
httpStatus :: Int
$sel:httpStatus:ImportAppCatalogResponse' :: ImportAppCatalogResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus