{-# 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.DisableProactiveEngagement
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Removes authorization from the Shield Response Team (SRT) to notify
-- contacts about escalations to the SRT and to initiate proactive customer
-- support.
module Amazonka.Shield.DisableProactiveEngagement
  ( -- * Creating a Request
    DisableProactiveEngagement (..),
    newDisableProactiveEngagement,

    -- * Destructuring the Response
    DisableProactiveEngagementResponse (..),
    newDisableProactiveEngagementResponse,

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

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

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

instance Core.AWSRequest DisableProactiveEngagement where
  type
    AWSResponse DisableProactiveEngagement =
      DisableProactiveEngagementResponse
  request :: DisableProactiveEngagement -> Request DisableProactiveEngagement
request = Service
-> DisableProactiveEngagement -> Request DisableProactiveEngagement
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DisableProactiveEngagement
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DisableProactiveEngagement)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either String (AWSResponse DisableProactiveEngagement))
-> Logger
-> Service
-> Proxy DisableProactiveEngagement
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DisableProactiveEngagement)))
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 -> DisableProactiveEngagementResponse
DisableProactiveEngagementResponse'
            (Int -> DisableProactiveEngagementResponse)
-> Either String Int
-> Either String DisableProactiveEngagementResponse
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 DisableProactiveEngagement

instance Prelude.NFData DisableProactiveEngagement

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

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

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

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

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

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

instance
  Prelude.NFData
    DisableProactiveEngagementResponse