{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.DescribeRecipe
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns the definition of a specific DataBrew recipe corresponding to a
-- particular version.
module Amazonka.DataBrew.DescribeRecipe
  ( -- * Creating a Request
    DescribeRecipe (..),
    newDescribeRecipe,

    -- * Request Lenses
    describeRecipe_recipeVersion,
    describeRecipe_name,

    -- * Destructuring the Response
    DescribeRecipeResponse (..),
    newDescribeRecipeResponse,

    -- * Response Lenses
    describeRecipeResponse_createDate,
    describeRecipeResponse_createdBy,
    describeRecipeResponse_description,
    describeRecipeResponse_lastModifiedBy,
    describeRecipeResponse_lastModifiedDate,
    describeRecipeResponse_projectName,
    describeRecipeResponse_publishedBy,
    describeRecipeResponse_publishedDate,
    describeRecipeResponse_recipeVersion,
    describeRecipeResponse_resourceArn,
    describeRecipeResponse_steps,
    describeRecipeResponse_tags,
    describeRecipeResponse_httpStatus,
    describeRecipeResponse_name,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DataBrew.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeRecipe' smart constructor.
data DescribeRecipe = DescribeRecipe'
  { -- | The recipe version identifier. If this parameter isn\'t specified, then
    -- the latest published version is returned.
    DescribeRecipe -> Maybe Text
recipeVersion :: Prelude.Maybe Prelude.Text,
    -- | The name of the recipe to be described.
    DescribeRecipe -> Text
name :: Prelude.Text
  }
  deriving (DescribeRecipe -> DescribeRecipe -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeRecipe -> DescribeRecipe -> Bool
$c/= :: DescribeRecipe -> DescribeRecipe -> Bool
== :: DescribeRecipe -> DescribeRecipe -> Bool
$c== :: DescribeRecipe -> DescribeRecipe -> Bool
Prelude.Eq, ReadPrec [DescribeRecipe]
ReadPrec DescribeRecipe
Int -> ReadS DescribeRecipe
ReadS [DescribeRecipe]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeRecipe]
$creadListPrec :: ReadPrec [DescribeRecipe]
readPrec :: ReadPrec DescribeRecipe
$creadPrec :: ReadPrec DescribeRecipe
readList :: ReadS [DescribeRecipe]
$creadList :: ReadS [DescribeRecipe]
readsPrec :: Int -> ReadS DescribeRecipe
$creadsPrec :: Int -> ReadS DescribeRecipe
Prelude.Read, Int -> DescribeRecipe -> ShowS
[DescribeRecipe] -> ShowS
DescribeRecipe -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeRecipe] -> ShowS
$cshowList :: [DescribeRecipe] -> ShowS
show :: DescribeRecipe -> String
$cshow :: DescribeRecipe -> String
showsPrec :: Int -> DescribeRecipe -> ShowS
$cshowsPrec :: Int -> DescribeRecipe -> ShowS
Prelude.Show, forall x. Rep DescribeRecipe x -> DescribeRecipe
forall x. DescribeRecipe -> Rep DescribeRecipe x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeRecipe x -> DescribeRecipe
$cfrom :: forall x. DescribeRecipe -> Rep DescribeRecipe x
Prelude.Generic)

-- |
-- Create a value of 'DescribeRecipe' 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:
--
-- 'recipeVersion', 'describeRecipe_recipeVersion' - The recipe version identifier. If this parameter isn\'t specified, then
-- the latest published version is returned.
--
-- 'name', 'describeRecipe_name' - The name of the recipe to be described.
newDescribeRecipe ::
  -- | 'name'
  Prelude.Text ->
  DescribeRecipe
newDescribeRecipe :: Text -> DescribeRecipe
newDescribeRecipe Text
pName_ =
  DescribeRecipe'
    { $sel:recipeVersion:DescribeRecipe' :: Maybe Text
recipeVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:name:DescribeRecipe' :: Text
name = Text
pName_
    }

-- | The recipe version identifier. If this parameter isn\'t specified, then
-- the latest published version is returned.
describeRecipe_recipeVersion :: Lens.Lens' DescribeRecipe (Prelude.Maybe Prelude.Text)
describeRecipe_recipeVersion :: Lens' DescribeRecipe (Maybe Text)
describeRecipe_recipeVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecipe' {Maybe Text
recipeVersion :: Maybe Text
$sel:recipeVersion:DescribeRecipe' :: DescribeRecipe -> Maybe Text
recipeVersion} -> Maybe Text
recipeVersion) (\s :: DescribeRecipe
s@DescribeRecipe' {} Maybe Text
a -> DescribeRecipe
s {$sel:recipeVersion:DescribeRecipe' :: Maybe Text
recipeVersion = Maybe Text
a} :: DescribeRecipe)

-- | The name of the recipe to be described.
describeRecipe_name :: Lens.Lens' DescribeRecipe Prelude.Text
describeRecipe_name :: Lens' DescribeRecipe Text
describeRecipe_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecipe' {Text
name :: Text
$sel:name:DescribeRecipe' :: DescribeRecipe -> Text
name} -> Text
name) (\s :: DescribeRecipe
s@DescribeRecipe' {} Text
a -> DescribeRecipe
s {$sel:name:DescribeRecipe' :: Text
name = Text
a} :: DescribeRecipe)

instance Core.AWSRequest DescribeRecipe where
  type
    AWSResponse DescribeRecipe =
      DescribeRecipeResponse
  request :: (Service -> Service) -> DescribeRecipe -> Request DescribeRecipe
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeRecipe
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeRecipe)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe [RecipeStep]
-> Maybe (HashMap Text Text)
-> Int
-> Text
-> DescribeRecipeResponse
DescribeRecipeResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"CreateDate")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"CreatedBy")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Description")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"LastModifiedBy")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"LastModifiedDate")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ProjectName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"PublishedBy")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"PublishedDate")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"RecipeVersion")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ResourceArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Steps" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"Name")
      )

instance Prelude.Hashable DescribeRecipe where
  hashWithSalt :: Int -> DescribeRecipe -> Int
hashWithSalt Int
_salt DescribeRecipe' {Maybe Text
Text
name :: Text
recipeVersion :: Maybe Text
$sel:name:DescribeRecipe' :: DescribeRecipe -> Text
$sel:recipeVersion:DescribeRecipe' :: DescribeRecipe -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
recipeVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name

instance Prelude.NFData DescribeRecipe where
  rnf :: DescribeRecipe -> ()
rnf DescribeRecipe' {Maybe Text
Text
name :: Text
recipeVersion :: Maybe Text
$sel:name:DescribeRecipe' :: DescribeRecipe -> Text
$sel:recipeVersion:DescribeRecipe' :: DescribeRecipe -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
recipeVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name

instance Data.ToHeaders DescribeRecipe where
  toHeaders :: DescribeRecipe -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToPath DescribeRecipe where
  toPath :: DescribeRecipe -> ByteString
toPath DescribeRecipe' {Maybe Text
Text
name :: Text
recipeVersion :: Maybe Text
$sel:name:DescribeRecipe' :: DescribeRecipe -> Text
$sel:recipeVersion:DescribeRecipe' :: DescribeRecipe -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/recipes/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
name]

instance Data.ToQuery DescribeRecipe where
  toQuery :: DescribeRecipe -> QueryString
toQuery DescribeRecipe' {Maybe Text
Text
name :: Text
recipeVersion :: Maybe Text
$sel:name:DescribeRecipe' :: DescribeRecipe -> Text
$sel:recipeVersion:DescribeRecipe' :: DescribeRecipe -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"recipeVersion" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
recipeVersion]

-- | /See:/ 'newDescribeRecipeResponse' smart constructor.
data DescribeRecipeResponse = DescribeRecipeResponse'
  { -- | The date and time that the recipe was created.
    DescribeRecipeResponse -> Maybe POSIX
createDate :: Prelude.Maybe Data.POSIX,
    -- | The identifier (user name) of the user who created the recipe.
    DescribeRecipeResponse -> Maybe Text
createdBy :: Prelude.Maybe Prelude.Text,
    -- | The description of the recipe.
    DescribeRecipeResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The identifier (user name) of the user who last modified the recipe.
    DescribeRecipeResponse -> Maybe Text
lastModifiedBy :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the recipe was last modified.
    DescribeRecipeResponse -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Data.POSIX,
    -- | The name of the project associated with this recipe.
    DescribeRecipeResponse -> Maybe Text
projectName :: Prelude.Maybe Prelude.Text,
    -- | The identifier (user name) of the user who last published the recipe.
    DescribeRecipeResponse -> Maybe Text
publishedBy :: Prelude.Maybe Prelude.Text,
    -- | The date and time when the recipe was last published.
    DescribeRecipeResponse -> Maybe POSIX
publishedDate :: Prelude.Maybe Data.POSIX,
    -- | The recipe version identifier.
    DescribeRecipeResponse -> Maybe Text
recipeVersion :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the recipe.
    DescribeRecipeResponse -> Maybe Text
resourceArn :: Prelude.Maybe Prelude.Text,
    -- | One or more steps to be performed by the recipe. Each step consists of
    -- an action, and the conditions under which the action should succeed.
    DescribeRecipeResponse -> Maybe [RecipeStep]
steps :: Prelude.Maybe [RecipeStep],
    -- | Metadata tags associated with this project.
    DescribeRecipeResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    DescribeRecipeResponse -> Int
httpStatus :: Prelude.Int,
    -- | The name of the recipe.
    DescribeRecipeResponse -> Text
name :: Prelude.Text
  }
  deriving (DescribeRecipeResponse -> DescribeRecipeResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeRecipeResponse -> DescribeRecipeResponse -> Bool
$c/= :: DescribeRecipeResponse -> DescribeRecipeResponse -> Bool
== :: DescribeRecipeResponse -> DescribeRecipeResponse -> Bool
$c== :: DescribeRecipeResponse -> DescribeRecipeResponse -> Bool
Prelude.Eq, ReadPrec [DescribeRecipeResponse]
ReadPrec DescribeRecipeResponse
Int -> ReadS DescribeRecipeResponse
ReadS [DescribeRecipeResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeRecipeResponse]
$creadListPrec :: ReadPrec [DescribeRecipeResponse]
readPrec :: ReadPrec DescribeRecipeResponse
$creadPrec :: ReadPrec DescribeRecipeResponse
readList :: ReadS [DescribeRecipeResponse]
$creadList :: ReadS [DescribeRecipeResponse]
readsPrec :: Int -> ReadS DescribeRecipeResponse
$creadsPrec :: Int -> ReadS DescribeRecipeResponse
Prelude.Read, Int -> DescribeRecipeResponse -> ShowS
[DescribeRecipeResponse] -> ShowS
DescribeRecipeResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeRecipeResponse] -> ShowS
$cshowList :: [DescribeRecipeResponse] -> ShowS
show :: DescribeRecipeResponse -> String
$cshow :: DescribeRecipeResponse -> String
showsPrec :: Int -> DescribeRecipeResponse -> ShowS
$cshowsPrec :: Int -> DescribeRecipeResponse -> ShowS
Prelude.Show, forall x. Rep DescribeRecipeResponse x -> DescribeRecipeResponse
forall x. DescribeRecipeResponse -> Rep DescribeRecipeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeRecipeResponse x -> DescribeRecipeResponse
$cfrom :: forall x. DescribeRecipeResponse -> Rep DescribeRecipeResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeRecipeResponse' 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:
--
-- 'createDate', 'describeRecipeResponse_createDate' - The date and time that the recipe was created.
--
-- 'createdBy', 'describeRecipeResponse_createdBy' - The identifier (user name) of the user who created the recipe.
--
-- 'description', 'describeRecipeResponse_description' - The description of the recipe.
--
-- 'lastModifiedBy', 'describeRecipeResponse_lastModifiedBy' - The identifier (user name) of the user who last modified the recipe.
--
-- 'lastModifiedDate', 'describeRecipeResponse_lastModifiedDate' - The date and time that the recipe was last modified.
--
-- 'projectName', 'describeRecipeResponse_projectName' - The name of the project associated with this recipe.
--
-- 'publishedBy', 'describeRecipeResponse_publishedBy' - The identifier (user name) of the user who last published the recipe.
--
-- 'publishedDate', 'describeRecipeResponse_publishedDate' - The date and time when the recipe was last published.
--
-- 'recipeVersion', 'describeRecipeResponse_recipeVersion' - The recipe version identifier.
--
-- 'resourceArn', 'describeRecipeResponse_resourceArn' - The ARN of the recipe.
--
-- 'steps', 'describeRecipeResponse_steps' - One or more steps to be performed by the recipe. Each step consists of
-- an action, and the conditions under which the action should succeed.
--
-- 'tags', 'describeRecipeResponse_tags' - Metadata tags associated with this project.
--
-- 'httpStatus', 'describeRecipeResponse_httpStatus' - The response's http status code.
--
-- 'name', 'describeRecipeResponse_name' - The name of the recipe.
newDescribeRecipeResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'name'
  Prelude.Text ->
  DescribeRecipeResponse
newDescribeRecipeResponse :: Int -> Text -> DescribeRecipeResponse
newDescribeRecipeResponse Int
pHttpStatus_ Text
pName_ =
  DescribeRecipeResponse'
    { $sel:createDate:DescribeRecipeResponse' :: Maybe POSIX
createDate =
        forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:DescribeRecipeResponse' :: Maybe Text
createdBy = forall a. Maybe a
Prelude.Nothing,
      $sel:description:DescribeRecipeResponse' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedBy:DescribeRecipeResponse' :: Maybe Text
lastModifiedBy = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedDate:DescribeRecipeResponse' :: Maybe POSIX
lastModifiedDate = forall a. Maybe a
Prelude.Nothing,
      $sel:projectName:DescribeRecipeResponse' :: Maybe Text
projectName = forall a. Maybe a
Prelude.Nothing,
      $sel:publishedBy:DescribeRecipeResponse' :: Maybe Text
publishedBy = forall a. Maybe a
Prelude.Nothing,
      $sel:publishedDate:DescribeRecipeResponse' :: Maybe POSIX
publishedDate = forall a. Maybe a
Prelude.Nothing,
      $sel:recipeVersion:DescribeRecipeResponse' :: Maybe Text
recipeVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:resourceArn:DescribeRecipeResponse' :: Maybe Text
resourceArn = forall a. Maybe a
Prelude.Nothing,
      $sel:steps:DescribeRecipeResponse' :: Maybe [RecipeStep]
steps = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:DescribeRecipeResponse' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeRecipeResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:name:DescribeRecipeResponse' :: Text
name = Text
pName_
    }

-- | The date and time that the recipe was created.
describeRecipeResponse_createDate :: Lens.Lens' DescribeRecipeResponse (Prelude.Maybe Prelude.UTCTime)
describeRecipeResponse_createDate :: Lens' DescribeRecipeResponse (Maybe UTCTime)
describeRecipeResponse_createDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecipeResponse' {Maybe POSIX
createDate :: Maybe POSIX
$sel:createDate:DescribeRecipeResponse' :: DescribeRecipeResponse -> Maybe POSIX
createDate} -> Maybe POSIX
createDate) (\s :: DescribeRecipeResponse
s@DescribeRecipeResponse' {} Maybe POSIX
a -> DescribeRecipeResponse
s {$sel:createDate:DescribeRecipeResponse' :: Maybe POSIX
createDate = Maybe POSIX
a} :: DescribeRecipeResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The identifier (user name) of the user who created the recipe.
describeRecipeResponse_createdBy :: Lens.Lens' DescribeRecipeResponse (Prelude.Maybe Prelude.Text)
describeRecipeResponse_createdBy :: Lens' DescribeRecipeResponse (Maybe Text)
describeRecipeResponse_createdBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecipeResponse' {Maybe Text
createdBy :: Maybe Text
$sel:createdBy:DescribeRecipeResponse' :: DescribeRecipeResponse -> Maybe Text
createdBy} -> Maybe Text
createdBy) (\s :: DescribeRecipeResponse
s@DescribeRecipeResponse' {} Maybe Text
a -> DescribeRecipeResponse
s {$sel:createdBy:DescribeRecipeResponse' :: Maybe Text
createdBy = Maybe Text
a} :: DescribeRecipeResponse)

-- | The description of the recipe.
describeRecipeResponse_description :: Lens.Lens' DescribeRecipeResponse (Prelude.Maybe Prelude.Text)
describeRecipeResponse_description :: Lens' DescribeRecipeResponse (Maybe Text)
describeRecipeResponse_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecipeResponse' {Maybe Text
description :: Maybe Text
$sel:description:DescribeRecipeResponse' :: DescribeRecipeResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: DescribeRecipeResponse
s@DescribeRecipeResponse' {} Maybe Text
a -> DescribeRecipeResponse
s {$sel:description:DescribeRecipeResponse' :: Maybe Text
description = Maybe Text
a} :: DescribeRecipeResponse)

-- | The identifier (user name) of the user who last modified the recipe.
describeRecipeResponse_lastModifiedBy :: Lens.Lens' DescribeRecipeResponse (Prelude.Maybe Prelude.Text)
describeRecipeResponse_lastModifiedBy :: Lens' DescribeRecipeResponse (Maybe Text)
describeRecipeResponse_lastModifiedBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecipeResponse' {Maybe Text
lastModifiedBy :: Maybe Text
$sel:lastModifiedBy:DescribeRecipeResponse' :: DescribeRecipeResponse -> Maybe Text
lastModifiedBy} -> Maybe Text
lastModifiedBy) (\s :: DescribeRecipeResponse
s@DescribeRecipeResponse' {} Maybe Text
a -> DescribeRecipeResponse
s {$sel:lastModifiedBy:DescribeRecipeResponse' :: Maybe Text
lastModifiedBy = Maybe Text
a} :: DescribeRecipeResponse)

-- | The date and time that the recipe was last modified.
describeRecipeResponse_lastModifiedDate :: Lens.Lens' DescribeRecipeResponse (Prelude.Maybe Prelude.UTCTime)
describeRecipeResponse_lastModifiedDate :: Lens' DescribeRecipeResponse (Maybe UTCTime)
describeRecipeResponse_lastModifiedDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecipeResponse' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:DescribeRecipeResponse' :: DescribeRecipeResponse -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: DescribeRecipeResponse
s@DescribeRecipeResponse' {} Maybe POSIX
a -> DescribeRecipeResponse
s {$sel:lastModifiedDate:DescribeRecipeResponse' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: DescribeRecipeResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The name of the project associated with this recipe.
describeRecipeResponse_projectName :: Lens.Lens' DescribeRecipeResponse (Prelude.Maybe Prelude.Text)
describeRecipeResponse_projectName :: Lens' DescribeRecipeResponse (Maybe Text)
describeRecipeResponse_projectName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecipeResponse' {Maybe Text
projectName :: Maybe Text
$sel:projectName:DescribeRecipeResponse' :: DescribeRecipeResponse -> Maybe Text
projectName} -> Maybe Text
projectName) (\s :: DescribeRecipeResponse
s@DescribeRecipeResponse' {} Maybe Text
a -> DescribeRecipeResponse
s {$sel:projectName:DescribeRecipeResponse' :: Maybe Text
projectName = Maybe Text
a} :: DescribeRecipeResponse)

-- | The identifier (user name) of the user who last published the recipe.
describeRecipeResponse_publishedBy :: Lens.Lens' DescribeRecipeResponse (Prelude.Maybe Prelude.Text)
describeRecipeResponse_publishedBy :: Lens' DescribeRecipeResponse (Maybe Text)
describeRecipeResponse_publishedBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecipeResponse' {Maybe Text
publishedBy :: Maybe Text
$sel:publishedBy:DescribeRecipeResponse' :: DescribeRecipeResponse -> Maybe Text
publishedBy} -> Maybe Text
publishedBy) (\s :: DescribeRecipeResponse
s@DescribeRecipeResponse' {} Maybe Text
a -> DescribeRecipeResponse
s {$sel:publishedBy:DescribeRecipeResponse' :: Maybe Text
publishedBy = Maybe Text
a} :: DescribeRecipeResponse)

-- | The date and time when the recipe was last published.
describeRecipeResponse_publishedDate :: Lens.Lens' DescribeRecipeResponse (Prelude.Maybe Prelude.UTCTime)
describeRecipeResponse_publishedDate :: Lens' DescribeRecipeResponse (Maybe UTCTime)
describeRecipeResponse_publishedDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecipeResponse' {Maybe POSIX
publishedDate :: Maybe POSIX
$sel:publishedDate:DescribeRecipeResponse' :: DescribeRecipeResponse -> Maybe POSIX
publishedDate} -> Maybe POSIX
publishedDate) (\s :: DescribeRecipeResponse
s@DescribeRecipeResponse' {} Maybe POSIX
a -> DescribeRecipeResponse
s {$sel:publishedDate:DescribeRecipeResponse' :: Maybe POSIX
publishedDate = Maybe POSIX
a} :: DescribeRecipeResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The recipe version identifier.
describeRecipeResponse_recipeVersion :: Lens.Lens' DescribeRecipeResponse (Prelude.Maybe Prelude.Text)
describeRecipeResponse_recipeVersion :: Lens' DescribeRecipeResponse (Maybe Text)
describeRecipeResponse_recipeVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecipeResponse' {Maybe Text
recipeVersion :: Maybe Text
$sel:recipeVersion:DescribeRecipeResponse' :: DescribeRecipeResponse -> Maybe Text
recipeVersion} -> Maybe Text
recipeVersion) (\s :: DescribeRecipeResponse
s@DescribeRecipeResponse' {} Maybe Text
a -> DescribeRecipeResponse
s {$sel:recipeVersion:DescribeRecipeResponse' :: Maybe Text
recipeVersion = Maybe Text
a} :: DescribeRecipeResponse)

-- | The ARN of the recipe.
describeRecipeResponse_resourceArn :: Lens.Lens' DescribeRecipeResponse (Prelude.Maybe Prelude.Text)
describeRecipeResponse_resourceArn :: Lens' DescribeRecipeResponse (Maybe Text)
describeRecipeResponse_resourceArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecipeResponse' {Maybe Text
resourceArn :: Maybe Text
$sel:resourceArn:DescribeRecipeResponse' :: DescribeRecipeResponse -> Maybe Text
resourceArn} -> Maybe Text
resourceArn) (\s :: DescribeRecipeResponse
s@DescribeRecipeResponse' {} Maybe Text
a -> DescribeRecipeResponse
s {$sel:resourceArn:DescribeRecipeResponse' :: Maybe Text
resourceArn = Maybe Text
a} :: DescribeRecipeResponse)

-- | One or more steps to be performed by the recipe. Each step consists of
-- an action, and the conditions under which the action should succeed.
describeRecipeResponse_steps :: Lens.Lens' DescribeRecipeResponse (Prelude.Maybe [RecipeStep])
describeRecipeResponse_steps :: Lens' DescribeRecipeResponse (Maybe [RecipeStep])
describeRecipeResponse_steps = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecipeResponse' {Maybe [RecipeStep]
steps :: Maybe [RecipeStep]
$sel:steps:DescribeRecipeResponse' :: DescribeRecipeResponse -> Maybe [RecipeStep]
steps} -> Maybe [RecipeStep]
steps) (\s :: DescribeRecipeResponse
s@DescribeRecipeResponse' {} Maybe [RecipeStep]
a -> DescribeRecipeResponse
s {$sel:steps:DescribeRecipeResponse' :: Maybe [RecipeStep]
steps = Maybe [RecipeStep]
a} :: DescribeRecipeResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Metadata tags associated with this project.
describeRecipeResponse_tags :: Lens.Lens' DescribeRecipeResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describeRecipeResponse_tags :: Lens' DescribeRecipeResponse (Maybe (HashMap Text Text))
describeRecipeResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecipeResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:DescribeRecipeResponse' :: DescribeRecipeResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: DescribeRecipeResponse
s@DescribeRecipeResponse' {} Maybe (HashMap Text Text)
a -> DescribeRecipeResponse
s {$sel:tags:DescribeRecipeResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: DescribeRecipeResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
describeRecipeResponse_httpStatus :: Lens.Lens' DescribeRecipeResponse Prelude.Int
describeRecipeResponse_httpStatus :: Lens' DescribeRecipeResponse Int
describeRecipeResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecipeResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeRecipeResponse' :: DescribeRecipeResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeRecipeResponse
s@DescribeRecipeResponse' {} Int
a -> DescribeRecipeResponse
s {$sel:httpStatus:DescribeRecipeResponse' :: Int
httpStatus = Int
a} :: DescribeRecipeResponse)

-- | The name of the recipe.
describeRecipeResponse_name :: Lens.Lens' DescribeRecipeResponse Prelude.Text
describeRecipeResponse_name :: Lens' DescribeRecipeResponse Text
describeRecipeResponse_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecipeResponse' {Text
name :: Text
$sel:name:DescribeRecipeResponse' :: DescribeRecipeResponse -> Text
name} -> Text
name) (\s :: DescribeRecipeResponse
s@DescribeRecipeResponse' {} Text
a -> DescribeRecipeResponse
s {$sel:name:DescribeRecipeResponse' :: Text
name = Text
a} :: DescribeRecipeResponse)

instance Prelude.NFData DescribeRecipeResponse where
  rnf :: DescribeRecipeResponse -> ()
rnf DescribeRecipeResponse' {Int
Maybe [RecipeStep]
Maybe Text
Maybe (HashMap Text Text)
Maybe POSIX
Text
name :: Text
httpStatus :: Int
tags :: Maybe (HashMap Text Text)
steps :: Maybe [RecipeStep]
resourceArn :: Maybe Text
recipeVersion :: Maybe Text
publishedDate :: Maybe POSIX
publishedBy :: Maybe Text
projectName :: Maybe Text
lastModifiedDate :: Maybe POSIX
lastModifiedBy :: Maybe Text
description :: Maybe Text
createdBy :: Maybe Text
createDate :: Maybe POSIX
$sel:name:DescribeRecipeResponse' :: DescribeRecipeResponse -> Text
$sel:httpStatus:DescribeRecipeResponse' :: DescribeRecipeResponse -> Int
$sel:tags:DescribeRecipeResponse' :: DescribeRecipeResponse -> Maybe (HashMap Text Text)
$sel:steps:DescribeRecipeResponse' :: DescribeRecipeResponse -> Maybe [RecipeStep]
$sel:resourceArn:DescribeRecipeResponse' :: DescribeRecipeResponse -> Maybe Text
$sel:recipeVersion:DescribeRecipeResponse' :: DescribeRecipeResponse -> Maybe Text
$sel:publishedDate:DescribeRecipeResponse' :: DescribeRecipeResponse -> Maybe POSIX
$sel:publishedBy:DescribeRecipeResponse' :: DescribeRecipeResponse -> Maybe Text
$sel:projectName:DescribeRecipeResponse' :: DescribeRecipeResponse -> Maybe Text
$sel:lastModifiedDate:DescribeRecipeResponse' :: DescribeRecipeResponse -> Maybe POSIX
$sel:lastModifiedBy:DescribeRecipeResponse' :: DescribeRecipeResponse -> Maybe Text
$sel:description:DescribeRecipeResponse' :: DescribeRecipeResponse -> Maybe Text
$sel:createdBy:DescribeRecipeResponse' :: DescribeRecipeResponse -> Maybe Text
$sel:createDate:DescribeRecipeResponse' :: DescribeRecipeResponse -> Maybe POSIX
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
createdBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lastModifiedBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastModifiedDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
projectName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
publishedBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
publishedDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
recipeVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [RecipeStep]
steps
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name