{-# 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.Route53Domains.Types.DomainSuggestion 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
data DomainSuggestion = DomainSuggestion'
{
DomainSuggestion -> Maybe Text
availability :: Prelude.Maybe Prelude.Text,
DomainSuggestion -> Maybe Text
domainName :: Prelude.Maybe Prelude.Text
}
deriving (DomainSuggestion -> DomainSuggestion -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DomainSuggestion -> DomainSuggestion -> Bool
$c/= :: DomainSuggestion -> DomainSuggestion -> Bool
== :: DomainSuggestion -> DomainSuggestion -> Bool
$c== :: DomainSuggestion -> DomainSuggestion -> Bool
Prelude.Eq, ReadPrec [DomainSuggestion]
ReadPrec DomainSuggestion
Int -> ReadS DomainSuggestion
ReadS [DomainSuggestion]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DomainSuggestion]
$creadListPrec :: ReadPrec [DomainSuggestion]
readPrec :: ReadPrec DomainSuggestion
$creadPrec :: ReadPrec DomainSuggestion
readList :: ReadS [DomainSuggestion]
$creadList :: ReadS [DomainSuggestion]
readsPrec :: Int -> ReadS DomainSuggestion
$creadsPrec :: Int -> ReadS DomainSuggestion
Prelude.Read, Int -> DomainSuggestion -> ShowS
[DomainSuggestion] -> ShowS
DomainSuggestion -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DomainSuggestion] -> ShowS
$cshowList :: [DomainSuggestion] -> ShowS
show :: DomainSuggestion -> String
$cshow :: DomainSuggestion -> String
showsPrec :: Int -> DomainSuggestion -> ShowS
$cshowsPrec :: Int -> DomainSuggestion -> ShowS
Prelude.Show, forall x. Rep DomainSuggestion x -> DomainSuggestion
forall x. DomainSuggestion -> Rep DomainSuggestion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DomainSuggestion x -> DomainSuggestion
$cfrom :: forall x. DomainSuggestion -> Rep DomainSuggestion x
Prelude.Generic)
newDomainSuggestion ::
DomainSuggestion
newDomainSuggestion :: DomainSuggestion
newDomainSuggestion =
DomainSuggestion'
{ $sel:availability:DomainSuggestion' :: Maybe Text
availability = forall a. Maybe a
Prelude.Nothing,
$sel:domainName:DomainSuggestion' :: Maybe Text
domainName = forall a. Maybe a
Prelude.Nothing
}
domainSuggestion_availability :: Lens.Lens' DomainSuggestion (Prelude.Maybe Prelude.Text)
domainSuggestion_availability :: Lens' DomainSuggestion (Maybe Text)
domainSuggestion_availability = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainSuggestion' {Maybe Text
availability :: Maybe Text
$sel:availability:DomainSuggestion' :: DomainSuggestion -> Maybe Text
availability} -> Maybe Text
availability) (\s :: DomainSuggestion
s@DomainSuggestion' {} Maybe Text
a -> DomainSuggestion
s {$sel:availability:DomainSuggestion' :: Maybe Text
availability = Maybe Text
a} :: DomainSuggestion)
domainSuggestion_domainName :: Lens.Lens' DomainSuggestion (Prelude.Maybe Prelude.Text)
domainSuggestion_domainName :: Lens' DomainSuggestion (Maybe Text)
domainSuggestion_domainName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainSuggestion' {Maybe Text
domainName :: Maybe Text
$sel:domainName:DomainSuggestion' :: DomainSuggestion -> Maybe Text
domainName} -> Maybe Text
domainName) (\s :: DomainSuggestion
s@DomainSuggestion' {} Maybe Text
a -> DomainSuggestion
s {$sel:domainName:DomainSuggestion' :: Maybe Text
domainName = Maybe Text
a} :: DomainSuggestion)
instance Data.FromJSON DomainSuggestion where
parseJSON :: Value -> Parser DomainSuggestion
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DomainSuggestion"
( \Object
x ->
Maybe Text -> Maybe Text -> DomainSuggestion
DomainSuggestion'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Availability")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DomainName")
)
instance Prelude.Hashable DomainSuggestion where
hashWithSalt :: Int -> DomainSuggestion -> Int
hashWithSalt Int
_salt DomainSuggestion' {Maybe Text
domainName :: Maybe Text
availability :: Maybe Text
$sel:domainName:DomainSuggestion' :: DomainSuggestion -> Maybe Text
$sel:availability:DomainSuggestion' :: DomainSuggestion -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
availability
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
domainName
instance Prelude.NFData DomainSuggestion where
rnf :: DomainSuggestion -> ()
rnf DomainSuggestion' {Maybe Text
domainName :: Maybe Text
availability :: Maybe Text
$sel:domainName:DomainSuggestion' :: DomainSuggestion -> Maybe Text
$sel:availability:DomainSuggestion' :: DomainSuggestion -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
availability
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
domainName