{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SageMaker.DisableSagemakerServicecatalogPortfolio
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Disables using Service Catalog in SageMaker. Service Catalog is used to
-- create SageMaker projects.
module Amazonka.SageMaker.DisableSagemakerServicecatalogPortfolio
  ( -- * Creating a Request
    DisableSagemakerServicecatalogPortfolio (..),
    newDisableSagemakerServicecatalogPortfolio,

    -- * Destructuring the Response
    DisableSagemakerServicecatalogPortfolioResponse (..),
    newDisableSagemakerServicecatalogPortfolioResponse,

    -- * Response Lenses
    disableSagemakerServicecatalogPortfolioResponse_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

-- | /See:/ 'newDisableSagemakerServicecatalogPortfolio' smart constructor.
data DisableSagemakerServicecatalogPortfolio = DisableSagemakerServicecatalogPortfolio'
  {
  }
  deriving (DisableSagemakerServicecatalogPortfolio
-> DisableSagemakerServicecatalogPortfolio -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisableSagemakerServicecatalogPortfolio
-> DisableSagemakerServicecatalogPortfolio -> Bool
$c/= :: DisableSagemakerServicecatalogPortfolio
-> DisableSagemakerServicecatalogPortfolio -> Bool
== :: DisableSagemakerServicecatalogPortfolio
-> DisableSagemakerServicecatalogPortfolio -> Bool
$c== :: DisableSagemakerServicecatalogPortfolio
-> DisableSagemakerServicecatalogPortfolio -> Bool
Prelude.Eq, ReadPrec [DisableSagemakerServicecatalogPortfolio]
ReadPrec DisableSagemakerServicecatalogPortfolio
Int -> ReadS DisableSagemakerServicecatalogPortfolio
ReadS [DisableSagemakerServicecatalogPortfolio]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisableSagemakerServicecatalogPortfolio]
$creadListPrec :: ReadPrec [DisableSagemakerServicecatalogPortfolio]
readPrec :: ReadPrec DisableSagemakerServicecatalogPortfolio
$creadPrec :: ReadPrec DisableSagemakerServicecatalogPortfolio
readList :: ReadS [DisableSagemakerServicecatalogPortfolio]
$creadList :: ReadS [DisableSagemakerServicecatalogPortfolio]
readsPrec :: Int -> ReadS DisableSagemakerServicecatalogPortfolio
$creadsPrec :: Int -> ReadS DisableSagemakerServicecatalogPortfolio
Prelude.Read, Int -> DisableSagemakerServicecatalogPortfolio -> ShowS
[DisableSagemakerServicecatalogPortfolio] -> ShowS
DisableSagemakerServicecatalogPortfolio -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisableSagemakerServicecatalogPortfolio] -> ShowS
$cshowList :: [DisableSagemakerServicecatalogPortfolio] -> ShowS
show :: DisableSagemakerServicecatalogPortfolio -> String
$cshow :: DisableSagemakerServicecatalogPortfolio -> String
showsPrec :: Int -> DisableSagemakerServicecatalogPortfolio -> ShowS
$cshowsPrec :: Int -> DisableSagemakerServicecatalogPortfolio -> ShowS
Prelude.Show, forall x.
Rep DisableSagemakerServicecatalogPortfolio x
-> DisableSagemakerServicecatalogPortfolio
forall x.
DisableSagemakerServicecatalogPortfolio
-> Rep DisableSagemakerServicecatalogPortfolio x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisableSagemakerServicecatalogPortfolio x
-> DisableSagemakerServicecatalogPortfolio
$cfrom :: forall x.
DisableSagemakerServicecatalogPortfolio
-> Rep DisableSagemakerServicecatalogPortfolio x
Prelude.Generic)

-- |
-- Create a value of 'DisableSagemakerServicecatalogPortfolio' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
newDisableSagemakerServicecatalogPortfolio ::
  DisableSagemakerServicecatalogPortfolio
newDisableSagemakerServicecatalogPortfolio :: DisableSagemakerServicecatalogPortfolio
newDisableSagemakerServicecatalogPortfolio =
  DisableSagemakerServicecatalogPortfolio
DisableSagemakerServicecatalogPortfolio'

instance
  Core.AWSRequest
    DisableSagemakerServicecatalogPortfolio
  where
  type
    AWSResponse
      DisableSagemakerServicecatalogPortfolio =
      DisableSagemakerServicecatalogPortfolioResponse
  request :: (Service -> Service)
-> DisableSagemakerServicecatalogPortfolio
-> Request DisableSagemakerServicecatalogPortfolio
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 DisableSagemakerServicecatalogPortfolio
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DisableSagemakerServicecatalogPortfolio)))
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 -> DisableSagemakerServicecatalogPortfolioResponse
DisableSagemakerServicecatalogPortfolioResponse'
            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
    DisableSagemakerServicecatalogPortfolio
  where
  hashWithSalt :: Int -> DisableSagemakerServicecatalogPortfolio -> Int
hashWithSalt Int
_salt DisableSagemakerServicecatalogPortfolio
_ =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ()

instance
  Prelude.NFData
    DisableSagemakerServicecatalogPortfolio
  where
  rnf :: DisableSagemakerServicecatalogPortfolio -> ()
rnf DisableSagemakerServicecatalogPortfolio
_ = ()

instance
  Data.ToHeaders
    DisableSagemakerServicecatalogPortfolio
  where
  toHeaders :: DisableSagemakerServicecatalogPortfolio -> 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.DisableSagemakerServicecatalogPortfolio" ::
                          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
    DisableSagemakerServicecatalogPortfolio
  where
  toJSON :: DisableSagemakerServicecatalogPortfolio -> Value
toJSON = forall a b. a -> b -> a
Prelude.const (Object -> Value
Data.Object forall a. Monoid a => a
Prelude.mempty)

instance
  Data.ToPath
    DisableSagemakerServicecatalogPortfolio
  where
  toPath :: DisableSagemakerServicecatalogPortfolio -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance
  Data.ToQuery
    DisableSagemakerServicecatalogPortfolio
  where
  toQuery :: DisableSagemakerServicecatalogPortfolio -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newDisableSagemakerServicecatalogPortfolioResponse' smart constructor.
data DisableSagemakerServicecatalogPortfolioResponse = DisableSagemakerServicecatalogPortfolioResponse'
  { -- | The response's http status code.
    DisableSagemakerServicecatalogPortfolioResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DisableSagemakerServicecatalogPortfolioResponse
-> DisableSagemakerServicecatalogPortfolioResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisableSagemakerServicecatalogPortfolioResponse
-> DisableSagemakerServicecatalogPortfolioResponse -> Bool
$c/= :: DisableSagemakerServicecatalogPortfolioResponse
-> DisableSagemakerServicecatalogPortfolioResponse -> Bool
== :: DisableSagemakerServicecatalogPortfolioResponse
-> DisableSagemakerServicecatalogPortfolioResponse -> Bool
$c== :: DisableSagemakerServicecatalogPortfolioResponse
-> DisableSagemakerServicecatalogPortfolioResponse -> Bool
Prelude.Eq, ReadPrec [DisableSagemakerServicecatalogPortfolioResponse]
ReadPrec DisableSagemakerServicecatalogPortfolioResponse
Int -> ReadS DisableSagemakerServicecatalogPortfolioResponse
ReadS [DisableSagemakerServicecatalogPortfolioResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisableSagemakerServicecatalogPortfolioResponse]
$creadListPrec :: ReadPrec [DisableSagemakerServicecatalogPortfolioResponse]
readPrec :: ReadPrec DisableSagemakerServicecatalogPortfolioResponse
$creadPrec :: ReadPrec DisableSagemakerServicecatalogPortfolioResponse
readList :: ReadS [DisableSagemakerServicecatalogPortfolioResponse]
$creadList :: ReadS [DisableSagemakerServicecatalogPortfolioResponse]
readsPrec :: Int -> ReadS DisableSagemakerServicecatalogPortfolioResponse
$creadsPrec :: Int -> ReadS DisableSagemakerServicecatalogPortfolioResponse
Prelude.Read, Int -> DisableSagemakerServicecatalogPortfolioResponse -> ShowS
[DisableSagemakerServicecatalogPortfolioResponse] -> ShowS
DisableSagemakerServicecatalogPortfolioResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisableSagemakerServicecatalogPortfolioResponse] -> ShowS
$cshowList :: [DisableSagemakerServicecatalogPortfolioResponse] -> ShowS
show :: DisableSagemakerServicecatalogPortfolioResponse -> String
$cshow :: DisableSagemakerServicecatalogPortfolioResponse -> String
showsPrec :: Int -> DisableSagemakerServicecatalogPortfolioResponse -> ShowS
$cshowsPrec :: Int -> DisableSagemakerServicecatalogPortfolioResponse -> ShowS
Prelude.Show, forall x.
Rep DisableSagemakerServicecatalogPortfolioResponse x
-> DisableSagemakerServicecatalogPortfolioResponse
forall x.
DisableSagemakerServicecatalogPortfolioResponse
-> Rep DisableSagemakerServicecatalogPortfolioResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisableSagemakerServicecatalogPortfolioResponse x
-> DisableSagemakerServicecatalogPortfolioResponse
$cfrom :: forall x.
DisableSagemakerServicecatalogPortfolioResponse
-> Rep DisableSagemakerServicecatalogPortfolioResponse x
Prelude.Generic)

-- |
-- Create a value of 'DisableSagemakerServicecatalogPortfolioResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'httpStatus', 'disableSagemakerServicecatalogPortfolioResponse_httpStatus' - The response's http status code.
newDisableSagemakerServicecatalogPortfolioResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DisableSagemakerServicecatalogPortfolioResponse
newDisableSagemakerServicecatalogPortfolioResponse :: Int -> DisableSagemakerServicecatalogPortfolioResponse
newDisableSagemakerServicecatalogPortfolioResponse
  Int
pHttpStatus_ =
    DisableSagemakerServicecatalogPortfolioResponse'
      { $sel:httpStatus:DisableSagemakerServicecatalogPortfolioResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

-- | The response's http status code.
disableSagemakerServicecatalogPortfolioResponse_httpStatus :: Lens.Lens' DisableSagemakerServicecatalogPortfolioResponse Prelude.Int
disableSagemakerServicecatalogPortfolioResponse_httpStatus :: Lens' DisableSagemakerServicecatalogPortfolioResponse Int
disableSagemakerServicecatalogPortfolioResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableSagemakerServicecatalogPortfolioResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisableSagemakerServicecatalogPortfolioResponse' :: DisableSagemakerServicecatalogPortfolioResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DisableSagemakerServicecatalogPortfolioResponse
s@DisableSagemakerServicecatalogPortfolioResponse' {} Int
a -> DisableSagemakerServicecatalogPortfolioResponse
s {$sel:httpStatus:DisableSagemakerServicecatalogPortfolioResponse' :: Int
httpStatus = Int
a} :: DisableSagemakerServicecatalogPortfolioResponse)

instance
  Prelude.NFData
    DisableSagemakerServicecatalogPortfolioResponse
  where
  rnf :: DisableSagemakerServicecatalogPortfolioResponse -> ()
rnf
    DisableSagemakerServicecatalogPortfolioResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisableSagemakerServicecatalogPortfolioResponse' :: DisableSagemakerServicecatalogPortfolioResponse -> Int
..} =
      forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus