{-# 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 #-}
module Amazonka.Glue.CreateCrawler
(
CreateCrawler (..),
newCreateCrawler,
createCrawler_schemaChangePolicy,
createCrawler_schedule,
createCrawler_recrawlPolicy,
createCrawler_classifiers,
createCrawler_databaseName,
createCrawler_crawlerSecurityConfiguration,
createCrawler_lineageConfiguration,
createCrawler_configuration,
createCrawler_tablePrefix,
createCrawler_description,
createCrawler_tags,
createCrawler_name,
createCrawler_role,
createCrawler_targets,
CreateCrawlerResponse (..),
newCreateCrawlerResponse,
createCrawlerResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Glue.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateCrawler = CreateCrawler'
{
CreateCrawler -> Maybe SchemaChangePolicy
schemaChangePolicy :: Prelude.Maybe SchemaChangePolicy,
CreateCrawler -> Maybe Text
schedule :: Prelude.Maybe Prelude.Text,
CreateCrawler -> Maybe RecrawlPolicy
recrawlPolicy :: Prelude.Maybe RecrawlPolicy,
CreateCrawler -> Maybe [Text]
classifiers :: Prelude.Maybe [Prelude.Text],
CreateCrawler -> Maybe Text
databaseName :: Prelude.Maybe Prelude.Text,
CreateCrawler -> Maybe Text
crawlerSecurityConfiguration :: Prelude.Maybe Prelude.Text,
CreateCrawler -> Maybe LineageConfiguration
lineageConfiguration :: Prelude.Maybe LineageConfiguration,
CreateCrawler -> Maybe Text
configuration :: Prelude.Maybe Prelude.Text,
CreateCrawler -> Maybe Text
tablePrefix :: Prelude.Maybe Prelude.Text,
CreateCrawler -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateCrawler -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateCrawler -> Text
name :: Prelude.Text,
CreateCrawler -> Text
role' :: Prelude.Text,
CreateCrawler -> CrawlerTargets
targets :: CrawlerTargets
}
deriving (CreateCrawler -> CreateCrawler -> Bool
(CreateCrawler -> CreateCrawler -> Bool)
-> (CreateCrawler -> CreateCrawler -> Bool) -> Eq CreateCrawler
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateCrawler -> CreateCrawler -> Bool
$c/= :: CreateCrawler -> CreateCrawler -> Bool
== :: CreateCrawler -> CreateCrawler -> Bool
$c== :: CreateCrawler -> CreateCrawler -> Bool
Prelude.Eq, ReadPrec [CreateCrawler]
ReadPrec CreateCrawler
Int -> ReadS CreateCrawler
ReadS [CreateCrawler]
(Int -> ReadS CreateCrawler)
-> ReadS [CreateCrawler]
-> ReadPrec CreateCrawler
-> ReadPrec [CreateCrawler]
-> Read CreateCrawler
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateCrawler]
$creadListPrec :: ReadPrec [CreateCrawler]
readPrec :: ReadPrec CreateCrawler
$creadPrec :: ReadPrec CreateCrawler
readList :: ReadS [CreateCrawler]
$creadList :: ReadS [CreateCrawler]
readsPrec :: Int -> ReadS CreateCrawler
$creadsPrec :: Int -> ReadS CreateCrawler
Prelude.Read, Int -> CreateCrawler -> ShowS
[CreateCrawler] -> ShowS
CreateCrawler -> String
(Int -> CreateCrawler -> ShowS)
-> (CreateCrawler -> String)
-> ([CreateCrawler] -> ShowS)
-> Show CreateCrawler
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateCrawler] -> ShowS
$cshowList :: [CreateCrawler] -> ShowS
show :: CreateCrawler -> String
$cshow :: CreateCrawler -> String
showsPrec :: Int -> CreateCrawler -> ShowS
$cshowsPrec :: Int -> CreateCrawler -> ShowS
Prelude.Show, (forall x. CreateCrawler -> Rep CreateCrawler x)
-> (forall x. Rep CreateCrawler x -> CreateCrawler)
-> Generic CreateCrawler
forall x. Rep CreateCrawler x -> CreateCrawler
forall x. CreateCrawler -> Rep CreateCrawler x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateCrawler x -> CreateCrawler
$cfrom :: forall x. CreateCrawler -> Rep CreateCrawler x
Prelude.Generic)
newCreateCrawler ::
Prelude.Text ->
Prelude.Text ->
CrawlerTargets ->
CreateCrawler
newCreateCrawler :: Text -> Text -> CrawlerTargets -> CreateCrawler
newCreateCrawler Text
pName_ Text
pRole_ CrawlerTargets
pTargets_ =
CreateCrawler' :: Maybe SchemaChangePolicy
-> Maybe Text
-> Maybe RecrawlPolicy
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe LineageConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> CrawlerTargets
-> CreateCrawler
CreateCrawler'
{ $sel:schemaChangePolicy:CreateCrawler' :: Maybe SchemaChangePolicy
schemaChangePolicy =
Maybe SchemaChangePolicy
forall a. Maybe a
Prelude.Nothing,
$sel:schedule:CreateCrawler' :: Maybe Text
schedule = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:recrawlPolicy:CreateCrawler' :: Maybe RecrawlPolicy
recrawlPolicy = Maybe RecrawlPolicy
forall a. Maybe a
Prelude.Nothing,
$sel:classifiers:CreateCrawler' :: Maybe [Text]
classifiers = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:databaseName:CreateCrawler' :: Maybe Text
databaseName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:crawlerSecurityConfiguration:CreateCrawler' :: Maybe Text
crawlerSecurityConfiguration = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lineageConfiguration:CreateCrawler' :: Maybe LineageConfiguration
lineageConfiguration = Maybe LineageConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:configuration:CreateCrawler' :: Maybe Text
configuration = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tablePrefix:CreateCrawler' :: Maybe Text
tablePrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateCrawler' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateCrawler' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateCrawler' :: Text
name = Text
pName_,
$sel:role':CreateCrawler' :: Text
role' = Text
pRole_,
$sel:targets:CreateCrawler' :: CrawlerTargets
targets = CrawlerTargets
pTargets_
}
createCrawler_schemaChangePolicy :: Lens.Lens' CreateCrawler (Prelude.Maybe SchemaChangePolicy)
createCrawler_schemaChangePolicy :: (Maybe SchemaChangePolicy -> f (Maybe SchemaChangePolicy))
-> CreateCrawler -> f CreateCrawler
createCrawler_schemaChangePolicy = (CreateCrawler -> Maybe SchemaChangePolicy)
-> (CreateCrawler -> Maybe SchemaChangePolicy -> CreateCrawler)
-> Lens
CreateCrawler
CreateCrawler
(Maybe SchemaChangePolicy)
(Maybe SchemaChangePolicy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCrawler' {Maybe SchemaChangePolicy
schemaChangePolicy :: Maybe SchemaChangePolicy
$sel:schemaChangePolicy:CreateCrawler' :: CreateCrawler -> Maybe SchemaChangePolicy
schemaChangePolicy} -> Maybe SchemaChangePolicy
schemaChangePolicy) (\s :: CreateCrawler
s@CreateCrawler' {} Maybe SchemaChangePolicy
a -> CreateCrawler
s {$sel:schemaChangePolicy:CreateCrawler' :: Maybe SchemaChangePolicy
schemaChangePolicy = Maybe SchemaChangePolicy
a} :: CreateCrawler)
createCrawler_schedule :: Lens.Lens' CreateCrawler (Prelude.Maybe Prelude.Text)
createCrawler_schedule :: (Maybe Text -> f (Maybe Text)) -> CreateCrawler -> f CreateCrawler
createCrawler_schedule = (CreateCrawler -> Maybe Text)
-> (CreateCrawler -> Maybe Text -> CreateCrawler)
-> Lens CreateCrawler CreateCrawler (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCrawler' {Maybe Text
schedule :: Maybe Text
$sel:schedule:CreateCrawler' :: CreateCrawler -> Maybe Text
schedule} -> Maybe Text
schedule) (\s :: CreateCrawler
s@CreateCrawler' {} Maybe Text
a -> CreateCrawler
s {$sel:schedule:CreateCrawler' :: Maybe Text
schedule = Maybe Text
a} :: CreateCrawler)
createCrawler_recrawlPolicy :: Lens.Lens' CreateCrawler (Prelude.Maybe RecrawlPolicy)
createCrawler_recrawlPolicy :: (Maybe RecrawlPolicy -> f (Maybe RecrawlPolicy))
-> CreateCrawler -> f CreateCrawler
createCrawler_recrawlPolicy = (CreateCrawler -> Maybe RecrawlPolicy)
-> (CreateCrawler -> Maybe RecrawlPolicy -> CreateCrawler)
-> Lens
CreateCrawler
CreateCrawler
(Maybe RecrawlPolicy)
(Maybe RecrawlPolicy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCrawler' {Maybe RecrawlPolicy
recrawlPolicy :: Maybe RecrawlPolicy
$sel:recrawlPolicy:CreateCrawler' :: CreateCrawler -> Maybe RecrawlPolicy
recrawlPolicy} -> Maybe RecrawlPolicy
recrawlPolicy) (\s :: CreateCrawler
s@CreateCrawler' {} Maybe RecrawlPolicy
a -> CreateCrawler
s {$sel:recrawlPolicy:CreateCrawler' :: Maybe RecrawlPolicy
recrawlPolicy = Maybe RecrawlPolicy
a} :: CreateCrawler)
createCrawler_classifiers :: Lens.Lens' CreateCrawler (Prelude.Maybe [Prelude.Text])
createCrawler_classifiers :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateCrawler -> f CreateCrawler
createCrawler_classifiers = (CreateCrawler -> Maybe [Text])
-> (CreateCrawler -> Maybe [Text] -> CreateCrawler)
-> Lens CreateCrawler CreateCrawler (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCrawler' {Maybe [Text]
classifiers :: Maybe [Text]
$sel:classifiers:CreateCrawler' :: CreateCrawler -> Maybe [Text]
classifiers} -> Maybe [Text]
classifiers) (\s :: CreateCrawler
s@CreateCrawler' {} Maybe [Text]
a -> CreateCrawler
s {$sel:classifiers:CreateCrawler' :: Maybe [Text]
classifiers = Maybe [Text]
a} :: CreateCrawler) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateCrawler -> f CreateCrawler)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateCrawler
-> f CreateCrawler
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
createCrawler_databaseName :: Lens.Lens' CreateCrawler (Prelude.Maybe Prelude.Text)
createCrawler_databaseName :: (Maybe Text -> f (Maybe Text)) -> CreateCrawler -> f CreateCrawler
createCrawler_databaseName = (CreateCrawler -> Maybe Text)
-> (CreateCrawler -> Maybe Text -> CreateCrawler)
-> Lens CreateCrawler CreateCrawler (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCrawler' {Maybe Text
databaseName :: Maybe Text
$sel:databaseName:CreateCrawler' :: CreateCrawler -> Maybe Text
databaseName} -> Maybe Text
databaseName) (\s :: CreateCrawler
s@CreateCrawler' {} Maybe Text
a -> CreateCrawler
s {$sel:databaseName:CreateCrawler' :: Maybe Text
databaseName = Maybe Text
a} :: CreateCrawler)
createCrawler_crawlerSecurityConfiguration :: Lens.Lens' CreateCrawler (Prelude.Maybe Prelude.Text)
createCrawler_crawlerSecurityConfiguration :: (Maybe Text -> f (Maybe Text)) -> CreateCrawler -> f CreateCrawler
createCrawler_crawlerSecurityConfiguration = (CreateCrawler -> Maybe Text)
-> (CreateCrawler -> Maybe Text -> CreateCrawler)
-> Lens CreateCrawler CreateCrawler (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCrawler' {Maybe Text
crawlerSecurityConfiguration :: Maybe Text
$sel:crawlerSecurityConfiguration:CreateCrawler' :: CreateCrawler -> Maybe Text
crawlerSecurityConfiguration} -> Maybe Text
crawlerSecurityConfiguration) (\s :: CreateCrawler
s@CreateCrawler' {} Maybe Text
a -> CreateCrawler
s {$sel:crawlerSecurityConfiguration:CreateCrawler' :: Maybe Text
crawlerSecurityConfiguration = Maybe Text
a} :: CreateCrawler)
createCrawler_lineageConfiguration :: Lens.Lens' CreateCrawler (Prelude.Maybe LineageConfiguration)
createCrawler_lineageConfiguration :: (Maybe LineageConfiguration -> f (Maybe LineageConfiguration))
-> CreateCrawler -> f CreateCrawler
createCrawler_lineageConfiguration = (CreateCrawler -> Maybe LineageConfiguration)
-> (CreateCrawler -> Maybe LineageConfiguration -> CreateCrawler)
-> Lens
CreateCrawler
CreateCrawler
(Maybe LineageConfiguration)
(Maybe LineageConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCrawler' {Maybe LineageConfiguration
lineageConfiguration :: Maybe LineageConfiguration
$sel:lineageConfiguration:CreateCrawler' :: CreateCrawler -> Maybe LineageConfiguration
lineageConfiguration} -> Maybe LineageConfiguration
lineageConfiguration) (\s :: CreateCrawler
s@CreateCrawler' {} Maybe LineageConfiguration
a -> CreateCrawler
s {$sel:lineageConfiguration:CreateCrawler' :: Maybe LineageConfiguration
lineageConfiguration = Maybe LineageConfiguration
a} :: CreateCrawler)
createCrawler_configuration :: Lens.Lens' CreateCrawler (Prelude.Maybe Prelude.Text)
createCrawler_configuration :: (Maybe Text -> f (Maybe Text)) -> CreateCrawler -> f CreateCrawler
createCrawler_configuration = (CreateCrawler -> Maybe Text)
-> (CreateCrawler -> Maybe Text -> CreateCrawler)
-> Lens CreateCrawler CreateCrawler (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCrawler' {Maybe Text
configuration :: Maybe Text
$sel:configuration:CreateCrawler' :: CreateCrawler -> Maybe Text
configuration} -> Maybe Text
configuration) (\s :: CreateCrawler
s@CreateCrawler' {} Maybe Text
a -> CreateCrawler
s {$sel:configuration:CreateCrawler' :: Maybe Text
configuration = Maybe Text
a} :: CreateCrawler)
createCrawler_tablePrefix :: Lens.Lens' CreateCrawler (Prelude.Maybe Prelude.Text)
createCrawler_tablePrefix :: (Maybe Text -> f (Maybe Text)) -> CreateCrawler -> f CreateCrawler
createCrawler_tablePrefix = (CreateCrawler -> Maybe Text)
-> (CreateCrawler -> Maybe Text -> CreateCrawler)
-> Lens CreateCrawler CreateCrawler (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCrawler' {Maybe Text
tablePrefix :: Maybe Text
$sel:tablePrefix:CreateCrawler' :: CreateCrawler -> Maybe Text
tablePrefix} -> Maybe Text
tablePrefix) (\s :: CreateCrawler
s@CreateCrawler' {} Maybe Text
a -> CreateCrawler
s {$sel:tablePrefix:CreateCrawler' :: Maybe Text
tablePrefix = Maybe Text
a} :: CreateCrawler)
createCrawler_description :: Lens.Lens' CreateCrawler (Prelude.Maybe Prelude.Text)
createCrawler_description :: (Maybe Text -> f (Maybe Text)) -> CreateCrawler -> f CreateCrawler
createCrawler_description = (CreateCrawler -> Maybe Text)
-> (CreateCrawler -> Maybe Text -> CreateCrawler)
-> Lens CreateCrawler CreateCrawler (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCrawler' {Maybe Text
description :: Maybe Text
$sel:description:CreateCrawler' :: CreateCrawler -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateCrawler
s@CreateCrawler' {} Maybe Text
a -> CreateCrawler
s {$sel:description:CreateCrawler' :: Maybe Text
description = Maybe Text
a} :: CreateCrawler)
createCrawler_tags :: Lens.Lens' CreateCrawler (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createCrawler_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateCrawler -> f CreateCrawler
createCrawler_tags = (CreateCrawler -> Maybe (HashMap Text Text))
-> (CreateCrawler -> Maybe (HashMap Text Text) -> CreateCrawler)
-> Lens
CreateCrawler
CreateCrawler
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCrawler' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateCrawler' :: CreateCrawler -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateCrawler
s@CreateCrawler' {} Maybe (HashMap Text Text)
a -> CreateCrawler
s {$sel:tags:CreateCrawler' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateCrawler) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateCrawler -> f CreateCrawler)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateCrawler
-> f CreateCrawler
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createCrawler_name :: Lens.Lens' CreateCrawler Prelude.Text
createCrawler_name :: (Text -> f Text) -> CreateCrawler -> f CreateCrawler
createCrawler_name = (CreateCrawler -> Text)
-> (CreateCrawler -> Text -> CreateCrawler)
-> Lens CreateCrawler CreateCrawler Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCrawler' {Text
name :: Text
$sel:name:CreateCrawler' :: CreateCrawler -> Text
name} -> Text
name) (\s :: CreateCrawler
s@CreateCrawler' {} Text
a -> CreateCrawler
s {$sel:name:CreateCrawler' :: Text
name = Text
a} :: CreateCrawler)
createCrawler_role :: Lens.Lens' CreateCrawler Prelude.Text
createCrawler_role :: (Text -> f Text) -> CreateCrawler -> f CreateCrawler
createCrawler_role = (CreateCrawler -> Text)
-> (CreateCrawler -> Text -> CreateCrawler)
-> Lens CreateCrawler CreateCrawler Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCrawler' {Text
role' :: Text
$sel:role':CreateCrawler' :: CreateCrawler -> Text
role'} -> Text
role') (\s :: CreateCrawler
s@CreateCrawler' {} Text
a -> CreateCrawler
s {$sel:role':CreateCrawler' :: Text
role' = Text
a} :: CreateCrawler)
createCrawler_targets :: Lens.Lens' CreateCrawler CrawlerTargets
createCrawler_targets :: (CrawlerTargets -> f CrawlerTargets)
-> CreateCrawler -> f CreateCrawler
createCrawler_targets = (CreateCrawler -> CrawlerTargets)
-> (CreateCrawler -> CrawlerTargets -> CreateCrawler)
-> Lens CreateCrawler CreateCrawler CrawlerTargets CrawlerTargets
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCrawler' {CrawlerTargets
targets :: CrawlerTargets
$sel:targets:CreateCrawler' :: CreateCrawler -> CrawlerTargets
targets} -> CrawlerTargets
targets) (\s :: CreateCrawler
s@CreateCrawler' {} CrawlerTargets
a -> CreateCrawler
s {$sel:targets:CreateCrawler' :: CrawlerTargets
targets = CrawlerTargets
a} :: CreateCrawler)
instance Core.AWSRequest CreateCrawler where
type
AWSResponse CreateCrawler =
CreateCrawlerResponse
request :: CreateCrawler -> Request CreateCrawler
request = Service -> CreateCrawler -> Request CreateCrawler
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateCrawler
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateCrawler)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse CreateCrawler))
-> Logger
-> Service
-> Proxy CreateCrawler
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateCrawler)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> CreateCrawlerResponse
CreateCrawlerResponse'
(Int -> CreateCrawlerResponse)
-> Either String Int -> Either String CreateCrawlerResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateCrawler
instance Prelude.NFData CreateCrawler
instance Core.ToHeaders CreateCrawler where
toHeaders :: CreateCrawler -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateCrawler -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# (ByteString
"AWSGlue.CreateCrawler" :: Prelude.ByteString),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateCrawler where
toJSON :: CreateCrawler -> Value
toJSON CreateCrawler' {Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe LineageConfiguration
Maybe RecrawlPolicy
Maybe SchemaChangePolicy
Text
CrawlerTargets
targets :: CrawlerTargets
role' :: Text
name :: Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
tablePrefix :: Maybe Text
configuration :: Maybe Text
lineageConfiguration :: Maybe LineageConfiguration
crawlerSecurityConfiguration :: Maybe Text
databaseName :: Maybe Text
classifiers :: Maybe [Text]
recrawlPolicy :: Maybe RecrawlPolicy
schedule :: Maybe Text
schemaChangePolicy :: Maybe SchemaChangePolicy
$sel:targets:CreateCrawler' :: CreateCrawler -> CrawlerTargets
$sel:role':CreateCrawler' :: CreateCrawler -> Text
$sel:name:CreateCrawler' :: CreateCrawler -> Text
$sel:tags:CreateCrawler' :: CreateCrawler -> Maybe (HashMap Text Text)
$sel:description:CreateCrawler' :: CreateCrawler -> Maybe Text
$sel:tablePrefix:CreateCrawler' :: CreateCrawler -> Maybe Text
$sel:configuration:CreateCrawler' :: CreateCrawler -> Maybe Text
$sel:lineageConfiguration:CreateCrawler' :: CreateCrawler -> Maybe LineageConfiguration
$sel:crawlerSecurityConfiguration:CreateCrawler' :: CreateCrawler -> Maybe Text
$sel:databaseName:CreateCrawler' :: CreateCrawler -> Maybe Text
$sel:classifiers:CreateCrawler' :: CreateCrawler -> Maybe [Text]
$sel:recrawlPolicy:CreateCrawler' :: CreateCrawler -> Maybe RecrawlPolicy
$sel:schedule:CreateCrawler' :: CreateCrawler -> Maybe Text
$sel:schemaChangePolicy:CreateCrawler' :: CreateCrawler -> Maybe SchemaChangePolicy
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"SchemaChangePolicy" Text -> SchemaChangePolicy -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(SchemaChangePolicy -> Pair)
-> Maybe SchemaChangePolicy -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SchemaChangePolicy
schemaChangePolicy,
(Text
"Schedule" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
schedule,
(Text
"RecrawlPolicy" Text -> RecrawlPolicy -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (RecrawlPolicy -> Pair) -> Maybe RecrawlPolicy -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RecrawlPolicy
recrawlPolicy,
(Text
"Classifiers" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
classifiers,
(Text
"DatabaseName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
databaseName,
(Text
"CrawlerSecurityConfiguration" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
crawlerSecurityConfiguration,
(Text
"LineageConfiguration" Text -> LineageConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(LineageConfiguration -> Pair)
-> Maybe LineageConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LineageConfiguration
lineageConfiguration,
(Text
"Configuration" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
configuration,
(Text
"TablePrefix" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
tablePrefix,
(Text
"Description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
(Text
"Tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Role" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
role'),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Targets" Text -> CrawlerTargets -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= CrawlerTargets
targets)
]
)
instance Core.ToPath CreateCrawler where
toPath :: CreateCrawler -> ByteString
toPath = ByteString -> CreateCrawler -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateCrawler where
toQuery :: CreateCrawler -> QueryString
toQuery = QueryString -> CreateCrawler -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateCrawlerResponse = CreateCrawlerResponse'
{
CreateCrawlerResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateCrawlerResponse -> CreateCrawlerResponse -> Bool
(CreateCrawlerResponse -> CreateCrawlerResponse -> Bool)
-> (CreateCrawlerResponse -> CreateCrawlerResponse -> Bool)
-> Eq CreateCrawlerResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateCrawlerResponse -> CreateCrawlerResponse -> Bool
$c/= :: CreateCrawlerResponse -> CreateCrawlerResponse -> Bool
== :: CreateCrawlerResponse -> CreateCrawlerResponse -> Bool
$c== :: CreateCrawlerResponse -> CreateCrawlerResponse -> Bool
Prelude.Eq, ReadPrec [CreateCrawlerResponse]
ReadPrec CreateCrawlerResponse
Int -> ReadS CreateCrawlerResponse
ReadS [CreateCrawlerResponse]
(Int -> ReadS CreateCrawlerResponse)
-> ReadS [CreateCrawlerResponse]
-> ReadPrec CreateCrawlerResponse
-> ReadPrec [CreateCrawlerResponse]
-> Read CreateCrawlerResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateCrawlerResponse]
$creadListPrec :: ReadPrec [CreateCrawlerResponse]
readPrec :: ReadPrec CreateCrawlerResponse
$creadPrec :: ReadPrec CreateCrawlerResponse
readList :: ReadS [CreateCrawlerResponse]
$creadList :: ReadS [CreateCrawlerResponse]
readsPrec :: Int -> ReadS CreateCrawlerResponse
$creadsPrec :: Int -> ReadS CreateCrawlerResponse
Prelude.Read, Int -> CreateCrawlerResponse -> ShowS
[CreateCrawlerResponse] -> ShowS
CreateCrawlerResponse -> String
(Int -> CreateCrawlerResponse -> ShowS)
-> (CreateCrawlerResponse -> String)
-> ([CreateCrawlerResponse] -> ShowS)
-> Show CreateCrawlerResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateCrawlerResponse] -> ShowS
$cshowList :: [CreateCrawlerResponse] -> ShowS
show :: CreateCrawlerResponse -> String
$cshow :: CreateCrawlerResponse -> String
showsPrec :: Int -> CreateCrawlerResponse -> ShowS
$cshowsPrec :: Int -> CreateCrawlerResponse -> ShowS
Prelude.Show, (forall x. CreateCrawlerResponse -> Rep CreateCrawlerResponse x)
-> (forall x. Rep CreateCrawlerResponse x -> CreateCrawlerResponse)
-> Generic CreateCrawlerResponse
forall x. Rep CreateCrawlerResponse x -> CreateCrawlerResponse
forall x. CreateCrawlerResponse -> Rep CreateCrawlerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateCrawlerResponse x -> CreateCrawlerResponse
$cfrom :: forall x. CreateCrawlerResponse -> Rep CreateCrawlerResponse x
Prelude.Generic)
newCreateCrawlerResponse ::
Prelude.Int ->
CreateCrawlerResponse
newCreateCrawlerResponse :: Int -> CreateCrawlerResponse
newCreateCrawlerResponse Int
pHttpStatus_ =
CreateCrawlerResponse' :: Int -> CreateCrawlerResponse
CreateCrawlerResponse' {$sel:httpStatus:CreateCrawlerResponse' :: Int
httpStatus = Int
pHttpStatus_}
createCrawlerResponse_httpStatus :: Lens.Lens' CreateCrawlerResponse Prelude.Int
createCrawlerResponse_httpStatus :: (Int -> f Int) -> CreateCrawlerResponse -> f CreateCrawlerResponse
createCrawlerResponse_httpStatus = (CreateCrawlerResponse -> Int)
-> (CreateCrawlerResponse -> Int -> CreateCrawlerResponse)
-> Lens CreateCrawlerResponse CreateCrawlerResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCrawlerResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateCrawlerResponse' :: CreateCrawlerResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateCrawlerResponse
s@CreateCrawlerResponse' {} Int
a -> CreateCrawlerResponse
s {$sel:httpStatus:CreateCrawlerResponse' :: Int
httpStatus = Int
a} :: CreateCrawlerResponse)
instance Prelude.NFData CreateCrawlerResponse