{-# 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.RegistryAlias where
import qualified Amazonka.Core as Core
import Amazonka.ECRPublic.Types.RegistryAliasStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RegistryAlias = RegistryAlias'
{
RegistryAlias -> Text
name :: Prelude.Text,
RegistryAlias -> RegistryAliasStatus
status :: RegistryAliasStatus,
RegistryAlias -> Bool
primaryRegistryAlias :: Prelude.Bool,
RegistryAlias -> Bool
defaultRegistryAlias :: Prelude.Bool
}
deriving (RegistryAlias -> RegistryAlias -> Bool
(RegistryAlias -> RegistryAlias -> Bool)
-> (RegistryAlias -> RegistryAlias -> Bool) -> Eq RegistryAlias
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegistryAlias -> RegistryAlias -> Bool
$c/= :: RegistryAlias -> RegistryAlias -> Bool
== :: RegistryAlias -> RegistryAlias -> Bool
$c== :: RegistryAlias -> RegistryAlias -> Bool
Prelude.Eq, ReadPrec [RegistryAlias]
ReadPrec RegistryAlias
Int -> ReadS RegistryAlias
ReadS [RegistryAlias]
(Int -> ReadS RegistryAlias)
-> ReadS [RegistryAlias]
-> ReadPrec RegistryAlias
-> ReadPrec [RegistryAlias]
-> Read RegistryAlias
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RegistryAlias]
$creadListPrec :: ReadPrec [RegistryAlias]
readPrec :: ReadPrec RegistryAlias
$creadPrec :: ReadPrec RegistryAlias
readList :: ReadS [RegistryAlias]
$creadList :: ReadS [RegistryAlias]
readsPrec :: Int -> ReadS RegistryAlias
$creadsPrec :: Int -> ReadS RegistryAlias
Prelude.Read, Int -> RegistryAlias -> ShowS
[RegistryAlias] -> ShowS
RegistryAlias -> String
(Int -> RegistryAlias -> ShowS)
-> (RegistryAlias -> String)
-> ([RegistryAlias] -> ShowS)
-> Show RegistryAlias
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegistryAlias] -> ShowS
$cshowList :: [RegistryAlias] -> ShowS
show :: RegistryAlias -> String
$cshow :: RegistryAlias -> String
showsPrec :: Int -> RegistryAlias -> ShowS
$cshowsPrec :: Int -> RegistryAlias -> ShowS
Prelude.Show, (forall x. RegistryAlias -> Rep RegistryAlias x)
-> (forall x. Rep RegistryAlias x -> RegistryAlias)
-> Generic RegistryAlias
forall x. Rep RegistryAlias x -> RegistryAlias
forall x. RegistryAlias -> Rep RegistryAlias x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RegistryAlias x -> RegistryAlias
$cfrom :: forall x. RegistryAlias -> Rep RegistryAlias x
Prelude.Generic)
newRegistryAlias ::
Prelude.Text ->
RegistryAliasStatus ->
Prelude.Bool ->
Prelude.Bool ->
RegistryAlias
newRegistryAlias :: Text -> RegistryAliasStatus -> Bool -> Bool -> RegistryAlias
newRegistryAlias
Text
pName_
RegistryAliasStatus
pStatus_
Bool
pPrimaryRegistryAlias_
Bool
pDefaultRegistryAlias_ =
RegistryAlias' :: Text -> RegistryAliasStatus -> Bool -> Bool -> RegistryAlias
RegistryAlias'
{ $sel:name:RegistryAlias' :: Text
name = Text
pName_,
$sel:status:RegistryAlias' :: RegistryAliasStatus
status = RegistryAliasStatus
pStatus_,
$sel:primaryRegistryAlias:RegistryAlias' :: Bool
primaryRegistryAlias = Bool
pPrimaryRegistryAlias_,
$sel:defaultRegistryAlias:RegistryAlias' :: Bool
defaultRegistryAlias = Bool
pDefaultRegistryAlias_
}
registryAlias_name :: Lens.Lens' RegistryAlias Prelude.Text
registryAlias_name :: (Text -> f Text) -> RegistryAlias -> f RegistryAlias
registryAlias_name = (RegistryAlias -> Text)
-> (RegistryAlias -> Text -> RegistryAlias)
-> Lens RegistryAlias RegistryAlias Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegistryAlias' {Text
name :: Text
$sel:name:RegistryAlias' :: RegistryAlias -> Text
name} -> Text
name) (\s :: RegistryAlias
s@RegistryAlias' {} Text
a -> RegistryAlias
s {$sel:name:RegistryAlias' :: Text
name = Text
a} :: RegistryAlias)
registryAlias_status :: Lens.Lens' RegistryAlias RegistryAliasStatus
registryAlias_status :: (RegistryAliasStatus -> f RegistryAliasStatus)
-> RegistryAlias -> f RegistryAlias
registryAlias_status = (RegistryAlias -> RegistryAliasStatus)
-> (RegistryAlias -> RegistryAliasStatus -> RegistryAlias)
-> Lens
RegistryAlias RegistryAlias RegistryAliasStatus RegistryAliasStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegistryAlias' {RegistryAliasStatus
status :: RegistryAliasStatus
$sel:status:RegistryAlias' :: RegistryAlias -> RegistryAliasStatus
status} -> RegistryAliasStatus
status) (\s :: RegistryAlias
s@RegistryAlias' {} RegistryAliasStatus
a -> RegistryAlias
s {$sel:status:RegistryAlias' :: RegistryAliasStatus
status = RegistryAliasStatus
a} :: RegistryAlias)
registryAlias_primaryRegistryAlias :: Lens.Lens' RegistryAlias Prelude.Bool
registryAlias_primaryRegistryAlias :: (Bool -> f Bool) -> RegistryAlias -> f RegistryAlias
registryAlias_primaryRegistryAlias = (RegistryAlias -> Bool)
-> (RegistryAlias -> Bool -> RegistryAlias)
-> Lens RegistryAlias RegistryAlias Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegistryAlias' {Bool
primaryRegistryAlias :: Bool
$sel:primaryRegistryAlias:RegistryAlias' :: RegistryAlias -> Bool
primaryRegistryAlias} -> Bool
primaryRegistryAlias) (\s :: RegistryAlias
s@RegistryAlias' {} Bool
a -> RegistryAlias
s {$sel:primaryRegistryAlias:RegistryAlias' :: Bool
primaryRegistryAlias = Bool
a} :: RegistryAlias)
registryAlias_defaultRegistryAlias :: Lens.Lens' RegistryAlias Prelude.Bool
registryAlias_defaultRegistryAlias :: (Bool -> f Bool) -> RegistryAlias -> f RegistryAlias
registryAlias_defaultRegistryAlias = (RegistryAlias -> Bool)
-> (RegistryAlias -> Bool -> RegistryAlias)
-> Lens RegistryAlias RegistryAlias Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegistryAlias' {Bool
defaultRegistryAlias :: Bool
$sel:defaultRegistryAlias:RegistryAlias' :: RegistryAlias -> Bool
defaultRegistryAlias} -> Bool
defaultRegistryAlias) (\s :: RegistryAlias
s@RegistryAlias' {} Bool
a -> RegistryAlias
s {$sel:defaultRegistryAlias:RegistryAlias' :: Bool
defaultRegistryAlias = Bool
a} :: RegistryAlias)
instance Core.FromJSON RegistryAlias where
parseJSON :: Value -> Parser RegistryAlias
parseJSON =
String
-> (Object -> Parser RegistryAlias)
-> Value
-> Parser RegistryAlias
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RegistryAlias"
( \Object
x ->
Text -> RegistryAliasStatus -> Bool -> Bool -> RegistryAlias
RegistryAlias'
(Text -> RegistryAliasStatus -> Bool -> Bool -> RegistryAlias)
-> Parser Text
-> Parser (RegistryAliasStatus -> Bool -> Bool -> RegistryAlias)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"name")
Parser (RegistryAliasStatus -> Bool -> Bool -> RegistryAlias)
-> Parser RegistryAliasStatus
-> Parser (Bool -> Bool -> RegistryAlias)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser RegistryAliasStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"status")
Parser (Bool -> Bool -> RegistryAlias)
-> Parser Bool -> Parser (Bool -> RegistryAlias)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"primaryRegistryAlias")
Parser (Bool -> RegistryAlias)
-> Parser Bool -> Parser RegistryAlias
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"defaultRegistryAlias")
)
instance Prelude.Hashable RegistryAlias
instance Prelude.NFData RegistryAlias