{-# 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.ResourceRecord 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 ResourceRecord = ResourceRecord'
{
ResourceRecord -> Text
value :: Prelude.Text
}
deriving (ResourceRecord -> ResourceRecord -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResourceRecord -> ResourceRecord -> Bool
$c/= :: ResourceRecord -> ResourceRecord -> Bool
== :: ResourceRecord -> ResourceRecord -> Bool
$c== :: ResourceRecord -> ResourceRecord -> Bool
Prelude.Eq, ReadPrec [ResourceRecord]
ReadPrec ResourceRecord
Int -> ReadS ResourceRecord
ReadS [ResourceRecord]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResourceRecord]
$creadListPrec :: ReadPrec [ResourceRecord]
readPrec :: ReadPrec ResourceRecord
$creadPrec :: ReadPrec ResourceRecord
readList :: ReadS [ResourceRecord]
$creadList :: ReadS [ResourceRecord]
readsPrec :: Int -> ReadS ResourceRecord
$creadsPrec :: Int -> ReadS ResourceRecord
Prelude.Read, Int -> ResourceRecord -> ShowS
[ResourceRecord] -> ShowS
ResourceRecord -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResourceRecord] -> ShowS
$cshowList :: [ResourceRecord] -> ShowS
show :: ResourceRecord -> String
$cshow :: ResourceRecord -> String
showsPrec :: Int -> ResourceRecord -> ShowS
$cshowsPrec :: Int -> ResourceRecord -> ShowS
Prelude.Show, forall x. Rep ResourceRecord x -> ResourceRecord
forall x. ResourceRecord -> Rep ResourceRecord x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResourceRecord x -> ResourceRecord
$cfrom :: forall x. ResourceRecord -> Rep ResourceRecord x
Prelude.Generic)
newResourceRecord ::
Prelude.Text ->
ResourceRecord
newResourceRecord :: Text -> ResourceRecord
newResourceRecord Text
pValue_ =
ResourceRecord' {$sel:value:ResourceRecord' :: Text
value = Text
pValue_}
resourceRecord_value :: Lens.Lens' ResourceRecord Prelude.Text
resourceRecord_value :: Lens' ResourceRecord Text
resourceRecord_value = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceRecord' {Text
value :: Text
$sel:value:ResourceRecord' :: ResourceRecord -> Text
value} -> Text
value) (\s :: ResourceRecord
s@ResourceRecord' {} Text
a -> ResourceRecord
s {$sel:value:ResourceRecord' :: Text
value = Text
a} :: ResourceRecord)
instance Data.FromXML ResourceRecord where
parseXML :: [Node] -> Either String ResourceRecord
parseXML [Node]
x =
Text -> ResourceRecord
ResourceRecord' forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"Value")
instance Prelude.Hashable ResourceRecord where
hashWithSalt :: Int -> ResourceRecord -> Int
hashWithSalt Int
_salt ResourceRecord' {Text
value :: Text
$sel:value:ResourceRecord' :: ResourceRecord -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
value
instance Prelude.NFData ResourceRecord where
rnf :: ResourceRecord -> ()
rnf ResourceRecord' {Text
value :: Text
$sel:value:ResourceRecord' :: ResourceRecord -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
value
instance Data.ToXML ResourceRecord where
toXML :: ResourceRecord -> XML
toXML ResourceRecord' {Text
value :: Text
$sel:value:ResourceRecord' :: ResourceRecord -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat [Name
"Value" forall a. ToXML a => Name -> a -> XML
Data.@= Text
value]