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