{-# 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.Glue.Types.BlueprintDetails
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Glue.Types.BlueprintDetails where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | The details of a blueprint.
--
-- /See:/ 'newBlueprintDetails' smart constructor.
data BlueprintDetails = BlueprintDetails'
  { -- | The name of the blueprint.
    BlueprintDetails -> Maybe Text
blueprintName :: Prelude.Maybe Prelude.Text,
    -- | The run ID for this blueprint.
    BlueprintDetails -> Maybe Text
runId :: Prelude.Maybe Prelude.Text
  }
  deriving (BlueprintDetails -> BlueprintDetails -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BlueprintDetails -> BlueprintDetails -> Bool
$c/= :: BlueprintDetails -> BlueprintDetails -> Bool
== :: BlueprintDetails -> BlueprintDetails -> Bool
$c== :: BlueprintDetails -> BlueprintDetails -> Bool
Prelude.Eq, ReadPrec [BlueprintDetails]
ReadPrec BlueprintDetails
Int -> ReadS BlueprintDetails
ReadS [BlueprintDetails]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BlueprintDetails]
$creadListPrec :: ReadPrec [BlueprintDetails]
readPrec :: ReadPrec BlueprintDetails
$creadPrec :: ReadPrec BlueprintDetails
readList :: ReadS [BlueprintDetails]
$creadList :: ReadS [BlueprintDetails]
readsPrec :: Int -> ReadS BlueprintDetails
$creadsPrec :: Int -> ReadS BlueprintDetails
Prelude.Read, Int -> BlueprintDetails -> ShowS
[BlueprintDetails] -> ShowS
BlueprintDetails -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BlueprintDetails] -> ShowS
$cshowList :: [BlueprintDetails] -> ShowS
show :: BlueprintDetails -> String
$cshow :: BlueprintDetails -> String
showsPrec :: Int -> BlueprintDetails -> ShowS
$cshowsPrec :: Int -> BlueprintDetails -> ShowS
Prelude.Show, forall x. Rep BlueprintDetails x -> BlueprintDetails
forall x. BlueprintDetails -> Rep BlueprintDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BlueprintDetails x -> BlueprintDetails
$cfrom :: forall x. BlueprintDetails -> Rep BlueprintDetails x
Prelude.Generic)

-- |
-- Create a value of 'BlueprintDetails' 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:
--
-- 'blueprintName', 'blueprintDetails_blueprintName' - The name of the blueprint.
--
-- 'runId', 'blueprintDetails_runId' - The run ID for this blueprint.
newBlueprintDetails ::
  BlueprintDetails
newBlueprintDetails :: BlueprintDetails
newBlueprintDetails =
  BlueprintDetails'
    { $sel:blueprintName:BlueprintDetails' :: Maybe Text
blueprintName = forall a. Maybe a
Prelude.Nothing,
      $sel:runId:BlueprintDetails' :: Maybe Text
runId = forall a. Maybe a
Prelude.Nothing
    }

-- | The name of the blueprint.
blueprintDetails_blueprintName :: Lens.Lens' BlueprintDetails (Prelude.Maybe Prelude.Text)
blueprintDetails_blueprintName :: Lens' BlueprintDetails (Maybe Text)
blueprintDetails_blueprintName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BlueprintDetails' {Maybe Text
blueprintName :: Maybe Text
$sel:blueprintName:BlueprintDetails' :: BlueprintDetails -> Maybe Text
blueprintName} -> Maybe Text
blueprintName) (\s :: BlueprintDetails
s@BlueprintDetails' {} Maybe Text
a -> BlueprintDetails
s {$sel:blueprintName:BlueprintDetails' :: Maybe Text
blueprintName = Maybe Text
a} :: BlueprintDetails)

-- | The run ID for this blueprint.
blueprintDetails_runId :: Lens.Lens' BlueprintDetails (Prelude.Maybe Prelude.Text)
blueprintDetails_runId :: Lens' BlueprintDetails (Maybe Text)
blueprintDetails_runId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BlueprintDetails' {Maybe Text
runId :: Maybe Text
$sel:runId:BlueprintDetails' :: BlueprintDetails -> Maybe Text
runId} -> Maybe Text
runId) (\s :: BlueprintDetails
s@BlueprintDetails' {} Maybe Text
a -> BlueprintDetails
s {$sel:runId:BlueprintDetails' :: Maybe Text
runId = Maybe Text
a} :: BlueprintDetails)

instance Data.FromJSON BlueprintDetails where
  parseJSON :: Value -> Parser BlueprintDetails
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"BlueprintDetails"
      ( \Object
x ->
          Maybe Text -> Maybe Text -> BlueprintDetails
BlueprintDetails'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"BlueprintName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RunId")
      )

instance Prelude.Hashable BlueprintDetails where
  hashWithSalt :: Int -> BlueprintDetails -> Int
hashWithSalt Int
_salt BlueprintDetails' {Maybe Text
runId :: Maybe Text
blueprintName :: Maybe Text
$sel:runId:BlueprintDetails' :: BlueprintDetails -> Maybe Text
$sel:blueprintName:BlueprintDetails' :: BlueprintDetails -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
blueprintName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
runId

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