{-# 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.SchemaListItem where
import qualified Amazonka.Core as Core
import Amazonka.Glue.Types.SchemaStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SchemaListItem = SchemaListItem'
{
SchemaListItem -> Maybe Text
registryName :: Prelude.Maybe Prelude.Text,
SchemaListItem -> Maybe Text
createdTime :: Prelude.Maybe Prelude.Text,
SchemaListItem -> Maybe SchemaStatus
schemaStatus :: Prelude.Maybe SchemaStatus,
SchemaListItem -> Maybe Text
schemaName :: Prelude.Maybe Prelude.Text,
SchemaListItem -> Maybe Text
schemaArn :: Prelude.Maybe Prelude.Text,
SchemaListItem -> Maybe Text
updatedTime :: Prelude.Maybe Prelude.Text,
SchemaListItem -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (SchemaListItem -> SchemaListItem -> Bool
(SchemaListItem -> SchemaListItem -> Bool)
-> (SchemaListItem -> SchemaListItem -> Bool) -> Eq SchemaListItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SchemaListItem -> SchemaListItem -> Bool
$c/= :: SchemaListItem -> SchemaListItem -> Bool
== :: SchemaListItem -> SchemaListItem -> Bool
$c== :: SchemaListItem -> SchemaListItem -> Bool
Prelude.Eq, ReadPrec [SchemaListItem]
ReadPrec SchemaListItem
Int -> ReadS SchemaListItem
ReadS [SchemaListItem]
(Int -> ReadS SchemaListItem)
-> ReadS [SchemaListItem]
-> ReadPrec SchemaListItem
-> ReadPrec [SchemaListItem]
-> Read SchemaListItem
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SchemaListItem]
$creadListPrec :: ReadPrec [SchemaListItem]
readPrec :: ReadPrec SchemaListItem
$creadPrec :: ReadPrec SchemaListItem
readList :: ReadS [SchemaListItem]
$creadList :: ReadS [SchemaListItem]
readsPrec :: Int -> ReadS SchemaListItem
$creadsPrec :: Int -> ReadS SchemaListItem
Prelude.Read, Int -> SchemaListItem -> ShowS
[SchemaListItem] -> ShowS
SchemaListItem -> String
(Int -> SchemaListItem -> ShowS)
-> (SchemaListItem -> String)
-> ([SchemaListItem] -> ShowS)
-> Show SchemaListItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SchemaListItem] -> ShowS
$cshowList :: [SchemaListItem] -> ShowS
show :: SchemaListItem -> String
$cshow :: SchemaListItem -> String
showsPrec :: Int -> SchemaListItem -> ShowS
$cshowsPrec :: Int -> SchemaListItem -> ShowS
Prelude.Show, (forall x. SchemaListItem -> Rep SchemaListItem x)
-> (forall x. Rep SchemaListItem x -> SchemaListItem)
-> Generic SchemaListItem
forall x. Rep SchemaListItem x -> SchemaListItem
forall x. SchemaListItem -> Rep SchemaListItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SchemaListItem x -> SchemaListItem
$cfrom :: forall x. SchemaListItem -> Rep SchemaListItem x
Prelude.Generic)
newSchemaListItem ::
SchemaListItem
newSchemaListItem :: SchemaListItem
newSchemaListItem =
SchemaListItem' :: Maybe Text
-> Maybe Text
-> Maybe SchemaStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SchemaListItem
SchemaListItem'
{ $sel:registryName:SchemaListItem' :: Maybe Text
registryName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdTime:SchemaListItem' :: Maybe Text
createdTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:schemaStatus:SchemaListItem' :: Maybe SchemaStatus
schemaStatus = Maybe SchemaStatus
forall a. Maybe a
Prelude.Nothing,
$sel:schemaName:SchemaListItem' :: Maybe Text
schemaName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:schemaArn:SchemaListItem' :: Maybe Text
schemaArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:updatedTime:SchemaListItem' :: Maybe Text
updatedTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:SchemaListItem' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
schemaListItem_registryName :: Lens.Lens' SchemaListItem (Prelude.Maybe Prelude.Text)
schemaListItem_registryName :: (Maybe Text -> f (Maybe Text))
-> SchemaListItem -> f SchemaListItem
schemaListItem_registryName = (SchemaListItem -> Maybe Text)
-> (SchemaListItem -> Maybe Text -> SchemaListItem)
-> Lens SchemaListItem SchemaListItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SchemaListItem' {Maybe Text
registryName :: Maybe Text
$sel:registryName:SchemaListItem' :: SchemaListItem -> Maybe Text
registryName} -> Maybe Text
registryName) (\s :: SchemaListItem
s@SchemaListItem' {} Maybe Text
a -> SchemaListItem
s {$sel:registryName:SchemaListItem' :: Maybe Text
registryName = Maybe Text
a} :: SchemaListItem)
schemaListItem_createdTime :: Lens.Lens' SchemaListItem (Prelude.Maybe Prelude.Text)
schemaListItem_createdTime :: (Maybe Text -> f (Maybe Text))
-> SchemaListItem -> f SchemaListItem
schemaListItem_createdTime = (SchemaListItem -> Maybe Text)
-> (SchemaListItem -> Maybe Text -> SchemaListItem)
-> Lens SchemaListItem SchemaListItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SchemaListItem' {Maybe Text
createdTime :: Maybe Text
$sel:createdTime:SchemaListItem' :: SchemaListItem -> Maybe Text
createdTime} -> Maybe Text
createdTime) (\s :: SchemaListItem
s@SchemaListItem' {} Maybe Text
a -> SchemaListItem
s {$sel:createdTime:SchemaListItem' :: Maybe Text
createdTime = Maybe Text
a} :: SchemaListItem)
schemaListItem_schemaStatus :: Lens.Lens' SchemaListItem (Prelude.Maybe SchemaStatus)
schemaListItem_schemaStatus :: (Maybe SchemaStatus -> f (Maybe SchemaStatus))
-> SchemaListItem -> f SchemaListItem
schemaListItem_schemaStatus = (SchemaListItem -> Maybe SchemaStatus)
-> (SchemaListItem -> Maybe SchemaStatus -> SchemaListItem)
-> Lens
SchemaListItem
SchemaListItem
(Maybe SchemaStatus)
(Maybe SchemaStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SchemaListItem' {Maybe SchemaStatus
schemaStatus :: Maybe SchemaStatus
$sel:schemaStatus:SchemaListItem' :: SchemaListItem -> Maybe SchemaStatus
schemaStatus} -> Maybe SchemaStatus
schemaStatus) (\s :: SchemaListItem
s@SchemaListItem' {} Maybe SchemaStatus
a -> SchemaListItem
s {$sel:schemaStatus:SchemaListItem' :: Maybe SchemaStatus
schemaStatus = Maybe SchemaStatus
a} :: SchemaListItem)
schemaListItem_schemaName :: Lens.Lens' SchemaListItem (Prelude.Maybe Prelude.Text)
schemaListItem_schemaName :: (Maybe Text -> f (Maybe Text))
-> SchemaListItem -> f SchemaListItem
schemaListItem_schemaName = (SchemaListItem -> Maybe Text)
-> (SchemaListItem -> Maybe Text -> SchemaListItem)
-> Lens SchemaListItem SchemaListItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SchemaListItem' {Maybe Text
schemaName :: Maybe Text
$sel:schemaName:SchemaListItem' :: SchemaListItem -> Maybe Text
schemaName} -> Maybe Text
schemaName) (\s :: SchemaListItem
s@SchemaListItem' {} Maybe Text
a -> SchemaListItem
s {$sel:schemaName:SchemaListItem' :: Maybe Text
schemaName = Maybe Text
a} :: SchemaListItem)
schemaListItem_schemaArn :: Lens.Lens' SchemaListItem (Prelude.Maybe Prelude.Text)
schemaListItem_schemaArn :: (Maybe Text -> f (Maybe Text))
-> SchemaListItem -> f SchemaListItem
schemaListItem_schemaArn = (SchemaListItem -> Maybe Text)
-> (SchemaListItem -> Maybe Text -> SchemaListItem)
-> Lens SchemaListItem SchemaListItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SchemaListItem' {Maybe Text
schemaArn :: Maybe Text
$sel:schemaArn:SchemaListItem' :: SchemaListItem -> Maybe Text
schemaArn} -> Maybe Text
schemaArn) (\s :: SchemaListItem
s@SchemaListItem' {} Maybe Text
a -> SchemaListItem
s {$sel:schemaArn:SchemaListItem' :: Maybe Text
schemaArn = Maybe Text
a} :: SchemaListItem)
schemaListItem_updatedTime :: Lens.Lens' SchemaListItem (Prelude.Maybe Prelude.Text)
schemaListItem_updatedTime :: (Maybe Text -> f (Maybe Text))
-> SchemaListItem -> f SchemaListItem
schemaListItem_updatedTime = (SchemaListItem -> Maybe Text)
-> (SchemaListItem -> Maybe Text -> SchemaListItem)
-> Lens SchemaListItem SchemaListItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SchemaListItem' {Maybe Text
updatedTime :: Maybe Text
$sel:updatedTime:SchemaListItem' :: SchemaListItem -> Maybe Text
updatedTime} -> Maybe Text
updatedTime) (\s :: SchemaListItem
s@SchemaListItem' {} Maybe Text
a -> SchemaListItem
s {$sel:updatedTime:SchemaListItem' :: Maybe Text
updatedTime = Maybe Text
a} :: SchemaListItem)
schemaListItem_description :: Lens.Lens' SchemaListItem (Prelude.Maybe Prelude.Text)
schemaListItem_description :: (Maybe Text -> f (Maybe Text))
-> SchemaListItem -> f SchemaListItem
schemaListItem_description = (SchemaListItem -> Maybe Text)
-> (SchemaListItem -> Maybe Text -> SchemaListItem)
-> Lens SchemaListItem SchemaListItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SchemaListItem' {Maybe Text
description :: Maybe Text
$sel:description:SchemaListItem' :: SchemaListItem -> Maybe Text
description} -> Maybe Text
description) (\s :: SchemaListItem
s@SchemaListItem' {} Maybe Text
a -> SchemaListItem
s {$sel:description:SchemaListItem' :: Maybe Text
description = Maybe Text
a} :: SchemaListItem)
instance Core.FromJSON SchemaListItem where
parseJSON :: Value -> Parser SchemaListItem
parseJSON =
String
-> (Object -> Parser SchemaListItem)
-> Value
-> Parser SchemaListItem
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SchemaListItem"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe SchemaStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SchemaListItem
SchemaListItem'
(Maybe Text
-> Maybe Text
-> Maybe SchemaStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SchemaListItem)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe SchemaStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SchemaListItem)
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 SchemaStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SchemaListItem)
-> Parser (Maybe Text)
-> Parser
(Maybe SchemaStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SchemaListItem)
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
"CreatedTime")
Parser
(Maybe SchemaStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SchemaListItem)
-> Parser (Maybe SchemaStatus)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> SchemaListItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SchemaStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SchemaStatus")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> SchemaListItem)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> SchemaListItem)
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
"SchemaName")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> SchemaListItem)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> SchemaListItem)
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
"SchemaArn")
Parser (Maybe Text -> Maybe Text -> SchemaListItem)
-> Parser (Maybe Text) -> Parser (Maybe Text -> SchemaListItem)
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
"UpdatedTime")
Parser (Maybe Text -> SchemaListItem)
-> Parser (Maybe Text) -> Parser SchemaListItem
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
"Description")
)
instance Prelude.Hashable SchemaListItem
instance Prelude.NFData SchemaListItem