{-# 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.ThirdPartyJob where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ThirdPartyJob = ThirdPartyJob'
{
ThirdPartyJob -> Maybe Text
clientId :: Prelude.Maybe Prelude.Text,
ThirdPartyJob -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text
}
deriving (ThirdPartyJob -> ThirdPartyJob -> Bool
(ThirdPartyJob -> ThirdPartyJob -> Bool)
-> (ThirdPartyJob -> ThirdPartyJob -> Bool) -> Eq ThirdPartyJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ThirdPartyJob -> ThirdPartyJob -> Bool
$c/= :: ThirdPartyJob -> ThirdPartyJob -> Bool
== :: ThirdPartyJob -> ThirdPartyJob -> Bool
$c== :: ThirdPartyJob -> ThirdPartyJob -> Bool
Prelude.Eq, ReadPrec [ThirdPartyJob]
ReadPrec ThirdPartyJob
Int -> ReadS ThirdPartyJob
ReadS [ThirdPartyJob]
(Int -> ReadS ThirdPartyJob)
-> ReadS [ThirdPartyJob]
-> ReadPrec ThirdPartyJob
-> ReadPrec [ThirdPartyJob]
-> Read ThirdPartyJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ThirdPartyJob]
$creadListPrec :: ReadPrec [ThirdPartyJob]
readPrec :: ReadPrec ThirdPartyJob
$creadPrec :: ReadPrec ThirdPartyJob
readList :: ReadS [ThirdPartyJob]
$creadList :: ReadS [ThirdPartyJob]
readsPrec :: Int -> ReadS ThirdPartyJob
$creadsPrec :: Int -> ReadS ThirdPartyJob
Prelude.Read, Int -> ThirdPartyJob -> ShowS
[ThirdPartyJob] -> ShowS
ThirdPartyJob -> String
(Int -> ThirdPartyJob -> ShowS)
-> (ThirdPartyJob -> String)
-> ([ThirdPartyJob] -> ShowS)
-> Show ThirdPartyJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ThirdPartyJob] -> ShowS
$cshowList :: [ThirdPartyJob] -> ShowS
show :: ThirdPartyJob -> String
$cshow :: ThirdPartyJob -> String
showsPrec :: Int -> ThirdPartyJob -> ShowS
$cshowsPrec :: Int -> ThirdPartyJob -> ShowS
Prelude.Show, (forall x. ThirdPartyJob -> Rep ThirdPartyJob x)
-> (forall x. Rep ThirdPartyJob x -> ThirdPartyJob)
-> Generic ThirdPartyJob
forall x. Rep ThirdPartyJob x -> ThirdPartyJob
forall x. ThirdPartyJob -> Rep ThirdPartyJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ThirdPartyJob x -> ThirdPartyJob
$cfrom :: forall x. ThirdPartyJob -> Rep ThirdPartyJob x
Prelude.Generic)
newThirdPartyJob ::
ThirdPartyJob
newThirdPartyJob :: ThirdPartyJob
newThirdPartyJob =
ThirdPartyJob' :: Maybe Text -> Maybe Text -> ThirdPartyJob
ThirdPartyJob'
{ $sel:clientId:ThirdPartyJob' :: Maybe Text
clientId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobId:ThirdPartyJob' :: Maybe Text
jobId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
thirdPartyJob_clientId :: Lens.Lens' ThirdPartyJob (Prelude.Maybe Prelude.Text)
thirdPartyJob_clientId :: (Maybe Text -> f (Maybe Text)) -> ThirdPartyJob -> f ThirdPartyJob
thirdPartyJob_clientId = (ThirdPartyJob -> Maybe Text)
-> (ThirdPartyJob -> Maybe Text -> ThirdPartyJob)
-> Lens ThirdPartyJob ThirdPartyJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ThirdPartyJob' {Maybe Text
clientId :: Maybe Text
$sel:clientId:ThirdPartyJob' :: ThirdPartyJob -> Maybe Text
clientId} -> Maybe Text
clientId) (\s :: ThirdPartyJob
s@ThirdPartyJob' {} Maybe Text
a -> ThirdPartyJob
s {$sel:clientId:ThirdPartyJob' :: Maybe Text
clientId = Maybe Text
a} :: ThirdPartyJob)
thirdPartyJob_jobId :: Lens.Lens' ThirdPartyJob (Prelude.Maybe Prelude.Text)
thirdPartyJob_jobId :: (Maybe Text -> f (Maybe Text)) -> ThirdPartyJob -> f ThirdPartyJob
thirdPartyJob_jobId = (ThirdPartyJob -> Maybe Text)
-> (ThirdPartyJob -> Maybe Text -> ThirdPartyJob)
-> Lens ThirdPartyJob ThirdPartyJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ThirdPartyJob' {Maybe Text
jobId :: Maybe Text
$sel:jobId:ThirdPartyJob' :: ThirdPartyJob -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: ThirdPartyJob
s@ThirdPartyJob' {} Maybe Text
a -> ThirdPartyJob
s {$sel:jobId:ThirdPartyJob' :: Maybe Text
jobId = Maybe Text
a} :: ThirdPartyJob)
instance Core.FromJSON ThirdPartyJob where
parseJSON :: Value -> Parser ThirdPartyJob
parseJSON =
String
-> (Object -> Parser ThirdPartyJob)
-> Value
-> Parser ThirdPartyJob
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ThirdPartyJob"
( \Object
x ->
Maybe Text -> Maybe Text -> ThirdPartyJob
ThirdPartyJob'
(Maybe Text -> Maybe Text -> ThirdPartyJob)
-> Parser (Maybe Text) -> Parser (Maybe Text -> ThirdPartyJob)
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
"clientId")
Parser (Maybe Text -> ThirdPartyJob)
-> Parser (Maybe Text) -> Parser ThirdPartyJob
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
"jobId")
)
instance Prelude.Hashable ThirdPartyJob
instance Prelude.NFData ThirdPartyJob