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