{-# 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.Schemas.Types.RegistrySummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RegistrySummary = RegistrySummary'
{
RegistrySummary -> Maybe Text
registryName :: Prelude.Maybe Prelude.Text,
RegistrySummary -> Maybe Text
registryArn :: Prelude.Maybe Prelude.Text,
RegistrySummary -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (RegistrySummary -> RegistrySummary -> Bool
(RegistrySummary -> RegistrySummary -> Bool)
-> (RegistrySummary -> RegistrySummary -> Bool)
-> Eq RegistrySummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegistrySummary -> RegistrySummary -> Bool
$c/= :: RegistrySummary -> RegistrySummary -> Bool
== :: RegistrySummary -> RegistrySummary -> Bool
$c== :: RegistrySummary -> RegistrySummary -> Bool
Prelude.Eq, ReadPrec [RegistrySummary]
ReadPrec RegistrySummary
Int -> ReadS RegistrySummary
ReadS [RegistrySummary]
(Int -> ReadS RegistrySummary)
-> ReadS [RegistrySummary]
-> ReadPrec RegistrySummary
-> ReadPrec [RegistrySummary]
-> Read RegistrySummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RegistrySummary]
$creadListPrec :: ReadPrec [RegistrySummary]
readPrec :: ReadPrec RegistrySummary
$creadPrec :: ReadPrec RegistrySummary
readList :: ReadS [RegistrySummary]
$creadList :: ReadS [RegistrySummary]
readsPrec :: Int -> ReadS RegistrySummary
$creadsPrec :: Int -> ReadS RegistrySummary
Prelude.Read, Int -> RegistrySummary -> ShowS
[RegistrySummary] -> ShowS
RegistrySummary -> String
(Int -> RegistrySummary -> ShowS)
-> (RegistrySummary -> String)
-> ([RegistrySummary] -> ShowS)
-> Show RegistrySummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegistrySummary] -> ShowS
$cshowList :: [RegistrySummary] -> ShowS
show :: RegistrySummary -> String
$cshow :: RegistrySummary -> String
showsPrec :: Int -> RegistrySummary -> ShowS
$cshowsPrec :: Int -> RegistrySummary -> ShowS
Prelude.Show, (forall x. RegistrySummary -> Rep RegistrySummary x)
-> (forall x. Rep RegistrySummary x -> RegistrySummary)
-> Generic RegistrySummary
forall x. Rep RegistrySummary x -> RegistrySummary
forall x. RegistrySummary -> Rep RegistrySummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RegistrySummary x -> RegistrySummary
$cfrom :: forall x. RegistrySummary -> Rep RegistrySummary x
Prelude.Generic)
newRegistrySummary ::
RegistrySummary
newRegistrySummary :: RegistrySummary
newRegistrySummary =
RegistrySummary' :: Maybe Text
-> Maybe Text -> Maybe (HashMap Text Text) -> RegistrySummary
RegistrySummary'
{ $sel:registryName:RegistrySummary' :: Maybe Text
registryName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:registryArn:RegistrySummary' :: Maybe Text
registryArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:RegistrySummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
}
registrySummary_registryName :: Lens.Lens' RegistrySummary (Prelude.Maybe Prelude.Text)
registrySummary_registryName :: (Maybe Text -> f (Maybe Text))
-> RegistrySummary -> f RegistrySummary
registrySummary_registryName = (RegistrySummary -> Maybe Text)
-> (RegistrySummary -> Maybe Text -> RegistrySummary)
-> Lens RegistrySummary RegistrySummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegistrySummary' {Maybe Text
registryName :: Maybe Text
$sel:registryName:RegistrySummary' :: RegistrySummary -> Maybe Text
registryName} -> Maybe Text
registryName) (\s :: RegistrySummary
s@RegistrySummary' {} Maybe Text
a -> RegistrySummary
s {$sel:registryName:RegistrySummary' :: Maybe Text
registryName = Maybe Text
a} :: RegistrySummary)
registrySummary_registryArn :: Lens.Lens' RegistrySummary (Prelude.Maybe Prelude.Text)
registrySummary_registryArn :: (Maybe Text -> f (Maybe Text))
-> RegistrySummary -> f RegistrySummary
registrySummary_registryArn = (RegistrySummary -> Maybe Text)
-> (RegistrySummary -> Maybe Text -> RegistrySummary)
-> Lens RegistrySummary RegistrySummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegistrySummary' {Maybe Text
registryArn :: Maybe Text
$sel:registryArn:RegistrySummary' :: RegistrySummary -> Maybe Text
registryArn} -> Maybe Text
registryArn) (\s :: RegistrySummary
s@RegistrySummary' {} Maybe Text
a -> RegistrySummary
s {$sel:registryArn:RegistrySummary' :: Maybe Text
registryArn = Maybe Text
a} :: RegistrySummary)
registrySummary_tags :: Lens.Lens' RegistrySummary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
registrySummary_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> RegistrySummary -> f RegistrySummary
registrySummary_tags = (RegistrySummary -> Maybe (HashMap Text Text))
-> (RegistrySummary
-> Maybe (HashMap Text Text) -> RegistrySummary)
-> Lens
RegistrySummary
RegistrySummary
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegistrySummary' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:RegistrySummary' :: RegistrySummary -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: RegistrySummary
s@RegistrySummary' {} Maybe (HashMap Text Text)
a -> RegistrySummary
s {$sel:tags:RegistrySummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: RegistrySummary) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> RegistrySummary -> f RegistrySummary)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> RegistrySummary
-> f RegistrySummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON RegistrySummary where
parseJSON :: Value -> Parser RegistrySummary
parseJSON =
String
-> (Object -> Parser RegistrySummary)
-> Value
-> Parser RegistrySummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RegistrySummary"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe (HashMap Text Text) -> RegistrySummary
RegistrySummary'
(Maybe Text
-> Maybe Text -> Maybe (HashMap Text Text) -> RegistrySummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe (HashMap Text Text) -> RegistrySummary)
forall (f :: * -> *) a b. Functor 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
"RegistryName")
Parser (Maybe Text -> Maybe (HashMap Text Text) -> RegistrySummary)
-> Parser (Maybe Text)
-> Parser (Maybe (HashMap Text Text) -> RegistrySummary)
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
"RegistryArn")
Parser (Maybe (HashMap Text Text) -> RegistrySummary)
-> Parser (Maybe (HashMap Text Text)) -> Parser RegistrySummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable RegistrySummary
instance Prelude.NFData RegistrySummary