{-# 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.DAX.Types.SecurityGroupMembership where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SecurityGroupMembership = SecurityGroupMembership'
{
SecurityGroupMembership -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
SecurityGroupMembership -> Maybe Text
securityGroupIdentifier :: Prelude.Maybe Prelude.Text
}
deriving (SecurityGroupMembership -> SecurityGroupMembership -> Bool
(SecurityGroupMembership -> SecurityGroupMembership -> Bool)
-> (SecurityGroupMembership -> SecurityGroupMembership -> Bool)
-> Eq SecurityGroupMembership
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SecurityGroupMembership -> SecurityGroupMembership -> Bool
$c/= :: SecurityGroupMembership -> SecurityGroupMembership -> Bool
== :: SecurityGroupMembership -> SecurityGroupMembership -> Bool
$c== :: SecurityGroupMembership -> SecurityGroupMembership -> Bool
Prelude.Eq, ReadPrec [SecurityGroupMembership]
ReadPrec SecurityGroupMembership
Int -> ReadS SecurityGroupMembership
ReadS [SecurityGroupMembership]
(Int -> ReadS SecurityGroupMembership)
-> ReadS [SecurityGroupMembership]
-> ReadPrec SecurityGroupMembership
-> ReadPrec [SecurityGroupMembership]
-> Read SecurityGroupMembership
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SecurityGroupMembership]
$creadListPrec :: ReadPrec [SecurityGroupMembership]
readPrec :: ReadPrec SecurityGroupMembership
$creadPrec :: ReadPrec SecurityGroupMembership
readList :: ReadS [SecurityGroupMembership]
$creadList :: ReadS [SecurityGroupMembership]
readsPrec :: Int -> ReadS SecurityGroupMembership
$creadsPrec :: Int -> ReadS SecurityGroupMembership
Prelude.Read, Int -> SecurityGroupMembership -> ShowS
[SecurityGroupMembership] -> ShowS
SecurityGroupMembership -> String
(Int -> SecurityGroupMembership -> ShowS)
-> (SecurityGroupMembership -> String)
-> ([SecurityGroupMembership] -> ShowS)
-> Show SecurityGroupMembership
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SecurityGroupMembership] -> ShowS
$cshowList :: [SecurityGroupMembership] -> ShowS
show :: SecurityGroupMembership -> String
$cshow :: SecurityGroupMembership -> String
showsPrec :: Int -> SecurityGroupMembership -> ShowS
$cshowsPrec :: Int -> SecurityGroupMembership -> ShowS
Prelude.Show, (forall x.
SecurityGroupMembership -> Rep SecurityGroupMembership x)
-> (forall x.
Rep SecurityGroupMembership x -> SecurityGroupMembership)
-> Generic SecurityGroupMembership
forall x. Rep SecurityGroupMembership x -> SecurityGroupMembership
forall x. SecurityGroupMembership -> Rep SecurityGroupMembership x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SecurityGroupMembership x -> SecurityGroupMembership
$cfrom :: forall x. SecurityGroupMembership -> Rep SecurityGroupMembership x
Prelude.Generic)
newSecurityGroupMembership ::
SecurityGroupMembership
newSecurityGroupMembership :: SecurityGroupMembership
newSecurityGroupMembership =
SecurityGroupMembership' :: Maybe Text -> Maybe Text -> SecurityGroupMembership
SecurityGroupMembership'
{ $sel:status:SecurityGroupMembership' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:securityGroupIdentifier:SecurityGroupMembership' :: Maybe Text
securityGroupIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
securityGroupMembership_status :: Lens.Lens' SecurityGroupMembership (Prelude.Maybe Prelude.Text)
securityGroupMembership_status :: (Maybe Text -> f (Maybe Text))
-> SecurityGroupMembership -> f SecurityGroupMembership
securityGroupMembership_status = (SecurityGroupMembership -> Maybe Text)
-> (SecurityGroupMembership
-> Maybe Text -> SecurityGroupMembership)
-> Lens
SecurityGroupMembership
SecurityGroupMembership
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SecurityGroupMembership' {Maybe Text
status :: Maybe Text
$sel:status:SecurityGroupMembership' :: SecurityGroupMembership -> Maybe Text
status} -> Maybe Text
status) (\s :: SecurityGroupMembership
s@SecurityGroupMembership' {} Maybe Text
a -> SecurityGroupMembership
s {$sel:status:SecurityGroupMembership' :: Maybe Text
status = Maybe Text
a} :: SecurityGroupMembership)
securityGroupMembership_securityGroupIdentifier :: Lens.Lens' SecurityGroupMembership (Prelude.Maybe Prelude.Text)
securityGroupMembership_securityGroupIdentifier :: (Maybe Text -> f (Maybe Text))
-> SecurityGroupMembership -> f SecurityGroupMembership
securityGroupMembership_securityGroupIdentifier = (SecurityGroupMembership -> Maybe Text)
-> (SecurityGroupMembership
-> Maybe Text -> SecurityGroupMembership)
-> Lens
SecurityGroupMembership
SecurityGroupMembership
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SecurityGroupMembership' {Maybe Text
securityGroupIdentifier :: Maybe Text
$sel:securityGroupIdentifier:SecurityGroupMembership' :: SecurityGroupMembership -> Maybe Text
securityGroupIdentifier} -> Maybe Text
securityGroupIdentifier) (\s :: SecurityGroupMembership
s@SecurityGroupMembership' {} Maybe Text
a -> SecurityGroupMembership
s {$sel:securityGroupIdentifier:SecurityGroupMembership' :: Maybe Text
securityGroupIdentifier = Maybe Text
a} :: SecurityGroupMembership)
instance Core.FromJSON SecurityGroupMembership where
parseJSON :: Value -> Parser SecurityGroupMembership
parseJSON =
String
-> (Object -> Parser SecurityGroupMembership)
-> Value
-> Parser SecurityGroupMembership
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SecurityGroupMembership"
( \Object
x ->
Maybe Text -> Maybe Text -> SecurityGroupMembership
SecurityGroupMembership'
(Maybe Text -> Maybe Text -> SecurityGroupMembership)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> SecurityGroupMembership)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser (Maybe Text -> SecurityGroupMembership)
-> Parser (Maybe Text) -> Parser SecurityGroupMembership
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SecurityGroupIdentifier")
)
instance Prelude.Hashable SecurityGroupMembership
instance Prelude.NFData SecurityGroupMembership