{-# 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.SWF.Types.DomainInfo where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SWF.Types.RegistrationStatus
data DomainInfo = DomainInfo'
{
DomainInfo -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
DomainInfo -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
DomainInfo -> Text
name :: Prelude.Text,
DomainInfo -> RegistrationStatus
status :: RegistrationStatus
}
deriving (DomainInfo -> DomainInfo -> Bool
(DomainInfo -> DomainInfo -> Bool)
-> (DomainInfo -> DomainInfo -> Bool) -> Eq DomainInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DomainInfo -> DomainInfo -> Bool
$c/= :: DomainInfo -> DomainInfo -> Bool
== :: DomainInfo -> DomainInfo -> Bool
$c== :: DomainInfo -> DomainInfo -> Bool
Prelude.Eq, ReadPrec [DomainInfo]
ReadPrec DomainInfo
Int -> ReadS DomainInfo
ReadS [DomainInfo]
(Int -> ReadS DomainInfo)
-> ReadS [DomainInfo]
-> ReadPrec DomainInfo
-> ReadPrec [DomainInfo]
-> Read DomainInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DomainInfo]
$creadListPrec :: ReadPrec [DomainInfo]
readPrec :: ReadPrec DomainInfo
$creadPrec :: ReadPrec DomainInfo
readList :: ReadS [DomainInfo]
$creadList :: ReadS [DomainInfo]
readsPrec :: Int -> ReadS DomainInfo
$creadsPrec :: Int -> ReadS DomainInfo
Prelude.Read, Int -> DomainInfo -> ShowS
[DomainInfo] -> ShowS
DomainInfo -> String
(Int -> DomainInfo -> ShowS)
-> (DomainInfo -> String)
-> ([DomainInfo] -> ShowS)
-> Show DomainInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DomainInfo] -> ShowS
$cshowList :: [DomainInfo] -> ShowS
show :: DomainInfo -> String
$cshow :: DomainInfo -> String
showsPrec :: Int -> DomainInfo -> ShowS
$cshowsPrec :: Int -> DomainInfo -> ShowS
Prelude.Show, (forall x. DomainInfo -> Rep DomainInfo x)
-> (forall x. Rep DomainInfo x -> DomainInfo) -> Generic DomainInfo
forall x. Rep DomainInfo x -> DomainInfo
forall x. DomainInfo -> Rep DomainInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DomainInfo x -> DomainInfo
$cfrom :: forall x. DomainInfo -> Rep DomainInfo x
Prelude.Generic)
newDomainInfo ::
Prelude.Text ->
RegistrationStatus ->
DomainInfo
newDomainInfo :: Text -> RegistrationStatus -> DomainInfo
newDomainInfo Text
pName_ RegistrationStatus
pStatus_ =
DomainInfo' :: Maybe Text
-> Maybe Text -> Text -> RegistrationStatus -> DomainInfo
DomainInfo'
{ $sel:arn:DomainInfo' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:DomainInfo' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:DomainInfo' :: Text
name = Text
pName_,
$sel:status:DomainInfo' :: RegistrationStatus
status = RegistrationStatus
pStatus_
}
domainInfo_arn :: Lens.Lens' DomainInfo (Prelude.Maybe Prelude.Text)
domainInfo_arn :: (Maybe Text -> f (Maybe Text)) -> DomainInfo -> f DomainInfo
domainInfo_arn = (DomainInfo -> Maybe Text)
-> (DomainInfo -> Maybe Text -> DomainInfo)
-> Lens DomainInfo DomainInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainInfo' {Maybe Text
arn :: Maybe Text
$sel:arn:DomainInfo' :: DomainInfo -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DomainInfo
s@DomainInfo' {} Maybe Text
a -> DomainInfo
s {$sel:arn:DomainInfo' :: Maybe Text
arn = Maybe Text
a} :: DomainInfo)
domainInfo_description :: Lens.Lens' DomainInfo (Prelude.Maybe Prelude.Text)
domainInfo_description :: (Maybe Text -> f (Maybe Text)) -> DomainInfo -> f DomainInfo
domainInfo_description = (DomainInfo -> Maybe Text)
-> (DomainInfo -> Maybe Text -> DomainInfo)
-> Lens DomainInfo DomainInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainInfo' {Maybe Text
description :: Maybe Text
$sel:description:DomainInfo' :: DomainInfo -> Maybe Text
description} -> Maybe Text
description) (\s :: DomainInfo
s@DomainInfo' {} Maybe Text
a -> DomainInfo
s {$sel:description:DomainInfo' :: Maybe Text
description = Maybe Text
a} :: DomainInfo)
domainInfo_name :: Lens.Lens' DomainInfo Prelude.Text
domainInfo_name :: (Text -> f Text) -> DomainInfo -> f DomainInfo
domainInfo_name = (DomainInfo -> Text)
-> (DomainInfo -> Text -> DomainInfo)
-> Lens DomainInfo DomainInfo Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainInfo' {Text
name :: Text
$sel:name:DomainInfo' :: DomainInfo -> Text
name} -> Text
name) (\s :: DomainInfo
s@DomainInfo' {} Text
a -> DomainInfo
s {$sel:name:DomainInfo' :: Text
name = Text
a} :: DomainInfo)
domainInfo_status :: Lens.Lens' DomainInfo RegistrationStatus
domainInfo_status :: (RegistrationStatus -> f RegistrationStatus)
-> DomainInfo -> f DomainInfo
domainInfo_status = (DomainInfo -> RegistrationStatus)
-> (DomainInfo -> RegistrationStatus -> DomainInfo)
-> Lens DomainInfo DomainInfo RegistrationStatus RegistrationStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainInfo' {RegistrationStatus
status :: RegistrationStatus
$sel:status:DomainInfo' :: DomainInfo -> RegistrationStatus
status} -> RegistrationStatus
status) (\s :: DomainInfo
s@DomainInfo' {} RegistrationStatus
a -> DomainInfo
s {$sel:status:DomainInfo' :: RegistrationStatus
status = RegistrationStatus
a} :: DomainInfo)
instance Core.FromJSON DomainInfo where
parseJSON :: Value -> Parser DomainInfo
parseJSON =
String
-> (Object -> Parser DomainInfo) -> Value -> Parser DomainInfo
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DomainInfo"
( \Object
x ->
Maybe Text
-> Maybe Text -> Text -> RegistrationStatus -> DomainInfo
DomainInfo'
(Maybe Text
-> Maybe Text -> Text -> RegistrationStatus -> DomainInfo)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Text -> RegistrationStatus -> DomainInfo)
forall (f :: * -> *) a b. Functor 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
"arn")
Parser (Maybe Text -> Text -> RegistrationStatus -> DomainInfo)
-> Parser (Maybe Text)
-> Parser (Text -> RegistrationStatus -> DomainInfo)
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
"description")
Parser (Text -> RegistrationStatus -> DomainInfo)
-> Parser Text -> Parser (RegistrationStatus -> DomainInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"name")
Parser (RegistrationStatus -> DomainInfo)
-> Parser RegistrationStatus -> Parser DomainInfo
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser RegistrationStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"status")
)
instance Prelude.Hashable DomainInfo
instance Prelude.NFData DomainInfo