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