{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data RegistryId = RegistryId'
{
RegistryId -> Maybe Text
registryArn :: Prelude.Maybe Prelude.Text,
RegistryId -> Maybe Text
registryName :: Prelude.Maybe Prelude.Text
}
deriving (RegistryId -> RegistryId -> Bool
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]
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
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. 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'
{ $sel:registryArn:RegistryId' :: Maybe Text
registryArn = forall a. Maybe a
Prelude.Nothing,
$sel:registryName:RegistryId' :: Maybe Text
registryName = forall a. Maybe a
Prelude.Nothing
}
registryId_registryArn :: Lens.Lens' RegistryId (Prelude.Maybe Prelude.Text)
registryId_registryArn :: Lens' RegistryId (Maybe Text)
registryId_registryArn = 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)
registryId_registryName :: Lens.Lens' RegistryId (Prelude.Maybe Prelude.Text)
registryId_registryName :: Lens' RegistryId (Maybe Text)
registryId_registryName = 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)
instance Prelude.Hashable RegistryId where
hashWithSalt :: Int -> RegistryId -> Int
hashWithSalt Int
_salt RegistryId' {Maybe Text
registryName :: Maybe Text
registryArn :: Maybe Text
$sel:registryName:RegistryId' :: RegistryId -> Maybe Text
$sel:registryArn:RegistryId' :: RegistryId -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
registryArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
registryName
instance Prelude.NFData RegistryId where
rnf :: RegistryId -> ()
rnf RegistryId' {Maybe Text
registryName :: Maybe Text
registryArn :: Maybe Text
$sel:registryName:RegistryId' :: RegistryId -> Maybe Text
$sel:registryArn:RegistryId' :: RegistryId -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
registryArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
registryName
instance Data.ToJSON RegistryId where
toJSON :: RegistryId -> Value
toJSON RegistryId' {Maybe Text
registryName :: Maybe Text
registryArn :: Maybe Text
$sel:registryName:RegistryId' :: RegistryId -> Maybe Text
$sel:registryArn:RegistryId' :: RegistryId -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"RegistryArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
registryArn,
(Key
"RegistryName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
registryName
]
)