{-# 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.DomainSummary 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 DomainSummary = DomainSummary'
{
DomainSummary -> Maybe Bool
autoRenew :: Prelude.Maybe Prelude.Bool,
DomainSummary -> Maybe Text
domainName :: Prelude.Maybe Prelude.Text,
DomainSummary -> Maybe POSIX
expiry :: Prelude.Maybe Data.POSIX,
DomainSummary -> Maybe Bool
transferLock :: Prelude.Maybe Prelude.Bool
}
deriving (DomainSummary -> DomainSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DomainSummary -> DomainSummary -> Bool
$c/= :: DomainSummary -> DomainSummary -> Bool
== :: DomainSummary -> DomainSummary -> Bool
$c== :: DomainSummary -> DomainSummary -> Bool
Prelude.Eq, ReadPrec [DomainSummary]
ReadPrec DomainSummary
Int -> ReadS DomainSummary
ReadS [DomainSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DomainSummary]
$creadListPrec :: ReadPrec [DomainSummary]
readPrec :: ReadPrec DomainSummary
$creadPrec :: ReadPrec DomainSummary
readList :: ReadS [DomainSummary]
$creadList :: ReadS [DomainSummary]
readsPrec :: Int -> ReadS DomainSummary
$creadsPrec :: Int -> ReadS DomainSummary
Prelude.Read, Int -> DomainSummary -> ShowS
[DomainSummary] -> ShowS
DomainSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DomainSummary] -> ShowS
$cshowList :: [DomainSummary] -> ShowS
show :: DomainSummary -> String
$cshow :: DomainSummary -> String
showsPrec :: Int -> DomainSummary -> ShowS
$cshowsPrec :: Int -> DomainSummary -> ShowS
Prelude.Show, forall x. Rep DomainSummary x -> DomainSummary
forall x. DomainSummary -> Rep DomainSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DomainSummary x -> DomainSummary
$cfrom :: forall x. DomainSummary -> Rep DomainSummary x
Prelude.Generic)
newDomainSummary ::
DomainSummary
newDomainSummary :: DomainSummary
newDomainSummary =
DomainSummary'
{ $sel:autoRenew:DomainSummary' :: Maybe Bool
autoRenew = forall a. Maybe a
Prelude.Nothing,
$sel:domainName:DomainSummary' :: Maybe Text
domainName = forall a. Maybe a
Prelude.Nothing,
$sel:expiry:DomainSummary' :: Maybe POSIX
expiry = forall a. Maybe a
Prelude.Nothing,
$sel:transferLock:DomainSummary' :: Maybe Bool
transferLock = forall a. Maybe a
Prelude.Nothing
}
domainSummary_autoRenew :: Lens.Lens' DomainSummary (Prelude.Maybe Prelude.Bool)
domainSummary_autoRenew :: Lens' DomainSummary (Maybe Bool)
domainSummary_autoRenew = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainSummary' {Maybe Bool
autoRenew :: Maybe Bool
$sel:autoRenew:DomainSummary' :: DomainSummary -> Maybe Bool
autoRenew} -> Maybe Bool
autoRenew) (\s :: DomainSummary
s@DomainSummary' {} Maybe Bool
a -> DomainSummary
s {$sel:autoRenew:DomainSummary' :: Maybe Bool
autoRenew = Maybe Bool
a} :: DomainSummary)
domainSummary_domainName :: Lens.Lens' DomainSummary (Prelude.Maybe Prelude.Text)
domainSummary_domainName :: Lens' DomainSummary (Maybe Text)
domainSummary_domainName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainSummary' {Maybe Text
domainName :: Maybe Text
$sel:domainName:DomainSummary' :: DomainSummary -> Maybe Text
domainName} -> Maybe Text
domainName) (\s :: DomainSummary
s@DomainSummary' {} Maybe Text
a -> DomainSummary
s {$sel:domainName:DomainSummary' :: Maybe Text
domainName = Maybe Text
a} :: DomainSummary)
domainSummary_expiry :: Lens.Lens' DomainSummary (Prelude.Maybe Prelude.UTCTime)
domainSummary_expiry :: Lens' DomainSummary (Maybe UTCTime)
domainSummary_expiry = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainSummary' {Maybe POSIX
expiry :: Maybe POSIX
$sel:expiry:DomainSummary' :: DomainSummary -> Maybe POSIX
expiry} -> Maybe POSIX
expiry) (\s :: DomainSummary
s@DomainSummary' {} Maybe POSIX
a -> DomainSummary
s {$sel:expiry:DomainSummary' :: Maybe POSIX
expiry = Maybe POSIX
a} :: DomainSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
domainSummary_transferLock :: Lens.Lens' DomainSummary (Prelude.Maybe Prelude.Bool)
domainSummary_transferLock :: Lens' DomainSummary (Maybe Bool)
domainSummary_transferLock = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainSummary' {Maybe Bool
transferLock :: Maybe Bool
$sel:transferLock:DomainSummary' :: DomainSummary -> Maybe Bool
transferLock} -> Maybe Bool
transferLock) (\s :: DomainSummary
s@DomainSummary' {} Maybe Bool
a -> DomainSummary
s {$sel:transferLock:DomainSummary' :: Maybe Bool
transferLock = Maybe Bool
a} :: DomainSummary)
instance Data.FromJSON DomainSummary where
parseJSON :: Value -> Parser DomainSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DomainSummary"
( \Object
x ->
Maybe Bool
-> Maybe Text -> Maybe POSIX -> Maybe Bool -> DomainSummary
DomainSummary'
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
"AutoRenew")
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")
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
"Expiry")
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
"TransferLock")
)
instance Prelude.Hashable DomainSummary where
hashWithSalt :: Int -> DomainSummary -> Int
hashWithSalt Int
_salt DomainSummary' {Maybe Bool
Maybe Text
Maybe POSIX
transferLock :: Maybe Bool
expiry :: Maybe POSIX
domainName :: Maybe Text
autoRenew :: Maybe Bool
$sel:transferLock:DomainSummary' :: DomainSummary -> Maybe Bool
$sel:expiry:DomainSummary' :: DomainSummary -> Maybe POSIX
$sel:domainName:DomainSummary' :: DomainSummary -> Maybe Text
$sel:autoRenew:DomainSummary' :: DomainSummary -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
autoRenew
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
domainName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
expiry
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
transferLock
instance Prelude.NFData DomainSummary where
rnf :: DomainSummary -> ()
rnf DomainSummary' {Maybe Bool
Maybe Text
Maybe POSIX
transferLock :: Maybe Bool
expiry :: Maybe POSIX
domainName :: Maybe Text
autoRenew :: Maybe Bool
$sel:transferLock:DomainSummary' :: DomainSummary -> Maybe Bool
$sel:expiry:DomainSummary' :: DomainSummary -> Maybe POSIX
$sel:domainName:DomainSummary' :: DomainSummary -> Maybe Text
$sel:autoRenew:DomainSummary' :: DomainSummary -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
autoRenew
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
domainName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
expiry
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
transferLock