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