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