{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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. 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'
{ $sel:owningAccount:HostedZoneOwner' :: Maybe Text
owningAccount = forall a. Maybe a
Prelude.Nothing,
$sel:owningService:HostedZoneOwner' :: Maybe Text
owningService = forall a. Maybe a
Prelude.Nothing
}
hostedZoneOwner_owningAccount :: Lens.Lens' HostedZoneOwner (Prelude.Maybe Prelude.Text)
hostedZoneOwner_owningAccount :: Lens' HostedZoneOwner (Maybe Text)
hostedZoneOwner_owningAccount = 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 :: Lens' HostedZoneOwner (Maybe Text)
hostedZoneOwner_owningService = 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 Data.FromXML HostedZoneOwner where
parseXML :: [Node] -> Either String HostedZoneOwner
parseXML [Node]
x =
Maybe Text -> Maybe Text -> HostedZoneOwner
HostedZoneOwner'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"OwningAccount")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"OwningService")
instance Prelude.Hashable HostedZoneOwner where
hashWithSalt :: Int -> HostedZoneOwner -> Int
hashWithSalt Int
_salt HostedZoneOwner' {Maybe Text
owningService :: Maybe Text
owningAccount :: Maybe Text
$sel:owningService:HostedZoneOwner' :: HostedZoneOwner -> Maybe Text
$sel:owningAccount:HostedZoneOwner' :: HostedZoneOwner -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
owningAccount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
owningService
instance Prelude.NFData HostedZoneOwner where
rnf :: HostedZoneOwner -> ()
rnf HostedZoneOwner' {Maybe Text
owningService :: Maybe Text
owningAccount :: Maybe Text
$sel:owningService:HostedZoneOwner' :: HostedZoneOwner -> Maybe Text
$sel:owningAccount:HostedZoneOwner' :: HostedZoneOwner -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
owningAccount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
owningService