{-# 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.Glue.Types.RegistryId where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RegistryId = RegistryId'
{
RegistryId -> Maybe Text
registryName :: Prelude.Maybe Prelude.Text,
RegistryId -> Maybe Text
registryArn :: Prelude.Maybe Prelude.Text
}
deriving (RegistryId -> RegistryId -> Bool
(RegistryId -> RegistryId -> Bool)
-> (RegistryId -> RegistryId -> Bool) -> Eq RegistryId
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegistryId -> RegistryId -> Bool
$c/= :: RegistryId -> RegistryId -> Bool
== :: RegistryId -> RegistryId -> Bool
$c== :: RegistryId -> RegistryId -> Bool
Prelude.Eq, ReadPrec [RegistryId]
ReadPrec RegistryId
Int -> ReadS RegistryId
ReadS [RegistryId]
(Int -> ReadS RegistryId)
-> ReadS [RegistryId]
-> ReadPrec RegistryId
-> ReadPrec [RegistryId]
-> Read RegistryId
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RegistryId]
$creadListPrec :: ReadPrec [RegistryId]
readPrec :: ReadPrec RegistryId
$creadPrec :: ReadPrec RegistryId
readList :: ReadS [RegistryId]
$creadList :: ReadS [RegistryId]
readsPrec :: Int -> ReadS RegistryId
$creadsPrec :: Int -> ReadS RegistryId
Prelude.Read, Int -> RegistryId -> ShowS
[RegistryId] -> ShowS
RegistryId -> String
(Int -> RegistryId -> ShowS)
-> (RegistryId -> String)
-> ([RegistryId] -> ShowS)
-> Show RegistryId
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegistryId] -> ShowS
$cshowList :: [RegistryId] -> ShowS
show :: RegistryId -> String
$cshow :: RegistryId -> String
showsPrec :: Int -> RegistryId -> ShowS
$cshowsPrec :: Int -> RegistryId -> ShowS
Prelude.Show, (forall x. RegistryId -> Rep RegistryId x)
-> (forall x. Rep RegistryId x -> RegistryId) -> Generic RegistryId
forall x. Rep RegistryId x -> RegistryId
forall x. RegistryId -> Rep RegistryId x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RegistryId x -> RegistryId
$cfrom :: forall x. RegistryId -> Rep RegistryId x
Prelude.Generic)
newRegistryId ::
RegistryId
newRegistryId :: RegistryId
newRegistryId =
RegistryId' :: Maybe Text -> Maybe Text -> RegistryId
RegistryId'
{ $sel:registryName:RegistryId' :: Maybe Text
registryName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:registryArn:RegistryId' :: Maybe Text
registryArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
registryId_registryName :: Lens.Lens' RegistryId (Prelude.Maybe Prelude.Text)
registryId_registryName :: (Maybe Text -> f (Maybe Text)) -> RegistryId -> f RegistryId
registryId_registryName = (RegistryId -> Maybe Text)
-> (RegistryId -> Maybe Text -> RegistryId)
-> Lens RegistryId RegistryId (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegistryId' {Maybe Text
registryName :: Maybe Text
$sel:registryName:RegistryId' :: RegistryId -> Maybe Text
registryName} -> Maybe Text
registryName) (\s :: RegistryId
s@RegistryId' {} Maybe Text
a -> RegistryId
s {$sel:registryName:RegistryId' :: Maybe Text
registryName = Maybe Text
a} :: RegistryId)
registryId_registryArn :: Lens.Lens' RegistryId (Prelude.Maybe Prelude.Text)
registryId_registryArn :: (Maybe Text -> f (Maybe Text)) -> RegistryId -> f RegistryId
registryId_registryArn = (RegistryId -> Maybe Text)
-> (RegistryId -> Maybe Text -> RegistryId)
-> Lens RegistryId RegistryId (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegistryId' {Maybe Text
registryArn :: Maybe Text
$sel:registryArn:RegistryId' :: RegistryId -> Maybe Text
registryArn} -> Maybe Text
registryArn) (\s :: RegistryId
s@RegistryId' {} Maybe Text
a -> RegistryId
s {$sel:registryArn:RegistryId' :: Maybe Text
registryArn = Maybe Text
a} :: RegistryId)
instance Prelude.Hashable RegistryId
instance Prelude.NFData RegistryId
instance Core.ToJSON RegistryId where
toJSON :: RegistryId -> Value
toJSON RegistryId' {Maybe Text
registryArn :: Maybe Text
registryName :: Maybe Text
$sel:registryArn:RegistryId' :: RegistryId -> Maybe Text
$sel:registryName:RegistryId' :: RegistryId -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"RegistryName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
registryName,
(Text
"RegistryArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
registryArn
]
)