{-# 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.Synthetics.Types.RuntimeVersion where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RuntimeVersion = RuntimeVersion'
{
RuntimeVersion -> Maybe Text
versionName :: Prelude.Maybe Prelude.Text,
RuntimeVersion -> Maybe POSIX
deprecationDate :: Prelude.Maybe Core.POSIX,
RuntimeVersion -> Maybe POSIX
releaseDate :: Prelude.Maybe Core.POSIX,
RuntimeVersion -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (RuntimeVersion -> RuntimeVersion -> Bool
(RuntimeVersion -> RuntimeVersion -> Bool)
-> (RuntimeVersion -> RuntimeVersion -> Bool) -> Eq RuntimeVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RuntimeVersion -> RuntimeVersion -> Bool
$c/= :: RuntimeVersion -> RuntimeVersion -> Bool
== :: RuntimeVersion -> RuntimeVersion -> Bool
$c== :: RuntimeVersion -> RuntimeVersion -> Bool
Prelude.Eq, ReadPrec [RuntimeVersion]
ReadPrec RuntimeVersion
Int -> ReadS RuntimeVersion
ReadS [RuntimeVersion]
(Int -> ReadS RuntimeVersion)
-> ReadS [RuntimeVersion]
-> ReadPrec RuntimeVersion
-> ReadPrec [RuntimeVersion]
-> Read RuntimeVersion
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RuntimeVersion]
$creadListPrec :: ReadPrec [RuntimeVersion]
readPrec :: ReadPrec RuntimeVersion
$creadPrec :: ReadPrec RuntimeVersion
readList :: ReadS [RuntimeVersion]
$creadList :: ReadS [RuntimeVersion]
readsPrec :: Int -> ReadS RuntimeVersion
$creadsPrec :: Int -> ReadS RuntimeVersion
Prelude.Read, Int -> RuntimeVersion -> ShowS
[RuntimeVersion] -> ShowS
RuntimeVersion -> String
(Int -> RuntimeVersion -> ShowS)
-> (RuntimeVersion -> String)
-> ([RuntimeVersion] -> ShowS)
-> Show RuntimeVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RuntimeVersion] -> ShowS
$cshowList :: [RuntimeVersion] -> ShowS
show :: RuntimeVersion -> String
$cshow :: RuntimeVersion -> String
showsPrec :: Int -> RuntimeVersion -> ShowS
$cshowsPrec :: Int -> RuntimeVersion -> ShowS
Prelude.Show, (forall x. RuntimeVersion -> Rep RuntimeVersion x)
-> (forall x. Rep RuntimeVersion x -> RuntimeVersion)
-> Generic RuntimeVersion
forall x. Rep RuntimeVersion x -> RuntimeVersion
forall x. RuntimeVersion -> Rep RuntimeVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RuntimeVersion x -> RuntimeVersion
$cfrom :: forall x. RuntimeVersion -> Rep RuntimeVersion x
Prelude.Generic)
newRuntimeVersion ::
RuntimeVersion
newRuntimeVersion :: RuntimeVersion
newRuntimeVersion =
RuntimeVersion' :: Maybe Text
-> Maybe POSIX -> Maybe POSIX -> Maybe Text -> RuntimeVersion
RuntimeVersion'
{ $sel:versionName:RuntimeVersion' :: Maybe Text
versionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:deprecationDate:RuntimeVersion' :: Maybe POSIX
deprecationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:releaseDate:RuntimeVersion' :: Maybe POSIX
releaseDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:description:RuntimeVersion' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
runtimeVersion_versionName :: Lens.Lens' RuntimeVersion (Prelude.Maybe Prelude.Text)
runtimeVersion_versionName :: (Maybe Text -> f (Maybe Text))
-> RuntimeVersion -> f RuntimeVersion
runtimeVersion_versionName = (RuntimeVersion -> Maybe Text)
-> (RuntimeVersion -> Maybe Text -> RuntimeVersion)
-> Lens RuntimeVersion RuntimeVersion (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuntimeVersion' {Maybe Text
versionName :: Maybe Text
$sel:versionName:RuntimeVersion' :: RuntimeVersion -> Maybe Text
versionName} -> Maybe Text
versionName) (\s :: RuntimeVersion
s@RuntimeVersion' {} Maybe Text
a -> RuntimeVersion
s {$sel:versionName:RuntimeVersion' :: Maybe Text
versionName = Maybe Text
a} :: RuntimeVersion)
runtimeVersion_deprecationDate :: Lens.Lens' RuntimeVersion (Prelude.Maybe Prelude.UTCTime)
runtimeVersion_deprecationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> RuntimeVersion -> f RuntimeVersion
runtimeVersion_deprecationDate = (RuntimeVersion -> Maybe POSIX)
-> (RuntimeVersion -> Maybe POSIX -> RuntimeVersion)
-> Lens RuntimeVersion RuntimeVersion (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuntimeVersion' {Maybe POSIX
deprecationDate :: Maybe POSIX
$sel:deprecationDate:RuntimeVersion' :: RuntimeVersion -> Maybe POSIX
deprecationDate} -> Maybe POSIX
deprecationDate) (\s :: RuntimeVersion
s@RuntimeVersion' {} Maybe POSIX
a -> RuntimeVersion
s {$sel:deprecationDate:RuntimeVersion' :: Maybe POSIX
deprecationDate = Maybe POSIX
a} :: RuntimeVersion) ((Maybe POSIX -> f (Maybe POSIX))
-> RuntimeVersion -> f RuntimeVersion)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> RuntimeVersion
-> f RuntimeVersion
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
runtimeVersion_releaseDate :: Lens.Lens' RuntimeVersion (Prelude.Maybe Prelude.UTCTime)
runtimeVersion_releaseDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> RuntimeVersion -> f RuntimeVersion
runtimeVersion_releaseDate = (RuntimeVersion -> Maybe POSIX)
-> (RuntimeVersion -> Maybe POSIX -> RuntimeVersion)
-> Lens RuntimeVersion RuntimeVersion (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuntimeVersion' {Maybe POSIX
releaseDate :: Maybe POSIX
$sel:releaseDate:RuntimeVersion' :: RuntimeVersion -> Maybe POSIX
releaseDate} -> Maybe POSIX
releaseDate) (\s :: RuntimeVersion
s@RuntimeVersion' {} Maybe POSIX
a -> RuntimeVersion
s {$sel:releaseDate:RuntimeVersion' :: Maybe POSIX
releaseDate = Maybe POSIX
a} :: RuntimeVersion) ((Maybe POSIX -> f (Maybe POSIX))
-> RuntimeVersion -> f RuntimeVersion)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> RuntimeVersion
-> f RuntimeVersion
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
runtimeVersion_description :: Lens.Lens' RuntimeVersion (Prelude.Maybe Prelude.Text)
runtimeVersion_description :: (Maybe Text -> f (Maybe Text))
-> RuntimeVersion -> f RuntimeVersion
runtimeVersion_description = (RuntimeVersion -> Maybe Text)
-> (RuntimeVersion -> Maybe Text -> RuntimeVersion)
-> Lens RuntimeVersion RuntimeVersion (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuntimeVersion' {Maybe Text
description :: Maybe Text
$sel:description:RuntimeVersion' :: RuntimeVersion -> Maybe Text
description} -> Maybe Text
description) (\s :: RuntimeVersion
s@RuntimeVersion' {} Maybe Text
a -> RuntimeVersion
s {$sel:description:RuntimeVersion' :: Maybe Text
description = Maybe Text
a} :: RuntimeVersion)
instance Core.FromJSON RuntimeVersion where
parseJSON :: Value -> Parser RuntimeVersion
parseJSON =
String
-> (Object -> Parser RuntimeVersion)
-> Value
-> Parser RuntimeVersion
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RuntimeVersion"
( \Object
x ->
Maybe Text
-> Maybe POSIX -> Maybe POSIX -> Maybe Text -> RuntimeVersion
RuntimeVersion'
(Maybe Text
-> Maybe POSIX -> Maybe POSIX -> Maybe Text -> RuntimeVersion)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX -> Maybe POSIX -> Maybe Text -> RuntimeVersion)
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
"VersionName")
Parser (Maybe POSIX -> Maybe POSIX -> Maybe Text -> RuntimeVersion)
-> Parser (Maybe POSIX)
-> Parser (Maybe POSIX -> Maybe Text -> RuntimeVersion)
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
"DeprecationDate")
Parser (Maybe POSIX -> Maybe Text -> RuntimeVersion)
-> Parser (Maybe POSIX) -> Parser (Maybe Text -> RuntimeVersion)
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
"ReleaseDate")
Parser (Maybe Text -> RuntimeVersion)
-> Parser (Maybe Text) -> Parser RuntimeVersion
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 RuntimeVersion
instance Prelude.NFData RuntimeVersion