{-# 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.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.SageMaker.Types
data EnableSagemakerServicecatalogPortfolio = EnableSagemakerServicecatalogPortfolio'
  {
  }
  deriving (EnableSagemakerServicecatalogPortfolio
-> EnableSagemakerServicecatalogPortfolio -> Bool
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]
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
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.
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 :: (Service -> Service)
-> EnableSagemakerServicecatalogPortfolio
-> Request EnableSagemakerServicecatalogPortfolio
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 EnableSagemakerServicecatalogPortfolio
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse EnableSagemakerServicecatalogPortfolio)))
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 -> EnableSagemakerServicecatalogPortfolioResponse
EnableSagemakerServicecatalogPortfolioResponse'
            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
    EnableSagemakerServicecatalogPortfolio
  where
  hashWithSalt :: Int -> EnableSagemakerServicecatalogPortfolio -> Int
hashWithSalt Int
_salt EnableSagemakerServicecatalogPortfolio
_ =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ()
instance
  Prelude.NFData
    EnableSagemakerServicecatalogPortfolio
  where
  rnf :: EnableSagemakerServicecatalogPortfolio -> ()
rnf EnableSagemakerServicecatalogPortfolio
_ = ()
instance
  Data.ToHeaders
    EnableSagemakerServicecatalogPortfolio
  where
  toHeaders :: EnableSagemakerServicecatalogPortfolio -> 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
"SageMaker.EnableSagemakerServicecatalogPortfolio" ::
                          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
    EnableSagemakerServicecatalogPortfolio
  where
  toJSON :: EnableSagemakerServicecatalogPortfolio -> Value
toJSON = forall a b. a -> b -> a
Prelude.const (Object -> Value
Data.Object forall a. Monoid a => a
Prelude.mempty)
instance
  Data.ToPath
    EnableSagemakerServicecatalogPortfolio
  where
  toPath :: EnableSagemakerServicecatalogPortfolio -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
  Data.ToQuery
    EnableSagemakerServicecatalogPortfolio
  where
  toQuery :: EnableSagemakerServicecatalogPortfolio -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data EnableSagemakerServicecatalogPortfolioResponse = EnableSagemakerServicecatalogPortfolioResponse'
  { 
    EnableSagemakerServicecatalogPortfolioResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (EnableSagemakerServicecatalogPortfolioResponse
-> EnableSagemakerServicecatalogPortfolioResponse -> Bool
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]
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
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.
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'
      { $sel:httpStatus:EnableSagemakerServicecatalogPortfolioResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }
enableSagemakerServicecatalogPortfolioResponse_httpStatus :: Lens.Lens' EnableSagemakerServicecatalogPortfolioResponse Prelude.Int
enableSagemakerServicecatalogPortfolioResponse_httpStatus :: Lens' EnableSagemakerServicecatalogPortfolioResponse Int
enableSagemakerServicecatalogPortfolioResponse_httpStatus = 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
  where
  rnf :: EnableSagemakerServicecatalogPortfolioResponse -> ()
rnf
    EnableSagemakerServicecatalogPortfolioResponse' {Int
httpStatus :: Int
$sel:httpStatus:EnableSagemakerServicecatalogPortfolioResponse' :: EnableSagemakerServicecatalogPortfolioResponse -> Int
..} =
      forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus