{-# 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.FindMatchesTaskRunProperties
-- 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.Glue.Types.FindMatchesTaskRunProperties where

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

-- | Specifies configuration properties for a Find Matches task run.
--
-- /See:/ 'newFindMatchesTaskRunProperties' smart constructor.
data FindMatchesTaskRunProperties = FindMatchesTaskRunProperties'
  { -- | The job ID for the Find Matches task run.
    FindMatchesTaskRunProperties -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
    -- | The name assigned to the job for the Find Matches task run.
    FindMatchesTaskRunProperties -> Maybe Text
jobName :: Prelude.Maybe Prelude.Text,
    -- | The job run ID for the Find Matches task run.
    FindMatchesTaskRunProperties -> Maybe Text
jobRunId :: Prelude.Maybe Prelude.Text
  }
  deriving (FindMatchesTaskRunProperties
-> FindMatchesTaskRunProperties -> Bool
(FindMatchesTaskRunProperties
 -> FindMatchesTaskRunProperties -> Bool)
-> (FindMatchesTaskRunProperties
    -> FindMatchesTaskRunProperties -> Bool)
-> Eq FindMatchesTaskRunProperties
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FindMatchesTaskRunProperties
-> FindMatchesTaskRunProperties -> Bool
$c/= :: FindMatchesTaskRunProperties
-> FindMatchesTaskRunProperties -> Bool
== :: FindMatchesTaskRunProperties
-> FindMatchesTaskRunProperties -> Bool
$c== :: FindMatchesTaskRunProperties
-> FindMatchesTaskRunProperties -> Bool
Prelude.Eq, ReadPrec [FindMatchesTaskRunProperties]
ReadPrec FindMatchesTaskRunProperties
Int -> ReadS FindMatchesTaskRunProperties
ReadS [FindMatchesTaskRunProperties]
(Int -> ReadS FindMatchesTaskRunProperties)
-> ReadS [FindMatchesTaskRunProperties]
-> ReadPrec FindMatchesTaskRunProperties
-> ReadPrec [FindMatchesTaskRunProperties]
-> Read FindMatchesTaskRunProperties
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FindMatchesTaskRunProperties]
$creadListPrec :: ReadPrec [FindMatchesTaskRunProperties]
readPrec :: ReadPrec FindMatchesTaskRunProperties
$creadPrec :: ReadPrec FindMatchesTaskRunProperties
readList :: ReadS [FindMatchesTaskRunProperties]
$creadList :: ReadS [FindMatchesTaskRunProperties]
readsPrec :: Int -> ReadS FindMatchesTaskRunProperties
$creadsPrec :: Int -> ReadS FindMatchesTaskRunProperties
Prelude.Read, Int -> FindMatchesTaskRunProperties -> ShowS
[FindMatchesTaskRunProperties] -> ShowS
FindMatchesTaskRunProperties -> String
(Int -> FindMatchesTaskRunProperties -> ShowS)
-> (FindMatchesTaskRunProperties -> String)
-> ([FindMatchesTaskRunProperties] -> ShowS)
-> Show FindMatchesTaskRunProperties
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FindMatchesTaskRunProperties] -> ShowS
$cshowList :: [FindMatchesTaskRunProperties] -> ShowS
show :: FindMatchesTaskRunProperties -> String
$cshow :: FindMatchesTaskRunProperties -> String
showsPrec :: Int -> FindMatchesTaskRunProperties -> ShowS
$cshowsPrec :: Int -> FindMatchesTaskRunProperties -> ShowS
Prelude.Show, (forall x.
 FindMatchesTaskRunProperties -> Rep FindMatchesTaskRunProperties x)
-> (forall x.
    Rep FindMatchesTaskRunProperties x -> FindMatchesTaskRunProperties)
-> Generic FindMatchesTaskRunProperties
forall x.
Rep FindMatchesTaskRunProperties x -> FindMatchesTaskRunProperties
forall x.
FindMatchesTaskRunProperties -> Rep FindMatchesTaskRunProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep FindMatchesTaskRunProperties x -> FindMatchesTaskRunProperties
$cfrom :: forall x.
FindMatchesTaskRunProperties -> Rep FindMatchesTaskRunProperties x
Prelude.Generic)

-- |
-- Create a value of 'FindMatchesTaskRunProperties' 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:
--
-- 'jobId', 'findMatchesTaskRunProperties_jobId' - The job ID for the Find Matches task run.
--
-- 'jobName', 'findMatchesTaskRunProperties_jobName' - The name assigned to the job for the Find Matches task run.
--
-- 'jobRunId', 'findMatchesTaskRunProperties_jobRunId' - The job run ID for the Find Matches task run.
newFindMatchesTaskRunProperties ::
  FindMatchesTaskRunProperties
newFindMatchesTaskRunProperties :: FindMatchesTaskRunProperties
newFindMatchesTaskRunProperties =
  FindMatchesTaskRunProperties' :: Maybe Text
-> Maybe Text -> Maybe Text -> FindMatchesTaskRunProperties
FindMatchesTaskRunProperties'
    { $sel:jobId:FindMatchesTaskRunProperties' :: Maybe Text
jobId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobName:FindMatchesTaskRunProperties' :: Maybe Text
jobName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobRunId:FindMatchesTaskRunProperties' :: Maybe Text
jobRunId = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The job ID for the Find Matches task run.
findMatchesTaskRunProperties_jobId :: Lens.Lens' FindMatchesTaskRunProperties (Prelude.Maybe Prelude.Text)
findMatchesTaskRunProperties_jobId :: (Maybe Text -> f (Maybe Text))
-> FindMatchesTaskRunProperties -> f FindMatchesTaskRunProperties
findMatchesTaskRunProperties_jobId = (FindMatchesTaskRunProperties -> Maybe Text)
-> (FindMatchesTaskRunProperties
    -> Maybe Text -> FindMatchesTaskRunProperties)
-> Lens
     FindMatchesTaskRunProperties
     FindMatchesTaskRunProperties
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindMatchesTaskRunProperties' {Maybe Text
jobId :: Maybe Text
$sel:jobId:FindMatchesTaskRunProperties' :: FindMatchesTaskRunProperties -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: FindMatchesTaskRunProperties
s@FindMatchesTaskRunProperties' {} Maybe Text
a -> FindMatchesTaskRunProperties
s {$sel:jobId:FindMatchesTaskRunProperties' :: Maybe Text
jobId = Maybe Text
a} :: FindMatchesTaskRunProperties)

-- | The name assigned to the job for the Find Matches task run.
findMatchesTaskRunProperties_jobName :: Lens.Lens' FindMatchesTaskRunProperties (Prelude.Maybe Prelude.Text)
findMatchesTaskRunProperties_jobName :: (Maybe Text -> f (Maybe Text))
-> FindMatchesTaskRunProperties -> f FindMatchesTaskRunProperties
findMatchesTaskRunProperties_jobName = (FindMatchesTaskRunProperties -> Maybe Text)
-> (FindMatchesTaskRunProperties
    -> Maybe Text -> FindMatchesTaskRunProperties)
-> Lens
     FindMatchesTaskRunProperties
     FindMatchesTaskRunProperties
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindMatchesTaskRunProperties' {Maybe Text
jobName :: Maybe Text
$sel:jobName:FindMatchesTaskRunProperties' :: FindMatchesTaskRunProperties -> Maybe Text
jobName} -> Maybe Text
jobName) (\s :: FindMatchesTaskRunProperties
s@FindMatchesTaskRunProperties' {} Maybe Text
a -> FindMatchesTaskRunProperties
s {$sel:jobName:FindMatchesTaskRunProperties' :: Maybe Text
jobName = Maybe Text
a} :: FindMatchesTaskRunProperties)

-- | The job run ID for the Find Matches task run.
findMatchesTaskRunProperties_jobRunId :: Lens.Lens' FindMatchesTaskRunProperties (Prelude.Maybe Prelude.Text)
findMatchesTaskRunProperties_jobRunId :: (Maybe Text -> f (Maybe Text))
-> FindMatchesTaskRunProperties -> f FindMatchesTaskRunProperties
findMatchesTaskRunProperties_jobRunId = (FindMatchesTaskRunProperties -> Maybe Text)
-> (FindMatchesTaskRunProperties
    -> Maybe Text -> FindMatchesTaskRunProperties)
-> Lens
     FindMatchesTaskRunProperties
     FindMatchesTaskRunProperties
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindMatchesTaskRunProperties' {Maybe Text
jobRunId :: Maybe Text
$sel:jobRunId:FindMatchesTaskRunProperties' :: FindMatchesTaskRunProperties -> Maybe Text
jobRunId} -> Maybe Text
jobRunId) (\s :: FindMatchesTaskRunProperties
s@FindMatchesTaskRunProperties' {} Maybe Text
a -> FindMatchesTaskRunProperties
s {$sel:jobRunId:FindMatchesTaskRunProperties' :: Maybe Text
jobRunId = Maybe Text
a} :: FindMatchesTaskRunProperties)

instance Core.FromJSON FindMatchesTaskRunProperties where
  parseJSON :: Value -> Parser FindMatchesTaskRunProperties
parseJSON =
    String
-> (Object -> Parser FindMatchesTaskRunProperties)
-> Value
-> Parser FindMatchesTaskRunProperties
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"FindMatchesTaskRunProperties"
      ( \Object
x ->
          Maybe Text
-> Maybe Text -> Maybe Text -> FindMatchesTaskRunProperties
FindMatchesTaskRunProperties'
            (Maybe Text
 -> Maybe Text -> Maybe Text -> FindMatchesTaskRunProperties)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> FindMatchesTaskRunProperties)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"JobId")
            Parser (Maybe Text -> Maybe Text -> FindMatchesTaskRunProperties)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> FindMatchesTaskRunProperties)
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
"JobName")
            Parser (Maybe Text -> FindMatchesTaskRunProperties)
-> Parser (Maybe Text) -> Parser FindMatchesTaskRunProperties
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
"JobRunId")
      )

instance
  Prelude.Hashable
    FindMatchesTaskRunProperties

instance Prelude.NFData FindMatchesTaskRunProperties