{-# 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.EC2.SendDiagnosticInterrupt
(
SendDiagnosticInterrupt (..),
newSendDiagnosticInterrupt,
sendDiagnosticInterrupt_dryRun,
sendDiagnosticInterrupt_instanceId,
SendDiagnosticInterruptResponse (..),
newSendDiagnosticInterruptResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data SendDiagnosticInterrupt = SendDiagnosticInterrupt'
{
SendDiagnosticInterrupt -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
SendDiagnosticInterrupt -> Text
instanceId :: Prelude.Text
}
deriving (SendDiagnosticInterrupt -> SendDiagnosticInterrupt -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SendDiagnosticInterrupt -> SendDiagnosticInterrupt -> Bool
$c/= :: SendDiagnosticInterrupt -> SendDiagnosticInterrupt -> Bool
== :: SendDiagnosticInterrupt -> SendDiagnosticInterrupt -> Bool
$c== :: SendDiagnosticInterrupt -> SendDiagnosticInterrupt -> Bool
Prelude.Eq, ReadPrec [SendDiagnosticInterrupt]
ReadPrec SendDiagnosticInterrupt
Int -> ReadS SendDiagnosticInterrupt
ReadS [SendDiagnosticInterrupt]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SendDiagnosticInterrupt]
$creadListPrec :: ReadPrec [SendDiagnosticInterrupt]
readPrec :: ReadPrec SendDiagnosticInterrupt
$creadPrec :: ReadPrec SendDiagnosticInterrupt
readList :: ReadS [SendDiagnosticInterrupt]
$creadList :: ReadS [SendDiagnosticInterrupt]
readsPrec :: Int -> ReadS SendDiagnosticInterrupt
$creadsPrec :: Int -> ReadS SendDiagnosticInterrupt
Prelude.Read, Int -> SendDiagnosticInterrupt -> ShowS
[SendDiagnosticInterrupt] -> ShowS
SendDiagnosticInterrupt -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SendDiagnosticInterrupt] -> ShowS
$cshowList :: [SendDiagnosticInterrupt] -> ShowS
show :: SendDiagnosticInterrupt -> String
$cshow :: SendDiagnosticInterrupt -> String
showsPrec :: Int -> SendDiagnosticInterrupt -> ShowS
$cshowsPrec :: Int -> SendDiagnosticInterrupt -> ShowS
Prelude.Show, forall x. Rep SendDiagnosticInterrupt x -> SendDiagnosticInterrupt
forall x. SendDiagnosticInterrupt -> Rep SendDiagnosticInterrupt x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SendDiagnosticInterrupt x -> SendDiagnosticInterrupt
$cfrom :: forall x. SendDiagnosticInterrupt -> Rep SendDiagnosticInterrupt x
Prelude.Generic)
newSendDiagnosticInterrupt ::
Prelude.Text ->
SendDiagnosticInterrupt
newSendDiagnosticInterrupt :: Text -> SendDiagnosticInterrupt
newSendDiagnosticInterrupt Text
pInstanceId_ =
SendDiagnosticInterrupt'
{ $sel:dryRun:SendDiagnosticInterrupt' :: Maybe Bool
dryRun = forall a. Maybe a
Prelude.Nothing,
$sel:instanceId:SendDiagnosticInterrupt' :: Text
instanceId = Text
pInstanceId_
}
sendDiagnosticInterrupt_dryRun :: Lens.Lens' SendDiagnosticInterrupt (Prelude.Maybe Prelude.Bool)
sendDiagnosticInterrupt_dryRun :: Lens' SendDiagnosticInterrupt (Maybe Bool)
sendDiagnosticInterrupt_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendDiagnosticInterrupt' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:SendDiagnosticInterrupt' :: SendDiagnosticInterrupt -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: SendDiagnosticInterrupt
s@SendDiagnosticInterrupt' {} Maybe Bool
a -> SendDiagnosticInterrupt
s {$sel:dryRun:SendDiagnosticInterrupt' :: Maybe Bool
dryRun = Maybe Bool
a} :: SendDiagnosticInterrupt)
sendDiagnosticInterrupt_instanceId :: Lens.Lens' SendDiagnosticInterrupt Prelude.Text
sendDiagnosticInterrupt_instanceId :: Lens' SendDiagnosticInterrupt Text
sendDiagnosticInterrupt_instanceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendDiagnosticInterrupt' {Text
instanceId :: Text
$sel:instanceId:SendDiagnosticInterrupt' :: SendDiagnosticInterrupt -> Text
instanceId} -> Text
instanceId) (\s :: SendDiagnosticInterrupt
s@SendDiagnosticInterrupt' {} Text
a -> SendDiagnosticInterrupt
s {$sel:instanceId:SendDiagnosticInterrupt' :: Text
instanceId = Text
a} :: SendDiagnosticInterrupt)
instance Core.AWSRequest SendDiagnosticInterrupt where
type
AWSResponse SendDiagnosticInterrupt =
SendDiagnosticInterruptResponse
request :: (Service -> Service)
-> SendDiagnosticInterrupt -> Request SendDiagnosticInterrupt
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy SendDiagnosticInterrupt
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SendDiagnosticInterrupt)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
SendDiagnosticInterruptResponse
SendDiagnosticInterruptResponse'
instance Prelude.Hashable SendDiagnosticInterrupt where
hashWithSalt :: Int -> SendDiagnosticInterrupt -> Int
hashWithSalt Int
_salt SendDiagnosticInterrupt' {Maybe Bool
Text
instanceId :: Text
dryRun :: Maybe Bool
$sel:instanceId:SendDiagnosticInterrupt' :: SendDiagnosticInterrupt -> Text
$sel:dryRun:SendDiagnosticInterrupt' :: SendDiagnosticInterrupt -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
instanceId
instance Prelude.NFData SendDiagnosticInterrupt where
rnf :: SendDiagnosticInterrupt -> ()
rnf SendDiagnosticInterrupt' {Maybe Bool
Text
instanceId :: Text
dryRun :: Maybe Bool
$sel:instanceId:SendDiagnosticInterrupt' :: SendDiagnosticInterrupt -> Text
$sel:dryRun:SendDiagnosticInterrupt' :: SendDiagnosticInterrupt -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dryRun
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
instanceId
instance Data.ToHeaders SendDiagnosticInterrupt where
toHeaders :: SendDiagnosticInterrupt -> [Header]
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath SendDiagnosticInterrupt where
toPath :: SendDiagnosticInterrupt -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery SendDiagnosticInterrupt where
toQuery :: SendDiagnosticInterrupt -> QueryString
toQuery SendDiagnosticInterrupt' {Maybe Bool
Text
instanceId :: Text
dryRun :: Maybe Bool
$sel:instanceId:SendDiagnosticInterrupt' :: SendDiagnosticInterrupt -> Text
$sel:dryRun:SendDiagnosticInterrupt' :: SendDiagnosticInterrupt -> Maybe Bool
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"SendDiagnosticInterrupt" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
ByteString
"DryRun" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
dryRun,
ByteString
"InstanceId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
instanceId
]
data SendDiagnosticInterruptResponse = SendDiagnosticInterruptResponse'
{
}
deriving (SendDiagnosticInterruptResponse
-> SendDiagnosticInterruptResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SendDiagnosticInterruptResponse
-> SendDiagnosticInterruptResponse -> Bool
$c/= :: SendDiagnosticInterruptResponse
-> SendDiagnosticInterruptResponse -> Bool
== :: SendDiagnosticInterruptResponse
-> SendDiagnosticInterruptResponse -> Bool
$c== :: SendDiagnosticInterruptResponse
-> SendDiagnosticInterruptResponse -> Bool
Prelude.Eq, ReadPrec [SendDiagnosticInterruptResponse]
ReadPrec SendDiagnosticInterruptResponse
Int -> ReadS SendDiagnosticInterruptResponse
ReadS [SendDiagnosticInterruptResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SendDiagnosticInterruptResponse]
$creadListPrec :: ReadPrec [SendDiagnosticInterruptResponse]
readPrec :: ReadPrec SendDiagnosticInterruptResponse
$creadPrec :: ReadPrec SendDiagnosticInterruptResponse
readList :: ReadS [SendDiagnosticInterruptResponse]
$creadList :: ReadS [SendDiagnosticInterruptResponse]
readsPrec :: Int -> ReadS SendDiagnosticInterruptResponse
$creadsPrec :: Int -> ReadS SendDiagnosticInterruptResponse
Prelude.Read, Int -> SendDiagnosticInterruptResponse -> ShowS
[SendDiagnosticInterruptResponse] -> ShowS
SendDiagnosticInterruptResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SendDiagnosticInterruptResponse] -> ShowS
$cshowList :: [SendDiagnosticInterruptResponse] -> ShowS
show :: SendDiagnosticInterruptResponse -> String
$cshow :: SendDiagnosticInterruptResponse -> String
showsPrec :: Int -> SendDiagnosticInterruptResponse -> ShowS
$cshowsPrec :: Int -> SendDiagnosticInterruptResponse -> ShowS
Prelude.Show, forall x.
Rep SendDiagnosticInterruptResponse x
-> SendDiagnosticInterruptResponse
forall x.
SendDiagnosticInterruptResponse
-> Rep SendDiagnosticInterruptResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SendDiagnosticInterruptResponse x
-> SendDiagnosticInterruptResponse
$cfrom :: forall x.
SendDiagnosticInterruptResponse
-> Rep SendDiagnosticInterruptResponse x
Prelude.Generic)
newSendDiagnosticInterruptResponse ::
SendDiagnosticInterruptResponse
newSendDiagnosticInterruptResponse :: SendDiagnosticInterruptResponse
newSendDiagnosticInterruptResponse =
SendDiagnosticInterruptResponse
SendDiagnosticInterruptResponse'
instance
Prelude.NFData
SendDiagnosticInterruptResponse
where
rnf :: SendDiagnosticInterruptResponse -> ()
rnf SendDiagnosticInterruptResponse
_ = ()