{-# 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.SupportedOperation where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Internal
data SupportedOperation = SupportedOperation'
{
SupportedOperation -> Maybe Text
operationName :: Prelude.Maybe Prelude.Text
}
deriving (SupportedOperation -> SupportedOperation -> Bool
(SupportedOperation -> SupportedOperation -> Bool)
-> (SupportedOperation -> SupportedOperation -> Bool)
-> Eq SupportedOperation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SupportedOperation -> SupportedOperation -> Bool
$c/= :: SupportedOperation -> SupportedOperation -> Bool
== :: SupportedOperation -> SupportedOperation -> Bool
$c== :: SupportedOperation -> SupportedOperation -> Bool
Prelude.Eq, ReadPrec [SupportedOperation]
ReadPrec SupportedOperation
Int -> ReadS SupportedOperation
ReadS [SupportedOperation]
(Int -> ReadS SupportedOperation)
-> ReadS [SupportedOperation]
-> ReadPrec SupportedOperation
-> ReadPrec [SupportedOperation]
-> Read SupportedOperation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SupportedOperation]
$creadListPrec :: ReadPrec [SupportedOperation]
readPrec :: ReadPrec SupportedOperation
$creadPrec :: ReadPrec SupportedOperation
readList :: ReadS [SupportedOperation]
$creadList :: ReadS [SupportedOperation]
readsPrec :: Int -> ReadS SupportedOperation
$creadsPrec :: Int -> ReadS SupportedOperation
Prelude.Read, Int -> SupportedOperation -> ShowS
[SupportedOperation] -> ShowS
SupportedOperation -> String
(Int -> SupportedOperation -> ShowS)
-> (SupportedOperation -> String)
-> ([SupportedOperation] -> ShowS)
-> Show SupportedOperation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SupportedOperation] -> ShowS
$cshowList :: [SupportedOperation] -> ShowS
show :: SupportedOperation -> String
$cshow :: SupportedOperation -> String
showsPrec :: Int -> SupportedOperation -> ShowS
$cshowsPrec :: Int -> SupportedOperation -> ShowS
Prelude.Show, (forall x. SupportedOperation -> Rep SupportedOperation x)
-> (forall x. Rep SupportedOperation x -> SupportedOperation)
-> Generic SupportedOperation
forall x. Rep SupportedOperation x -> SupportedOperation
forall x. SupportedOperation -> Rep SupportedOperation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SupportedOperation x -> SupportedOperation
$cfrom :: forall x. SupportedOperation -> Rep SupportedOperation x
Prelude.Generic)
newSupportedOperation ::
SupportedOperation
newSupportedOperation :: SupportedOperation
newSupportedOperation =
SupportedOperation' :: Maybe Text -> SupportedOperation
SupportedOperation'
{ $sel:operationName:SupportedOperation' :: Maybe Text
operationName =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
supportedOperation_operationName :: Lens.Lens' SupportedOperation (Prelude.Maybe Prelude.Text)
supportedOperation_operationName :: (Maybe Text -> f (Maybe Text))
-> SupportedOperation -> f SupportedOperation
supportedOperation_operationName = (SupportedOperation -> Maybe Text)
-> (SupportedOperation -> Maybe Text -> SupportedOperation)
-> Lens
SupportedOperation SupportedOperation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SupportedOperation' {Maybe Text
operationName :: Maybe Text
$sel:operationName:SupportedOperation' :: SupportedOperation -> Maybe Text
operationName} -> Maybe Text
operationName) (\s :: SupportedOperation
s@SupportedOperation' {} Maybe Text
a -> SupportedOperation
s {$sel:operationName:SupportedOperation' :: Maybe Text
operationName = Maybe Text
a} :: SupportedOperation)
instance Core.FromXML SupportedOperation where
parseXML :: [Node] -> Either String SupportedOperation
parseXML [Node]
x =
Maybe Text -> SupportedOperation
SupportedOperation'
(Maybe Text -> SupportedOperation)
-> Either String (Maybe Text) -> Either String SupportedOperation
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"OperationName")
instance Prelude.Hashable SupportedOperation
instance Prelude.NFData SupportedOperation