{-# 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.Shield.DisassociateDRTRole
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Removes the Shield Response Team\'s (SRT) access to your Amazon Web
-- Services account.
module Amazonka.Shield.DisassociateDRTRole
  ( -- * Creating a Request
    DisassociateDRTRole (..),
    newDisassociateDRTRole,

    -- * Destructuring the Response
    DisassociateDRTRoleResponse (..),
    newDisassociateDRTRoleResponse,

    -- * Response Lenses
    disassociateDRTRoleResponse_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.Shield.Types

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

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

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

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

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

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

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

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

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

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

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