{-# 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.CertificateManager.Types.DomainValidationOption where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DomainValidationOption = DomainValidationOption'
{
DomainValidationOption -> Text
domainName :: Prelude.Text,
DomainValidationOption -> Text
validationDomain :: Prelude.Text
}
deriving (DomainValidationOption -> DomainValidationOption -> Bool
(DomainValidationOption -> DomainValidationOption -> Bool)
-> (DomainValidationOption -> DomainValidationOption -> Bool)
-> Eq DomainValidationOption
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DomainValidationOption -> DomainValidationOption -> Bool
$c/= :: DomainValidationOption -> DomainValidationOption -> Bool
== :: DomainValidationOption -> DomainValidationOption -> Bool
$c== :: DomainValidationOption -> DomainValidationOption -> Bool
Prelude.Eq, ReadPrec [DomainValidationOption]
ReadPrec DomainValidationOption
Int -> ReadS DomainValidationOption
ReadS [DomainValidationOption]
(Int -> ReadS DomainValidationOption)
-> ReadS [DomainValidationOption]
-> ReadPrec DomainValidationOption
-> ReadPrec [DomainValidationOption]
-> Read DomainValidationOption
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DomainValidationOption]
$creadListPrec :: ReadPrec [DomainValidationOption]
readPrec :: ReadPrec DomainValidationOption
$creadPrec :: ReadPrec DomainValidationOption
readList :: ReadS [DomainValidationOption]
$creadList :: ReadS [DomainValidationOption]
readsPrec :: Int -> ReadS DomainValidationOption
$creadsPrec :: Int -> ReadS DomainValidationOption
Prelude.Read, Int -> DomainValidationOption -> ShowS
[DomainValidationOption] -> ShowS
DomainValidationOption -> String
(Int -> DomainValidationOption -> ShowS)
-> (DomainValidationOption -> String)
-> ([DomainValidationOption] -> ShowS)
-> Show DomainValidationOption
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DomainValidationOption] -> ShowS
$cshowList :: [DomainValidationOption] -> ShowS
show :: DomainValidationOption -> String
$cshow :: DomainValidationOption -> String
showsPrec :: Int -> DomainValidationOption -> ShowS
$cshowsPrec :: Int -> DomainValidationOption -> ShowS
Prelude.Show, (forall x. DomainValidationOption -> Rep DomainValidationOption x)
-> (forall x.
Rep DomainValidationOption x -> DomainValidationOption)
-> Generic DomainValidationOption
forall x. Rep DomainValidationOption x -> DomainValidationOption
forall x. DomainValidationOption -> Rep DomainValidationOption x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DomainValidationOption x -> DomainValidationOption
$cfrom :: forall x. DomainValidationOption -> Rep DomainValidationOption x
Prelude.Generic)
newDomainValidationOption ::
Prelude.Text ->
Prelude.Text ->
DomainValidationOption
newDomainValidationOption :: Text -> Text -> DomainValidationOption
newDomainValidationOption
Text
pDomainName_
Text
pValidationDomain_ =
DomainValidationOption' :: Text -> Text -> DomainValidationOption
DomainValidationOption'
{ $sel:domainName:DomainValidationOption' :: Text
domainName = Text
pDomainName_,
$sel:validationDomain:DomainValidationOption' :: Text
validationDomain = Text
pValidationDomain_
}
domainValidationOption_domainName :: Lens.Lens' DomainValidationOption Prelude.Text
domainValidationOption_domainName :: (Text -> f Text)
-> DomainValidationOption -> f DomainValidationOption
domainValidationOption_domainName = (DomainValidationOption -> Text)
-> (DomainValidationOption -> Text -> DomainValidationOption)
-> Lens DomainValidationOption DomainValidationOption Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainValidationOption' {Text
domainName :: Text
$sel:domainName:DomainValidationOption' :: DomainValidationOption -> Text
domainName} -> Text
domainName) (\s :: DomainValidationOption
s@DomainValidationOption' {} Text
a -> DomainValidationOption
s {$sel:domainName:DomainValidationOption' :: Text
domainName = Text
a} :: DomainValidationOption)
domainValidationOption_validationDomain :: Lens.Lens' DomainValidationOption Prelude.Text
domainValidationOption_validationDomain :: (Text -> f Text)
-> DomainValidationOption -> f DomainValidationOption
domainValidationOption_validationDomain = (DomainValidationOption -> Text)
-> (DomainValidationOption -> Text -> DomainValidationOption)
-> Lens DomainValidationOption DomainValidationOption Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainValidationOption' {Text
validationDomain :: Text
$sel:validationDomain:DomainValidationOption' :: DomainValidationOption -> Text
validationDomain} -> Text
validationDomain) (\s :: DomainValidationOption
s@DomainValidationOption' {} Text
a -> DomainValidationOption
s {$sel:validationDomain:DomainValidationOption' :: Text
validationDomain = Text
a} :: DomainValidationOption)
instance Prelude.Hashable DomainValidationOption
instance Prelude.NFData DomainValidationOption
instance Core.ToJSON DomainValidationOption where
toJSON :: DomainValidationOption -> Value
toJSON DomainValidationOption' {Text
validationDomain :: Text
domainName :: Text
$sel:validationDomain:DomainValidationOption' :: DomainValidationOption -> Text
$sel:domainName:DomainValidationOption' :: DomainValidationOption -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DomainName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
domainName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ValidationDomain" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
validationDomain)
]
)