{-# 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.ECR.Types.Repository where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ECR.Types.EncryptionConfiguration
import Amazonka.ECR.Types.ImageScanningConfiguration
import Amazonka.ECR.Types.ImageTagMutability
import qualified Amazonka.Prelude as Prelude
data Repository = Repository'
{
Repository -> Maybe POSIX
createdAt :: Prelude.Maybe Data.POSIX,
Repository -> Maybe EncryptionConfiguration
encryptionConfiguration :: Prelude.Maybe EncryptionConfiguration,
Repository -> Maybe ImageScanningConfiguration
imageScanningConfiguration :: Prelude.Maybe ImageScanningConfiguration,
Repository -> Maybe ImageTagMutability
imageTagMutability :: Prelude.Maybe ImageTagMutability,
Repository -> Maybe Text
registryId :: Prelude.Maybe Prelude.Text,
Repository -> Maybe Text
repositoryArn :: Prelude.Maybe Prelude.Text,
Repository -> Maybe Text
repositoryName :: Prelude.Maybe Prelude.Text,
Repository -> Maybe Text
repositoryUri :: Prelude.Maybe Prelude.Text
}
deriving (Repository -> Repository -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Repository -> Repository -> Bool
$c/= :: Repository -> Repository -> Bool
== :: Repository -> Repository -> Bool
$c== :: Repository -> Repository -> Bool
Prelude.Eq, ReadPrec [Repository]
ReadPrec Repository
Int -> ReadS Repository
ReadS [Repository]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Repository]
$creadListPrec :: ReadPrec [Repository]
readPrec :: ReadPrec Repository
$creadPrec :: ReadPrec Repository
readList :: ReadS [Repository]
$creadList :: ReadS [Repository]
readsPrec :: Int -> ReadS Repository
$creadsPrec :: Int -> ReadS Repository
Prelude.Read, Int -> Repository -> ShowS
[Repository] -> ShowS
Repository -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Repository] -> ShowS
$cshowList :: [Repository] -> ShowS
show :: Repository -> String
$cshow :: Repository -> String
showsPrec :: Int -> Repository -> ShowS
$cshowsPrec :: Int -> Repository -> ShowS
Prelude.Show, forall x. Rep Repository x -> Repository
forall x. Repository -> Rep Repository x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Repository x -> Repository
$cfrom :: forall x. Repository -> Rep Repository x
Prelude.Generic)
newRepository ::
Repository
newRepository :: Repository
newRepository =
Repository'
{ $sel:createdAt:Repository' :: Maybe POSIX
createdAt = forall a. Maybe a
Prelude.Nothing,
$sel:encryptionConfiguration:Repository' :: Maybe EncryptionConfiguration
encryptionConfiguration = forall a. Maybe a
Prelude.Nothing,
$sel:imageScanningConfiguration:Repository' :: Maybe ImageScanningConfiguration
imageScanningConfiguration = forall a. Maybe a
Prelude.Nothing,
$sel:imageTagMutability:Repository' :: Maybe ImageTagMutability
imageTagMutability = forall a. Maybe a
Prelude.Nothing,
$sel:registryId:Repository' :: Maybe Text
registryId = forall a. Maybe a
Prelude.Nothing,
$sel:repositoryArn:Repository' :: Maybe Text
repositoryArn = forall a. Maybe a
Prelude.Nothing,
$sel:repositoryName:Repository' :: Maybe Text
repositoryName = forall a. Maybe a
Prelude.Nothing,
$sel:repositoryUri:Repository' :: Maybe Text
repositoryUri = forall a. Maybe a
Prelude.Nothing
}
repository_createdAt :: Lens.Lens' Repository (Prelude.Maybe Prelude.UTCTime)
repository_createdAt :: Lens' Repository (Maybe UTCTime)
repository_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Repository' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:Repository' :: Repository -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: Repository
s@Repository' {} Maybe POSIX
a -> Repository
s {$sel:createdAt:Repository' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: Repository) 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
repository_encryptionConfiguration :: Lens.Lens' Repository (Prelude.Maybe EncryptionConfiguration)
repository_encryptionConfiguration :: Lens' Repository (Maybe EncryptionConfiguration)
repository_encryptionConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Repository' {Maybe EncryptionConfiguration
encryptionConfiguration :: Maybe EncryptionConfiguration
$sel:encryptionConfiguration:Repository' :: Repository -> Maybe EncryptionConfiguration
encryptionConfiguration} -> Maybe EncryptionConfiguration
encryptionConfiguration) (\s :: Repository
s@Repository' {} Maybe EncryptionConfiguration
a -> Repository
s {$sel:encryptionConfiguration:Repository' :: Maybe EncryptionConfiguration
encryptionConfiguration = Maybe EncryptionConfiguration
a} :: Repository)
repository_imageScanningConfiguration :: Lens.Lens' Repository (Prelude.Maybe ImageScanningConfiguration)
repository_imageScanningConfiguration :: Lens' Repository (Maybe ImageScanningConfiguration)
repository_imageScanningConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Repository' {Maybe ImageScanningConfiguration
imageScanningConfiguration :: Maybe ImageScanningConfiguration
$sel:imageScanningConfiguration:Repository' :: Repository -> Maybe ImageScanningConfiguration
imageScanningConfiguration} -> Maybe ImageScanningConfiguration
imageScanningConfiguration) (\s :: Repository
s@Repository' {} Maybe ImageScanningConfiguration
a -> Repository
s {$sel:imageScanningConfiguration:Repository' :: Maybe ImageScanningConfiguration
imageScanningConfiguration = Maybe ImageScanningConfiguration
a} :: Repository)
repository_imageTagMutability :: Lens.Lens' Repository (Prelude.Maybe ImageTagMutability)
repository_imageTagMutability :: Lens' Repository (Maybe ImageTagMutability)
repository_imageTagMutability = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Repository' {Maybe ImageTagMutability
imageTagMutability :: Maybe ImageTagMutability
$sel:imageTagMutability:Repository' :: Repository -> Maybe ImageTagMutability
imageTagMutability} -> Maybe ImageTagMutability
imageTagMutability) (\s :: Repository
s@Repository' {} Maybe ImageTagMutability
a -> Repository
s {$sel:imageTagMutability:Repository' :: Maybe ImageTagMutability
imageTagMutability = Maybe ImageTagMutability
a} :: Repository)
repository_registryId :: Lens.Lens' Repository (Prelude.Maybe Prelude.Text)
repository_registryId :: Lens' Repository (Maybe Text)
repository_registryId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Repository' {Maybe Text
registryId :: Maybe Text
$sel:registryId:Repository' :: Repository -> Maybe Text
registryId} -> Maybe Text
registryId) (\s :: Repository
s@Repository' {} Maybe Text
a -> Repository
s {$sel:registryId:Repository' :: Maybe Text
registryId = Maybe Text
a} :: Repository)
repository_repositoryArn :: Lens.Lens' Repository (Prelude.Maybe Prelude.Text)
repository_repositoryArn :: Lens' Repository (Maybe Text)
repository_repositoryArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Repository' {Maybe Text
repositoryArn :: Maybe Text
$sel:repositoryArn:Repository' :: Repository -> Maybe Text
repositoryArn} -> Maybe Text
repositoryArn) (\s :: Repository
s@Repository' {} Maybe Text
a -> Repository
s {$sel:repositoryArn:Repository' :: Maybe Text
repositoryArn = Maybe Text
a} :: Repository)
repository_repositoryName :: Lens.Lens' Repository (Prelude.Maybe Prelude.Text)
repository_repositoryName :: Lens' Repository (Maybe Text)
repository_repositoryName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Repository' {Maybe Text
repositoryName :: Maybe Text
$sel:repositoryName:Repository' :: Repository -> Maybe Text
repositoryName} -> Maybe Text
repositoryName) (\s :: Repository
s@Repository' {} Maybe Text
a -> Repository
s {$sel:repositoryName:Repository' :: Maybe Text
repositoryName = Maybe Text
a} :: Repository)
repository_repositoryUri :: Lens.Lens' Repository (Prelude.Maybe Prelude.Text)
repository_repositoryUri :: Lens' Repository (Maybe Text)
repository_repositoryUri = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Repository' {Maybe Text
repositoryUri :: Maybe Text
$sel:repositoryUri:Repository' :: Repository -> Maybe Text
repositoryUri} -> Maybe Text
repositoryUri) (\s :: Repository
s@Repository' {} Maybe Text
a -> Repository
s {$sel:repositoryUri:Repository' :: Maybe Text
repositoryUri = Maybe Text
a} :: Repository)
instance Data.FromJSON Repository where
parseJSON :: Value -> Parser Repository
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Repository"
( \Object
x ->
Maybe POSIX
-> Maybe EncryptionConfiguration
-> Maybe ImageScanningConfiguration
-> Maybe ImageTagMutability
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Repository
Repository'
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
"createdAt")
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
"encryptionConfiguration")
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
"imageScanningConfiguration")
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
"imageTagMutability")
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
"registryId")
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
"repositoryArn")
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
"repositoryName")
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
"repositoryUri")
)
instance Prelude.Hashable Repository where
hashWithSalt :: Int -> Repository -> Int
hashWithSalt Int
_salt Repository' {Maybe Text
Maybe POSIX
Maybe EncryptionConfiguration
Maybe ImageScanningConfiguration
Maybe ImageTagMutability
repositoryUri :: Maybe Text
repositoryName :: Maybe Text
repositoryArn :: Maybe Text
registryId :: Maybe Text
imageTagMutability :: Maybe ImageTagMutability
imageScanningConfiguration :: Maybe ImageScanningConfiguration
encryptionConfiguration :: Maybe EncryptionConfiguration
createdAt :: Maybe POSIX
$sel:repositoryUri:Repository' :: Repository -> Maybe Text
$sel:repositoryName:Repository' :: Repository -> Maybe Text
$sel:repositoryArn:Repository' :: Repository -> Maybe Text
$sel:registryId:Repository' :: Repository -> Maybe Text
$sel:imageTagMutability:Repository' :: Repository -> Maybe ImageTagMutability
$sel:imageScanningConfiguration:Repository' :: Repository -> Maybe ImageScanningConfiguration
$sel:encryptionConfiguration:Repository' :: Repository -> Maybe EncryptionConfiguration
$sel:createdAt:Repository' :: Repository -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createdAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EncryptionConfiguration
encryptionConfiguration
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ImageScanningConfiguration
imageScanningConfiguration
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ImageTagMutability
imageTagMutability
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
registryId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
repositoryArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
repositoryName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
repositoryUri
instance Prelude.NFData Repository where
rnf :: Repository -> ()
rnf Repository' {Maybe Text
Maybe POSIX
Maybe EncryptionConfiguration
Maybe ImageScanningConfiguration
Maybe ImageTagMutability
repositoryUri :: Maybe Text
repositoryName :: Maybe Text
repositoryArn :: Maybe Text
registryId :: Maybe Text
imageTagMutability :: Maybe ImageTagMutability
imageScanningConfiguration :: Maybe ImageScanningConfiguration
encryptionConfiguration :: Maybe EncryptionConfiguration
createdAt :: Maybe POSIX
$sel:repositoryUri:Repository' :: Repository -> Maybe Text
$sel:repositoryName:Repository' :: Repository -> Maybe Text
$sel:repositoryArn:Repository' :: Repository -> Maybe Text
$sel:registryId:Repository' :: Repository -> Maybe Text
$sel:imageTagMutability:Repository' :: Repository -> Maybe ImageTagMutability
$sel:imageScanningConfiguration:Repository' :: Repository -> Maybe ImageScanningConfiguration
$sel:encryptionConfiguration:Repository' :: Repository -> Maybe EncryptionConfiguration
$sel:createdAt:Repository' :: Repository -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EncryptionConfiguration
encryptionConfiguration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ImageScanningConfiguration
imageScanningConfiguration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ImageTagMutability
imageTagMutability
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
registryId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
repositoryArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
repositoryName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
repositoryUri