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