{-# 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.AssociateProactiveEngagementDetails
(
AssociateProactiveEngagementDetails (..),
newAssociateProactiveEngagementDetails,
associateProactiveEngagementDetails_emergencyContactList,
AssociateProactiveEngagementDetailsResponse (..),
newAssociateProactiveEngagementDetailsResponse,
associateProactiveEngagementDetailsResponse_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 AssociateProactiveEngagementDetails = AssociateProactiveEngagementDetails'
{
AssociateProactiveEngagementDetails -> [EmergencyContact]
emergencyContactList :: [EmergencyContact]
}
deriving (AssociateProactiveEngagementDetails
-> AssociateProactiveEngagementDetails -> Bool
(AssociateProactiveEngagementDetails
-> AssociateProactiveEngagementDetails -> Bool)
-> (AssociateProactiveEngagementDetails
-> AssociateProactiveEngagementDetails -> Bool)
-> Eq AssociateProactiveEngagementDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateProactiveEngagementDetails
-> AssociateProactiveEngagementDetails -> Bool
$c/= :: AssociateProactiveEngagementDetails
-> AssociateProactiveEngagementDetails -> Bool
== :: AssociateProactiveEngagementDetails
-> AssociateProactiveEngagementDetails -> Bool
$c== :: AssociateProactiveEngagementDetails
-> AssociateProactiveEngagementDetails -> Bool
Prelude.Eq, ReadPrec [AssociateProactiveEngagementDetails]
ReadPrec AssociateProactiveEngagementDetails
Int -> ReadS AssociateProactiveEngagementDetails
ReadS [AssociateProactiveEngagementDetails]
(Int -> ReadS AssociateProactiveEngagementDetails)
-> ReadS [AssociateProactiveEngagementDetails]
-> ReadPrec AssociateProactiveEngagementDetails
-> ReadPrec [AssociateProactiveEngagementDetails]
-> Read AssociateProactiveEngagementDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateProactiveEngagementDetails]
$creadListPrec :: ReadPrec [AssociateProactiveEngagementDetails]
readPrec :: ReadPrec AssociateProactiveEngagementDetails
$creadPrec :: ReadPrec AssociateProactiveEngagementDetails
readList :: ReadS [AssociateProactiveEngagementDetails]
$creadList :: ReadS [AssociateProactiveEngagementDetails]
readsPrec :: Int -> ReadS AssociateProactiveEngagementDetails
$creadsPrec :: Int -> ReadS AssociateProactiveEngagementDetails
Prelude.Read, Int -> AssociateProactiveEngagementDetails -> ShowS
[AssociateProactiveEngagementDetails] -> ShowS
AssociateProactiveEngagementDetails -> String
(Int -> AssociateProactiveEngagementDetails -> ShowS)
-> (AssociateProactiveEngagementDetails -> String)
-> ([AssociateProactiveEngagementDetails] -> ShowS)
-> Show AssociateProactiveEngagementDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateProactiveEngagementDetails] -> ShowS
$cshowList :: [AssociateProactiveEngagementDetails] -> ShowS
show :: AssociateProactiveEngagementDetails -> String
$cshow :: AssociateProactiveEngagementDetails -> String
showsPrec :: Int -> AssociateProactiveEngagementDetails -> ShowS
$cshowsPrec :: Int -> AssociateProactiveEngagementDetails -> ShowS
Prelude.Show, (forall x.
AssociateProactiveEngagementDetails
-> Rep AssociateProactiveEngagementDetails x)
-> (forall x.
Rep AssociateProactiveEngagementDetails x
-> AssociateProactiveEngagementDetails)
-> Generic AssociateProactiveEngagementDetails
forall x.
Rep AssociateProactiveEngagementDetails x
-> AssociateProactiveEngagementDetails
forall x.
AssociateProactiveEngagementDetails
-> Rep AssociateProactiveEngagementDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateProactiveEngagementDetails x
-> AssociateProactiveEngagementDetails
$cfrom :: forall x.
AssociateProactiveEngagementDetails
-> Rep AssociateProactiveEngagementDetails x
Prelude.Generic)
newAssociateProactiveEngagementDetails ::
AssociateProactiveEngagementDetails
newAssociateProactiveEngagementDetails :: AssociateProactiveEngagementDetails
newAssociateProactiveEngagementDetails =
AssociateProactiveEngagementDetails' :: [EmergencyContact] -> AssociateProactiveEngagementDetails
AssociateProactiveEngagementDetails'
{ $sel:emergencyContactList:AssociateProactiveEngagementDetails' :: [EmergencyContact]
emergencyContactList =
[EmergencyContact]
forall a. Monoid a => a
Prelude.mempty
}
associateProactiveEngagementDetails_emergencyContactList :: Lens.Lens' AssociateProactiveEngagementDetails [EmergencyContact]
associateProactiveEngagementDetails_emergencyContactList :: ([EmergencyContact] -> f [EmergencyContact])
-> AssociateProactiveEngagementDetails
-> f AssociateProactiveEngagementDetails
associateProactiveEngagementDetails_emergencyContactList = (AssociateProactiveEngagementDetails -> [EmergencyContact])
-> (AssociateProactiveEngagementDetails
-> [EmergencyContact] -> AssociateProactiveEngagementDetails)
-> Lens
AssociateProactiveEngagementDetails
AssociateProactiveEngagementDetails
[EmergencyContact]
[EmergencyContact]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateProactiveEngagementDetails' {[EmergencyContact]
emergencyContactList :: [EmergencyContact]
$sel:emergencyContactList:AssociateProactiveEngagementDetails' :: AssociateProactiveEngagementDetails -> [EmergencyContact]
emergencyContactList} -> [EmergencyContact]
emergencyContactList) (\s :: AssociateProactiveEngagementDetails
s@AssociateProactiveEngagementDetails' {} [EmergencyContact]
a -> AssociateProactiveEngagementDetails
s {$sel:emergencyContactList:AssociateProactiveEngagementDetails' :: [EmergencyContact]
emergencyContactList = [EmergencyContact]
a} :: AssociateProactiveEngagementDetails) (([EmergencyContact] -> f [EmergencyContact])
-> AssociateProactiveEngagementDetails
-> f AssociateProactiveEngagementDetails)
-> (([EmergencyContact] -> f [EmergencyContact])
-> [EmergencyContact] -> f [EmergencyContact])
-> ([EmergencyContact] -> f [EmergencyContact])
-> AssociateProactiveEngagementDetails
-> f AssociateProactiveEngagementDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([EmergencyContact] -> f [EmergencyContact])
-> [EmergencyContact] -> f [EmergencyContact]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Core.AWSRequest
AssociateProactiveEngagementDetails
where
type
AWSResponse AssociateProactiveEngagementDetails =
AssociateProactiveEngagementDetailsResponse
request :: AssociateProactiveEngagementDetails
-> Request AssociateProactiveEngagementDetails
request = Service
-> AssociateProactiveEngagementDetails
-> Request AssociateProactiveEngagementDetails
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy AssociateProactiveEngagementDetails
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse AssociateProactiveEngagementDetails)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse AssociateProactiveEngagementDetails))
-> Logger
-> Service
-> Proxy AssociateProactiveEngagementDetails
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse AssociateProactiveEngagementDetails)))
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 -> AssociateProactiveEngagementDetailsResponse
AssociateProactiveEngagementDetailsResponse'
(Int -> AssociateProactiveEngagementDetailsResponse)
-> Either String Int
-> Either String AssociateProactiveEngagementDetailsResponse
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
AssociateProactiveEngagementDetails
instance
Prelude.NFData
AssociateProactiveEngagementDetails
instance
Core.ToHeaders
AssociateProactiveEngagementDetails
where
toHeaders :: AssociateProactiveEngagementDetails -> ResponseHeaders
toHeaders =
ResponseHeaders
-> AssociateProactiveEngagementDetails -> 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.AssociateProactiveEngagementDetails" ::
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
AssociateProactiveEngagementDetails
where
toJSON :: AssociateProactiveEngagementDetails -> Value
toJSON AssociateProactiveEngagementDetails' {[EmergencyContact]
emergencyContactList :: [EmergencyContact]
$sel:emergencyContactList:AssociateProactiveEngagementDetails' :: AssociateProactiveEngagementDetails -> [EmergencyContact]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"EmergencyContactList"
Text -> [EmergencyContact] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [EmergencyContact]
emergencyContactList
)
]
)
instance
Core.ToPath
AssociateProactiveEngagementDetails
where
toPath :: AssociateProactiveEngagementDetails -> ByteString
toPath = ByteString -> AssociateProactiveEngagementDetails -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
AssociateProactiveEngagementDetails
where
toQuery :: AssociateProactiveEngagementDetails -> QueryString
toQuery = QueryString -> AssociateProactiveEngagementDetails -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data AssociateProactiveEngagementDetailsResponse = AssociateProactiveEngagementDetailsResponse'
{
AssociateProactiveEngagementDetailsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (AssociateProactiveEngagementDetailsResponse
-> AssociateProactiveEngagementDetailsResponse -> Bool
(AssociateProactiveEngagementDetailsResponse
-> AssociateProactiveEngagementDetailsResponse -> Bool)
-> (AssociateProactiveEngagementDetailsResponse
-> AssociateProactiveEngagementDetailsResponse -> Bool)
-> Eq AssociateProactiveEngagementDetailsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateProactiveEngagementDetailsResponse
-> AssociateProactiveEngagementDetailsResponse -> Bool
$c/= :: AssociateProactiveEngagementDetailsResponse
-> AssociateProactiveEngagementDetailsResponse -> Bool
== :: AssociateProactiveEngagementDetailsResponse
-> AssociateProactiveEngagementDetailsResponse -> Bool
$c== :: AssociateProactiveEngagementDetailsResponse
-> AssociateProactiveEngagementDetailsResponse -> Bool
Prelude.Eq, ReadPrec [AssociateProactiveEngagementDetailsResponse]
ReadPrec AssociateProactiveEngagementDetailsResponse
Int -> ReadS AssociateProactiveEngagementDetailsResponse
ReadS [AssociateProactiveEngagementDetailsResponse]
(Int -> ReadS AssociateProactiveEngagementDetailsResponse)
-> ReadS [AssociateProactiveEngagementDetailsResponse]
-> ReadPrec AssociateProactiveEngagementDetailsResponse
-> ReadPrec [AssociateProactiveEngagementDetailsResponse]
-> Read AssociateProactiveEngagementDetailsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateProactiveEngagementDetailsResponse]
$creadListPrec :: ReadPrec [AssociateProactiveEngagementDetailsResponse]
readPrec :: ReadPrec AssociateProactiveEngagementDetailsResponse
$creadPrec :: ReadPrec AssociateProactiveEngagementDetailsResponse
readList :: ReadS [AssociateProactiveEngagementDetailsResponse]
$creadList :: ReadS [AssociateProactiveEngagementDetailsResponse]
readsPrec :: Int -> ReadS AssociateProactiveEngagementDetailsResponse
$creadsPrec :: Int -> ReadS AssociateProactiveEngagementDetailsResponse
Prelude.Read, Int -> AssociateProactiveEngagementDetailsResponse -> ShowS
[AssociateProactiveEngagementDetailsResponse] -> ShowS
AssociateProactiveEngagementDetailsResponse -> String
(Int -> AssociateProactiveEngagementDetailsResponse -> ShowS)
-> (AssociateProactiveEngagementDetailsResponse -> String)
-> ([AssociateProactiveEngagementDetailsResponse] -> ShowS)
-> Show AssociateProactiveEngagementDetailsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateProactiveEngagementDetailsResponse] -> ShowS
$cshowList :: [AssociateProactiveEngagementDetailsResponse] -> ShowS
show :: AssociateProactiveEngagementDetailsResponse -> String
$cshow :: AssociateProactiveEngagementDetailsResponse -> String
showsPrec :: Int -> AssociateProactiveEngagementDetailsResponse -> ShowS
$cshowsPrec :: Int -> AssociateProactiveEngagementDetailsResponse -> ShowS
Prelude.Show, (forall x.
AssociateProactiveEngagementDetailsResponse
-> Rep AssociateProactiveEngagementDetailsResponse x)
-> (forall x.
Rep AssociateProactiveEngagementDetailsResponse x
-> AssociateProactiveEngagementDetailsResponse)
-> Generic AssociateProactiveEngagementDetailsResponse
forall x.
Rep AssociateProactiveEngagementDetailsResponse x
-> AssociateProactiveEngagementDetailsResponse
forall x.
AssociateProactiveEngagementDetailsResponse
-> Rep AssociateProactiveEngagementDetailsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateProactiveEngagementDetailsResponse x
-> AssociateProactiveEngagementDetailsResponse
$cfrom :: forall x.
AssociateProactiveEngagementDetailsResponse
-> Rep AssociateProactiveEngagementDetailsResponse x
Prelude.Generic)
newAssociateProactiveEngagementDetailsResponse ::
Prelude.Int ->
AssociateProactiveEngagementDetailsResponse
newAssociateProactiveEngagementDetailsResponse :: Int -> AssociateProactiveEngagementDetailsResponse
newAssociateProactiveEngagementDetailsResponse
Int
pHttpStatus_ =
AssociateProactiveEngagementDetailsResponse' :: Int -> AssociateProactiveEngagementDetailsResponse
AssociateProactiveEngagementDetailsResponse'
{ $sel:httpStatus:AssociateProactiveEngagementDetailsResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
associateProactiveEngagementDetailsResponse_httpStatus :: Lens.Lens' AssociateProactiveEngagementDetailsResponse Prelude.Int
associateProactiveEngagementDetailsResponse_httpStatus :: (Int -> f Int)
-> AssociateProactiveEngagementDetailsResponse
-> f AssociateProactiveEngagementDetailsResponse
associateProactiveEngagementDetailsResponse_httpStatus = (AssociateProactiveEngagementDetailsResponse -> Int)
-> (AssociateProactiveEngagementDetailsResponse
-> Int -> AssociateProactiveEngagementDetailsResponse)
-> Lens
AssociateProactiveEngagementDetailsResponse
AssociateProactiveEngagementDetailsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateProactiveEngagementDetailsResponse' {Int
httpStatus :: Int
$sel:httpStatus:AssociateProactiveEngagementDetailsResponse' :: AssociateProactiveEngagementDetailsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: AssociateProactiveEngagementDetailsResponse
s@AssociateProactiveEngagementDetailsResponse' {} Int
a -> AssociateProactiveEngagementDetailsResponse
s {$sel:httpStatus:AssociateProactiveEngagementDetailsResponse' :: Int
httpStatus = Int
a} :: AssociateProactiveEngagementDetailsResponse)
instance
Prelude.NFData
AssociateProactiveEngagementDetailsResponse