{-# 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.ServiceQuotas.DisassociateServiceQuotaTemplate
-- 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 your quota request template. After a template is disabled, the
-- quota increase requests in the template are not applied to new accounts
-- in your organization. Disabling a quota request template does not apply
-- its quota increase requests.
module Amazonka.ServiceQuotas.DisassociateServiceQuotaTemplate
  ( -- * Creating a Request
    DisassociateServiceQuotaTemplate (..),
    newDisassociateServiceQuotaTemplate,

    -- * Destructuring the Response
    DisassociateServiceQuotaTemplateResponse (..),
    newDisassociateServiceQuotaTemplateResponse,

    -- * Response Lenses
    disassociateServiceQuotaTemplateResponse_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.ServiceQuotas.Types

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

-- |
-- Create a value of 'DisassociateServiceQuotaTemplate' 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.
newDisassociateServiceQuotaTemplate ::
  DisassociateServiceQuotaTemplate
newDisassociateServiceQuotaTemplate :: DisassociateServiceQuotaTemplate
newDisassociateServiceQuotaTemplate =
  DisassociateServiceQuotaTemplate
DisassociateServiceQuotaTemplate'

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

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

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

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

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

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

-- |
-- Create a value of 'DisassociateServiceQuotaTemplateResponse' 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', 'disassociateServiceQuotaTemplateResponse_httpStatus' - The response's http status code.
newDisassociateServiceQuotaTemplateResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DisassociateServiceQuotaTemplateResponse
newDisassociateServiceQuotaTemplateResponse :: Int -> DisassociateServiceQuotaTemplateResponse
newDisassociateServiceQuotaTemplateResponse
  Int
pHttpStatus_ =
    DisassociateServiceQuotaTemplateResponse'
      { $sel:httpStatus:DisassociateServiceQuotaTemplateResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

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

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