{-# 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.CodePipeline.Types.JobDetails where
import Amazonka.CodePipeline.Types.JobData
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data JobDetails = JobDetails'
{
JobDetails -> Maybe JobData
data' :: Prelude.Maybe JobData,
JobDetails -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
JobDetails -> Maybe Text
id :: Prelude.Maybe Prelude.Text
}
deriving (JobDetails -> JobDetails -> Bool
(JobDetails -> JobDetails -> Bool)
-> (JobDetails -> JobDetails -> Bool) -> Eq JobDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JobDetails -> JobDetails -> Bool
$c/= :: JobDetails -> JobDetails -> Bool
== :: JobDetails -> JobDetails -> Bool
$c== :: JobDetails -> JobDetails -> Bool
Prelude.Eq, Int -> JobDetails -> ShowS
[JobDetails] -> ShowS
JobDetails -> String
(Int -> JobDetails -> ShowS)
-> (JobDetails -> String)
-> ([JobDetails] -> ShowS)
-> Show JobDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JobDetails] -> ShowS
$cshowList :: [JobDetails] -> ShowS
show :: JobDetails -> String
$cshow :: JobDetails -> String
showsPrec :: Int -> JobDetails -> ShowS
$cshowsPrec :: Int -> JobDetails -> ShowS
Prelude.Show, (forall x. JobDetails -> Rep JobDetails x)
-> (forall x. Rep JobDetails x -> JobDetails) -> Generic JobDetails
forall x. Rep JobDetails x -> JobDetails
forall x. JobDetails -> Rep JobDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JobDetails x -> JobDetails
$cfrom :: forall x. JobDetails -> Rep JobDetails x
Prelude.Generic)
newJobDetails ::
JobDetails
newJobDetails :: JobDetails
newJobDetails =
JobDetails' :: Maybe JobData -> Maybe Text -> Maybe Text -> JobDetails
JobDetails'
{ $sel:data':JobDetails' :: Maybe JobData
data' = Maybe JobData
forall a. Maybe a
Prelude.Nothing,
$sel:accountId:JobDetails' :: Maybe Text
accountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:JobDetails' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
jobDetails_data :: Lens.Lens' JobDetails (Prelude.Maybe JobData)
jobDetails_data :: (Maybe JobData -> f (Maybe JobData)) -> JobDetails -> f JobDetails
jobDetails_data = (JobDetails -> Maybe JobData)
-> (JobDetails -> Maybe JobData -> JobDetails)
-> Lens JobDetails JobDetails (Maybe JobData) (Maybe JobData)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobDetails' {Maybe JobData
data' :: Maybe JobData
$sel:data':JobDetails' :: JobDetails -> Maybe JobData
data'} -> Maybe JobData
data') (\s :: JobDetails
s@JobDetails' {} Maybe JobData
a -> JobDetails
s {$sel:data':JobDetails' :: Maybe JobData
data' = Maybe JobData
a} :: JobDetails)
jobDetails_accountId :: Lens.Lens' JobDetails (Prelude.Maybe Prelude.Text)
jobDetails_accountId :: (Maybe Text -> f (Maybe Text)) -> JobDetails -> f JobDetails
jobDetails_accountId = (JobDetails -> Maybe Text)
-> (JobDetails -> Maybe Text -> JobDetails)
-> Lens JobDetails JobDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobDetails' {Maybe Text
accountId :: Maybe Text
$sel:accountId:JobDetails' :: JobDetails -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: JobDetails
s@JobDetails' {} Maybe Text
a -> JobDetails
s {$sel:accountId:JobDetails' :: Maybe Text
accountId = Maybe Text
a} :: JobDetails)
jobDetails_id :: Lens.Lens' JobDetails (Prelude.Maybe Prelude.Text)
jobDetails_id :: (Maybe Text -> f (Maybe Text)) -> JobDetails -> f JobDetails
jobDetails_id = (JobDetails -> Maybe Text)
-> (JobDetails -> Maybe Text -> JobDetails)
-> Lens JobDetails JobDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobDetails' {Maybe Text
id :: Maybe Text
$sel:id:JobDetails' :: JobDetails -> Maybe Text
id} -> Maybe Text
id) (\s :: JobDetails
s@JobDetails' {} Maybe Text
a -> JobDetails
s {$sel:id:JobDetails' :: Maybe Text
id = Maybe Text
a} :: JobDetails)
instance Core.FromJSON JobDetails where
parseJSON :: Value -> Parser JobDetails
parseJSON =
String
-> (Object -> Parser JobDetails) -> Value -> Parser JobDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"JobDetails"
( \Object
x ->
Maybe JobData -> Maybe Text -> Maybe Text -> JobDetails
JobDetails'
(Maybe JobData -> Maybe Text -> Maybe Text -> JobDetails)
-> Parser (Maybe JobData)
-> Parser (Maybe Text -> Maybe Text -> JobDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe JobData)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"data")
Parser (Maybe Text -> Maybe Text -> JobDetails)
-> Parser (Maybe Text) -> Parser (Maybe Text -> JobDetails)
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
"accountId")
Parser (Maybe Text -> JobDetails)
-> Parser (Maybe Text) -> Parser JobDetails
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
"id")
)
instance Prelude.Hashable JobDetails
instance Prelude.NFData JobDetails