{-# 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.DeviceFarm.Types.TestGridProject where
import qualified Amazonka.Core as Core
import Amazonka.DeviceFarm.Types.TestGridVpcConfig
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TestGridProject = TestGridProject'
{
TestGridProject -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
TestGridProject -> Maybe POSIX
created :: Prelude.Maybe Core.POSIX,
TestGridProject -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
TestGridProject -> Maybe TestGridVpcConfig
vpcConfig :: Prelude.Maybe TestGridVpcConfig,
TestGridProject -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (TestGridProject -> TestGridProject -> Bool
(TestGridProject -> TestGridProject -> Bool)
-> (TestGridProject -> TestGridProject -> Bool)
-> Eq TestGridProject
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TestGridProject -> TestGridProject -> Bool
$c/= :: TestGridProject -> TestGridProject -> Bool
== :: TestGridProject -> TestGridProject -> Bool
$c== :: TestGridProject -> TestGridProject -> Bool
Prelude.Eq, ReadPrec [TestGridProject]
ReadPrec TestGridProject
Int -> ReadS TestGridProject
ReadS [TestGridProject]
(Int -> ReadS TestGridProject)
-> ReadS [TestGridProject]
-> ReadPrec TestGridProject
-> ReadPrec [TestGridProject]
-> Read TestGridProject
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TestGridProject]
$creadListPrec :: ReadPrec [TestGridProject]
readPrec :: ReadPrec TestGridProject
$creadPrec :: ReadPrec TestGridProject
readList :: ReadS [TestGridProject]
$creadList :: ReadS [TestGridProject]
readsPrec :: Int -> ReadS TestGridProject
$creadsPrec :: Int -> ReadS TestGridProject
Prelude.Read, Int -> TestGridProject -> ShowS
[TestGridProject] -> ShowS
TestGridProject -> String
(Int -> TestGridProject -> ShowS)
-> (TestGridProject -> String)
-> ([TestGridProject] -> ShowS)
-> Show TestGridProject
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TestGridProject] -> ShowS
$cshowList :: [TestGridProject] -> ShowS
show :: TestGridProject -> String
$cshow :: TestGridProject -> String
showsPrec :: Int -> TestGridProject -> ShowS
$cshowsPrec :: Int -> TestGridProject -> ShowS
Prelude.Show, (forall x. TestGridProject -> Rep TestGridProject x)
-> (forall x. Rep TestGridProject x -> TestGridProject)
-> Generic TestGridProject
forall x. Rep TestGridProject x -> TestGridProject
forall x. TestGridProject -> Rep TestGridProject x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TestGridProject x -> TestGridProject
$cfrom :: forall x. TestGridProject -> Rep TestGridProject x
Prelude.Generic)
newTestGridProject ::
TestGridProject
newTestGridProject :: TestGridProject
newTestGridProject =
TestGridProject' :: Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe TestGridVpcConfig
-> Maybe Text
-> TestGridProject
TestGridProject'
{ $sel:arn:TestGridProject' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:created:TestGridProject' :: Maybe POSIX
created = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:name:TestGridProject' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:vpcConfig:TestGridProject' :: Maybe TestGridVpcConfig
vpcConfig = Maybe TestGridVpcConfig
forall a. Maybe a
Prelude.Nothing,
$sel:description:TestGridProject' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
testGridProject_arn :: Lens.Lens' TestGridProject (Prelude.Maybe Prelude.Text)
testGridProject_arn :: (Maybe Text -> f (Maybe Text))
-> TestGridProject -> f TestGridProject
testGridProject_arn = (TestGridProject -> Maybe Text)
-> (TestGridProject -> Maybe Text -> TestGridProject)
-> Lens TestGridProject TestGridProject (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestGridProject' {Maybe Text
arn :: Maybe Text
$sel:arn:TestGridProject' :: TestGridProject -> Maybe Text
arn} -> Maybe Text
arn) (\s :: TestGridProject
s@TestGridProject' {} Maybe Text
a -> TestGridProject
s {$sel:arn:TestGridProject' :: Maybe Text
arn = Maybe Text
a} :: TestGridProject)
testGridProject_created :: Lens.Lens' TestGridProject (Prelude.Maybe Prelude.UTCTime)
testGridProject_created :: (Maybe UTCTime -> f (Maybe UTCTime))
-> TestGridProject -> f TestGridProject
testGridProject_created = (TestGridProject -> Maybe POSIX)
-> (TestGridProject -> Maybe POSIX -> TestGridProject)
-> Lens TestGridProject TestGridProject (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestGridProject' {Maybe POSIX
created :: Maybe POSIX
$sel:created:TestGridProject' :: TestGridProject -> Maybe POSIX
created} -> Maybe POSIX
created) (\s :: TestGridProject
s@TestGridProject' {} Maybe POSIX
a -> TestGridProject
s {$sel:created:TestGridProject' :: Maybe POSIX
created = Maybe POSIX
a} :: TestGridProject) ((Maybe POSIX -> f (Maybe POSIX))
-> TestGridProject -> f TestGridProject)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> TestGridProject
-> f TestGridProject
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
testGridProject_name :: Lens.Lens' TestGridProject (Prelude.Maybe Prelude.Text)
testGridProject_name :: (Maybe Text -> f (Maybe Text))
-> TestGridProject -> f TestGridProject
testGridProject_name = (TestGridProject -> Maybe Text)
-> (TestGridProject -> Maybe Text -> TestGridProject)
-> Lens TestGridProject TestGridProject (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestGridProject' {Maybe Text
name :: Maybe Text
$sel:name:TestGridProject' :: TestGridProject -> Maybe Text
name} -> Maybe Text
name) (\s :: TestGridProject
s@TestGridProject' {} Maybe Text
a -> TestGridProject
s {$sel:name:TestGridProject' :: Maybe Text
name = Maybe Text
a} :: TestGridProject)
testGridProject_vpcConfig :: Lens.Lens' TestGridProject (Prelude.Maybe TestGridVpcConfig)
testGridProject_vpcConfig :: (Maybe TestGridVpcConfig -> f (Maybe TestGridVpcConfig))
-> TestGridProject -> f TestGridProject
testGridProject_vpcConfig = (TestGridProject -> Maybe TestGridVpcConfig)
-> (TestGridProject -> Maybe TestGridVpcConfig -> TestGridProject)
-> Lens
TestGridProject
TestGridProject
(Maybe TestGridVpcConfig)
(Maybe TestGridVpcConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestGridProject' {Maybe TestGridVpcConfig
vpcConfig :: Maybe TestGridVpcConfig
$sel:vpcConfig:TestGridProject' :: TestGridProject -> Maybe TestGridVpcConfig
vpcConfig} -> Maybe TestGridVpcConfig
vpcConfig) (\s :: TestGridProject
s@TestGridProject' {} Maybe TestGridVpcConfig
a -> TestGridProject
s {$sel:vpcConfig:TestGridProject' :: Maybe TestGridVpcConfig
vpcConfig = Maybe TestGridVpcConfig
a} :: TestGridProject)
testGridProject_description :: Lens.Lens' TestGridProject (Prelude.Maybe Prelude.Text)
testGridProject_description :: (Maybe Text -> f (Maybe Text))
-> TestGridProject -> f TestGridProject
testGridProject_description = (TestGridProject -> Maybe Text)
-> (TestGridProject -> Maybe Text -> TestGridProject)
-> Lens TestGridProject TestGridProject (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestGridProject' {Maybe Text
description :: Maybe Text
$sel:description:TestGridProject' :: TestGridProject -> Maybe Text
description} -> Maybe Text
description) (\s :: TestGridProject
s@TestGridProject' {} Maybe Text
a -> TestGridProject
s {$sel:description:TestGridProject' :: Maybe Text
description = Maybe Text
a} :: TestGridProject)
instance Core.FromJSON TestGridProject where
parseJSON :: Value -> Parser TestGridProject
parseJSON =
String
-> (Object -> Parser TestGridProject)
-> Value
-> Parser TestGridProject
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TestGridProject"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe TestGridVpcConfig
-> Maybe Text
-> TestGridProject
TestGridProject'
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe TestGridVpcConfig
-> Maybe Text
-> TestGridProject)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe TestGridVpcConfig
-> Maybe Text
-> TestGridProject)
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
"arn")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe TestGridVpcConfig
-> Maybe Text
-> TestGridProject)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe TestGridVpcConfig -> Maybe Text -> TestGridProject)
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
"created")
Parser
(Maybe Text
-> Maybe TestGridVpcConfig -> Maybe Text -> TestGridProject)
-> Parser (Maybe Text)
-> Parser
(Maybe TestGridVpcConfig -> Maybe Text -> TestGridProject)
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
"name")
Parser (Maybe TestGridVpcConfig -> Maybe Text -> TestGridProject)
-> Parser (Maybe TestGridVpcConfig)
-> Parser (Maybe Text -> TestGridProject)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TestGridVpcConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"vpcConfig")
Parser (Maybe Text -> TestGridProject)
-> Parser (Maybe Text) -> Parser TestGridProject
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 TestGridProject
instance Prelude.NFData TestGridProject