{-# 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.Backup.Types.Framework where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Framework = Framework'
{
Framework -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
Framework -> Maybe Text
frameworkDescription :: Prelude.Maybe Prelude.Text,
Framework -> Maybe Int
numberOfControls :: Prelude.Maybe Prelude.Int,
Framework -> Maybe Text
frameworkArn :: Prelude.Maybe Prelude.Text,
Framework -> Maybe Text
deploymentStatus :: Prelude.Maybe Prelude.Text,
Framework -> Maybe Text
frameworkName :: Prelude.Maybe Prelude.Text
}
deriving (Framework -> Framework -> Bool
(Framework -> Framework -> Bool)
-> (Framework -> Framework -> Bool) -> Eq Framework
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Framework -> Framework -> Bool
$c/= :: Framework -> Framework -> Bool
== :: Framework -> Framework -> Bool
$c== :: Framework -> Framework -> Bool
Prelude.Eq, ReadPrec [Framework]
ReadPrec Framework
Int -> ReadS Framework
ReadS [Framework]
(Int -> ReadS Framework)
-> ReadS [Framework]
-> ReadPrec Framework
-> ReadPrec [Framework]
-> Read Framework
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Framework]
$creadListPrec :: ReadPrec [Framework]
readPrec :: ReadPrec Framework
$creadPrec :: ReadPrec Framework
readList :: ReadS [Framework]
$creadList :: ReadS [Framework]
readsPrec :: Int -> ReadS Framework
$creadsPrec :: Int -> ReadS Framework
Prelude.Read, Int -> Framework -> ShowS
[Framework] -> ShowS
Framework -> String
(Int -> Framework -> ShowS)
-> (Framework -> String)
-> ([Framework] -> ShowS)
-> Show Framework
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Framework] -> ShowS
$cshowList :: [Framework] -> ShowS
show :: Framework -> String
$cshow :: Framework -> String
showsPrec :: Int -> Framework -> ShowS
$cshowsPrec :: Int -> Framework -> ShowS
Prelude.Show, (forall x. Framework -> Rep Framework x)
-> (forall x. Rep Framework x -> Framework) -> Generic Framework
forall x. Rep Framework x -> Framework
forall x. Framework -> Rep Framework x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Framework x -> Framework
$cfrom :: forall x. Framework -> Rep Framework x
Prelude.Generic)
newFramework ::
Framework
newFramework :: Framework
newFramework =
Framework' :: Maybe POSIX
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Framework
Framework'
{ $sel:creationTime:Framework' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:frameworkDescription:Framework' :: Maybe Text
frameworkDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:numberOfControls:Framework' :: Maybe Int
numberOfControls = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:frameworkArn:Framework' :: Maybe Text
frameworkArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:deploymentStatus:Framework' :: Maybe Text
deploymentStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:frameworkName:Framework' :: Maybe Text
frameworkName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
framework_creationTime :: Lens.Lens' Framework (Prelude.Maybe Prelude.UTCTime)
framework_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Framework -> f Framework
framework_creationTime = (Framework -> Maybe POSIX)
-> (Framework -> Maybe POSIX -> Framework)
-> Lens Framework Framework (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Framework' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:Framework' :: Framework -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: Framework
s@Framework' {} Maybe POSIX
a -> Framework
s {$sel:creationTime:Framework' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: Framework) ((Maybe POSIX -> f (Maybe POSIX)) -> Framework -> f Framework)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Framework
-> f Framework
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
framework_frameworkDescription :: Lens.Lens' Framework (Prelude.Maybe Prelude.Text)
framework_frameworkDescription :: (Maybe Text -> f (Maybe Text)) -> Framework -> f Framework
framework_frameworkDescription = (Framework -> Maybe Text)
-> (Framework -> Maybe Text -> Framework)
-> Lens Framework Framework (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Framework' {Maybe Text
frameworkDescription :: Maybe Text
$sel:frameworkDescription:Framework' :: Framework -> Maybe Text
frameworkDescription} -> Maybe Text
frameworkDescription) (\s :: Framework
s@Framework' {} Maybe Text
a -> Framework
s {$sel:frameworkDescription:Framework' :: Maybe Text
frameworkDescription = Maybe Text
a} :: Framework)
framework_numberOfControls :: Lens.Lens' Framework (Prelude.Maybe Prelude.Int)
framework_numberOfControls :: (Maybe Int -> f (Maybe Int)) -> Framework -> f Framework
framework_numberOfControls = (Framework -> Maybe Int)
-> (Framework -> Maybe Int -> Framework)
-> Lens Framework Framework (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Framework' {Maybe Int
numberOfControls :: Maybe Int
$sel:numberOfControls:Framework' :: Framework -> Maybe Int
numberOfControls} -> Maybe Int
numberOfControls) (\s :: Framework
s@Framework' {} Maybe Int
a -> Framework
s {$sel:numberOfControls:Framework' :: Maybe Int
numberOfControls = Maybe Int
a} :: Framework)
framework_frameworkArn :: Lens.Lens' Framework (Prelude.Maybe Prelude.Text)
framework_frameworkArn :: (Maybe Text -> f (Maybe Text)) -> Framework -> f Framework
framework_frameworkArn = (Framework -> Maybe Text)
-> (Framework -> Maybe Text -> Framework)
-> Lens Framework Framework (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Framework' {Maybe Text
frameworkArn :: Maybe Text
$sel:frameworkArn:Framework' :: Framework -> Maybe Text
frameworkArn} -> Maybe Text
frameworkArn) (\s :: Framework
s@Framework' {} Maybe Text
a -> Framework
s {$sel:frameworkArn:Framework' :: Maybe Text
frameworkArn = Maybe Text
a} :: Framework)
framework_deploymentStatus :: Lens.Lens' Framework (Prelude.Maybe Prelude.Text)
framework_deploymentStatus :: (Maybe Text -> f (Maybe Text)) -> Framework -> f Framework
framework_deploymentStatus = (Framework -> Maybe Text)
-> (Framework -> Maybe Text -> Framework)
-> Lens Framework Framework (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Framework' {Maybe Text
deploymentStatus :: Maybe Text
$sel:deploymentStatus:Framework' :: Framework -> Maybe Text
deploymentStatus} -> Maybe Text
deploymentStatus) (\s :: Framework
s@Framework' {} Maybe Text
a -> Framework
s {$sel:deploymentStatus:Framework' :: Maybe Text
deploymentStatus = Maybe Text
a} :: Framework)
framework_frameworkName :: Lens.Lens' Framework (Prelude.Maybe Prelude.Text)
framework_frameworkName :: (Maybe Text -> f (Maybe Text)) -> Framework -> f Framework
framework_frameworkName = (Framework -> Maybe Text)
-> (Framework -> Maybe Text -> Framework)
-> Lens Framework Framework (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Framework' {Maybe Text
frameworkName :: Maybe Text
$sel:frameworkName:Framework' :: Framework -> Maybe Text
frameworkName} -> Maybe Text
frameworkName) (\s :: Framework
s@Framework' {} Maybe Text
a -> Framework
s {$sel:frameworkName:Framework' :: Maybe Text
frameworkName = Maybe Text
a} :: Framework)
instance Core.FromJSON Framework where
parseJSON :: Value -> Parser Framework
parseJSON =
String -> (Object -> Parser Framework) -> Value -> Parser Framework
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Framework"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Framework
Framework'
(Maybe POSIX
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Framework)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Framework)
forall (f :: * -> *) a b. Functor 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
"CreationTime")
Parser
(Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Framework)
-> Parser (Maybe Text)
-> Parser
(Maybe Int -> Maybe Text -> Maybe Text -> Maybe Text -> Framework)
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
"FrameworkDescription")
Parser
(Maybe Int -> Maybe Text -> Maybe Text -> Maybe Text -> Framework)
-> Parser (Maybe Int)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> Framework)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NumberOfControls")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> Framework)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Framework)
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
"FrameworkArn")
Parser (Maybe Text -> Maybe Text -> Framework)
-> Parser (Maybe Text) -> Parser (Maybe Text -> Framework)
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
"DeploymentStatus")
Parser (Maybe Text -> Framework)
-> Parser (Maybe Text) -> Parser Framework
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
"FrameworkName")
)
instance Prelude.Hashable Framework
instance Prelude.NFData Framework