{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Redshift.Types.PauseClusterMessage where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Internal
data PauseClusterMessage = PauseClusterMessage'
{
PauseClusterMessage -> Text
clusterIdentifier :: Prelude.Text
}
deriving (PauseClusterMessage -> PauseClusterMessage -> Bool
(PauseClusterMessage -> PauseClusterMessage -> Bool)
-> (PauseClusterMessage -> PauseClusterMessage -> Bool)
-> Eq PauseClusterMessage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PauseClusterMessage -> PauseClusterMessage -> Bool
$c/= :: PauseClusterMessage -> PauseClusterMessage -> Bool
== :: PauseClusterMessage -> PauseClusterMessage -> Bool
$c== :: PauseClusterMessage -> PauseClusterMessage -> Bool
Prelude.Eq, ReadPrec [PauseClusterMessage]
ReadPrec PauseClusterMessage
Int -> ReadS PauseClusterMessage
ReadS [PauseClusterMessage]
(Int -> ReadS PauseClusterMessage)
-> ReadS [PauseClusterMessage]
-> ReadPrec PauseClusterMessage
-> ReadPrec [PauseClusterMessage]
-> Read PauseClusterMessage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PauseClusterMessage]
$creadListPrec :: ReadPrec [PauseClusterMessage]
readPrec :: ReadPrec PauseClusterMessage
$creadPrec :: ReadPrec PauseClusterMessage
readList :: ReadS [PauseClusterMessage]
$creadList :: ReadS [PauseClusterMessage]
readsPrec :: Int -> ReadS PauseClusterMessage
$creadsPrec :: Int -> ReadS PauseClusterMessage
Prelude.Read, Int -> PauseClusterMessage -> ShowS
[PauseClusterMessage] -> ShowS
PauseClusterMessage -> String
(Int -> PauseClusterMessage -> ShowS)
-> (PauseClusterMessage -> String)
-> ([PauseClusterMessage] -> ShowS)
-> Show PauseClusterMessage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PauseClusterMessage] -> ShowS
$cshowList :: [PauseClusterMessage] -> ShowS
show :: PauseClusterMessage -> String
$cshow :: PauseClusterMessage -> String
showsPrec :: Int -> PauseClusterMessage -> ShowS
$cshowsPrec :: Int -> PauseClusterMessage -> ShowS
Prelude.Show, (forall x. PauseClusterMessage -> Rep PauseClusterMessage x)
-> (forall x. Rep PauseClusterMessage x -> PauseClusterMessage)
-> Generic PauseClusterMessage
forall x. Rep PauseClusterMessage x -> PauseClusterMessage
forall x. PauseClusterMessage -> Rep PauseClusterMessage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PauseClusterMessage x -> PauseClusterMessage
$cfrom :: forall x. PauseClusterMessage -> Rep PauseClusterMessage x
Prelude.Generic)
newPauseClusterMessage ::
Prelude.Text ->
PauseClusterMessage
newPauseClusterMessage :: Text -> PauseClusterMessage
newPauseClusterMessage Text
pClusterIdentifier_ =
PauseClusterMessage' :: Text -> PauseClusterMessage
PauseClusterMessage'
{ $sel:clusterIdentifier:PauseClusterMessage' :: Text
clusterIdentifier =
Text
pClusterIdentifier_
}
pauseClusterMessage_clusterIdentifier :: Lens.Lens' PauseClusterMessage Prelude.Text
pauseClusterMessage_clusterIdentifier :: (Text -> f Text) -> PauseClusterMessage -> f PauseClusterMessage
pauseClusterMessage_clusterIdentifier = (PauseClusterMessage -> Text)
-> (PauseClusterMessage -> Text -> PauseClusterMessage)
-> Lens PauseClusterMessage PauseClusterMessage Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PauseClusterMessage' {Text
clusterIdentifier :: Text
$sel:clusterIdentifier:PauseClusterMessage' :: PauseClusterMessage -> Text
clusterIdentifier} -> Text
clusterIdentifier) (\s :: PauseClusterMessage
s@PauseClusterMessage' {} Text
a -> PauseClusterMessage
s {$sel:clusterIdentifier:PauseClusterMessage' :: Text
clusterIdentifier = Text
a} :: PauseClusterMessage)
instance Core.FromXML PauseClusterMessage where
parseXML :: [Node] -> Either String PauseClusterMessage
parseXML [Node]
x =
Text -> PauseClusterMessage
PauseClusterMessage'
(Text -> PauseClusterMessage)
-> Either String Text -> Either String PauseClusterMessage
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"ClusterIdentifier")
instance Prelude.Hashable PauseClusterMessage
instance Prelude.NFData PauseClusterMessage
instance Core.ToQuery PauseClusterMessage where
toQuery :: PauseClusterMessage -> QueryString
toQuery PauseClusterMessage' {Text
clusterIdentifier :: Text
$sel:clusterIdentifier:PauseClusterMessage' :: PauseClusterMessage -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"ClusterIdentifier" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
clusterIdentifier]