{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data DomainDescription = DomainDescription'
{
DomainDescription -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
DomainDescription -> Maybe Integer
assetSizeBytes :: Prelude.Maybe Prelude.Integer,
DomainDescription -> Maybe POSIX
createdTime :: Prelude.Maybe Data.POSIX,
DomainDescription -> Maybe Text
encryptionKey :: Prelude.Maybe Prelude.Text,
DomainDescription -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
DomainDescription -> Maybe Text
owner :: Prelude.Maybe Prelude.Text,
DomainDescription -> Maybe Int
repositoryCount :: Prelude.Maybe Prelude.Int,
DomainDescription -> Maybe Text
s3BucketArn :: Prelude.Maybe Prelude.Text,
DomainDescription -> Maybe DomainStatus
status :: Prelude.Maybe DomainStatus
}
deriving (DomainDescription -> DomainDescription -> Bool
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]
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
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. 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'
{ $sel:arn:DomainDescription' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:assetSizeBytes:DomainDescription' :: Maybe Integer
assetSizeBytes = forall a. Maybe a
Prelude.Nothing,
$sel:createdTime:DomainDescription' :: Maybe POSIX
createdTime = forall a. Maybe a
Prelude.Nothing,
$sel:encryptionKey:DomainDescription' :: Maybe Text
encryptionKey = forall a. Maybe a
Prelude.Nothing,
$sel:name:DomainDescription' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:owner:DomainDescription' :: Maybe Text
owner = forall a. Maybe a
Prelude.Nothing,
$sel:repositoryCount:DomainDescription' :: Maybe Int
repositoryCount = forall a. Maybe a
Prelude.Nothing,
$sel:s3BucketArn:DomainDescription' :: Maybe Text
s3BucketArn = forall a. Maybe a
Prelude.Nothing,
$sel:status:DomainDescription' :: Maybe DomainStatus
status = forall a. Maybe a
Prelude.Nothing
}
domainDescription_arn :: Lens.Lens' DomainDescription (Prelude.Maybe Prelude.Text)
domainDescription_arn :: Lens' DomainDescription (Maybe Text)
domainDescription_arn = 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_assetSizeBytes :: Lens.Lens' DomainDescription (Prelude.Maybe Prelude.Integer)
domainDescription_assetSizeBytes :: Lens' DomainDescription (Maybe Integer)
domainDescription_assetSizeBytes = 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_createdTime :: Lens.Lens' DomainDescription (Prelude.Maybe Prelude.UTCTime)
domainDescription_createdTime :: Lens' DomainDescription (Maybe UTCTime)
domainDescription_createdTime = 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) 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
domainDescription_encryptionKey :: Lens.Lens' DomainDescription (Prelude.Maybe Prelude.Text)
domainDescription_encryptionKey :: Lens' DomainDescription (Maybe Text)
domainDescription_encryptionKey = 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)
domainDescription_name :: Lens.Lens' DomainDescription (Prelude.Maybe Prelude.Text)
domainDescription_name :: Lens' DomainDescription (Maybe Text)
domainDescription_name = 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_owner :: Lens.Lens' DomainDescription (Prelude.Maybe Prelude.Text)
domainDescription_owner :: Lens' DomainDescription (Maybe Text)
domainDescription_owner = 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 :: Lens' DomainDescription (Maybe Int)
domainDescription_repositoryCount = 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_s3BucketArn :: Lens.Lens' DomainDescription (Prelude.Maybe Prelude.Text)
domainDescription_s3BucketArn :: Lens' DomainDescription (Maybe Text)
domainDescription_s3BucketArn = 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_status :: Lens.Lens' DomainDescription (Prelude.Maybe DomainStatus)
domainDescription_status :: Lens' DomainDescription (Maybe DomainStatus)
domainDescription_status = 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)
instance Data.FromJSON DomainDescription where
parseJSON :: Value -> Parser DomainDescription
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DomainDescription"
( \Object
x ->
Maybe Text
-> Maybe Integer
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe DomainStatus
-> DomainDescription
DomainDescription'
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
"arn")
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
"assetSizeBytes")
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
"createdTime")
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
"encryptionKey")
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
"name")
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
"owner")
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
"repositoryCount")
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
"s3BucketArn")
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
"status")
)
instance Prelude.Hashable DomainDescription where
hashWithSalt :: Int -> DomainDescription -> Int
hashWithSalt Int
_salt DomainDescription' {Maybe Int
Maybe Integer
Maybe Text
Maybe POSIX
Maybe DomainStatus
status :: Maybe DomainStatus
s3BucketArn :: Maybe Text
repositoryCount :: Maybe Int
owner :: Maybe Text
name :: Maybe Text
encryptionKey :: Maybe Text
createdTime :: Maybe POSIX
assetSizeBytes :: Maybe Integer
arn :: Maybe Text
$sel:status:DomainDescription' :: DomainDescription -> Maybe DomainStatus
$sel:s3BucketArn:DomainDescription' :: DomainDescription -> Maybe Text
$sel:repositoryCount:DomainDescription' :: DomainDescription -> Maybe Int
$sel:owner:DomainDescription' :: DomainDescription -> Maybe Text
$sel:name:DomainDescription' :: DomainDescription -> Maybe Text
$sel:encryptionKey:DomainDescription' :: DomainDescription -> Maybe Text
$sel:createdTime:DomainDescription' :: DomainDescription -> Maybe POSIX
$sel:assetSizeBytes:DomainDescription' :: DomainDescription -> Maybe Integer
$sel:arn:DomainDescription' :: DomainDescription -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
assetSizeBytes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createdTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
encryptionKey
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
owner
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
repositoryCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
s3BucketArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DomainStatus
status
instance Prelude.NFData DomainDescription where
rnf :: DomainDescription -> ()
rnf DomainDescription' {Maybe Int
Maybe Integer
Maybe Text
Maybe POSIX
Maybe DomainStatus
status :: Maybe DomainStatus
s3BucketArn :: Maybe Text
repositoryCount :: Maybe Int
owner :: Maybe Text
name :: Maybe Text
encryptionKey :: Maybe Text
createdTime :: Maybe POSIX
assetSizeBytes :: Maybe Integer
arn :: Maybe Text
$sel:status:DomainDescription' :: DomainDescription -> Maybe DomainStatus
$sel:s3BucketArn:DomainDescription' :: DomainDescription -> Maybe Text
$sel:repositoryCount:DomainDescription' :: DomainDescription -> Maybe Int
$sel:owner:DomainDescription' :: DomainDescription -> Maybe Text
$sel:name:DomainDescription' :: DomainDescription -> Maybe Text
$sel:encryptionKey:DomainDescription' :: DomainDescription -> Maybe Text
$sel:createdTime:DomainDescription' :: DomainDescription -> Maybe POSIX
$sel:assetSizeBytes:DomainDescription' :: DomainDescription -> Maybe Integer
$sel:arn:DomainDescription' :: DomainDescription -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
assetSizeBytes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
encryptionKey
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
owner
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
repositoryCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
s3BucketArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DomainStatus
status