{-# 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.DataBrew.Types.Project
-- 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.DataBrew.Types.Project where

import qualified Amazonka.Core as Core
import Amazonka.DataBrew.Types.Sample
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Represents all of the attributes of a DataBrew project.
--
-- /See:/ 'newProject' smart constructor.
data Project = Project'
  { -- | The last modification date and time for the project.
    Project -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Core.POSIX,
    -- | The date and time when the project was opened.
    Project -> Maybe POSIX
openDate :: Prelude.Maybe Core.POSIX,
    -- | The date and time that the project was created.
    Project -> Maybe POSIX
createDate :: Prelude.Maybe Core.POSIX,
    -- | The Amazon Resource Name (ARN) of the user who crated the project.
    Project -> Maybe Text
createdBy :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Amazon Web Services account that owns the project.
    Project -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) for the project.
    Project -> Maybe Text
resourceArn :: Prelude.Maybe Prelude.Text,
    -- | The dataset that the project is to act upon.
    Project -> Maybe Text
datasetName :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the user who last modified the
    -- project.
    Project -> Maybe Text
lastModifiedBy :: Prelude.Maybe Prelude.Text,
    -- | The sample size and sampling type to apply to the data. If this
    -- parameter isn\'t specified, then the sample consists of the first 500
    -- rows from the dataset.
    Project -> Maybe Sample
sample :: Prelude.Maybe Sample,
    -- | The Amazon Resource Name (ARN) of the user that opened the project for
    -- use.
    Project -> Maybe Text
openedBy :: Prelude.Maybe Prelude.Text,
    -- | Metadata tags that have been applied to the project.
    Project -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The Amazon Resource Name (ARN) of the role that will be assumed for this
    -- project.
    Project -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
    -- | The unique name of a project.
    Project -> Text
name :: Prelude.Text,
    -- | The name of a recipe that will be developed during a project session.
    Project -> Text
recipeName :: Prelude.Text
  }
  deriving (Project -> Project -> Bool
(Project -> Project -> Bool)
-> (Project -> Project -> Bool) -> Eq Project
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Project -> Project -> Bool
$c/= :: Project -> Project -> Bool
== :: Project -> Project -> Bool
$c== :: Project -> Project -> Bool
Prelude.Eq, ReadPrec [Project]
ReadPrec Project
Int -> ReadS Project
ReadS [Project]
(Int -> ReadS Project)
-> ReadS [Project]
-> ReadPrec Project
-> ReadPrec [Project]
-> Read Project
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Project]
$creadListPrec :: ReadPrec [Project]
readPrec :: ReadPrec Project
$creadPrec :: ReadPrec Project
readList :: ReadS [Project]
$creadList :: ReadS [Project]
readsPrec :: Int -> ReadS Project
$creadsPrec :: Int -> ReadS Project
Prelude.Read, Int -> Project -> ShowS
[Project] -> ShowS
Project -> String
(Int -> Project -> ShowS)
-> (Project -> String) -> ([Project] -> ShowS) -> Show Project
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Project] -> ShowS
$cshowList :: [Project] -> ShowS
show :: Project -> String
$cshow :: Project -> String
showsPrec :: Int -> Project -> ShowS
$cshowsPrec :: Int -> Project -> ShowS
Prelude.Show, (forall x. Project -> Rep Project x)
-> (forall x. Rep Project x -> Project) -> Generic Project
forall x. Rep Project x -> Project
forall x. Project -> Rep Project x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Project x -> Project
$cfrom :: forall x. Project -> Rep Project x
Prelude.Generic)

-- |
-- Create a value of 'Project' 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:
--
-- 'lastModifiedDate', 'project_lastModifiedDate' - The last modification date and time for the project.
--
-- 'openDate', 'project_openDate' - The date and time when the project was opened.
--
-- 'createDate', 'project_createDate' - The date and time that the project was created.
--
-- 'createdBy', 'project_createdBy' - The Amazon Resource Name (ARN) of the user who crated the project.
--
-- 'accountId', 'project_accountId' - The ID of the Amazon Web Services account that owns the project.
--
-- 'resourceArn', 'project_resourceArn' - The Amazon Resource Name (ARN) for the project.
--
-- 'datasetName', 'project_datasetName' - The dataset that the project is to act upon.
--
-- 'lastModifiedBy', 'project_lastModifiedBy' - The Amazon Resource Name (ARN) of the user who last modified the
-- project.
--
-- 'sample', 'project_sample' - The sample size and sampling type to apply to the data. If this
-- parameter isn\'t specified, then the sample consists of the first 500
-- rows from the dataset.
--
-- 'openedBy', 'project_openedBy' - The Amazon Resource Name (ARN) of the user that opened the project for
-- use.
--
-- 'tags', 'project_tags' - Metadata tags that have been applied to the project.
--
-- 'roleArn', 'project_roleArn' - The Amazon Resource Name (ARN) of the role that will be assumed for this
-- project.
--
-- 'name', 'project_name' - The unique name of a project.
--
-- 'recipeName', 'project_recipeName' - The name of a recipe that will be developed during a project session.
newProject ::
  -- | 'name'
  Prelude.Text ->
  -- | 'recipeName'
  Prelude.Text ->
  Project
newProject :: Text -> Text -> Project
newProject Text
pName_ Text
pRecipeName_ =
  Project' :: Maybe POSIX
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Sample
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Text
-> Text
-> Project
Project'
    { $sel:lastModifiedDate:Project' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:openDate:Project' :: Maybe POSIX
openDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createDate:Project' :: Maybe POSIX
createDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:Project' :: Maybe Text
createdBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:accountId:Project' :: Maybe Text
accountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceArn:Project' :: Maybe Text
resourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:datasetName:Project' :: Maybe Text
datasetName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedBy:Project' :: Maybe Text
lastModifiedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sample:Project' :: Maybe Sample
sample = Maybe Sample
forall a. Maybe a
Prelude.Nothing,
      $sel:openedBy:Project' :: Maybe Text
openedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Project' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:Project' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Project' :: Text
name = Text
pName_,
      $sel:recipeName:Project' :: Text
recipeName = Text
pRecipeName_
    }

-- | The last modification date and time for the project.
project_lastModifiedDate :: Lens.Lens' Project (Prelude.Maybe Prelude.UTCTime)
project_lastModifiedDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Project -> f Project
project_lastModifiedDate = (Project -> Maybe POSIX)
-> (Project -> Maybe POSIX -> Project)
-> Lens Project Project (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Project' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:Project' :: Project -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: Project
s@Project' {} Maybe POSIX
a -> Project
s {$sel:lastModifiedDate:Project' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: Project) ((Maybe POSIX -> f (Maybe POSIX)) -> Project -> f Project)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Project
-> f Project
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 date and time when the project was opened.
project_openDate :: Lens.Lens' Project (Prelude.Maybe Prelude.UTCTime)
project_openDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Project -> f Project
project_openDate = (Project -> Maybe POSIX)
-> (Project -> Maybe POSIX -> Project)
-> Lens Project Project (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Project' {Maybe POSIX
openDate :: Maybe POSIX
$sel:openDate:Project' :: Project -> Maybe POSIX
openDate} -> Maybe POSIX
openDate) (\s :: Project
s@Project' {} Maybe POSIX
a -> Project
s {$sel:openDate:Project' :: Maybe POSIX
openDate = Maybe POSIX
a} :: Project) ((Maybe POSIX -> f (Maybe POSIX)) -> Project -> f Project)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Project
-> f Project
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 date and time that the project was created.
project_createDate :: Lens.Lens' Project (Prelude.Maybe Prelude.UTCTime)
project_createDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Project -> f Project
project_createDate = (Project -> Maybe POSIX)
-> (Project -> Maybe POSIX -> Project)
-> Lens Project Project (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Project' {Maybe POSIX
createDate :: Maybe POSIX
$sel:createDate:Project' :: Project -> Maybe POSIX
createDate} -> Maybe POSIX
createDate) (\s :: Project
s@Project' {} Maybe POSIX
a -> Project
s {$sel:createDate:Project' :: Maybe POSIX
createDate = Maybe POSIX
a} :: Project) ((Maybe POSIX -> f (Maybe POSIX)) -> Project -> f Project)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Project
-> f Project
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 Amazon Resource Name (ARN) of the user who crated the project.
project_createdBy :: Lens.Lens' Project (Prelude.Maybe Prelude.Text)
project_createdBy :: (Maybe Text -> f (Maybe Text)) -> Project -> f Project
project_createdBy = (Project -> Maybe Text)
-> (Project -> Maybe Text -> Project)
-> Lens Project Project (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Project' {Maybe Text
createdBy :: Maybe Text
$sel:createdBy:Project' :: Project -> Maybe Text
createdBy} -> Maybe Text
createdBy) (\s :: Project
s@Project' {} Maybe Text
a -> Project
s {$sel:createdBy:Project' :: Maybe Text
createdBy = Maybe Text
a} :: Project)

-- | The ID of the Amazon Web Services account that owns the project.
project_accountId :: Lens.Lens' Project (Prelude.Maybe Prelude.Text)
project_accountId :: (Maybe Text -> f (Maybe Text)) -> Project -> f Project
project_accountId = (Project -> Maybe Text)
-> (Project -> Maybe Text -> Project)
-> Lens Project Project (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Project' {Maybe Text
accountId :: Maybe Text
$sel:accountId:Project' :: Project -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: Project
s@Project' {} Maybe Text
a -> Project
s {$sel:accountId:Project' :: Maybe Text
accountId = Maybe Text
a} :: Project)

-- | The Amazon Resource Name (ARN) for the project.
project_resourceArn :: Lens.Lens' Project (Prelude.Maybe Prelude.Text)
project_resourceArn :: (Maybe Text -> f (Maybe Text)) -> Project -> f Project
project_resourceArn = (Project -> Maybe Text)
-> (Project -> Maybe Text -> Project)
-> Lens Project Project (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Project' {Maybe Text
resourceArn :: Maybe Text
$sel:resourceArn:Project' :: Project -> Maybe Text
resourceArn} -> Maybe Text
resourceArn) (\s :: Project
s@Project' {} Maybe Text
a -> Project
s {$sel:resourceArn:Project' :: Maybe Text
resourceArn = Maybe Text
a} :: Project)

-- | The dataset that the project is to act upon.
project_datasetName :: Lens.Lens' Project (Prelude.Maybe Prelude.Text)
project_datasetName :: (Maybe Text -> f (Maybe Text)) -> Project -> f Project
project_datasetName = (Project -> Maybe Text)
-> (Project -> Maybe Text -> Project)
-> Lens Project Project (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Project' {Maybe Text
datasetName :: Maybe Text
$sel:datasetName:Project' :: Project -> Maybe Text
datasetName} -> Maybe Text
datasetName) (\s :: Project
s@Project' {} Maybe Text
a -> Project
s {$sel:datasetName:Project' :: Maybe Text
datasetName = Maybe Text
a} :: Project)

-- | The Amazon Resource Name (ARN) of the user who last modified the
-- project.
project_lastModifiedBy :: Lens.Lens' Project (Prelude.Maybe Prelude.Text)
project_lastModifiedBy :: (Maybe Text -> f (Maybe Text)) -> Project -> f Project
project_lastModifiedBy = (Project -> Maybe Text)
-> (Project -> Maybe Text -> Project)
-> Lens Project Project (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Project' {Maybe Text
lastModifiedBy :: Maybe Text
$sel:lastModifiedBy:Project' :: Project -> Maybe Text
lastModifiedBy} -> Maybe Text
lastModifiedBy) (\s :: Project
s@Project' {} Maybe Text
a -> Project
s {$sel:lastModifiedBy:Project' :: Maybe Text
lastModifiedBy = Maybe Text
a} :: Project)

-- | The sample size and sampling type to apply to the data. If this
-- parameter isn\'t specified, then the sample consists of the first 500
-- rows from the dataset.
project_sample :: Lens.Lens' Project (Prelude.Maybe Sample)
project_sample :: (Maybe Sample -> f (Maybe Sample)) -> Project -> f Project
project_sample = (Project -> Maybe Sample)
-> (Project -> Maybe Sample -> Project)
-> Lens Project Project (Maybe Sample) (Maybe Sample)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Project' {Maybe Sample
sample :: Maybe Sample
$sel:sample:Project' :: Project -> Maybe Sample
sample} -> Maybe Sample
sample) (\s :: Project
s@Project' {} Maybe Sample
a -> Project
s {$sel:sample:Project' :: Maybe Sample
sample = Maybe Sample
a} :: Project)

-- | The Amazon Resource Name (ARN) of the user that opened the project for
-- use.
project_openedBy :: Lens.Lens' Project (Prelude.Maybe Prelude.Text)
project_openedBy :: (Maybe Text -> f (Maybe Text)) -> Project -> f Project
project_openedBy = (Project -> Maybe Text)
-> (Project -> Maybe Text -> Project)
-> Lens Project Project (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Project' {Maybe Text
openedBy :: Maybe Text
$sel:openedBy:Project' :: Project -> Maybe Text
openedBy} -> Maybe Text
openedBy) (\s :: Project
s@Project' {} Maybe Text
a -> Project
s {$sel:openedBy:Project' :: Maybe Text
openedBy = Maybe Text
a} :: Project)

-- | Metadata tags that have been applied to the project.
project_tags :: Lens.Lens' Project (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
project_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Project -> f Project
project_tags = (Project -> Maybe (HashMap Text Text))
-> (Project -> Maybe (HashMap Text Text) -> Project)
-> Lens
     Project
     Project
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Project' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:Project' :: Project -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: Project
s@Project' {} Maybe (HashMap Text Text)
a -> Project
s {$sel:tags:Project' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: Project) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> Project -> f Project)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Project
-> f Project
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
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 will be assumed for this
-- project.
project_roleArn :: Lens.Lens' Project (Prelude.Maybe Prelude.Text)
project_roleArn :: (Maybe Text -> f (Maybe Text)) -> Project -> f Project
project_roleArn = (Project -> Maybe Text)
-> (Project -> Maybe Text -> Project)
-> Lens Project Project (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Project' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:Project' :: Project -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: Project
s@Project' {} Maybe Text
a -> Project
s {$sel:roleArn:Project' :: Maybe Text
roleArn = Maybe Text
a} :: Project)

-- | The unique name of a project.
project_name :: Lens.Lens' Project Prelude.Text
project_name :: (Text -> f Text) -> Project -> f Project
project_name = (Project -> Text)
-> (Project -> Text -> Project) -> Lens Project Project Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Project' {Text
name :: Text
$sel:name:Project' :: Project -> Text
name} -> Text
name) (\s :: Project
s@Project' {} Text
a -> Project
s {$sel:name:Project' :: Text
name = Text
a} :: Project)

-- | The name of a recipe that will be developed during a project session.
project_recipeName :: Lens.Lens' Project Prelude.Text
project_recipeName :: (Text -> f Text) -> Project -> f Project
project_recipeName = (Project -> Text)
-> (Project -> Text -> Project) -> Lens Project Project Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Project' {Text
recipeName :: Text
$sel:recipeName:Project' :: Project -> Text
recipeName} -> Text
recipeName) (\s :: Project
s@Project' {} Text
a -> Project
s {$sel:recipeName:Project' :: Text
recipeName = Text
a} :: Project)

instance Core.FromJSON Project where
  parseJSON :: Value -> Parser Project
parseJSON =
    String -> (Object -> Parser Project) -> Value -> Parser Project
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Project"
      ( \Object
x ->
          Maybe POSIX
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Sample
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Text
-> Text
-> Project
Project'
            (Maybe POSIX
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Sample
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe Text
 -> Text
 -> Text
 -> Project)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Sample
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Text
      -> Text
      -> Project)
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
"LastModifiedDate")
            Parser
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Sample
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Text
   -> Text
   -> Project)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Sample
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Text
      -> Text
      -> Project)
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
"OpenDate")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Sample
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Text
   -> Text
   -> Project)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Sample
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Text
      -> Text
      -> Project)
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
"CreateDate")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Sample
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Text
   -> Text
   -> Project)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Sample
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Text
      -> Text
      -> Project)
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
"CreatedBy")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Sample
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Text
   -> Text
   -> Project)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Sample
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Text
      -> Text
      -> Project)
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
   -> Maybe Text
   -> Maybe Text
   -> Maybe Sample
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Text
   -> Text
   -> Project)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Sample
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Text
      -> Text
      -> Project)
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
"ResourceArn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Sample
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Text
   -> Text
   -> Project)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Sample
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Text
      -> Text
      -> Project)
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
"DatasetName")
            Parser
  (Maybe Text
   -> Maybe Sample
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Text
   -> Text
   -> Project)
-> Parser (Maybe Text)
-> Parser
     (Maybe Sample
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Text
      -> Text
      -> Project)
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
"LastModifiedBy")
            Parser
  (Maybe Sample
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Text
   -> Text
   -> Project)
-> Parser (Maybe Sample)
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Text
      -> Text
      -> Project)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Sample)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Sample")
            Parser
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Text
   -> Text
   -> Project)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe Text -> Text -> Text -> Project)
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
"OpenedBy")
            Parser
  (Maybe (HashMap Text Text)
   -> Maybe Text -> Text -> Text -> Project)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Maybe Text -> Text -> Text -> Project)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe Text -> Text -> Text -> Project)
-> Parser (Maybe Text) -> Parser (Text -> Text -> Project)
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")
            Parser (Text -> Text -> Project)
-> Parser Text -> Parser (Text -> Project)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Name")
            Parser (Text -> Project) -> Parser Text -> Parser Project
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"RecipeName")
      )

instance Prelude.Hashable Project

instance Prelude.NFData Project