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