{-# 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.CloudFormation.SignalResource
(
SignalResource (..),
newSignalResource,
signalResource_stackName,
signalResource_logicalResourceId,
signalResource_uniqueId,
signalResource_status,
SignalResourceResponse (..),
newSignalResourceResponse,
)
where
import Amazonka.CloudFormation.Types
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
data SignalResource = SignalResource'
{
SignalResource -> Text
stackName :: Prelude.Text,
SignalResource -> Text
logicalResourceId :: Prelude.Text,
SignalResource -> Text
uniqueId :: Prelude.Text,
SignalResource -> ResourceSignalStatus
status :: ResourceSignalStatus
}
deriving (SignalResource -> SignalResource -> Bool
(SignalResource -> SignalResource -> Bool)
-> (SignalResource -> SignalResource -> Bool) -> Eq SignalResource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SignalResource -> SignalResource -> Bool
$c/= :: SignalResource -> SignalResource -> Bool
== :: SignalResource -> SignalResource -> Bool
$c== :: SignalResource -> SignalResource -> Bool
Prelude.Eq, ReadPrec [SignalResource]
ReadPrec SignalResource
Int -> ReadS SignalResource
ReadS [SignalResource]
(Int -> ReadS SignalResource)
-> ReadS [SignalResource]
-> ReadPrec SignalResource
-> ReadPrec [SignalResource]
-> Read SignalResource
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SignalResource]
$creadListPrec :: ReadPrec [SignalResource]
readPrec :: ReadPrec SignalResource
$creadPrec :: ReadPrec SignalResource
readList :: ReadS [SignalResource]
$creadList :: ReadS [SignalResource]
readsPrec :: Int -> ReadS SignalResource
$creadsPrec :: Int -> ReadS SignalResource
Prelude.Read, Int -> SignalResource -> ShowS
[SignalResource] -> ShowS
SignalResource -> String
(Int -> SignalResource -> ShowS)
-> (SignalResource -> String)
-> ([SignalResource] -> ShowS)
-> Show SignalResource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SignalResource] -> ShowS
$cshowList :: [SignalResource] -> ShowS
show :: SignalResource -> String
$cshow :: SignalResource -> String
showsPrec :: Int -> SignalResource -> ShowS
$cshowsPrec :: Int -> SignalResource -> ShowS
Prelude.Show, (forall x. SignalResource -> Rep SignalResource x)
-> (forall x. Rep SignalResource x -> SignalResource)
-> Generic SignalResource
forall x. Rep SignalResource x -> SignalResource
forall x. SignalResource -> Rep SignalResource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SignalResource x -> SignalResource
$cfrom :: forall x. SignalResource -> Rep SignalResource x
Prelude.Generic)
newSignalResource ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ResourceSignalStatus ->
SignalResource
newSignalResource :: Text -> Text -> Text -> ResourceSignalStatus -> SignalResource
newSignalResource
Text
pStackName_
Text
pLogicalResourceId_
Text
pUniqueId_
ResourceSignalStatus
pStatus_ =
SignalResource' :: Text -> Text -> Text -> ResourceSignalStatus -> SignalResource
SignalResource'
{ $sel:stackName:SignalResource' :: Text
stackName = Text
pStackName_,
$sel:logicalResourceId:SignalResource' :: Text
logicalResourceId = Text
pLogicalResourceId_,
$sel:uniqueId:SignalResource' :: Text
uniqueId = Text
pUniqueId_,
$sel:status:SignalResource' :: ResourceSignalStatus
status = ResourceSignalStatus
pStatus_
}
signalResource_stackName :: Lens.Lens' SignalResource Prelude.Text
signalResource_stackName :: (Text -> f Text) -> SignalResource -> f SignalResource
signalResource_stackName = (SignalResource -> Text)
-> (SignalResource -> Text -> SignalResource)
-> Lens SignalResource SignalResource Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SignalResource' {Text
stackName :: Text
$sel:stackName:SignalResource' :: SignalResource -> Text
stackName} -> Text
stackName) (\s :: SignalResource
s@SignalResource' {} Text
a -> SignalResource
s {$sel:stackName:SignalResource' :: Text
stackName = Text
a} :: SignalResource)
signalResource_logicalResourceId :: Lens.Lens' SignalResource Prelude.Text
signalResource_logicalResourceId :: (Text -> f Text) -> SignalResource -> f SignalResource
signalResource_logicalResourceId = (SignalResource -> Text)
-> (SignalResource -> Text -> SignalResource)
-> Lens SignalResource SignalResource Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SignalResource' {Text
logicalResourceId :: Text
$sel:logicalResourceId:SignalResource' :: SignalResource -> Text
logicalResourceId} -> Text
logicalResourceId) (\s :: SignalResource
s@SignalResource' {} Text
a -> SignalResource
s {$sel:logicalResourceId:SignalResource' :: Text
logicalResourceId = Text
a} :: SignalResource)
signalResource_uniqueId :: Lens.Lens' SignalResource Prelude.Text
signalResource_uniqueId :: (Text -> f Text) -> SignalResource -> f SignalResource
signalResource_uniqueId = (SignalResource -> Text)
-> (SignalResource -> Text -> SignalResource)
-> Lens SignalResource SignalResource Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SignalResource' {Text
uniqueId :: Text
$sel:uniqueId:SignalResource' :: SignalResource -> Text
uniqueId} -> Text
uniqueId) (\s :: SignalResource
s@SignalResource' {} Text
a -> SignalResource
s {$sel:uniqueId:SignalResource' :: Text
uniqueId = Text
a} :: SignalResource)
signalResource_status :: Lens.Lens' SignalResource ResourceSignalStatus
signalResource_status :: (ResourceSignalStatus -> f ResourceSignalStatus)
-> SignalResource -> f SignalResource
signalResource_status = (SignalResource -> ResourceSignalStatus)
-> (SignalResource -> ResourceSignalStatus -> SignalResource)
-> Lens
SignalResource
SignalResource
ResourceSignalStatus
ResourceSignalStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SignalResource' {ResourceSignalStatus
status :: ResourceSignalStatus
$sel:status:SignalResource' :: SignalResource -> ResourceSignalStatus
status} -> ResourceSignalStatus
status) (\s :: SignalResource
s@SignalResource' {} ResourceSignalStatus
a -> SignalResource
s {$sel:status:SignalResource' :: ResourceSignalStatus
status = ResourceSignalStatus
a} :: SignalResource)
instance Core.AWSRequest SignalResource where
type
AWSResponse SignalResource =
SignalResourceResponse
request :: SignalResource -> Request SignalResource
request = Service -> SignalResource -> Request SignalResource
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy SignalResource
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse SignalResource)))
response =
AWSResponse SignalResource
-> Logger
-> Service
-> Proxy SignalResource
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse SignalResource)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse SignalResource
SignalResourceResponse
SignalResourceResponse'
instance Prelude.Hashable SignalResource
instance Prelude.NFData SignalResource
instance Core.ToHeaders SignalResource where
toHeaders :: SignalResource -> [Header]
toHeaders = [Header] -> SignalResource -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath SignalResource where
toPath :: SignalResource -> ByteString
toPath = ByteString -> SignalResource -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery SignalResource where
toQuery :: SignalResource -> QueryString
toQuery SignalResource' {Text
ResourceSignalStatus
status :: ResourceSignalStatus
uniqueId :: Text
logicalResourceId :: Text
stackName :: Text
$sel:status:SignalResource' :: SignalResource -> ResourceSignalStatus
$sel:uniqueId:SignalResource' :: SignalResource -> Text
$sel:logicalResourceId:SignalResource' :: SignalResource -> Text
$sel:stackName:SignalResource' :: SignalResource -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"SignalResource" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
ByteString
"StackName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
stackName,
ByteString
"LogicalResourceId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
logicalResourceId,
ByteString
"UniqueId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
uniqueId,
ByteString
"Status" ByteString -> ResourceSignalStatus -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ResourceSignalStatus
status
]
data SignalResourceResponse = SignalResourceResponse'
{
}
deriving (SignalResourceResponse -> SignalResourceResponse -> Bool
(SignalResourceResponse -> SignalResourceResponse -> Bool)
-> (SignalResourceResponse -> SignalResourceResponse -> Bool)
-> Eq SignalResourceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SignalResourceResponse -> SignalResourceResponse -> Bool
$c/= :: SignalResourceResponse -> SignalResourceResponse -> Bool
== :: SignalResourceResponse -> SignalResourceResponse -> Bool
$c== :: SignalResourceResponse -> SignalResourceResponse -> Bool
Prelude.Eq, ReadPrec [SignalResourceResponse]
ReadPrec SignalResourceResponse
Int -> ReadS SignalResourceResponse
ReadS [SignalResourceResponse]
(Int -> ReadS SignalResourceResponse)
-> ReadS [SignalResourceResponse]
-> ReadPrec SignalResourceResponse
-> ReadPrec [SignalResourceResponse]
-> Read SignalResourceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SignalResourceResponse]
$creadListPrec :: ReadPrec [SignalResourceResponse]
readPrec :: ReadPrec SignalResourceResponse
$creadPrec :: ReadPrec SignalResourceResponse
readList :: ReadS [SignalResourceResponse]
$creadList :: ReadS [SignalResourceResponse]
readsPrec :: Int -> ReadS SignalResourceResponse
$creadsPrec :: Int -> ReadS SignalResourceResponse
Prelude.Read, Int -> SignalResourceResponse -> ShowS
[SignalResourceResponse] -> ShowS
SignalResourceResponse -> String
(Int -> SignalResourceResponse -> ShowS)
-> (SignalResourceResponse -> String)
-> ([SignalResourceResponse] -> ShowS)
-> Show SignalResourceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SignalResourceResponse] -> ShowS
$cshowList :: [SignalResourceResponse] -> ShowS
show :: SignalResourceResponse -> String
$cshow :: SignalResourceResponse -> String
showsPrec :: Int -> SignalResourceResponse -> ShowS
$cshowsPrec :: Int -> SignalResourceResponse -> ShowS
Prelude.Show, (forall x. SignalResourceResponse -> Rep SignalResourceResponse x)
-> (forall x.
Rep SignalResourceResponse x -> SignalResourceResponse)
-> Generic SignalResourceResponse
forall x. Rep SignalResourceResponse x -> SignalResourceResponse
forall x. SignalResourceResponse -> Rep SignalResourceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SignalResourceResponse x -> SignalResourceResponse
$cfrom :: forall x. SignalResourceResponse -> Rep SignalResourceResponse x
Prelude.Generic)
newSignalResourceResponse ::
SignalResourceResponse
newSignalResourceResponse :: SignalResourceResponse
newSignalResourceResponse = SignalResourceResponse
SignalResourceResponse'
instance Prelude.NFData SignalResourceResponse