{-# 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.Crawler
-- 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.Crawler where

import qualified Amazonka.Core as Core
import Amazonka.Glue.Types.CrawlerState
import Amazonka.Glue.Types.CrawlerTargets
import Amazonka.Glue.Types.LastCrawlInfo
import Amazonka.Glue.Types.LineageConfiguration
import Amazonka.Glue.Types.RecrawlPolicy
import Amazonka.Glue.Types.Schedule
import Amazonka.Glue.Types.SchemaChangePolicy
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Specifies a crawler program that examines a data source and uses
-- classifiers to try to determine its schema. If successful, the crawler
-- records metadata concerning the data source in the Glue Data Catalog.
--
-- /See:/ 'newCrawler' smart constructor.
data Crawler = Crawler'
  { -- | The time that the crawler was created.
    Crawler -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | Indicates whether the crawler is running, or whether a run is pending.
    Crawler -> Maybe CrawlerState
state :: Prelude.Maybe CrawlerState,
    -- | The policy that specifies update and delete behaviors for the crawler.
    Crawler -> Maybe SchemaChangePolicy
schemaChangePolicy :: Prelude.Maybe SchemaChangePolicy,
    -- | The time that the crawler was last updated.
    Crawler -> Maybe POSIX
lastUpdated :: Prelude.Maybe Core.POSIX,
    -- | For scheduled crawlers, the schedule when the crawler runs.
    Crawler -> Maybe Schedule
schedule :: Prelude.Maybe Schedule,
    -- | The status of the last crawl, and potentially error information if an
    -- error occurred.
    Crawler -> Maybe LastCrawlInfo
lastCrawl :: Prelude.Maybe LastCrawlInfo,
    -- | If the crawler is running, contains the total time elapsed since the
    -- last crawl began.
    Crawler -> Maybe Integer
crawlElapsedTime :: Prelude.Maybe Prelude.Integer,
    -- | A policy that specifies whether to crawl the entire dataset again, or to
    -- crawl only folders that were added since the last crawler run.
    Crawler -> Maybe RecrawlPolicy
recrawlPolicy :: Prelude.Maybe RecrawlPolicy,
    -- | A list of UTF-8 strings that specify the custom classifiers that are
    -- associated with the crawler.
    Crawler -> Maybe [Text]
classifiers :: Prelude.Maybe [Prelude.Text],
    -- | The Amazon Resource Name (ARN) of an IAM role that\'s used to access
    -- customer resources, such as Amazon Simple Storage Service (Amazon S3)
    -- data.
    Crawler -> Maybe Text
role' :: Prelude.Maybe Prelude.Text,
    -- | The name of the crawler.
    Crawler -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | A collection of targets to crawl.
    Crawler -> Maybe CrawlerTargets
targets :: Prelude.Maybe CrawlerTargets,
    -- | The version of the crawler.
    Crawler -> Maybe Integer
version :: Prelude.Maybe Prelude.Integer,
    -- | The name of the database in which the crawler\'s output is stored.
    Crawler -> Maybe Text
databaseName :: Prelude.Maybe Prelude.Text,
    -- | The name of the @SecurityConfiguration@ structure to be used by this
    -- crawler.
    Crawler -> Maybe Text
crawlerSecurityConfiguration :: Prelude.Maybe Prelude.Text,
    -- | A configuration that specifies whether data lineage is enabled for the
    -- crawler.
    Crawler -> Maybe LineageConfiguration
lineageConfiguration :: Prelude.Maybe LineageConfiguration,
    -- | Crawler configuration information. This versioned JSON string allows
    -- users to specify aspects of a crawler\'s behavior. For more information,
    -- see
    -- <https://docs.aws.amazon.com/glue/latest/dg/define-crawler.html#crawler-data-stores-exclude Include and Exclude Patterns>.
    Crawler -> Maybe Text
configuration :: Prelude.Maybe Prelude.Text,
    -- | The prefix added to the names of tables that are created.
    Crawler -> Maybe Text
tablePrefix :: Prelude.Maybe Prelude.Text,
    -- | A description of the crawler.
    Crawler -> Maybe Text
description :: Prelude.Maybe Prelude.Text
  }
  deriving (Crawler -> Crawler -> Bool
(Crawler -> Crawler -> Bool)
-> (Crawler -> Crawler -> Bool) -> Eq Crawler
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Crawler -> Crawler -> Bool
$c/= :: Crawler -> Crawler -> Bool
== :: Crawler -> Crawler -> Bool
$c== :: Crawler -> Crawler -> Bool
Prelude.Eq, ReadPrec [Crawler]
ReadPrec Crawler
Int -> ReadS Crawler
ReadS [Crawler]
(Int -> ReadS Crawler)
-> ReadS [Crawler]
-> ReadPrec Crawler
-> ReadPrec [Crawler]
-> Read Crawler
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Crawler]
$creadListPrec :: ReadPrec [Crawler]
readPrec :: ReadPrec Crawler
$creadPrec :: ReadPrec Crawler
readList :: ReadS [Crawler]
$creadList :: ReadS [Crawler]
readsPrec :: Int -> ReadS Crawler
$creadsPrec :: Int -> ReadS Crawler
Prelude.Read, Int -> Crawler -> ShowS
[Crawler] -> ShowS
Crawler -> String
(Int -> Crawler -> ShowS)
-> (Crawler -> String) -> ([Crawler] -> ShowS) -> Show Crawler
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Crawler] -> ShowS
$cshowList :: [Crawler] -> ShowS
show :: Crawler -> String
$cshow :: Crawler -> String
showsPrec :: Int -> Crawler -> ShowS
$cshowsPrec :: Int -> Crawler -> ShowS
Prelude.Show, (forall x. Crawler -> Rep Crawler x)
-> (forall x. Rep Crawler x -> Crawler) -> Generic Crawler
forall x. Rep Crawler x -> Crawler
forall x. Crawler -> Rep Crawler x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Crawler x -> Crawler
$cfrom :: forall x. Crawler -> Rep Crawler x
Prelude.Generic)

-- |
-- Create a value of 'Crawler' 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', 'crawler_creationTime' - The time that the crawler was created.
--
-- 'state', 'crawler_state' - Indicates whether the crawler is running, or whether a run is pending.
--
-- 'schemaChangePolicy', 'crawler_schemaChangePolicy' - The policy that specifies update and delete behaviors for the crawler.
--
-- 'lastUpdated', 'crawler_lastUpdated' - The time that the crawler was last updated.
--
-- 'schedule', 'crawler_schedule' - For scheduled crawlers, the schedule when the crawler runs.
--
-- 'lastCrawl', 'crawler_lastCrawl' - The status of the last crawl, and potentially error information if an
-- error occurred.
--
-- 'crawlElapsedTime', 'crawler_crawlElapsedTime' - If the crawler is running, contains the total time elapsed since the
-- last crawl began.
--
-- 'recrawlPolicy', 'crawler_recrawlPolicy' - A policy that specifies whether to crawl the entire dataset again, or to
-- crawl only folders that were added since the last crawler run.
--
-- 'classifiers', 'crawler_classifiers' - A list of UTF-8 strings that specify the custom classifiers that are
-- associated with the crawler.
--
-- 'role'', 'crawler_role' - The Amazon Resource Name (ARN) of an IAM role that\'s used to access
-- customer resources, such as Amazon Simple Storage Service (Amazon S3)
-- data.
--
-- 'name', 'crawler_name' - The name of the crawler.
--
-- 'targets', 'crawler_targets' - A collection of targets to crawl.
--
-- 'version', 'crawler_version' - The version of the crawler.
--
-- 'databaseName', 'crawler_databaseName' - The name of the database in which the crawler\'s output is stored.
--
-- 'crawlerSecurityConfiguration', 'crawler_crawlerSecurityConfiguration' - The name of the @SecurityConfiguration@ structure to be used by this
-- crawler.
--
-- 'lineageConfiguration', 'crawler_lineageConfiguration' - A configuration that specifies whether data lineage is enabled for the
-- crawler.
--
-- 'configuration', 'crawler_configuration' - Crawler configuration information. This versioned JSON string allows
-- users to specify aspects of a crawler\'s behavior. For more information,
-- see
-- <https://docs.aws.amazon.com/glue/latest/dg/define-crawler.html#crawler-data-stores-exclude Include and Exclude Patterns>.
--
-- 'tablePrefix', 'crawler_tablePrefix' - The prefix added to the names of tables that are created.
--
-- 'description', 'crawler_description' - A description of the crawler.
newCrawler ::
  Crawler
newCrawler :: Crawler
newCrawler =
  Crawler' :: Maybe POSIX
-> Maybe CrawlerState
-> Maybe SchemaChangePolicy
-> Maybe POSIX
-> Maybe Schedule
-> Maybe LastCrawlInfo
-> Maybe Integer
-> Maybe RecrawlPolicy
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe CrawlerTargets
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe LineageConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Crawler
Crawler'
    { $sel:creationTime:Crawler' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:state:Crawler' :: Maybe CrawlerState
state = Maybe CrawlerState
forall a. Maybe a
Prelude.Nothing,
      $sel:schemaChangePolicy:Crawler' :: Maybe SchemaChangePolicy
schemaChangePolicy = Maybe SchemaChangePolicy
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdated:Crawler' :: Maybe POSIX
lastUpdated = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:schedule:Crawler' :: Maybe Schedule
schedule = Maybe Schedule
forall a. Maybe a
Prelude.Nothing,
      $sel:lastCrawl:Crawler' :: Maybe LastCrawlInfo
lastCrawl = Maybe LastCrawlInfo
forall a. Maybe a
Prelude.Nothing,
      $sel:crawlElapsedTime:Crawler' :: Maybe Integer
crawlElapsedTime = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:recrawlPolicy:Crawler' :: Maybe RecrawlPolicy
recrawlPolicy = Maybe RecrawlPolicy
forall a. Maybe a
Prelude.Nothing,
      $sel:classifiers:Crawler' :: Maybe [Text]
classifiers = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:role':Crawler' :: Maybe Text
role' = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Crawler' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:targets:Crawler' :: Maybe CrawlerTargets
targets = Maybe CrawlerTargets
forall a. Maybe a
Prelude.Nothing,
      $sel:version:Crawler' :: Maybe Integer
version = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:databaseName:Crawler' :: Maybe Text
databaseName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:crawlerSecurityConfiguration:Crawler' :: Maybe Text
crawlerSecurityConfiguration = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lineageConfiguration:Crawler' :: Maybe LineageConfiguration
lineageConfiguration = Maybe LineageConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:configuration:Crawler' :: Maybe Text
configuration = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tablePrefix:Crawler' :: Maybe Text
tablePrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:Crawler' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The time that the crawler was created.
crawler_creationTime :: Lens.Lens' Crawler (Prelude.Maybe Prelude.UTCTime)
crawler_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Crawler -> f Crawler
crawler_creationTime = (Crawler -> Maybe POSIX)
-> (Crawler -> Maybe POSIX -> Crawler)
-> Lens Crawler Crawler (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Crawler' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:Crawler' :: Crawler -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: Crawler
s@Crawler' {} Maybe POSIX
a -> Crawler
s {$sel:creationTime:Crawler' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: Crawler) ((Maybe POSIX -> f (Maybe POSIX)) -> Crawler -> f Crawler)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Crawler
-> f Crawler
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

-- | Indicates whether the crawler is running, or whether a run is pending.
crawler_state :: Lens.Lens' Crawler (Prelude.Maybe CrawlerState)
crawler_state :: (Maybe CrawlerState -> f (Maybe CrawlerState))
-> Crawler -> f Crawler
crawler_state = (Crawler -> Maybe CrawlerState)
-> (Crawler -> Maybe CrawlerState -> Crawler)
-> Lens Crawler Crawler (Maybe CrawlerState) (Maybe CrawlerState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Crawler' {Maybe CrawlerState
state :: Maybe CrawlerState
$sel:state:Crawler' :: Crawler -> Maybe CrawlerState
state} -> Maybe CrawlerState
state) (\s :: Crawler
s@Crawler' {} Maybe CrawlerState
a -> Crawler
s {$sel:state:Crawler' :: Maybe CrawlerState
state = Maybe CrawlerState
a} :: Crawler)

-- | The policy that specifies update and delete behaviors for the crawler.
crawler_schemaChangePolicy :: Lens.Lens' Crawler (Prelude.Maybe SchemaChangePolicy)
crawler_schemaChangePolicy :: (Maybe SchemaChangePolicy -> f (Maybe SchemaChangePolicy))
-> Crawler -> f Crawler
crawler_schemaChangePolicy = (Crawler -> Maybe SchemaChangePolicy)
-> (Crawler -> Maybe SchemaChangePolicy -> Crawler)
-> Lens
     Crawler
     Crawler
     (Maybe SchemaChangePolicy)
     (Maybe SchemaChangePolicy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Crawler' {Maybe SchemaChangePolicy
schemaChangePolicy :: Maybe SchemaChangePolicy
$sel:schemaChangePolicy:Crawler' :: Crawler -> Maybe SchemaChangePolicy
schemaChangePolicy} -> Maybe SchemaChangePolicy
schemaChangePolicy) (\s :: Crawler
s@Crawler' {} Maybe SchemaChangePolicy
a -> Crawler
s {$sel:schemaChangePolicy:Crawler' :: Maybe SchemaChangePolicy
schemaChangePolicy = Maybe SchemaChangePolicy
a} :: Crawler)

-- | The time that the crawler was last updated.
crawler_lastUpdated :: Lens.Lens' Crawler (Prelude.Maybe Prelude.UTCTime)
crawler_lastUpdated :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Crawler -> f Crawler
crawler_lastUpdated = (Crawler -> Maybe POSIX)
-> (Crawler -> Maybe POSIX -> Crawler)
-> Lens Crawler Crawler (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Crawler' {Maybe POSIX
lastUpdated :: Maybe POSIX
$sel:lastUpdated:Crawler' :: Crawler -> Maybe POSIX
lastUpdated} -> Maybe POSIX
lastUpdated) (\s :: Crawler
s@Crawler' {} Maybe POSIX
a -> Crawler
s {$sel:lastUpdated:Crawler' :: Maybe POSIX
lastUpdated = Maybe POSIX
a} :: Crawler) ((Maybe POSIX -> f (Maybe POSIX)) -> Crawler -> f Crawler)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Crawler
-> f Crawler
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

-- | For scheduled crawlers, the schedule when the crawler runs.
crawler_schedule :: Lens.Lens' Crawler (Prelude.Maybe Schedule)
crawler_schedule :: (Maybe Schedule -> f (Maybe Schedule)) -> Crawler -> f Crawler
crawler_schedule = (Crawler -> Maybe Schedule)
-> (Crawler -> Maybe Schedule -> Crawler)
-> Lens Crawler Crawler (Maybe Schedule) (Maybe Schedule)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Crawler' {Maybe Schedule
schedule :: Maybe Schedule
$sel:schedule:Crawler' :: Crawler -> Maybe Schedule
schedule} -> Maybe Schedule
schedule) (\s :: Crawler
s@Crawler' {} Maybe Schedule
a -> Crawler
s {$sel:schedule:Crawler' :: Maybe Schedule
schedule = Maybe Schedule
a} :: Crawler)

-- | The status of the last crawl, and potentially error information if an
-- error occurred.
crawler_lastCrawl :: Lens.Lens' Crawler (Prelude.Maybe LastCrawlInfo)
crawler_lastCrawl :: (Maybe LastCrawlInfo -> f (Maybe LastCrawlInfo))
-> Crawler -> f Crawler
crawler_lastCrawl = (Crawler -> Maybe LastCrawlInfo)
-> (Crawler -> Maybe LastCrawlInfo -> Crawler)
-> Lens Crawler Crawler (Maybe LastCrawlInfo) (Maybe LastCrawlInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Crawler' {Maybe LastCrawlInfo
lastCrawl :: Maybe LastCrawlInfo
$sel:lastCrawl:Crawler' :: Crawler -> Maybe LastCrawlInfo
lastCrawl} -> Maybe LastCrawlInfo
lastCrawl) (\s :: Crawler
s@Crawler' {} Maybe LastCrawlInfo
a -> Crawler
s {$sel:lastCrawl:Crawler' :: Maybe LastCrawlInfo
lastCrawl = Maybe LastCrawlInfo
a} :: Crawler)

-- | If the crawler is running, contains the total time elapsed since the
-- last crawl began.
crawler_crawlElapsedTime :: Lens.Lens' Crawler (Prelude.Maybe Prelude.Integer)
crawler_crawlElapsedTime :: (Maybe Integer -> f (Maybe Integer)) -> Crawler -> f Crawler
crawler_crawlElapsedTime = (Crawler -> Maybe Integer)
-> (Crawler -> Maybe Integer -> Crawler)
-> Lens Crawler Crawler (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Crawler' {Maybe Integer
crawlElapsedTime :: Maybe Integer
$sel:crawlElapsedTime:Crawler' :: Crawler -> Maybe Integer
crawlElapsedTime} -> Maybe Integer
crawlElapsedTime) (\s :: Crawler
s@Crawler' {} Maybe Integer
a -> Crawler
s {$sel:crawlElapsedTime:Crawler' :: Maybe Integer
crawlElapsedTime = Maybe Integer
a} :: Crawler)

-- | A policy that specifies whether to crawl the entire dataset again, or to
-- crawl only folders that were added since the last crawler run.
crawler_recrawlPolicy :: Lens.Lens' Crawler (Prelude.Maybe RecrawlPolicy)
crawler_recrawlPolicy :: (Maybe RecrawlPolicy -> f (Maybe RecrawlPolicy))
-> Crawler -> f Crawler
crawler_recrawlPolicy = (Crawler -> Maybe RecrawlPolicy)
-> (Crawler -> Maybe RecrawlPolicy -> Crawler)
-> Lens Crawler Crawler (Maybe RecrawlPolicy) (Maybe RecrawlPolicy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Crawler' {Maybe RecrawlPolicy
recrawlPolicy :: Maybe RecrawlPolicy
$sel:recrawlPolicy:Crawler' :: Crawler -> Maybe RecrawlPolicy
recrawlPolicy} -> Maybe RecrawlPolicy
recrawlPolicy) (\s :: Crawler
s@Crawler' {} Maybe RecrawlPolicy
a -> Crawler
s {$sel:recrawlPolicy:Crawler' :: Maybe RecrawlPolicy
recrawlPolicy = Maybe RecrawlPolicy
a} :: Crawler)

-- | A list of UTF-8 strings that specify the custom classifiers that are
-- associated with the crawler.
crawler_classifiers :: Lens.Lens' Crawler (Prelude.Maybe [Prelude.Text])
crawler_classifiers :: (Maybe [Text] -> f (Maybe [Text])) -> Crawler -> f Crawler
crawler_classifiers = (Crawler -> Maybe [Text])
-> (Crawler -> Maybe [Text] -> Crawler)
-> Lens Crawler Crawler (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Crawler' {Maybe [Text]
classifiers :: Maybe [Text]
$sel:classifiers:Crawler' :: Crawler -> Maybe [Text]
classifiers} -> Maybe [Text]
classifiers) (\s :: Crawler
s@Crawler' {} Maybe [Text]
a -> Crawler
s {$sel:classifiers:Crawler' :: Maybe [Text]
classifiers = Maybe [Text]
a} :: Crawler) ((Maybe [Text] -> f (Maybe [Text])) -> Crawler -> f Crawler)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Crawler
-> f Crawler
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [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 [Text] [Text] [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 an IAM role that\'s used to access
-- customer resources, such as Amazon Simple Storage Service (Amazon S3)
-- data.
crawler_role :: Lens.Lens' Crawler (Prelude.Maybe Prelude.Text)
crawler_role :: (Maybe Text -> f (Maybe Text)) -> Crawler -> f Crawler
crawler_role = (Crawler -> Maybe Text)
-> (Crawler -> Maybe Text -> Crawler)
-> Lens Crawler Crawler (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Crawler' {Maybe Text
role' :: Maybe Text
$sel:role':Crawler' :: Crawler -> Maybe Text
role'} -> Maybe Text
role') (\s :: Crawler
s@Crawler' {} Maybe Text
a -> Crawler
s {$sel:role':Crawler' :: Maybe Text
role' = Maybe Text
a} :: Crawler)

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

-- | A collection of targets to crawl.
crawler_targets :: Lens.Lens' Crawler (Prelude.Maybe CrawlerTargets)
crawler_targets :: (Maybe CrawlerTargets -> f (Maybe CrawlerTargets))
-> Crawler -> f Crawler
crawler_targets = (Crawler -> Maybe CrawlerTargets)
-> (Crawler -> Maybe CrawlerTargets -> Crawler)
-> Lens
     Crawler Crawler (Maybe CrawlerTargets) (Maybe CrawlerTargets)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Crawler' {Maybe CrawlerTargets
targets :: Maybe CrawlerTargets
$sel:targets:Crawler' :: Crawler -> Maybe CrawlerTargets
targets} -> Maybe CrawlerTargets
targets) (\s :: Crawler
s@Crawler' {} Maybe CrawlerTargets
a -> Crawler
s {$sel:targets:Crawler' :: Maybe CrawlerTargets
targets = Maybe CrawlerTargets
a} :: Crawler)

-- | The version of the crawler.
crawler_version :: Lens.Lens' Crawler (Prelude.Maybe Prelude.Integer)
crawler_version :: (Maybe Integer -> f (Maybe Integer)) -> Crawler -> f Crawler
crawler_version = (Crawler -> Maybe Integer)
-> (Crawler -> Maybe Integer -> Crawler)
-> Lens Crawler Crawler (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Crawler' {Maybe Integer
version :: Maybe Integer
$sel:version:Crawler' :: Crawler -> Maybe Integer
version} -> Maybe Integer
version) (\s :: Crawler
s@Crawler' {} Maybe Integer
a -> Crawler
s {$sel:version:Crawler' :: Maybe Integer
version = Maybe Integer
a} :: Crawler)

-- | The name of the database in which the crawler\'s output is stored.
crawler_databaseName :: Lens.Lens' Crawler (Prelude.Maybe Prelude.Text)
crawler_databaseName :: (Maybe Text -> f (Maybe Text)) -> Crawler -> f Crawler
crawler_databaseName = (Crawler -> Maybe Text)
-> (Crawler -> Maybe Text -> Crawler)
-> Lens Crawler Crawler (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Crawler' {Maybe Text
databaseName :: Maybe Text
$sel:databaseName:Crawler' :: Crawler -> Maybe Text
databaseName} -> Maybe Text
databaseName) (\s :: Crawler
s@Crawler' {} Maybe Text
a -> Crawler
s {$sel:databaseName:Crawler' :: Maybe Text
databaseName = Maybe Text
a} :: Crawler)

-- | The name of the @SecurityConfiguration@ structure to be used by this
-- crawler.
crawler_crawlerSecurityConfiguration :: Lens.Lens' Crawler (Prelude.Maybe Prelude.Text)
crawler_crawlerSecurityConfiguration :: (Maybe Text -> f (Maybe Text)) -> Crawler -> f Crawler
crawler_crawlerSecurityConfiguration = (Crawler -> Maybe Text)
-> (Crawler -> Maybe Text -> Crawler)
-> Lens Crawler Crawler (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Crawler' {Maybe Text
crawlerSecurityConfiguration :: Maybe Text
$sel:crawlerSecurityConfiguration:Crawler' :: Crawler -> Maybe Text
crawlerSecurityConfiguration} -> Maybe Text
crawlerSecurityConfiguration) (\s :: Crawler
s@Crawler' {} Maybe Text
a -> Crawler
s {$sel:crawlerSecurityConfiguration:Crawler' :: Maybe Text
crawlerSecurityConfiguration = Maybe Text
a} :: Crawler)

-- | A configuration that specifies whether data lineage is enabled for the
-- crawler.
crawler_lineageConfiguration :: Lens.Lens' Crawler (Prelude.Maybe LineageConfiguration)
crawler_lineageConfiguration :: (Maybe LineageConfiguration -> f (Maybe LineageConfiguration))
-> Crawler -> f Crawler
crawler_lineageConfiguration = (Crawler -> Maybe LineageConfiguration)
-> (Crawler -> Maybe LineageConfiguration -> Crawler)
-> Lens
     Crawler
     Crawler
     (Maybe LineageConfiguration)
     (Maybe LineageConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Crawler' {Maybe LineageConfiguration
lineageConfiguration :: Maybe LineageConfiguration
$sel:lineageConfiguration:Crawler' :: Crawler -> Maybe LineageConfiguration
lineageConfiguration} -> Maybe LineageConfiguration
lineageConfiguration) (\s :: Crawler
s@Crawler' {} Maybe LineageConfiguration
a -> Crawler
s {$sel:lineageConfiguration:Crawler' :: Maybe LineageConfiguration
lineageConfiguration = Maybe LineageConfiguration
a} :: Crawler)

-- | Crawler configuration information. This versioned JSON string allows
-- users to specify aspects of a crawler\'s behavior. For more information,
-- see
-- <https://docs.aws.amazon.com/glue/latest/dg/define-crawler.html#crawler-data-stores-exclude Include and Exclude Patterns>.
crawler_configuration :: Lens.Lens' Crawler (Prelude.Maybe Prelude.Text)
crawler_configuration :: (Maybe Text -> f (Maybe Text)) -> Crawler -> f Crawler
crawler_configuration = (Crawler -> Maybe Text)
-> (Crawler -> Maybe Text -> Crawler)
-> Lens Crawler Crawler (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Crawler' {Maybe Text
configuration :: Maybe Text
$sel:configuration:Crawler' :: Crawler -> Maybe Text
configuration} -> Maybe Text
configuration) (\s :: Crawler
s@Crawler' {} Maybe Text
a -> Crawler
s {$sel:configuration:Crawler' :: Maybe Text
configuration = Maybe Text
a} :: Crawler)

-- | The prefix added to the names of tables that are created.
crawler_tablePrefix :: Lens.Lens' Crawler (Prelude.Maybe Prelude.Text)
crawler_tablePrefix :: (Maybe Text -> f (Maybe Text)) -> Crawler -> f Crawler
crawler_tablePrefix = (Crawler -> Maybe Text)
-> (Crawler -> Maybe Text -> Crawler)
-> Lens Crawler Crawler (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Crawler' {Maybe Text
tablePrefix :: Maybe Text
$sel:tablePrefix:Crawler' :: Crawler -> Maybe Text
tablePrefix} -> Maybe Text
tablePrefix) (\s :: Crawler
s@Crawler' {} Maybe Text
a -> Crawler
s {$sel:tablePrefix:Crawler' :: Maybe Text
tablePrefix = Maybe Text
a} :: Crawler)

-- | A description of the crawler.
crawler_description :: Lens.Lens' Crawler (Prelude.Maybe Prelude.Text)
crawler_description :: (Maybe Text -> f (Maybe Text)) -> Crawler -> f Crawler
crawler_description = (Crawler -> Maybe Text)
-> (Crawler -> Maybe Text -> Crawler)
-> Lens Crawler Crawler (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Crawler' {Maybe Text
description :: Maybe Text
$sel:description:Crawler' :: Crawler -> Maybe Text
description} -> Maybe Text
description) (\s :: Crawler
s@Crawler' {} Maybe Text
a -> Crawler
s {$sel:description:Crawler' :: Maybe Text
description = Maybe Text
a} :: Crawler)

instance Core.FromJSON Crawler where
  parseJSON :: Value -> Parser Crawler
parseJSON =
    String -> (Object -> Parser Crawler) -> Value -> Parser Crawler
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Crawler"
      ( \Object
x ->
          Maybe POSIX
-> Maybe CrawlerState
-> Maybe SchemaChangePolicy
-> Maybe POSIX
-> Maybe Schedule
-> Maybe LastCrawlInfo
-> Maybe Integer
-> Maybe RecrawlPolicy
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe CrawlerTargets
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe LineageConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Crawler
Crawler'
            (Maybe POSIX
 -> Maybe CrawlerState
 -> Maybe SchemaChangePolicy
 -> Maybe POSIX
 -> Maybe Schedule
 -> Maybe LastCrawlInfo
 -> Maybe Integer
 -> Maybe RecrawlPolicy
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Maybe CrawlerTargets
 -> Maybe Integer
 -> Maybe Text
 -> Maybe Text
 -> Maybe LineageConfiguration
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Crawler)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe CrawlerState
      -> Maybe SchemaChangePolicy
      -> Maybe POSIX
      -> Maybe Schedule
      -> Maybe LastCrawlInfo
      -> Maybe Integer
      -> Maybe RecrawlPolicy
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe CrawlerTargets
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe LineageConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Crawler)
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 CrawlerState
   -> Maybe SchemaChangePolicy
   -> Maybe POSIX
   -> Maybe Schedule
   -> Maybe LastCrawlInfo
   -> Maybe Integer
   -> Maybe RecrawlPolicy
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe CrawlerTargets
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe LineageConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Crawler)
-> Parser (Maybe CrawlerState)
-> Parser
     (Maybe SchemaChangePolicy
      -> Maybe POSIX
      -> Maybe Schedule
      -> Maybe LastCrawlInfo
      -> Maybe Integer
      -> Maybe RecrawlPolicy
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe CrawlerTargets
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe LineageConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Crawler)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CrawlerState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"State")
            Parser
  (Maybe SchemaChangePolicy
   -> Maybe POSIX
   -> Maybe Schedule
   -> Maybe LastCrawlInfo
   -> Maybe Integer
   -> Maybe RecrawlPolicy
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe CrawlerTargets
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe LineageConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Crawler)
-> Parser (Maybe SchemaChangePolicy)
-> Parser
     (Maybe POSIX
      -> Maybe Schedule
      -> Maybe LastCrawlInfo
      -> Maybe Integer
      -> Maybe RecrawlPolicy
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe CrawlerTargets
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe LineageConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Crawler)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SchemaChangePolicy)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SchemaChangePolicy")
            Parser
  (Maybe POSIX
   -> Maybe Schedule
   -> Maybe LastCrawlInfo
   -> Maybe Integer
   -> Maybe RecrawlPolicy
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe CrawlerTargets
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe LineageConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Crawler)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Schedule
      -> Maybe LastCrawlInfo
      -> Maybe Integer
      -> Maybe RecrawlPolicy
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe CrawlerTargets
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe LineageConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Crawler)
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
"LastUpdated")
            Parser
  (Maybe Schedule
   -> Maybe LastCrawlInfo
   -> Maybe Integer
   -> Maybe RecrawlPolicy
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe CrawlerTargets
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe LineageConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Crawler)
-> Parser (Maybe Schedule)
-> Parser
     (Maybe LastCrawlInfo
      -> Maybe Integer
      -> Maybe RecrawlPolicy
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe CrawlerTargets
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe LineageConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Crawler)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Schedule)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Schedule")
            Parser
  (Maybe LastCrawlInfo
   -> Maybe Integer
   -> Maybe RecrawlPolicy
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe CrawlerTargets
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe LineageConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Crawler)
-> Parser (Maybe LastCrawlInfo)
-> Parser
     (Maybe Integer
      -> Maybe RecrawlPolicy
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe CrawlerTargets
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe LineageConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Crawler)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LastCrawlInfo)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastCrawl")
            Parser
  (Maybe Integer
   -> Maybe RecrawlPolicy
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe CrawlerTargets
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe LineageConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Crawler)
-> Parser (Maybe Integer)
-> Parser
     (Maybe RecrawlPolicy
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe CrawlerTargets
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe LineageConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Crawler)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CrawlElapsedTime")
            Parser
  (Maybe RecrawlPolicy
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe CrawlerTargets
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe LineageConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Crawler)
-> Parser (Maybe RecrawlPolicy)
-> Parser
     (Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe CrawlerTargets
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe LineageConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Crawler)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RecrawlPolicy)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RecrawlPolicy")
            Parser
  (Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe CrawlerTargets
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe LineageConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Crawler)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe CrawlerTargets
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe LineageConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Crawler)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Classifiers" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe CrawlerTargets
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe LineageConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Crawler)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe CrawlerTargets
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe LineageConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Crawler)
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
"Role")
            Parser
  (Maybe Text
   -> Maybe CrawlerTargets
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe LineageConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Crawler)
-> Parser (Maybe Text)
-> Parser
     (Maybe CrawlerTargets
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe LineageConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Crawler)
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
"Name")
            Parser
  (Maybe CrawlerTargets
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe LineageConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Crawler)
-> Parser (Maybe CrawlerTargets)
-> Parser
     (Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe LineageConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Crawler)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CrawlerTargets)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Targets")
            Parser
  (Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe LineageConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Crawler)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe LineageConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Crawler)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Version")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe LineageConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Crawler)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe LineageConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Crawler)
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
"DatabaseName")
            Parser
  (Maybe Text
   -> Maybe LineageConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Crawler)
-> Parser (Maybe Text)
-> Parser
     (Maybe LineageConfiguration
      -> Maybe Text -> Maybe Text -> Maybe Text -> Crawler)
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
"CrawlerSecurityConfiguration")
            Parser
  (Maybe LineageConfiguration
   -> Maybe Text -> Maybe Text -> Maybe Text -> Crawler)
-> Parser (Maybe LineageConfiguration)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> Crawler)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LineageConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LineageConfiguration")
            Parser (Maybe Text -> Maybe Text -> Maybe Text -> Crawler)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Crawler)
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
"Configuration")
            Parser (Maybe Text -> Maybe Text -> Crawler)
-> Parser (Maybe Text) -> Parser (Maybe Text -> Crawler)
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
"TablePrefix")
            Parser (Maybe Text -> Crawler)
-> Parser (Maybe Text) -> Parser Crawler
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
"Description")
      )

instance Prelude.Hashable Crawler

instance Prelude.NFData Crawler