{-# 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.ECRPublic.Types.Registry where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ECRPublic.Types.RegistryAlias
import qualified Amazonka.Prelude as Prelude
data Registry = Registry'
{
Registry -> Text
registryId :: Prelude.Text,
Registry -> Text
registryArn :: Prelude.Text,
Registry -> Text
registryUri :: Prelude.Text,
Registry -> Bool
verified :: Prelude.Bool,
Registry -> [RegistryAlias]
aliases :: [RegistryAlias]
}
deriving (Registry -> Registry -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Registry -> Registry -> Bool
$c/= :: Registry -> Registry -> Bool
== :: Registry -> Registry -> Bool
$c== :: Registry -> Registry -> Bool
Prelude.Eq, ReadPrec [Registry]
ReadPrec Registry
Int -> ReadS Registry
ReadS [Registry]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Registry]
$creadListPrec :: ReadPrec [Registry]
readPrec :: ReadPrec Registry
$creadPrec :: ReadPrec Registry
readList :: ReadS [Registry]
$creadList :: ReadS [Registry]
readsPrec :: Int -> ReadS Registry
$creadsPrec :: Int -> ReadS Registry
Prelude.Read, Int -> Registry -> ShowS
[Registry] -> ShowS
Registry -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Registry] -> ShowS
$cshowList :: [Registry] -> ShowS
show :: Registry -> String
$cshow :: Registry -> String
showsPrec :: Int -> Registry -> ShowS
$cshowsPrec :: Int -> Registry -> ShowS
Prelude.Show, forall x. Rep Registry x -> Registry
forall x. Registry -> Rep Registry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Registry x -> Registry
$cfrom :: forall x. Registry -> Rep Registry x
Prelude.Generic)
newRegistry ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Bool ->
Registry
newRegistry :: Text -> Text -> Text -> Bool -> Registry
newRegistry
Text
pRegistryId_
Text
pRegistryArn_
Text
pRegistryUri_
Bool
pVerified_ =
Registry'
{ $sel:registryId:Registry' :: Text
registryId = Text
pRegistryId_,
$sel:registryArn:Registry' :: Text
registryArn = Text
pRegistryArn_,
$sel:registryUri:Registry' :: Text
registryUri = Text
pRegistryUri_,
$sel:verified:Registry' :: Bool
verified = Bool
pVerified_,
$sel:aliases:Registry' :: [RegistryAlias]
aliases = forall a. Monoid a => a
Prelude.mempty
}
registry_registryId :: Lens.Lens' Registry Prelude.Text
registry_registryId :: Lens' Registry Text
registry_registryId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Registry' {Text
registryId :: Text
$sel:registryId:Registry' :: Registry -> Text
registryId} -> Text
registryId) (\s :: Registry
s@Registry' {} Text
a -> Registry
s {$sel:registryId:Registry' :: Text
registryId = Text
a} :: Registry)
registry_registryArn :: Lens.Lens' Registry Prelude.Text
registry_registryArn :: Lens' Registry Text
registry_registryArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Registry' {Text
registryArn :: Text
$sel:registryArn:Registry' :: Registry -> Text
registryArn} -> Text
registryArn) (\s :: Registry
s@Registry' {} Text
a -> Registry
s {$sel:registryArn:Registry' :: Text
registryArn = Text
a} :: Registry)
registry_registryUri :: Lens.Lens' Registry Prelude.Text
registry_registryUri :: Lens' Registry Text
registry_registryUri = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Registry' {Text
registryUri :: Text
$sel:registryUri:Registry' :: Registry -> Text
registryUri} -> Text
registryUri) (\s :: Registry
s@Registry' {} Text
a -> Registry
s {$sel:registryUri:Registry' :: Text
registryUri = Text
a} :: Registry)
registry_verified :: Lens.Lens' Registry Prelude.Bool
registry_verified :: Lens' Registry Bool
registry_verified = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Registry' {Bool
verified :: Bool
$sel:verified:Registry' :: Registry -> Bool
verified} -> Bool
verified) (\s :: Registry
s@Registry' {} Bool
a -> Registry
s {$sel:verified:Registry' :: Bool
verified = Bool
a} :: Registry)
registry_aliases :: Lens.Lens' Registry [RegistryAlias]
registry_aliases :: Lens' Registry [RegistryAlias]
registry_aliases = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Registry' {[RegistryAlias]
aliases :: [RegistryAlias]
$sel:aliases:Registry' :: Registry -> [RegistryAlias]
aliases} -> [RegistryAlias]
aliases) (\s :: Registry
s@Registry' {} [RegistryAlias]
a -> Registry
s {$sel:aliases:Registry' :: [RegistryAlias]
aliases = [RegistryAlias]
a} :: Registry) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON Registry where
parseJSON :: Value -> Parser Registry
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Registry"
( \Object
x ->
Text -> Text -> Text -> Bool -> [RegistryAlias] -> Registry
Registry'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser 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 a
Data..: Key
"registryArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"registryUri")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"verified")
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
"aliases" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable Registry where
hashWithSalt :: Int -> Registry -> Int
hashWithSalt Int
_salt Registry' {Bool
[RegistryAlias]
Text
aliases :: [RegistryAlias]
verified :: Bool
registryUri :: Text
registryArn :: Text
registryId :: Text
$sel:aliases:Registry' :: Registry -> [RegistryAlias]
$sel:verified:Registry' :: Registry -> Bool
$sel:registryUri:Registry' :: Registry -> Text
$sel:registryArn:Registry' :: Registry -> Text
$sel:registryId:Registry' :: Registry -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
registryId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
registryArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
registryUri
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
verified
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [RegistryAlias]
aliases
instance Prelude.NFData Registry where
rnf :: Registry -> ()
rnf Registry' {Bool
[RegistryAlias]
Text
aliases :: [RegistryAlias]
verified :: Bool
registryUri :: Text
registryArn :: Text
registryId :: Text
$sel:aliases:Registry' :: Registry -> [RegistryAlias]
$sel:verified:Registry' :: Registry -> Bool
$sel:registryUri:Registry' :: Registry -> Text
$sel:registryArn:Registry' :: Registry -> Text
$sel:registryId:Registry' :: Registry -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
registryId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
registryArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
registryUri
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Bool
verified
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [RegistryAlias]
aliases