{-# 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.Shield.EnableProactiveEngagement
(
EnableProactiveEngagement (..),
newEnableProactiveEngagement,
EnableProactiveEngagementResponse (..),
newEnableProactiveEngagementResponse,
enableProactiveEngagementResponse_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
data EnableProactiveEngagement = EnableProactiveEngagement'
{
}
deriving (EnableProactiveEngagement -> EnableProactiveEngagement -> Bool
(EnableProactiveEngagement -> EnableProactiveEngagement -> Bool)
-> (EnableProactiveEngagement -> EnableProactiveEngagement -> Bool)
-> Eq EnableProactiveEngagement
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EnableProactiveEngagement -> EnableProactiveEngagement -> Bool
$c/= :: EnableProactiveEngagement -> EnableProactiveEngagement -> Bool
== :: EnableProactiveEngagement -> EnableProactiveEngagement -> Bool
$c== :: EnableProactiveEngagement -> EnableProactiveEngagement -> Bool
Prelude.Eq, ReadPrec [EnableProactiveEngagement]
ReadPrec EnableProactiveEngagement
Int -> ReadS EnableProactiveEngagement
ReadS [EnableProactiveEngagement]
(Int -> ReadS EnableProactiveEngagement)
-> ReadS [EnableProactiveEngagement]
-> ReadPrec EnableProactiveEngagement
-> ReadPrec [EnableProactiveEngagement]
-> Read EnableProactiveEngagement
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EnableProactiveEngagement]
$creadListPrec :: ReadPrec [EnableProactiveEngagement]
readPrec :: ReadPrec EnableProactiveEngagement
$creadPrec :: ReadPrec EnableProactiveEngagement
readList :: ReadS [EnableProactiveEngagement]
$creadList :: ReadS [EnableProactiveEngagement]
readsPrec :: Int -> ReadS EnableProactiveEngagement
$creadsPrec :: Int -> ReadS EnableProactiveEngagement
Prelude.Read, Int -> EnableProactiveEngagement -> ShowS
[EnableProactiveEngagement] -> ShowS
EnableProactiveEngagement -> String
(Int -> EnableProactiveEngagement -> ShowS)
-> (EnableProactiveEngagement -> String)
-> ([EnableProactiveEngagement] -> ShowS)
-> Show EnableProactiveEngagement
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EnableProactiveEngagement] -> ShowS
$cshowList :: [EnableProactiveEngagement] -> ShowS
show :: EnableProactiveEngagement -> String
$cshow :: EnableProactiveEngagement -> String
showsPrec :: Int -> EnableProactiveEngagement -> ShowS
$cshowsPrec :: Int -> EnableProactiveEngagement -> ShowS
Prelude.Show, (forall x.
EnableProactiveEngagement -> Rep EnableProactiveEngagement x)
-> (forall x.
Rep EnableProactiveEngagement x -> EnableProactiveEngagement)
-> Generic EnableProactiveEngagement
forall x.
Rep EnableProactiveEngagement x -> EnableProactiveEngagement
forall x.
EnableProactiveEngagement -> Rep EnableProactiveEngagement x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EnableProactiveEngagement x -> EnableProactiveEngagement
$cfrom :: forall x.
EnableProactiveEngagement -> Rep EnableProactiveEngagement x
Prelude.Generic)
newEnableProactiveEngagement ::
EnableProactiveEngagement
newEnableProactiveEngagement :: EnableProactiveEngagement
newEnableProactiveEngagement =
EnableProactiveEngagement
EnableProactiveEngagement'
instance Core.AWSRequest EnableProactiveEngagement where
type
AWSResponse EnableProactiveEngagement =
EnableProactiveEngagementResponse
request :: EnableProactiveEngagement -> Request EnableProactiveEngagement
request = Service
-> EnableProactiveEngagement -> Request EnableProactiveEngagement
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy EnableProactiveEngagement
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse EnableProactiveEngagement)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse EnableProactiveEngagement))
-> Logger
-> Service
-> Proxy EnableProactiveEngagement
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse EnableProactiveEngagement)))
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 -> EnableProactiveEngagementResponse
EnableProactiveEngagementResponse'
(Int -> EnableProactiveEngagementResponse)
-> Either String Int
-> Either String EnableProactiveEngagementResponse
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 EnableProactiveEngagement
instance Prelude.NFData EnableProactiveEngagement
instance Core.ToHeaders EnableProactiveEngagement where
toHeaders :: EnableProactiveEngagement -> ResponseHeaders
toHeaders =
ResponseHeaders -> EnableProactiveEngagement -> 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.EnableProactiveEngagement" ::
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 EnableProactiveEngagement where
toJSON :: EnableProactiveEngagement -> Value
toJSON = Value -> EnableProactiveEngagement -> Value
forall a b. a -> b -> a
Prelude.const (Object -> Value
Core.Object Object
forall a. Monoid a => a
Prelude.mempty)
instance Core.ToPath EnableProactiveEngagement where
toPath :: EnableProactiveEngagement -> ByteString
toPath = ByteString -> EnableProactiveEngagement -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery EnableProactiveEngagement where
toQuery :: EnableProactiveEngagement -> QueryString
toQuery = QueryString -> EnableProactiveEngagement -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data EnableProactiveEngagementResponse = EnableProactiveEngagementResponse'
{
EnableProactiveEngagementResponse -> Int
httpStatus :: Prelude.Int
}
deriving (EnableProactiveEngagementResponse
-> EnableProactiveEngagementResponse -> Bool
(EnableProactiveEngagementResponse
-> EnableProactiveEngagementResponse -> Bool)
-> (EnableProactiveEngagementResponse
-> EnableProactiveEngagementResponse -> Bool)
-> Eq EnableProactiveEngagementResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EnableProactiveEngagementResponse
-> EnableProactiveEngagementResponse -> Bool
$c/= :: EnableProactiveEngagementResponse
-> EnableProactiveEngagementResponse -> Bool
== :: EnableProactiveEngagementResponse
-> EnableProactiveEngagementResponse -> Bool
$c== :: EnableProactiveEngagementResponse
-> EnableProactiveEngagementResponse -> Bool
Prelude.Eq, ReadPrec [EnableProactiveEngagementResponse]
ReadPrec EnableProactiveEngagementResponse
Int -> ReadS EnableProactiveEngagementResponse
ReadS [EnableProactiveEngagementResponse]
(Int -> ReadS EnableProactiveEngagementResponse)
-> ReadS [EnableProactiveEngagementResponse]
-> ReadPrec EnableProactiveEngagementResponse
-> ReadPrec [EnableProactiveEngagementResponse]
-> Read EnableProactiveEngagementResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EnableProactiveEngagementResponse]
$creadListPrec :: ReadPrec [EnableProactiveEngagementResponse]
readPrec :: ReadPrec EnableProactiveEngagementResponse
$creadPrec :: ReadPrec EnableProactiveEngagementResponse
readList :: ReadS [EnableProactiveEngagementResponse]
$creadList :: ReadS [EnableProactiveEngagementResponse]
readsPrec :: Int -> ReadS EnableProactiveEngagementResponse
$creadsPrec :: Int -> ReadS EnableProactiveEngagementResponse
Prelude.Read, Int -> EnableProactiveEngagementResponse -> ShowS
[EnableProactiveEngagementResponse] -> ShowS
EnableProactiveEngagementResponse -> String
(Int -> EnableProactiveEngagementResponse -> ShowS)
-> (EnableProactiveEngagementResponse -> String)
-> ([EnableProactiveEngagementResponse] -> ShowS)
-> Show EnableProactiveEngagementResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EnableProactiveEngagementResponse] -> ShowS
$cshowList :: [EnableProactiveEngagementResponse] -> ShowS
show :: EnableProactiveEngagementResponse -> String
$cshow :: EnableProactiveEngagementResponse -> String
showsPrec :: Int -> EnableProactiveEngagementResponse -> ShowS
$cshowsPrec :: Int -> EnableProactiveEngagementResponse -> ShowS
Prelude.Show, (forall x.
EnableProactiveEngagementResponse
-> Rep EnableProactiveEngagementResponse x)
-> (forall x.
Rep EnableProactiveEngagementResponse x
-> EnableProactiveEngagementResponse)
-> Generic EnableProactiveEngagementResponse
forall x.
Rep EnableProactiveEngagementResponse x
-> EnableProactiveEngagementResponse
forall x.
EnableProactiveEngagementResponse
-> Rep EnableProactiveEngagementResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EnableProactiveEngagementResponse x
-> EnableProactiveEngagementResponse
$cfrom :: forall x.
EnableProactiveEngagementResponse
-> Rep EnableProactiveEngagementResponse x
Prelude.Generic)
newEnableProactiveEngagementResponse ::
Prelude.Int ->
EnableProactiveEngagementResponse
newEnableProactiveEngagementResponse :: Int -> EnableProactiveEngagementResponse
newEnableProactiveEngagementResponse Int
pHttpStatus_ =
EnableProactiveEngagementResponse' :: Int -> EnableProactiveEngagementResponse
EnableProactiveEngagementResponse'
{ $sel:httpStatus:EnableProactiveEngagementResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
enableProactiveEngagementResponse_httpStatus :: Lens.Lens' EnableProactiveEngagementResponse Prelude.Int
enableProactiveEngagementResponse_httpStatus :: (Int -> f Int)
-> EnableProactiveEngagementResponse
-> f EnableProactiveEngagementResponse
enableProactiveEngagementResponse_httpStatus = (EnableProactiveEngagementResponse -> Int)
-> (EnableProactiveEngagementResponse
-> Int -> EnableProactiveEngagementResponse)
-> Lens
EnableProactiveEngagementResponse
EnableProactiveEngagementResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnableProactiveEngagementResponse' {Int
httpStatus :: Int
$sel:httpStatus:EnableProactiveEngagementResponse' :: EnableProactiveEngagementResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: EnableProactiveEngagementResponse
s@EnableProactiveEngagementResponse' {} Int
a -> EnableProactiveEngagementResponse
s {$sel:httpStatus:EnableProactiveEngagementResponse' :: Int
httpStatus = Int
a} :: EnableProactiveEngagementResponse)
instance
Prelude.NFData
EnableProactiveEngagementResponse