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