{-# 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.Lightsail.Types.DomainValidationRecord where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Lightsail.Types.ResourceRecord
import qualified Amazonka.Prelude as Prelude
data DomainValidationRecord = DomainValidationRecord'
{
DomainValidationRecord -> Maybe ResourceRecord
resourceRecord :: Prelude.Maybe ResourceRecord,
DomainValidationRecord -> Maybe Text
domainName :: Prelude.Maybe Prelude.Text
}
deriving (DomainValidationRecord -> DomainValidationRecord -> Bool
(DomainValidationRecord -> DomainValidationRecord -> Bool)
-> (DomainValidationRecord -> DomainValidationRecord -> Bool)
-> Eq DomainValidationRecord
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DomainValidationRecord -> DomainValidationRecord -> Bool
$c/= :: DomainValidationRecord -> DomainValidationRecord -> Bool
== :: DomainValidationRecord -> DomainValidationRecord -> Bool
$c== :: DomainValidationRecord -> DomainValidationRecord -> Bool
Prelude.Eq, ReadPrec [DomainValidationRecord]
ReadPrec DomainValidationRecord
Int -> ReadS DomainValidationRecord
ReadS [DomainValidationRecord]
(Int -> ReadS DomainValidationRecord)
-> ReadS [DomainValidationRecord]
-> ReadPrec DomainValidationRecord
-> ReadPrec [DomainValidationRecord]
-> Read DomainValidationRecord
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DomainValidationRecord]
$creadListPrec :: ReadPrec [DomainValidationRecord]
readPrec :: ReadPrec DomainValidationRecord
$creadPrec :: ReadPrec DomainValidationRecord
readList :: ReadS [DomainValidationRecord]
$creadList :: ReadS [DomainValidationRecord]
readsPrec :: Int -> ReadS DomainValidationRecord
$creadsPrec :: Int -> ReadS DomainValidationRecord
Prelude.Read, Int -> DomainValidationRecord -> ShowS
[DomainValidationRecord] -> ShowS
DomainValidationRecord -> String
(Int -> DomainValidationRecord -> ShowS)
-> (DomainValidationRecord -> String)
-> ([DomainValidationRecord] -> ShowS)
-> Show DomainValidationRecord
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DomainValidationRecord] -> ShowS
$cshowList :: [DomainValidationRecord] -> ShowS
show :: DomainValidationRecord -> String
$cshow :: DomainValidationRecord -> String
showsPrec :: Int -> DomainValidationRecord -> ShowS
$cshowsPrec :: Int -> DomainValidationRecord -> ShowS
Prelude.Show, (forall x. DomainValidationRecord -> Rep DomainValidationRecord x)
-> (forall x.
Rep DomainValidationRecord x -> DomainValidationRecord)
-> Generic DomainValidationRecord
forall x. Rep DomainValidationRecord x -> DomainValidationRecord
forall x. DomainValidationRecord -> Rep DomainValidationRecord x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DomainValidationRecord x -> DomainValidationRecord
$cfrom :: forall x. DomainValidationRecord -> Rep DomainValidationRecord x
Prelude.Generic)
newDomainValidationRecord ::
DomainValidationRecord
newDomainValidationRecord :: DomainValidationRecord
newDomainValidationRecord =
DomainValidationRecord' :: Maybe ResourceRecord -> Maybe Text -> DomainValidationRecord
DomainValidationRecord'
{ $sel:resourceRecord:DomainValidationRecord' :: Maybe ResourceRecord
resourceRecord =
Maybe ResourceRecord
forall a. Maybe a
Prelude.Nothing,
$sel:domainName:DomainValidationRecord' :: Maybe Text
domainName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
domainValidationRecord_resourceRecord :: Lens.Lens' DomainValidationRecord (Prelude.Maybe ResourceRecord)
domainValidationRecord_resourceRecord :: (Maybe ResourceRecord -> f (Maybe ResourceRecord))
-> DomainValidationRecord -> f DomainValidationRecord
domainValidationRecord_resourceRecord = (DomainValidationRecord -> Maybe ResourceRecord)
-> (DomainValidationRecord
-> Maybe ResourceRecord -> DomainValidationRecord)
-> Lens
DomainValidationRecord
DomainValidationRecord
(Maybe ResourceRecord)
(Maybe ResourceRecord)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainValidationRecord' {Maybe ResourceRecord
resourceRecord :: Maybe ResourceRecord
$sel:resourceRecord:DomainValidationRecord' :: DomainValidationRecord -> Maybe ResourceRecord
resourceRecord} -> Maybe ResourceRecord
resourceRecord) (\s :: DomainValidationRecord
s@DomainValidationRecord' {} Maybe ResourceRecord
a -> DomainValidationRecord
s {$sel:resourceRecord:DomainValidationRecord' :: Maybe ResourceRecord
resourceRecord = Maybe ResourceRecord
a} :: DomainValidationRecord)
domainValidationRecord_domainName :: Lens.Lens' DomainValidationRecord (Prelude.Maybe Prelude.Text)
domainValidationRecord_domainName :: (Maybe Text -> f (Maybe Text))
-> DomainValidationRecord -> f DomainValidationRecord
domainValidationRecord_domainName = (DomainValidationRecord -> Maybe Text)
-> (DomainValidationRecord -> Maybe Text -> DomainValidationRecord)
-> Lens
DomainValidationRecord
DomainValidationRecord
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainValidationRecord' {Maybe Text
domainName :: Maybe Text
$sel:domainName:DomainValidationRecord' :: DomainValidationRecord -> Maybe Text
domainName} -> Maybe Text
domainName) (\s :: DomainValidationRecord
s@DomainValidationRecord' {} Maybe Text
a -> DomainValidationRecord
s {$sel:domainName:DomainValidationRecord' :: Maybe Text
domainName = Maybe Text
a} :: DomainValidationRecord)
instance Core.FromJSON DomainValidationRecord where
parseJSON :: Value -> Parser DomainValidationRecord
parseJSON =
String
-> (Object -> Parser DomainValidationRecord)
-> Value
-> Parser DomainValidationRecord
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DomainValidationRecord"
( \Object
x ->
Maybe ResourceRecord -> Maybe Text -> DomainValidationRecord
DomainValidationRecord'
(Maybe ResourceRecord -> Maybe Text -> DomainValidationRecord)
-> Parser (Maybe ResourceRecord)
-> Parser (Maybe Text -> DomainValidationRecord)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ResourceRecord)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"resourceRecord")
Parser (Maybe Text -> DomainValidationRecord)
-> Parser (Maybe Text) -> Parser DomainValidationRecord
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"domainName")
)
instance Prelude.Hashable DomainValidationRecord
instance Prelude.NFData DomainValidationRecord