{-# 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.SchemaVersionListItem where
import qualified Amazonka.Core as Core
import Amazonka.Glue.Types.SchemaVersionStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SchemaVersionListItem = SchemaVersionListItem'
{
SchemaVersionListItem -> Maybe SchemaVersionStatus
status :: Prelude.Maybe SchemaVersionStatus,
SchemaVersionListItem -> Maybe Text
createdTime :: Prelude.Maybe Prelude.Text,
SchemaVersionListItem -> Maybe Text
schemaVersionId :: Prelude.Maybe Prelude.Text,
SchemaVersionListItem -> Maybe Natural
versionNumber :: Prelude.Maybe Prelude.Natural,
SchemaVersionListItem -> Maybe Text
schemaArn :: Prelude.Maybe Prelude.Text
}
deriving (SchemaVersionListItem -> SchemaVersionListItem -> Bool
(SchemaVersionListItem -> SchemaVersionListItem -> Bool)
-> (SchemaVersionListItem -> SchemaVersionListItem -> Bool)
-> Eq SchemaVersionListItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SchemaVersionListItem -> SchemaVersionListItem -> Bool
$c/= :: SchemaVersionListItem -> SchemaVersionListItem -> Bool
== :: SchemaVersionListItem -> SchemaVersionListItem -> Bool
$c== :: SchemaVersionListItem -> SchemaVersionListItem -> Bool
Prelude.Eq, ReadPrec [SchemaVersionListItem]
ReadPrec SchemaVersionListItem
Int -> ReadS SchemaVersionListItem
ReadS [SchemaVersionListItem]
(Int -> ReadS SchemaVersionListItem)
-> ReadS [SchemaVersionListItem]
-> ReadPrec SchemaVersionListItem
-> ReadPrec [SchemaVersionListItem]
-> Read SchemaVersionListItem
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SchemaVersionListItem]
$creadListPrec :: ReadPrec [SchemaVersionListItem]
readPrec :: ReadPrec SchemaVersionListItem
$creadPrec :: ReadPrec SchemaVersionListItem
readList :: ReadS [SchemaVersionListItem]
$creadList :: ReadS [SchemaVersionListItem]
readsPrec :: Int -> ReadS SchemaVersionListItem
$creadsPrec :: Int -> ReadS SchemaVersionListItem
Prelude.Read, Int -> SchemaVersionListItem -> ShowS
[SchemaVersionListItem] -> ShowS
SchemaVersionListItem -> String
(Int -> SchemaVersionListItem -> ShowS)
-> (SchemaVersionListItem -> String)
-> ([SchemaVersionListItem] -> ShowS)
-> Show SchemaVersionListItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SchemaVersionListItem] -> ShowS
$cshowList :: [SchemaVersionListItem] -> ShowS
show :: SchemaVersionListItem -> String
$cshow :: SchemaVersionListItem -> String
showsPrec :: Int -> SchemaVersionListItem -> ShowS
$cshowsPrec :: Int -> SchemaVersionListItem -> ShowS
Prelude.Show, (forall x. SchemaVersionListItem -> Rep SchemaVersionListItem x)
-> (forall x. Rep SchemaVersionListItem x -> SchemaVersionListItem)
-> Generic SchemaVersionListItem
forall x. Rep SchemaVersionListItem x -> SchemaVersionListItem
forall x. SchemaVersionListItem -> Rep SchemaVersionListItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SchemaVersionListItem x -> SchemaVersionListItem
$cfrom :: forall x. SchemaVersionListItem -> Rep SchemaVersionListItem x
Prelude.Generic)
newSchemaVersionListItem ::
SchemaVersionListItem
newSchemaVersionListItem :: SchemaVersionListItem
newSchemaVersionListItem =
SchemaVersionListItem' :: Maybe SchemaVersionStatus
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> SchemaVersionListItem
SchemaVersionListItem'
{ $sel:status:SchemaVersionListItem' :: Maybe SchemaVersionStatus
status = Maybe SchemaVersionStatus
forall a. Maybe a
Prelude.Nothing,
$sel:createdTime:SchemaVersionListItem' :: Maybe Text
createdTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:schemaVersionId:SchemaVersionListItem' :: Maybe Text
schemaVersionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:versionNumber:SchemaVersionListItem' :: Maybe Natural
versionNumber = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:schemaArn:SchemaVersionListItem' :: Maybe Text
schemaArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
schemaVersionListItem_status :: Lens.Lens' SchemaVersionListItem (Prelude.Maybe SchemaVersionStatus)
schemaVersionListItem_status :: (Maybe SchemaVersionStatus -> f (Maybe SchemaVersionStatus))
-> SchemaVersionListItem -> f SchemaVersionListItem
schemaVersionListItem_status = (SchemaVersionListItem -> Maybe SchemaVersionStatus)
-> (SchemaVersionListItem
-> Maybe SchemaVersionStatus -> SchemaVersionListItem)
-> Lens
SchemaVersionListItem
SchemaVersionListItem
(Maybe SchemaVersionStatus)
(Maybe SchemaVersionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SchemaVersionListItem' {Maybe SchemaVersionStatus
status :: Maybe SchemaVersionStatus
$sel:status:SchemaVersionListItem' :: SchemaVersionListItem -> Maybe SchemaVersionStatus
status} -> Maybe SchemaVersionStatus
status) (\s :: SchemaVersionListItem
s@SchemaVersionListItem' {} Maybe SchemaVersionStatus
a -> SchemaVersionListItem
s {$sel:status:SchemaVersionListItem' :: Maybe SchemaVersionStatus
status = Maybe SchemaVersionStatus
a} :: SchemaVersionListItem)
schemaVersionListItem_createdTime :: Lens.Lens' SchemaVersionListItem (Prelude.Maybe Prelude.Text)
schemaVersionListItem_createdTime :: (Maybe Text -> f (Maybe Text))
-> SchemaVersionListItem -> f SchemaVersionListItem
schemaVersionListItem_createdTime = (SchemaVersionListItem -> Maybe Text)
-> (SchemaVersionListItem -> Maybe Text -> SchemaVersionListItem)
-> Lens
SchemaVersionListItem
SchemaVersionListItem
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SchemaVersionListItem' {Maybe Text
createdTime :: Maybe Text
$sel:createdTime:SchemaVersionListItem' :: SchemaVersionListItem -> Maybe Text
createdTime} -> Maybe Text
createdTime) (\s :: SchemaVersionListItem
s@SchemaVersionListItem' {} Maybe Text
a -> SchemaVersionListItem
s {$sel:createdTime:SchemaVersionListItem' :: Maybe Text
createdTime = Maybe Text
a} :: SchemaVersionListItem)
schemaVersionListItem_schemaVersionId :: Lens.Lens' SchemaVersionListItem (Prelude.Maybe Prelude.Text)
schemaVersionListItem_schemaVersionId :: (Maybe Text -> f (Maybe Text))
-> SchemaVersionListItem -> f SchemaVersionListItem
schemaVersionListItem_schemaVersionId = (SchemaVersionListItem -> Maybe Text)
-> (SchemaVersionListItem -> Maybe Text -> SchemaVersionListItem)
-> Lens
SchemaVersionListItem
SchemaVersionListItem
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SchemaVersionListItem' {Maybe Text
schemaVersionId :: Maybe Text
$sel:schemaVersionId:SchemaVersionListItem' :: SchemaVersionListItem -> Maybe Text
schemaVersionId} -> Maybe Text
schemaVersionId) (\s :: SchemaVersionListItem
s@SchemaVersionListItem' {} Maybe Text
a -> SchemaVersionListItem
s {$sel:schemaVersionId:SchemaVersionListItem' :: Maybe Text
schemaVersionId = Maybe Text
a} :: SchemaVersionListItem)
schemaVersionListItem_versionNumber :: Lens.Lens' SchemaVersionListItem (Prelude.Maybe Prelude.Natural)
schemaVersionListItem_versionNumber :: (Maybe Natural -> f (Maybe Natural))
-> SchemaVersionListItem -> f SchemaVersionListItem
schemaVersionListItem_versionNumber = (SchemaVersionListItem -> Maybe Natural)
-> (SchemaVersionListItem
-> Maybe Natural -> SchemaVersionListItem)
-> Lens
SchemaVersionListItem
SchemaVersionListItem
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SchemaVersionListItem' {Maybe Natural
versionNumber :: Maybe Natural
$sel:versionNumber:SchemaVersionListItem' :: SchemaVersionListItem -> Maybe Natural
versionNumber} -> Maybe Natural
versionNumber) (\s :: SchemaVersionListItem
s@SchemaVersionListItem' {} Maybe Natural
a -> SchemaVersionListItem
s {$sel:versionNumber:SchemaVersionListItem' :: Maybe Natural
versionNumber = Maybe Natural
a} :: SchemaVersionListItem)
schemaVersionListItem_schemaArn :: Lens.Lens' SchemaVersionListItem (Prelude.Maybe Prelude.Text)
schemaVersionListItem_schemaArn :: (Maybe Text -> f (Maybe Text))
-> SchemaVersionListItem -> f SchemaVersionListItem
schemaVersionListItem_schemaArn = (SchemaVersionListItem -> Maybe Text)
-> (SchemaVersionListItem -> Maybe Text -> SchemaVersionListItem)
-> Lens
SchemaVersionListItem
SchemaVersionListItem
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SchemaVersionListItem' {Maybe Text
schemaArn :: Maybe Text
$sel:schemaArn:SchemaVersionListItem' :: SchemaVersionListItem -> Maybe Text
schemaArn} -> Maybe Text
schemaArn) (\s :: SchemaVersionListItem
s@SchemaVersionListItem' {} Maybe Text
a -> SchemaVersionListItem
s {$sel:schemaArn:SchemaVersionListItem' :: Maybe Text
schemaArn = Maybe Text
a} :: SchemaVersionListItem)
instance Core.FromJSON SchemaVersionListItem where
parseJSON :: Value -> Parser SchemaVersionListItem
parseJSON =
String
-> (Object -> Parser SchemaVersionListItem)
-> Value
-> Parser SchemaVersionListItem
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SchemaVersionListItem"
( \Object
x ->
Maybe SchemaVersionStatus
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> SchemaVersionListItem
SchemaVersionListItem'
(Maybe SchemaVersionStatus
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> SchemaVersionListItem)
-> Parser (Maybe SchemaVersionStatus)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> SchemaVersionListItem)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe SchemaVersionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> SchemaVersionListItem)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Natural -> Maybe Text -> SchemaVersionListItem)
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 Text
-> Maybe Natural -> Maybe Text -> SchemaVersionListItem)
-> Parser (Maybe Text)
-> Parser (Maybe Natural -> Maybe Text -> SchemaVersionListItem)
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
"SchemaVersionId")
Parser (Maybe Natural -> Maybe Text -> SchemaVersionListItem)
-> Parser (Maybe Natural)
-> Parser (Maybe Text -> SchemaVersionListItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VersionNumber")
Parser (Maybe Text -> SchemaVersionListItem)
-> Parser (Maybe Text) -> Parser SchemaVersionListItem
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")
)
instance Prelude.Hashable SchemaVersionListItem
instance Prelude.NFData SchemaVersionListItem