{-# 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.CodeArtifact.Types.DomainSummary where
import Amazonka.CodeArtifact.Types.DomainStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DomainSummary = DomainSummary'
{
DomainSummary -> Maybe DomainStatus
status :: Prelude.Maybe DomainStatus,
DomainSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
DomainSummary -> Maybe POSIX
createdTime :: Prelude.Maybe Core.POSIX,
DomainSummary -> Maybe Text
owner :: Prelude.Maybe Prelude.Text,
DomainSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
DomainSummary -> Maybe Text
encryptionKey :: Prelude.Maybe Prelude.Text
}
deriving (DomainSummary -> DomainSummary -> Bool
(DomainSummary -> DomainSummary -> Bool)
-> (DomainSummary -> DomainSummary -> Bool) -> Eq DomainSummary
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]
(Int -> ReadS DomainSummary)
-> ReadS [DomainSummary]
-> ReadPrec DomainSummary
-> ReadPrec [DomainSummary]
-> Read 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
(Int -> DomainSummary -> ShowS)
-> (DomainSummary -> String)
-> ([DomainSummary] -> ShowS)
-> Show DomainSummary
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. DomainSummary -> Rep DomainSummary x)
-> (forall x. Rep DomainSummary x -> DomainSummary)
-> Generic DomainSummary
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' :: Maybe DomainStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DomainSummary
DomainSummary'
{ $sel:status:DomainSummary' :: Maybe DomainStatus
status = Maybe DomainStatus
forall a. Maybe a
Prelude.Nothing,
$sel:arn:DomainSummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdTime:DomainSummary' :: Maybe POSIX
createdTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:owner:DomainSummary' :: Maybe Text
owner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:DomainSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:encryptionKey:DomainSummary' :: Maybe Text
encryptionKey = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
domainSummary_status :: Lens.Lens' DomainSummary (Prelude.Maybe DomainStatus)
domainSummary_status :: (Maybe DomainStatus -> f (Maybe DomainStatus))
-> DomainSummary -> f DomainSummary
domainSummary_status = (DomainSummary -> Maybe DomainStatus)
-> (DomainSummary -> Maybe DomainStatus -> DomainSummary)
-> Lens
DomainSummary
DomainSummary
(Maybe DomainStatus)
(Maybe DomainStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainSummary' {Maybe DomainStatus
status :: Maybe DomainStatus
$sel:status:DomainSummary' :: DomainSummary -> Maybe DomainStatus
status} -> Maybe DomainStatus
status) (\s :: DomainSummary
s@DomainSummary' {} Maybe DomainStatus
a -> DomainSummary
s {$sel:status:DomainSummary' :: Maybe DomainStatus
status = Maybe DomainStatus
a} :: DomainSummary)
domainSummary_arn :: Lens.Lens' DomainSummary (Prelude.Maybe Prelude.Text)
domainSummary_arn :: (Maybe Text -> f (Maybe Text)) -> DomainSummary -> f DomainSummary
domainSummary_arn = (DomainSummary -> Maybe Text)
-> (DomainSummary -> Maybe Text -> DomainSummary)
-> Lens DomainSummary DomainSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:DomainSummary' :: DomainSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DomainSummary
s@DomainSummary' {} Maybe Text
a -> DomainSummary
s {$sel:arn:DomainSummary' :: Maybe Text
arn = Maybe Text
a} :: DomainSummary)
domainSummary_createdTime :: Lens.Lens' DomainSummary (Prelude.Maybe Prelude.UTCTime)
domainSummary_createdTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DomainSummary -> f DomainSummary
domainSummary_createdTime = (DomainSummary -> Maybe POSIX)
-> (DomainSummary -> Maybe POSIX -> DomainSummary)
-> Lens DomainSummary DomainSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainSummary' {Maybe POSIX
createdTime :: Maybe POSIX
$sel:createdTime:DomainSummary' :: DomainSummary -> Maybe POSIX
createdTime} -> Maybe POSIX
createdTime) (\s :: DomainSummary
s@DomainSummary' {} Maybe POSIX
a -> DomainSummary
s {$sel:createdTime:DomainSummary' :: Maybe POSIX
createdTime = Maybe POSIX
a} :: DomainSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> DomainSummary -> f DomainSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DomainSummary
-> f DomainSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
domainSummary_owner :: Lens.Lens' DomainSummary (Prelude.Maybe Prelude.Text)
domainSummary_owner :: (Maybe Text -> f (Maybe Text)) -> DomainSummary -> f DomainSummary
domainSummary_owner = (DomainSummary -> Maybe Text)
-> (DomainSummary -> Maybe Text -> DomainSummary)
-> Lens DomainSummary DomainSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainSummary' {Maybe Text
owner :: Maybe Text
$sel:owner:DomainSummary' :: DomainSummary -> Maybe Text
owner} -> Maybe Text
owner) (\s :: DomainSummary
s@DomainSummary' {} Maybe Text
a -> DomainSummary
s {$sel:owner:DomainSummary' :: Maybe Text
owner = Maybe Text
a} :: DomainSummary)
domainSummary_name :: Lens.Lens' DomainSummary (Prelude.Maybe Prelude.Text)
domainSummary_name :: (Maybe Text -> f (Maybe Text)) -> DomainSummary -> f DomainSummary
domainSummary_name = (DomainSummary -> Maybe Text)
-> (DomainSummary -> Maybe Text -> DomainSummary)
-> Lens DomainSummary DomainSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainSummary' {Maybe Text
name :: Maybe Text
$sel:name:DomainSummary' :: DomainSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: DomainSummary
s@DomainSummary' {} Maybe Text
a -> DomainSummary
s {$sel:name:DomainSummary' :: Maybe Text
name = Maybe Text
a} :: DomainSummary)
domainSummary_encryptionKey :: Lens.Lens' DomainSummary (Prelude.Maybe Prelude.Text)
domainSummary_encryptionKey :: (Maybe Text -> f (Maybe Text)) -> DomainSummary -> f DomainSummary
domainSummary_encryptionKey = (DomainSummary -> Maybe Text)
-> (DomainSummary -> Maybe Text -> DomainSummary)
-> Lens DomainSummary DomainSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainSummary' {Maybe Text
encryptionKey :: Maybe Text
$sel:encryptionKey:DomainSummary' :: DomainSummary -> Maybe Text
encryptionKey} -> Maybe Text
encryptionKey) (\s :: DomainSummary
s@DomainSummary' {} Maybe Text
a -> DomainSummary
s {$sel:encryptionKey:DomainSummary' :: Maybe Text
encryptionKey = Maybe Text
a} :: DomainSummary)
instance Core.FromJSON DomainSummary where
parseJSON :: Value -> Parser DomainSummary
parseJSON =
String
-> (Object -> Parser DomainSummary)
-> Value
-> Parser DomainSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DomainSummary"
( \Object
x ->
Maybe DomainStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DomainSummary
DomainSummary'
(Maybe DomainStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DomainSummary)
-> Parser (Maybe DomainStatus)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DomainSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe DomainStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DomainSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text -> Maybe Text -> Maybe Text -> DomainSummary)
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
"arn")
Parser
(Maybe POSIX
-> Maybe Text -> Maybe Text -> Maybe Text -> DomainSummary)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> DomainSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"createdTime")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> DomainSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> DomainSummary)
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
"owner")
Parser (Maybe Text -> Maybe Text -> DomainSummary)
-> Parser (Maybe Text) -> Parser (Maybe Text -> DomainSummary)
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
"name")
Parser (Maybe Text -> DomainSummary)
-> Parser (Maybe Text) -> Parser DomainSummary
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
"encryptionKey")
)
instance Prelude.Hashable DomainSummary
instance Prelude.NFData DomainSummary