{-# 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.DomainDescription 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 DomainDescription = DomainDescription'
{
DomainDescription -> Maybe Integer
assetSizeBytes :: Prelude.Maybe Prelude.Integer,
DomainDescription -> Maybe DomainStatus
status :: Prelude.Maybe DomainStatus,
DomainDescription -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
DomainDescription -> Maybe POSIX
createdTime :: Prelude.Maybe Core.POSIX,
DomainDescription -> Maybe Text
s3BucketArn :: Prelude.Maybe Prelude.Text,
DomainDescription -> Maybe Text
owner :: Prelude.Maybe Prelude.Text,
DomainDescription -> Maybe Int
repositoryCount :: Prelude.Maybe Prelude.Int,
DomainDescription -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
DomainDescription -> Maybe Text
encryptionKey :: Prelude.Maybe Prelude.Text
}
deriving (DomainDescription -> DomainDescription -> Bool
(DomainDescription -> DomainDescription -> Bool)
-> (DomainDescription -> DomainDescription -> Bool)
-> Eq DomainDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DomainDescription -> DomainDescription -> Bool
$c/= :: DomainDescription -> DomainDescription -> Bool
== :: DomainDescription -> DomainDescription -> Bool
$c== :: DomainDescription -> DomainDescription -> Bool
Prelude.Eq, ReadPrec [DomainDescription]
ReadPrec DomainDescription
Int -> ReadS DomainDescription
ReadS [DomainDescription]
(Int -> ReadS DomainDescription)
-> ReadS [DomainDescription]
-> ReadPrec DomainDescription
-> ReadPrec [DomainDescription]
-> Read DomainDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DomainDescription]
$creadListPrec :: ReadPrec [DomainDescription]
readPrec :: ReadPrec DomainDescription
$creadPrec :: ReadPrec DomainDescription
readList :: ReadS [DomainDescription]
$creadList :: ReadS [DomainDescription]
readsPrec :: Int -> ReadS DomainDescription
$creadsPrec :: Int -> ReadS DomainDescription
Prelude.Read, Int -> DomainDescription -> ShowS
[DomainDescription] -> ShowS
DomainDescription -> String
(Int -> DomainDescription -> ShowS)
-> (DomainDescription -> String)
-> ([DomainDescription] -> ShowS)
-> Show DomainDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DomainDescription] -> ShowS
$cshowList :: [DomainDescription] -> ShowS
show :: DomainDescription -> String
$cshow :: DomainDescription -> String
showsPrec :: Int -> DomainDescription -> ShowS
$cshowsPrec :: Int -> DomainDescription -> ShowS
Prelude.Show, (forall x. DomainDescription -> Rep DomainDescription x)
-> (forall x. Rep DomainDescription x -> DomainDescription)
-> Generic DomainDescription
forall x. Rep DomainDescription x -> DomainDescription
forall x. DomainDescription -> Rep DomainDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DomainDescription x -> DomainDescription
$cfrom :: forall x. DomainDescription -> Rep DomainDescription x
Prelude.Generic)
newDomainDescription ::
DomainDescription
newDomainDescription :: DomainDescription
newDomainDescription =
DomainDescription' :: Maybe Integer
-> Maybe DomainStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> DomainDescription
DomainDescription'
{ $sel:assetSizeBytes:DomainDescription' :: Maybe Integer
assetSizeBytes =
Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:status:DomainDescription' :: Maybe DomainStatus
status = Maybe DomainStatus
forall a. Maybe a
Prelude.Nothing,
$sel:arn:DomainDescription' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdTime:DomainDescription' :: Maybe POSIX
createdTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:s3BucketArn:DomainDescription' :: Maybe Text
s3BucketArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:owner:DomainDescription' :: Maybe Text
owner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:repositoryCount:DomainDescription' :: Maybe Int
repositoryCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:name:DomainDescription' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:encryptionKey:DomainDescription' :: Maybe Text
encryptionKey = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
domainDescription_assetSizeBytes :: Lens.Lens' DomainDescription (Prelude.Maybe Prelude.Integer)
domainDescription_assetSizeBytes :: (Maybe Integer -> f (Maybe Integer))
-> DomainDescription -> f DomainDescription
domainDescription_assetSizeBytes = (DomainDescription -> Maybe Integer)
-> (DomainDescription -> Maybe Integer -> DomainDescription)
-> Lens
DomainDescription DomainDescription (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainDescription' {Maybe Integer
assetSizeBytes :: Maybe Integer
$sel:assetSizeBytes:DomainDescription' :: DomainDescription -> Maybe Integer
assetSizeBytes} -> Maybe Integer
assetSizeBytes) (\s :: DomainDescription
s@DomainDescription' {} Maybe Integer
a -> DomainDescription
s {$sel:assetSizeBytes:DomainDescription' :: Maybe Integer
assetSizeBytes = Maybe Integer
a} :: DomainDescription)
domainDescription_status :: Lens.Lens' DomainDescription (Prelude.Maybe DomainStatus)
domainDescription_status :: (Maybe DomainStatus -> f (Maybe DomainStatus))
-> DomainDescription -> f DomainDescription
domainDescription_status = (DomainDescription -> Maybe DomainStatus)
-> (DomainDescription -> Maybe DomainStatus -> DomainDescription)
-> Lens
DomainDescription
DomainDescription
(Maybe DomainStatus)
(Maybe DomainStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainDescription' {Maybe DomainStatus
status :: Maybe DomainStatus
$sel:status:DomainDescription' :: DomainDescription -> Maybe DomainStatus
status} -> Maybe DomainStatus
status) (\s :: DomainDescription
s@DomainDescription' {} Maybe DomainStatus
a -> DomainDescription
s {$sel:status:DomainDescription' :: Maybe DomainStatus
status = Maybe DomainStatus
a} :: DomainDescription)
domainDescription_arn :: Lens.Lens' DomainDescription (Prelude.Maybe Prelude.Text)
domainDescription_arn :: (Maybe Text -> f (Maybe Text))
-> DomainDescription -> f DomainDescription
domainDescription_arn = (DomainDescription -> Maybe Text)
-> (DomainDescription -> Maybe Text -> DomainDescription)
-> Lens
DomainDescription DomainDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainDescription' {Maybe Text
arn :: Maybe Text
$sel:arn:DomainDescription' :: DomainDescription -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DomainDescription
s@DomainDescription' {} Maybe Text
a -> DomainDescription
s {$sel:arn:DomainDescription' :: Maybe Text
arn = Maybe Text
a} :: DomainDescription)
domainDescription_createdTime :: Lens.Lens' DomainDescription (Prelude.Maybe Prelude.UTCTime)
domainDescription_createdTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DomainDescription -> f DomainDescription
domainDescription_createdTime = (DomainDescription -> Maybe POSIX)
-> (DomainDescription -> Maybe POSIX -> DomainDescription)
-> Lens
DomainDescription DomainDescription (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainDescription' {Maybe POSIX
createdTime :: Maybe POSIX
$sel:createdTime:DomainDescription' :: DomainDescription -> Maybe POSIX
createdTime} -> Maybe POSIX
createdTime) (\s :: DomainDescription
s@DomainDescription' {} Maybe POSIX
a -> DomainDescription
s {$sel:createdTime:DomainDescription' :: Maybe POSIX
createdTime = Maybe POSIX
a} :: DomainDescription) ((Maybe POSIX -> f (Maybe POSIX))
-> DomainDescription -> f DomainDescription)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DomainDescription
-> f DomainDescription
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
domainDescription_s3BucketArn :: Lens.Lens' DomainDescription (Prelude.Maybe Prelude.Text)
domainDescription_s3BucketArn :: (Maybe Text -> f (Maybe Text))
-> DomainDescription -> f DomainDescription
domainDescription_s3BucketArn = (DomainDescription -> Maybe Text)
-> (DomainDescription -> Maybe Text -> DomainDescription)
-> Lens
DomainDescription DomainDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainDescription' {Maybe Text
s3BucketArn :: Maybe Text
$sel:s3BucketArn:DomainDescription' :: DomainDescription -> Maybe Text
s3BucketArn} -> Maybe Text
s3BucketArn) (\s :: DomainDescription
s@DomainDescription' {} Maybe Text
a -> DomainDescription
s {$sel:s3BucketArn:DomainDescription' :: Maybe Text
s3BucketArn = Maybe Text
a} :: DomainDescription)
domainDescription_owner :: Lens.Lens' DomainDescription (Prelude.Maybe Prelude.Text)
domainDescription_owner :: (Maybe Text -> f (Maybe Text))
-> DomainDescription -> f DomainDescription
domainDescription_owner = (DomainDescription -> Maybe Text)
-> (DomainDescription -> Maybe Text -> DomainDescription)
-> Lens
DomainDescription DomainDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainDescription' {Maybe Text
owner :: Maybe Text
$sel:owner:DomainDescription' :: DomainDescription -> Maybe Text
owner} -> Maybe Text
owner) (\s :: DomainDescription
s@DomainDescription' {} Maybe Text
a -> DomainDescription
s {$sel:owner:DomainDescription' :: Maybe Text
owner = Maybe Text
a} :: DomainDescription)
domainDescription_repositoryCount :: Lens.Lens' DomainDescription (Prelude.Maybe Prelude.Int)
domainDescription_repositoryCount :: (Maybe Int -> f (Maybe Int))
-> DomainDescription -> f DomainDescription
domainDescription_repositoryCount = (DomainDescription -> Maybe Int)
-> (DomainDescription -> Maybe Int -> DomainDescription)
-> Lens DomainDescription DomainDescription (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainDescription' {Maybe Int
repositoryCount :: Maybe Int
$sel:repositoryCount:DomainDescription' :: DomainDescription -> Maybe Int
repositoryCount} -> Maybe Int
repositoryCount) (\s :: DomainDescription
s@DomainDescription' {} Maybe Int
a -> DomainDescription
s {$sel:repositoryCount:DomainDescription' :: Maybe Int
repositoryCount = Maybe Int
a} :: DomainDescription)
domainDescription_name :: Lens.Lens' DomainDescription (Prelude.Maybe Prelude.Text)
domainDescription_name :: (Maybe Text -> f (Maybe Text))
-> DomainDescription -> f DomainDescription
domainDescription_name = (DomainDescription -> Maybe Text)
-> (DomainDescription -> Maybe Text -> DomainDescription)
-> Lens
DomainDescription DomainDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainDescription' {Maybe Text
name :: Maybe Text
$sel:name:DomainDescription' :: DomainDescription -> Maybe Text
name} -> Maybe Text
name) (\s :: DomainDescription
s@DomainDescription' {} Maybe Text
a -> DomainDescription
s {$sel:name:DomainDescription' :: Maybe Text
name = Maybe Text
a} :: DomainDescription)
domainDescription_encryptionKey :: Lens.Lens' DomainDescription (Prelude.Maybe Prelude.Text)
domainDescription_encryptionKey :: (Maybe Text -> f (Maybe Text))
-> DomainDescription -> f DomainDescription
domainDescription_encryptionKey = (DomainDescription -> Maybe Text)
-> (DomainDescription -> Maybe Text -> DomainDescription)
-> Lens
DomainDescription DomainDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainDescription' {Maybe Text
encryptionKey :: Maybe Text
$sel:encryptionKey:DomainDescription' :: DomainDescription -> Maybe Text
encryptionKey} -> Maybe Text
encryptionKey) (\s :: DomainDescription
s@DomainDescription' {} Maybe Text
a -> DomainDescription
s {$sel:encryptionKey:DomainDescription' :: Maybe Text
encryptionKey = Maybe Text
a} :: DomainDescription)
instance Core.FromJSON DomainDescription where
parseJSON :: Value -> Parser DomainDescription
parseJSON =
String
-> (Object -> Parser DomainDescription)
-> Value
-> Parser DomainDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DomainDescription"
( \Object
x ->
Maybe Integer
-> Maybe DomainStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> DomainDescription
DomainDescription'
(Maybe Integer
-> Maybe DomainStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> DomainDescription)
-> Parser (Maybe Integer)
-> Parser
(Maybe DomainStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> DomainDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"assetSizeBytes")
Parser
(Maybe DomainStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> DomainDescription)
-> Parser (Maybe DomainStatus)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> DomainDescription)
forall (f :: * -> *) a b. Applicative f => 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 Int
-> Maybe Text
-> Maybe Text
-> DomainDescription)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> DomainDescription)
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 Int
-> Maybe Text
-> Maybe Text
-> DomainDescription)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> DomainDescription)
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 Int
-> Maybe Text
-> Maybe Text
-> DomainDescription)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Int -> Maybe Text -> Maybe Text -> DomainDescription)
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
"s3BucketArn")
Parser
(Maybe Text
-> Maybe Int -> Maybe Text -> Maybe Text -> DomainDescription)
-> Parser (Maybe Text)
-> Parser
(Maybe Int -> Maybe Text -> Maybe Text -> DomainDescription)
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 Int -> Maybe Text -> Maybe Text -> DomainDescription)
-> Parser (Maybe Int)
-> Parser (Maybe Text -> Maybe Text -> DomainDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"repositoryCount")
Parser (Maybe Text -> Maybe Text -> DomainDescription)
-> Parser (Maybe Text) -> Parser (Maybe Text -> DomainDescription)
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 -> DomainDescription)
-> Parser (Maybe Text) -> Parser DomainDescription
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 DomainDescription
instance Prelude.NFData DomainDescription