{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SageMaker.Types.Pipeline
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SageMaker.Types.Pipeline where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.PipelineStatus
import Amazonka.SageMaker.Types.Tag
import Amazonka.SageMaker.Types.UserContext

-- | A SageMaker Model Building Pipeline instance.
--
-- /See:/ 'newPipeline' smart constructor.
data Pipeline = Pipeline'
  { -- | The creation time of the pipeline.
    Pipeline -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | The display name of the pipeline.
    Pipeline -> Maybe Text
pipelineDisplayName :: Prelude.Maybe Prelude.Text,
    -- | The name of the pipeline.
    Pipeline -> Maybe Text
pipelineName :: Prelude.Maybe Prelude.Text,
    Pipeline -> Maybe UserContext
createdBy :: Prelude.Maybe UserContext,
    -- | The time when the pipeline was last run.
    Pipeline -> Maybe POSIX
lastRunTime :: Prelude.Maybe Core.POSIX,
    -- | The time that the pipeline was last modified.
    Pipeline -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
    -- | The status of the pipeline.
    Pipeline -> Maybe PipelineStatus
pipelineStatus :: Prelude.Maybe PipelineStatus,
    -- | The description of the pipeline.
    Pipeline -> Maybe Text
pipelineDescription :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the pipeline.
    Pipeline -> Maybe Text
pipelineArn :: Prelude.Maybe Prelude.Text,
    Pipeline -> Maybe UserContext
lastModifiedBy :: Prelude.Maybe UserContext,
    -- | A list of tags that apply to the pipeline.
    Pipeline -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The Amazon Resource Name (ARN) of the role that created the pipeline.
    Pipeline -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text
  }
  deriving (Pipeline -> Pipeline -> Bool
(Pipeline -> Pipeline -> Bool)
-> (Pipeline -> Pipeline -> Bool) -> Eq Pipeline
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Pipeline -> Pipeline -> Bool
$c/= :: Pipeline -> Pipeline -> Bool
== :: Pipeline -> Pipeline -> Bool
$c== :: Pipeline -> Pipeline -> Bool
Prelude.Eq, ReadPrec [Pipeline]
ReadPrec Pipeline
Int -> ReadS Pipeline
ReadS [Pipeline]
(Int -> ReadS Pipeline)
-> ReadS [Pipeline]
-> ReadPrec Pipeline
-> ReadPrec [Pipeline]
-> Read Pipeline
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Pipeline]
$creadListPrec :: ReadPrec [Pipeline]
readPrec :: ReadPrec Pipeline
$creadPrec :: ReadPrec Pipeline
readList :: ReadS [Pipeline]
$creadList :: ReadS [Pipeline]
readsPrec :: Int -> ReadS Pipeline
$creadsPrec :: Int -> ReadS Pipeline
Prelude.Read, Int -> Pipeline -> ShowS
[Pipeline] -> ShowS
Pipeline -> String
(Int -> Pipeline -> ShowS)
-> (Pipeline -> String) -> ([Pipeline] -> ShowS) -> Show Pipeline
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Pipeline] -> ShowS
$cshowList :: [Pipeline] -> ShowS
show :: Pipeline -> String
$cshow :: Pipeline -> String
showsPrec :: Int -> Pipeline -> ShowS
$cshowsPrec :: Int -> Pipeline -> ShowS
Prelude.Show, (forall x. Pipeline -> Rep Pipeline x)
-> (forall x. Rep Pipeline x -> Pipeline) -> Generic Pipeline
forall x. Rep Pipeline x -> Pipeline
forall x. Pipeline -> Rep Pipeline x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Pipeline x -> Pipeline
$cfrom :: forall x. Pipeline -> Rep Pipeline x
Prelude.Generic)

-- |
-- Create a value of 'Pipeline' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'creationTime', 'pipeline_creationTime' - The creation time of the pipeline.
--
-- 'pipelineDisplayName', 'pipeline_pipelineDisplayName' - The display name of the pipeline.
--
-- 'pipelineName', 'pipeline_pipelineName' - The name of the pipeline.
--
-- 'createdBy', 'pipeline_createdBy' - Undocumented member.
--
-- 'lastRunTime', 'pipeline_lastRunTime' - The time when the pipeline was last run.
--
-- 'lastModifiedTime', 'pipeline_lastModifiedTime' - The time that the pipeline was last modified.
--
-- 'pipelineStatus', 'pipeline_pipelineStatus' - The status of the pipeline.
--
-- 'pipelineDescription', 'pipeline_pipelineDescription' - The description of the pipeline.
--
-- 'pipelineArn', 'pipeline_pipelineArn' - The Amazon Resource Name (ARN) of the pipeline.
--
-- 'lastModifiedBy', 'pipeline_lastModifiedBy' - Undocumented member.
--
-- 'tags', 'pipeline_tags' - A list of tags that apply to the pipeline.
--
-- 'roleArn', 'pipeline_roleArn' - The Amazon Resource Name (ARN) of the role that created the pipeline.
newPipeline ::
  Pipeline
newPipeline :: Pipeline
newPipeline =
  Pipeline' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe UserContext
-> Maybe POSIX
-> Maybe POSIX
-> Maybe PipelineStatus
-> Maybe Text
-> Maybe Text
-> Maybe UserContext
-> Maybe [Tag]
-> Maybe Text
-> Pipeline
Pipeline'
    { $sel:creationTime:Pipeline' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:pipelineDisplayName:Pipeline' :: Maybe Text
pipelineDisplayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pipelineName:Pipeline' :: Maybe Text
pipelineName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:Pipeline' :: Maybe UserContext
createdBy = Maybe UserContext
forall a. Maybe a
Prelude.Nothing,
      $sel:lastRunTime:Pipeline' :: Maybe POSIX
lastRunTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:Pipeline' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:pipelineStatus:Pipeline' :: Maybe PipelineStatus
pipelineStatus = Maybe PipelineStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:pipelineDescription:Pipeline' :: Maybe Text
pipelineDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pipelineArn:Pipeline' :: Maybe Text
pipelineArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedBy:Pipeline' :: Maybe UserContext
lastModifiedBy = Maybe UserContext
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Pipeline' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:Pipeline' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The creation time of the pipeline.
pipeline_creationTime :: Lens.Lens' Pipeline (Prelude.Maybe Prelude.UTCTime)
pipeline_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Pipeline -> f Pipeline
pipeline_creationTime = (Pipeline -> Maybe POSIX)
-> (Pipeline -> Maybe POSIX -> Pipeline)
-> Lens Pipeline Pipeline (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Pipeline' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:Pipeline' :: Pipeline -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: Pipeline
s@Pipeline' {} Maybe POSIX
a -> Pipeline
s {$sel:creationTime:Pipeline' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: Pipeline) ((Maybe POSIX -> f (Maybe POSIX)) -> Pipeline -> f Pipeline)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Pipeline
-> f Pipeline
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

-- | The display name of the pipeline.
pipeline_pipelineDisplayName :: Lens.Lens' Pipeline (Prelude.Maybe Prelude.Text)
pipeline_pipelineDisplayName :: (Maybe Text -> f (Maybe Text)) -> Pipeline -> f Pipeline
pipeline_pipelineDisplayName = (Pipeline -> Maybe Text)
-> (Pipeline -> Maybe Text -> Pipeline)
-> Lens Pipeline Pipeline (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Pipeline' {Maybe Text
pipelineDisplayName :: Maybe Text
$sel:pipelineDisplayName:Pipeline' :: Pipeline -> Maybe Text
pipelineDisplayName} -> Maybe Text
pipelineDisplayName) (\s :: Pipeline
s@Pipeline' {} Maybe Text
a -> Pipeline
s {$sel:pipelineDisplayName:Pipeline' :: Maybe Text
pipelineDisplayName = Maybe Text
a} :: Pipeline)

-- | The name of the pipeline.
pipeline_pipelineName :: Lens.Lens' Pipeline (Prelude.Maybe Prelude.Text)
pipeline_pipelineName :: (Maybe Text -> f (Maybe Text)) -> Pipeline -> f Pipeline
pipeline_pipelineName = (Pipeline -> Maybe Text)
-> (Pipeline -> Maybe Text -> Pipeline)
-> Lens Pipeline Pipeline (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Pipeline' {Maybe Text
pipelineName :: Maybe Text
$sel:pipelineName:Pipeline' :: Pipeline -> Maybe Text
pipelineName} -> Maybe Text
pipelineName) (\s :: Pipeline
s@Pipeline' {} Maybe Text
a -> Pipeline
s {$sel:pipelineName:Pipeline' :: Maybe Text
pipelineName = Maybe Text
a} :: Pipeline)

-- | Undocumented member.
pipeline_createdBy :: Lens.Lens' Pipeline (Prelude.Maybe UserContext)
pipeline_createdBy :: (Maybe UserContext -> f (Maybe UserContext))
-> Pipeline -> f Pipeline
pipeline_createdBy = (Pipeline -> Maybe UserContext)
-> (Pipeline -> Maybe UserContext -> Pipeline)
-> Lens Pipeline Pipeline (Maybe UserContext) (Maybe UserContext)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Pipeline' {Maybe UserContext
createdBy :: Maybe UserContext
$sel:createdBy:Pipeline' :: Pipeline -> Maybe UserContext
createdBy} -> Maybe UserContext
createdBy) (\s :: Pipeline
s@Pipeline' {} Maybe UserContext
a -> Pipeline
s {$sel:createdBy:Pipeline' :: Maybe UserContext
createdBy = Maybe UserContext
a} :: Pipeline)

-- | The time when the pipeline was last run.
pipeline_lastRunTime :: Lens.Lens' Pipeline (Prelude.Maybe Prelude.UTCTime)
pipeline_lastRunTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Pipeline -> f Pipeline
pipeline_lastRunTime = (Pipeline -> Maybe POSIX)
-> (Pipeline -> Maybe POSIX -> Pipeline)
-> Lens Pipeline Pipeline (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Pipeline' {Maybe POSIX
lastRunTime :: Maybe POSIX
$sel:lastRunTime:Pipeline' :: Pipeline -> Maybe POSIX
lastRunTime} -> Maybe POSIX
lastRunTime) (\s :: Pipeline
s@Pipeline' {} Maybe POSIX
a -> Pipeline
s {$sel:lastRunTime:Pipeline' :: Maybe POSIX
lastRunTime = Maybe POSIX
a} :: Pipeline) ((Maybe POSIX -> f (Maybe POSIX)) -> Pipeline -> f Pipeline)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Pipeline
-> f Pipeline
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

-- | The time that the pipeline was last modified.
pipeline_lastModifiedTime :: Lens.Lens' Pipeline (Prelude.Maybe Prelude.UTCTime)
pipeline_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Pipeline -> f Pipeline
pipeline_lastModifiedTime = (Pipeline -> Maybe POSIX)
-> (Pipeline -> Maybe POSIX -> Pipeline)
-> Lens Pipeline Pipeline (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Pipeline' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:Pipeline' :: Pipeline -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: Pipeline
s@Pipeline' {} Maybe POSIX
a -> Pipeline
s {$sel:lastModifiedTime:Pipeline' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: Pipeline) ((Maybe POSIX -> f (Maybe POSIX)) -> Pipeline -> f Pipeline)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Pipeline
-> f Pipeline
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

-- | The status of the pipeline.
pipeline_pipelineStatus :: Lens.Lens' Pipeline (Prelude.Maybe PipelineStatus)
pipeline_pipelineStatus :: (Maybe PipelineStatus -> f (Maybe PipelineStatus))
-> Pipeline -> f Pipeline
pipeline_pipelineStatus = (Pipeline -> Maybe PipelineStatus)
-> (Pipeline -> Maybe PipelineStatus -> Pipeline)
-> Lens
     Pipeline Pipeline (Maybe PipelineStatus) (Maybe PipelineStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Pipeline' {Maybe PipelineStatus
pipelineStatus :: Maybe PipelineStatus
$sel:pipelineStatus:Pipeline' :: Pipeline -> Maybe PipelineStatus
pipelineStatus} -> Maybe PipelineStatus
pipelineStatus) (\s :: Pipeline
s@Pipeline' {} Maybe PipelineStatus
a -> Pipeline
s {$sel:pipelineStatus:Pipeline' :: Maybe PipelineStatus
pipelineStatus = Maybe PipelineStatus
a} :: Pipeline)

-- | The description of the pipeline.
pipeline_pipelineDescription :: Lens.Lens' Pipeline (Prelude.Maybe Prelude.Text)
pipeline_pipelineDescription :: (Maybe Text -> f (Maybe Text)) -> Pipeline -> f Pipeline
pipeline_pipelineDescription = (Pipeline -> Maybe Text)
-> (Pipeline -> Maybe Text -> Pipeline)
-> Lens Pipeline Pipeline (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Pipeline' {Maybe Text
pipelineDescription :: Maybe Text
$sel:pipelineDescription:Pipeline' :: Pipeline -> Maybe Text
pipelineDescription} -> Maybe Text
pipelineDescription) (\s :: Pipeline
s@Pipeline' {} Maybe Text
a -> Pipeline
s {$sel:pipelineDescription:Pipeline' :: Maybe Text
pipelineDescription = Maybe Text
a} :: Pipeline)

-- | The Amazon Resource Name (ARN) of the pipeline.
pipeline_pipelineArn :: Lens.Lens' Pipeline (Prelude.Maybe Prelude.Text)
pipeline_pipelineArn :: (Maybe Text -> f (Maybe Text)) -> Pipeline -> f Pipeline
pipeline_pipelineArn = (Pipeline -> Maybe Text)
-> (Pipeline -> Maybe Text -> Pipeline)
-> Lens Pipeline Pipeline (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Pipeline' {Maybe Text
pipelineArn :: Maybe Text
$sel:pipelineArn:Pipeline' :: Pipeline -> Maybe Text
pipelineArn} -> Maybe Text
pipelineArn) (\s :: Pipeline
s@Pipeline' {} Maybe Text
a -> Pipeline
s {$sel:pipelineArn:Pipeline' :: Maybe Text
pipelineArn = Maybe Text
a} :: Pipeline)

-- | Undocumented member.
pipeline_lastModifiedBy :: Lens.Lens' Pipeline (Prelude.Maybe UserContext)
pipeline_lastModifiedBy :: (Maybe UserContext -> f (Maybe UserContext))
-> Pipeline -> f Pipeline
pipeline_lastModifiedBy = (Pipeline -> Maybe UserContext)
-> (Pipeline -> Maybe UserContext -> Pipeline)
-> Lens Pipeline Pipeline (Maybe UserContext) (Maybe UserContext)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Pipeline' {Maybe UserContext
lastModifiedBy :: Maybe UserContext
$sel:lastModifiedBy:Pipeline' :: Pipeline -> Maybe UserContext
lastModifiedBy} -> Maybe UserContext
lastModifiedBy) (\s :: Pipeline
s@Pipeline' {} Maybe UserContext
a -> Pipeline
s {$sel:lastModifiedBy:Pipeline' :: Maybe UserContext
lastModifiedBy = Maybe UserContext
a} :: Pipeline)

-- | A list of tags that apply to the pipeline.
pipeline_tags :: Lens.Lens' Pipeline (Prelude.Maybe [Tag])
pipeline_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> Pipeline -> f Pipeline
pipeline_tags = (Pipeline -> Maybe [Tag])
-> (Pipeline -> Maybe [Tag] -> Pipeline)
-> Lens Pipeline Pipeline (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Pipeline' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:Pipeline' :: Pipeline -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: Pipeline
s@Pipeline' {} Maybe [Tag]
a -> Pipeline
s {$sel:tags:Pipeline' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: Pipeline) ((Maybe [Tag] -> f (Maybe [Tag])) -> Pipeline -> f Pipeline)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> Pipeline
-> f Pipeline
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resource Name (ARN) of the role that created the pipeline.
pipeline_roleArn :: Lens.Lens' Pipeline (Prelude.Maybe Prelude.Text)
pipeline_roleArn :: (Maybe Text -> f (Maybe Text)) -> Pipeline -> f Pipeline
pipeline_roleArn = (Pipeline -> Maybe Text)
-> (Pipeline -> Maybe Text -> Pipeline)
-> Lens Pipeline Pipeline (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Pipeline' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:Pipeline' :: Pipeline -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: Pipeline
s@Pipeline' {} Maybe Text
a -> Pipeline
s {$sel:roleArn:Pipeline' :: Maybe Text
roleArn = Maybe Text
a} :: Pipeline)

instance Core.FromJSON Pipeline where
  parseJSON :: Value -> Parser Pipeline
parseJSON =
    String -> (Object -> Parser Pipeline) -> Value -> Parser Pipeline
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Pipeline"
      ( \Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe UserContext
-> Maybe POSIX
-> Maybe POSIX
-> Maybe PipelineStatus
-> Maybe Text
-> Maybe Text
-> Maybe UserContext
-> Maybe [Tag]
-> Maybe Text
-> Pipeline
Pipeline'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe UserContext
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe PipelineStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe UserContext
 -> Maybe [Tag]
 -> Maybe Text
 -> Pipeline)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe PipelineStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe [Tag]
      -> Maybe Text
      -> Pipeline)
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 Text
   -> Maybe UserContext
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe PipelineStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe [Tag]
   -> Maybe Text
   -> Pipeline)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe UserContext
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe PipelineStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe [Tag]
      -> Maybe Text
      -> Pipeline)
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
"PipelineDisplayName")
            Parser
  (Maybe Text
   -> Maybe UserContext
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe PipelineStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe [Tag]
   -> Maybe Text
   -> Pipeline)
-> Parser (Maybe Text)
-> Parser
     (Maybe UserContext
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe PipelineStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe [Tag]
      -> Maybe Text
      -> Pipeline)
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
"PipelineName")
            Parser
  (Maybe UserContext
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe PipelineStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe [Tag]
   -> Maybe Text
   -> Pipeline)
-> Parser (Maybe UserContext)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe PipelineStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe [Tag]
      -> Maybe Text
      -> Pipeline)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe UserContext)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedBy")
            Parser
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe PipelineStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe [Tag]
   -> Maybe Text
   -> Pipeline)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe PipelineStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe [Tag]
      -> Maybe Text
      -> Pipeline)
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
"LastRunTime")
            Parser
  (Maybe POSIX
   -> Maybe PipelineStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe [Tag]
   -> Maybe Text
   -> Pipeline)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe PipelineStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe [Tag]
      -> Maybe Text
      -> Pipeline)
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
"LastModifiedTime")
            Parser
  (Maybe PipelineStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe [Tag]
   -> Maybe Text
   -> Pipeline)
-> Parser (Maybe PipelineStatus)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe [Tag]
      -> Maybe Text
      -> Pipeline)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PipelineStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PipelineStatus")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe [Tag]
   -> Maybe Text
   -> Pipeline)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe UserContext -> Maybe [Tag] -> Maybe Text -> Pipeline)
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
"PipelineDescription")
            Parser
  (Maybe Text
   -> Maybe UserContext -> Maybe [Tag] -> Maybe Text -> Pipeline)
-> Parser (Maybe Text)
-> Parser
     (Maybe UserContext -> Maybe [Tag] -> Maybe Text -> Pipeline)
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
"PipelineArn")
            Parser (Maybe UserContext -> Maybe [Tag] -> Maybe Text -> Pipeline)
-> Parser (Maybe UserContext)
-> Parser (Maybe [Tag] -> Maybe Text -> Pipeline)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe UserContext)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastModifiedBy")
            Parser (Maybe [Tag] -> Maybe Text -> Pipeline)
-> Parser (Maybe [Tag]) -> Parser (Maybe Text -> Pipeline)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Tags" Parser (Maybe (Maybe [Tag])) -> Maybe [Tag] -> Parser (Maybe [Tag])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe Text -> Pipeline)
-> Parser (Maybe Text) -> Parser Pipeline
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
"RoleArn")
      )

instance Prelude.Hashable Pipeline

instance Prelude.NFData Pipeline