{-# 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.SearchSchemaVersionSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Schemas.Types.Type
data SearchSchemaVersionSummary = SearchSchemaVersionSummary'
{
SearchSchemaVersionSummary -> Maybe Text
schemaVersion :: Prelude.Maybe Prelude.Text,
SearchSchemaVersionSummary -> Maybe POSIX
createdDate :: Prelude.Maybe Core.POSIX,
SearchSchemaVersionSummary -> Maybe Type
type' :: Prelude.Maybe Type
}
deriving (SearchSchemaVersionSummary -> SearchSchemaVersionSummary -> Bool
(SearchSchemaVersionSummary -> SearchSchemaVersionSummary -> Bool)
-> (SearchSchemaVersionSummary
-> SearchSchemaVersionSummary -> Bool)
-> Eq SearchSchemaVersionSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SearchSchemaVersionSummary -> SearchSchemaVersionSummary -> Bool
$c/= :: SearchSchemaVersionSummary -> SearchSchemaVersionSummary -> Bool
== :: SearchSchemaVersionSummary -> SearchSchemaVersionSummary -> Bool
$c== :: SearchSchemaVersionSummary -> SearchSchemaVersionSummary -> Bool
Prelude.Eq, ReadPrec [SearchSchemaVersionSummary]
ReadPrec SearchSchemaVersionSummary
Int -> ReadS SearchSchemaVersionSummary
ReadS [SearchSchemaVersionSummary]
(Int -> ReadS SearchSchemaVersionSummary)
-> ReadS [SearchSchemaVersionSummary]
-> ReadPrec SearchSchemaVersionSummary
-> ReadPrec [SearchSchemaVersionSummary]
-> Read SearchSchemaVersionSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SearchSchemaVersionSummary]
$creadListPrec :: ReadPrec [SearchSchemaVersionSummary]
readPrec :: ReadPrec SearchSchemaVersionSummary
$creadPrec :: ReadPrec SearchSchemaVersionSummary
readList :: ReadS [SearchSchemaVersionSummary]
$creadList :: ReadS [SearchSchemaVersionSummary]
readsPrec :: Int -> ReadS SearchSchemaVersionSummary
$creadsPrec :: Int -> ReadS SearchSchemaVersionSummary
Prelude.Read, Int -> SearchSchemaVersionSummary -> ShowS
[SearchSchemaVersionSummary] -> ShowS
SearchSchemaVersionSummary -> String
(Int -> SearchSchemaVersionSummary -> ShowS)
-> (SearchSchemaVersionSummary -> String)
-> ([SearchSchemaVersionSummary] -> ShowS)
-> Show SearchSchemaVersionSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SearchSchemaVersionSummary] -> ShowS
$cshowList :: [SearchSchemaVersionSummary] -> ShowS
show :: SearchSchemaVersionSummary -> String
$cshow :: SearchSchemaVersionSummary -> String
showsPrec :: Int -> SearchSchemaVersionSummary -> ShowS
$cshowsPrec :: Int -> SearchSchemaVersionSummary -> ShowS
Prelude.Show, (forall x.
SearchSchemaVersionSummary -> Rep SearchSchemaVersionSummary x)
-> (forall x.
Rep SearchSchemaVersionSummary x -> SearchSchemaVersionSummary)
-> Generic SearchSchemaVersionSummary
forall x.
Rep SearchSchemaVersionSummary x -> SearchSchemaVersionSummary
forall x.
SearchSchemaVersionSummary -> Rep SearchSchemaVersionSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SearchSchemaVersionSummary x -> SearchSchemaVersionSummary
$cfrom :: forall x.
SearchSchemaVersionSummary -> Rep SearchSchemaVersionSummary x
Prelude.Generic)
newSearchSchemaVersionSummary ::
SearchSchemaVersionSummary
newSearchSchemaVersionSummary :: SearchSchemaVersionSummary
newSearchSchemaVersionSummary =
SearchSchemaVersionSummary' :: Maybe Text
-> Maybe POSIX -> Maybe Type -> SearchSchemaVersionSummary
SearchSchemaVersionSummary'
{ $sel:schemaVersion:SearchSchemaVersionSummary' :: Maybe Text
schemaVersion =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdDate:SearchSchemaVersionSummary' :: Maybe POSIX
createdDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:type':SearchSchemaVersionSummary' :: Maybe Type
type' = Maybe Type
forall a. Maybe a
Prelude.Nothing
}
searchSchemaVersionSummary_schemaVersion :: Lens.Lens' SearchSchemaVersionSummary (Prelude.Maybe Prelude.Text)
searchSchemaVersionSummary_schemaVersion :: (Maybe Text -> f (Maybe Text))
-> SearchSchemaVersionSummary -> f SearchSchemaVersionSummary
searchSchemaVersionSummary_schemaVersion = (SearchSchemaVersionSummary -> Maybe Text)
-> (SearchSchemaVersionSummary
-> Maybe Text -> SearchSchemaVersionSummary)
-> Lens
SearchSchemaVersionSummary
SearchSchemaVersionSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchSchemaVersionSummary' {Maybe Text
schemaVersion :: Maybe Text
$sel:schemaVersion:SearchSchemaVersionSummary' :: SearchSchemaVersionSummary -> Maybe Text
schemaVersion} -> Maybe Text
schemaVersion) (\s :: SearchSchemaVersionSummary
s@SearchSchemaVersionSummary' {} Maybe Text
a -> SearchSchemaVersionSummary
s {$sel:schemaVersion:SearchSchemaVersionSummary' :: Maybe Text
schemaVersion = Maybe Text
a} :: SearchSchemaVersionSummary)
searchSchemaVersionSummary_createdDate :: Lens.Lens' SearchSchemaVersionSummary (Prelude.Maybe Prelude.UTCTime)
searchSchemaVersionSummary_createdDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SearchSchemaVersionSummary -> f SearchSchemaVersionSummary
searchSchemaVersionSummary_createdDate = (SearchSchemaVersionSummary -> Maybe POSIX)
-> (SearchSchemaVersionSummary
-> Maybe POSIX -> SearchSchemaVersionSummary)
-> Lens
SearchSchemaVersionSummary
SearchSchemaVersionSummary
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchSchemaVersionSummary' {Maybe POSIX
createdDate :: Maybe POSIX
$sel:createdDate:SearchSchemaVersionSummary' :: SearchSchemaVersionSummary -> Maybe POSIX
createdDate} -> Maybe POSIX
createdDate) (\s :: SearchSchemaVersionSummary
s@SearchSchemaVersionSummary' {} Maybe POSIX
a -> SearchSchemaVersionSummary
s {$sel:createdDate:SearchSchemaVersionSummary' :: Maybe POSIX
createdDate = Maybe POSIX
a} :: SearchSchemaVersionSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> SearchSchemaVersionSummary -> f SearchSchemaVersionSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SearchSchemaVersionSummary
-> f SearchSchemaVersionSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
searchSchemaVersionSummary_type :: Lens.Lens' SearchSchemaVersionSummary (Prelude.Maybe Type)
searchSchemaVersionSummary_type :: (Maybe Type -> f (Maybe Type))
-> SearchSchemaVersionSummary -> f SearchSchemaVersionSummary
searchSchemaVersionSummary_type = (SearchSchemaVersionSummary -> Maybe Type)
-> (SearchSchemaVersionSummary
-> Maybe Type -> SearchSchemaVersionSummary)
-> Lens
SearchSchemaVersionSummary
SearchSchemaVersionSummary
(Maybe Type)
(Maybe Type)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchSchemaVersionSummary' {Maybe Type
type' :: Maybe Type
$sel:type':SearchSchemaVersionSummary' :: SearchSchemaVersionSummary -> Maybe Type
type'} -> Maybe Type
type') (\s :: SearchSchemaVersionSummary
s@SearchSchemaVersionSummary' {} Maybe Type
a -> SearchSchemaVersionSummary
s {$sel:type':SearchSchemaVersionSummary' :: Maybe Type
type' = Maybe Type
a} :: SearchSchemaVersionSummary)
instance Core.FromJSON SearchSchemaVersionSummary where
parseJSON :: Value -> Parser SearchSchemaVersionSummary
parseJSON =
String
-> (Object -> Parser SearchSchemaVersionSummary)
-> Value
-> Parser SearchSchemaVersionSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SearchSchemaVersionSummary"
( \Object
x ->
Maybe Text
-> Maybe POSIX -> Maybe Type -> SearchSchemaVersionSummary
SearchSchemaVersionSummary'
(Maybe Text
-> Maybe POSIX -> Maybe Type -> SearchSchemaVersionSummary)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> Maybe Type -> SearchSchemaVersionSummary)
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
"SchemaVersion")
Parser (Maybe POSIX -> Maybe Type -> SearchSchemaVersionSummary)
-> Parser (Maybe POSIX)
-> Parser (Maybe Type -> SearchSchemaVersionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedDate")
Parser (Maybe Type -> SearchSchemaVersionSummary)
-> Parser (Maybe Type) -> Parser SearchSchemaVersionSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Type)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Type")
)
instance Prelude.Hashable SearchSchemaVersionSummary
instance Prelude.NFData SearchSchemaVersionSummary