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