{-# 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.MacieV2.CreateCustomDataIdentifier
(
CreateCustomDataIdentifier (..),
newCreateCustomDataIdentifier,
createCustomDataIdentifier_clientToken,
createCustomDataIdentifier_regex,
createCustomDataIdentifier_name,
createCustomDataIdentifier_keywords,
createCustomDataIdentifier_ignoreWords,
createCustomDataIdentifier_maximumMatchDistance,
createCustomDataIdentifier_description,
createCustomDataIdentifier_tags,
CreateCustomDataIdentifierResponse (..),
newCreateCustomDataIdentifierResponse,
createCustomDataIdentifierResponse_customDataIdentifierId,
createCustomDataIdentifierResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MacieV2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateCustomDataIdentifier = CreateCustomDataIdentifier'
{
CreateCustomDataIdentifier -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
CreateCustomDataIdentifier -> Maybe Text
regex :: Prelude.Maybe Prelude.Text,
CreateCustomDataIdentifier -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
CreateCustomDataIdentifier -> Maybe [Text]
keywords :: Prelude.Maybe [Prelude.Text],
CreateCustomDataIdentifier -> Maybe [Text]
ignoreWords :: Prelude.Maybe [Prelude.Text],
CreateCustomDataIdentifier -> Maybe Int
maximumMatchDistance :: Prelude.Maybe Prelude.Int,
CreateCustomDataIdentifier -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateCustomDataIdentifier -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (CreateCustomDataIdentifier -> CreateCustomDataIdentifier -> Bool
(CreateCustomDataIdentifier -> CreateCustomDataIdentifier -> Bool)
-> (CreateCustomDataIdentifier
-> CreateCustomDataIdentifier -> Bool)
-> Eq CreateCustomDataIdentifier
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateCustomDataIdentifier -> CreateCustomDataIdentifier -> Bool
$c/= :: CreateCustomDataIdentifier -> CreateCustomDataIdentifier -> Bool
== :: CreateCustomDataIdentifier -> CreateCustomDataIdentifier -> Bool
$c== :: CreateCustomDataIdentifier -> CreateCustomDataIdentifier -> Bool
Prelude.Eq, ReadPrec [CreateCustomDataIdentifier]
ReadPrec CreateCustomDataIdentifier
Int -> ReadS CreateCustomDataIdentifier
ReadS [CreateCustomDataIdentifier]
(Int -> ReadS CreateCustomDataIdentifier)
-> ReadS [CreateCustomDataIdentifier]
-> ReadPrec CreateCustomDataIdentifier
-> ReadPrec [CreateCustomDataIdentifier]
-> Read CreateCustomDataIdentifier
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateCustomDataIdentifier]
$creadListPrec :: ReadPrec [CreateCustomDataIdentifier]
readPrec :: ReadPrec CreateCustomDataIdentifier
$creadPrec :: ReadPrec CreateCustomDataIdentifier
readList :: ReadS [CreateCustomDataIdentifier]
$creadList :: ReadS [CreateCustomDataIdentifier]
readsPrec :: Int -> ReadS CreateCustomDataIdentifier
$creadsPrec :: Int -> ReadS CreateCustomDataIdentifier
Prelude.Read, Int -> CreateCustomDataIdentifier -> ShowS
[CreateCustomDataIdentifier] -> ShowS
CreateCustomDataIdentifier -> String
(Int -> CreateCustomDataIdentifier -> ShowS)
-> (CreateCustomDataIdentifier -> String)
-> ([CreateCustomDataIdentifier] -> ShowS)
-> Show CreateCustomDataIdentifier
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateCustomDataIdentifier] -> ShowS
$cshowList :: [CreateCustomDataIdentifier] -> ShowS
show :: CreateCustomDataIdentifier -> String
$cshow :: CreateCustomDataIdentifier -> String
showsPrec :: Int -> CreateCustomDataIdentifier -> ShowS
$cshowsPrec :: Int -> CreateCustomDataIdentifier -> ShowS
Prelude.Show, (forall x.
CreateCustomDataIdentifier -> Rep CreateCustomDataIdentifier x)
-> (forall x.
Rep CreateCustomDataIdentifier x -> CreateCustomDataIdentifier)
-> Generic CreateCustomDataIdentifier
forall x.
Rep CreateCustomDataIdentifier x -> CreateCustomDataIdentifier
forall x.
CreateCustomDataIdentifier -> Rep CreateCustomDataIdentifier x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateCustomDataIdentifier x -> CreateCustomDataIdentifier
$cfrom :: forall x.
CreateCustomDataIdentifier -> Rep CreateCustomDataIdentifier x
Prelude.Generic)
newCreateCustomDataIdentifier ::
CreateCustomDataIdentifier
newCreateCustomDataIdentifier :: CreateCustomDataIdentifier
newCreateCustomDataIdentifier =
CreateCustomDataIdentifier' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CreateCustomDataIdentifier
CreateCustomDataIdentifier'
{ $sel:clientToken:CreateCustomDataIdentifier' :: Maybe Text
clientToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:regex:CreateCustomDataIdentifier' :: Maybe Text
regex = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateCustomDataIdentifier' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:keywords:CreateCustomDataIdentifier' :: Maybe [Text]
keywords = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:ignoreWords:CreateCustomDataIdentifier' :: Maybe [Text]
ignoreWords = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:maximumMatchDistance:CreateCustomDataIdentifier' :: Maybe Int
maximumMatchDistance = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateCustomDataIdentifier' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateCustomDataIdentifier' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
}
createCustomDataIdentifier_clientToken :: Lens.Lens' CreateCustomDataIdentifier (Prelude.Maybe Prelude.Text)
createCustomDataIdentifier_clientToken :: (Maybe Text -> f (Maybe Text))
-> CreateCustomDataIdentifier -> f CreateCustomDataIdentifier
createCustomDataIdentifier_clientToken = (CreateCustomDataIdentifier -> Maybe Text)
-> (CreateCustomDataIdentifier
-> Maybe Text -> CreateCustomDataIdentifier)
-> Lens
CreateCustomDataIdentifier
CreateCustomDataIdentifier
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomDataIdentifier' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateCustomDataIdentifier' :: CreateCustomDataIdentifier -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateCustomDataIdentifier
s@CreateCustomDataIdentifier' {} Maybe Text
a -> CreateCustomDataIdentifier
s {$sel:clientToken:CreateCustomDataIdentifier' :: Maybe Text
clientToken = Maybe Text
a} :: CreateCustomDataIdentifier)
createCustomDataIdentifier_regex :: Lens.Lens' CreateCustomDataIdentifier (Prelude.Maybe Prelude.Text)
createCustomDataIdentifier_regex :: (Maybe Text -> f (Maybe Text))
-> CreateCustomDataIdentifier -> f CreateCustomDataIdentifier
createCustomDataIdentifier_regex = (CreateCustomDataIdentifier -> Maybe Text)
-> (CreateCustomDataIdentifier
-> Maybe Text -> CreateCustomDataIdentifier)
-> Lens
CreateCustomDataIdentifier
CreateCustomDataIdentifier
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomDataIdentifier' {Maybe Text
regex :: Maybe Text
$sel:regex:CreateCustomDataIdentifier' :: CreateCustomDataIdentifier -> Maybe Text
regex} -> Maybe Text
regex) (\s :: CreateCustomDataIdentifier
s@CreateCustomDataIdentifier' {} Maybe Text
a -> CreateCustomDataIdentifier
s {$sel:regex:CreateCustomDataIdentifier' :: Maybe Text
regex = Maybe Text
a} :: CreateCustomDataIdentifier)
createCustomDataIdentifier_name :: Lens.Lens' CreateCustomDataIdentifier (Prelude.Maybe Prelude.Text)
createCustomDataIdentifier_name :: (Maybe Text -> f (Maybe Text))
-> CreateCustomDataIdentifier -> f CreateCustomDataIdentifier
createCustomDataIdentifier_name = (CreateCustomDataIdentifier -> Maybe Text)
-> (CreateCustomDataIdentifier
-> Maybe Text -> CreateCustomDataIdentifier)
-> Lens
CreateCustomDataIdentifier
CreateCustomDataIdentifier
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomDataIdentifier' {Maybe Text
name :: Maybe Text
$sel:name:CreateCustomDataIdentifier' :: CreateCustomDataIdentifier -> Maybe Text
name} -> Maybe Text
name) (\s :: CreateCustomDataIdentifier
s@CreateCustomDataIdentifier' {} Maybe Text
a -> CreateCustomDataIdentifier
s {$sel:name:CreateCustomDataIdentifier' :: Maybe Text
name = Maybe Text
a} :: CreateCustomDataIdentifier)
createCustomDataIdentifier_keywords :: Lens.Lens' CreateCustomDataIdentifier (Prelude.Maybe [Prelude.Text])
createCustomDataIdentifier_keywords :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateCustomDataIdentifier -> f CreateCustomDataIdentifier
createCustomDataIdentifier_keywords = (CreateCustomDataIdentifier -> Maybe [Text])
-> (CreateCustomDataIdentifier
-> Maybe [Text] -> CreateCustomDataIdentifier)
-> Lens
CreateCustomDataIdentifier
CreateCustomDataIdentifier
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomDataIdentifier' {Maybe [Text]
keywords :: Maybe [Text]
$sel:keywords:CreateCustomDataIdentifier' :: CreateCustomDataIdentifier -> Maybe [Text]
keywords} -> Maybe [Text]
keywords) (\s :: CreateCustomDataIdentifier
s@CreateCustomDataIdentifier' {} Maybe [Text]
a -> CreateCustomDataIdentifier
s {$sel:keywords:CreateCustomDataIdentifier' :: Maybe [Text]
keywords = Maybe [Text]
a} :: CreateCustomDataIdentifier) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateCustomDataIdentifier -> f CreateCustomDataIdentifier)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateCustomDataIdentifier
-> f CreateCustomDataIdentifier
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
createCustomDataIdentifier_ignoreWords :: Lens.Lens' CreateCustomDataIdentifier (Prelude.Maybe [Prelude.Text])
createCustomDataIdentifier_ignoreWords :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateCustomDataIdentifier -> f CreateCustomDataIdentifier
createCustomDataIdentifier_ignoreWords = (CreateCustomDataIdentifier -> Maybe [Text])
-> (CreateCustomDataIdentifier
-> Maybe [Text] -> CreateCustomDataIdentifier)
-> Lens
CreateCustomDataIdentifier
CreateCustomDataIdentifier
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomDataIdentifier' {Maybe [Text]
ignoreWords :: Maybe [Text]
$sel:ignoreWords:CreateCustomDataIdentifier' :: CreateCustomDataIdentifier -> Maybe [Text]
ignoreWords} -> Maybe [Text]
ignoreWords) (\s :: CreateCustomDataIdentifier
s@CreateCustomDataIdentifier' {} Maybe [Text]
a -> CreateCustomDataIdentifier
s {$sel:ignoreWords:CreateCustomDataIdentifier' :: Maybe [Text]
ignoreWords = Maybe [Text]
a} :: CreateCustomDataIdentifier) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateCustomDataIdentifier -> f CreateCustomDataIdentifier)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateCustomDataIdentifier
-> f CreateCustomDataIdentifier
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
createCustomDataIdentifier_maximumMatchDistance :: Lens.Lens' CreateCustomDataIdentifier (Prelude.Maybe Prelude.Int)
createCustomDataIdentifier_maximumMatchDistance :: (Maybe Int -> f (Maybe Int))
-> CreateCustomDataIdentifier -> f CreateCustomDataIdentifier
createCustomDataIdentifier_maximumMatchDistance = (CreateCustomDataIdentifier -> Maybe Int)
-> (CreateCustomDataIdentifier
-> Maybe Int -> CreateCustomDataIdentifier)
-> Lens
CreateCustomDataIdentifier
CreateCustomDataIdentifier
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomDataIdentifier' {Maybe Int
maximumMatchDistance :: Maybe Int
$sel:maximumMatchDistance:CreateCustomDataIdentifier' :: CreateCustomDataIdentifier -> Maybe Int
maximumMatchDistance} -> Maybe Int
maximumMatchDistance) (\s :: CreateCustomDataIdentifier
s@CreateCustomDataIdentifier' {} Maybe Int
a -> CreateCustomDataIdentifier
s {$sel:maximumMatchDistance:CreateCustomDataIdentifier' :: Maybe Int
maximumMatchDistance = Maybe Int
a} :: CreateCustomDataIdentifier)
createCustomDataIdentifier_description :: Lens.Lens' CreateCustomDataIdentifier (Prelude.Maybe Prelude.Text)
createCustomDataIdentifier_description :: (Maybe Text -> f (Maybe Text))
-> CreateCustomDataIdentifier -> f CreateCustomDataIdentifier
createCustomDataIdentifier_description = (CreateCustomDataIdentifier -> Maybe Text)
-> (CreateCustomDataIdentifier
-> Maybe Text -> CreateCustomDataIdentifier)
-> Lens
CreateCustomDataIdentifier
CreateCustomDataIdentifier
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomDataIdentifier' {Maybe Text
description :: Maybe Text
$sel:description:CreateCustomDataIdentifier' :: CreateCustomDataIdentifier -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateCustomDataIdentifier
s@CreateCustomDataIdentifier' {} Maybe Text
a -> CreateCustomDataIdentifier
s {$sel:description:CreateCustomDataIdentifier' :: Maybe Text
description = Maybe Text
a} :: CreateCustomDataIdentifier)
createCustomDataIdentifier_tags :: Lens.Lens' CreateCustomDataIdentifier (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createCustomDataIdentifier_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateCustomDataIdentifier -> f CreateCustomDataIdentifier
createCustomDataIdentifier_tags = (CreateCustomDataIdentifier -> Maybe (HashMap Text Text))
-> (CreateCustomDataIdentifier
-> Maybe (HashMap Text Text) -> CreateCustomDataIdentifier)
-> Lens
CreateCustomDataIdentifier
CreateCustomDataIdentifier
(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 (\CreateCustomDataIdentifier' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateCustomDataIdentifier' :: CreateCustomDataIdentifier -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateCustomDataIdentifier
s@CreateCustomDataIdentifier' {} Maybe (HashMap Text Text)
a -> CreateCustomDataIdentifier
s {$sel:tags:CreateCustomDataIdentifier' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateCustomDataIdentifier) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateCustomDataIdentifier -> f CreateCustomDataIdentifier)
-> ((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)))
-> CreateCustomDataIdentifier
-> f CreateCustomDataIdentifier
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
instance Core.AWSRequest CreateCustomDataIdentifier where
type
AWSResponse CreateCustomDataIdentifier =
CreateCustomDataIdentifierResponse
request :: CreateCustomDataIdentifier -> Request CreateCustomDataIdentifier
request = Service
-> CreateCustomDataIdentifier -> Request CreateCustomDataIdentifier
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateCustomDataIdentifier
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateCustomDataIdentifier)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateCustomDataIdentifier))
-> Logger
-> Service
-> Proxy CreateCustomDataIdentifier
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateCustomDataIdentifier)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text -> Int -> CreateCustomDataIdentifierResponse
CreateCustomDataIdentifierResponse'
(Maybe Text -> Int -> CreateCustomDataIdentifierResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateCustomDataIdentifierResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"customDataIdentifierId")
Either String (Int -> CreateCustomDataIdentifierResponse)
-> Either String Int
-> Either String CreateCustomDataIdentifierResponse
forall (f :: * -> *) a b. Applicative f => 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 CreateCustomDataIdentifier
instance Prelude.NFData CreateCustomDataIdentifier
instance Core.ToHeaders CreateCustomDataIdentifier where
toHeaders :: CreateCustomDataIdentifier -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateCustomDataIdentifier -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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 CreateCustomDataIdentifier where
toJSON :: CreateCustomDataIdentifier -> Value
toJSON CreateCustomDataIdentifier' {Maybe Int
Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
maximumMatchDistance :: Maybe Int
ignoreWords :: Maybe [Text]
keywords :: Maybe [Text]
name :: Maybe Text
regex :: Maybe Text
clientToken :: Maybe Text
$sel:tags:CreateCustomDataIdentifier' :: CreateCustomDataIdentifier -> Maybe (HashMap Text Text)
$sel:description:CreateCustomDataIdentifier' :: CreateCustomDataIdentifier -> Maybe Text
$sel:maximumMatchDistance:CreateCustomDataIdentifier' :: CreateCustomDataIdentifier -> Maybe Int
$sel:ignoreWords:CreateCustomDataIdentifier' :: CreateCustomDataIdentifier -> Maybe [Text]
$sel:keywords:CreateCustomDataIdentifier' :: CreateCustomDataIdentifier -> Maybe [Text]
$sel:name:CreateCustomDataIdentifier' :: CreateCustomDataIdentifier -> Maybe Text
$sel:regex:CreateCustomDataIdentifier' :: CreateCustomDataIdentifier -> Maybe Text
$sel:clientToken:CreateCustomDataIdentifier' :: CreateCustomDataIdentifier -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"clientToken" 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
clientToken,
(Text
"regex" 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
regex,
(Text
"name" 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
name,
(Text
"keywords" 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]
keywords,
(Text
"ignoreWords" 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]
ignoreWords,
(Text
"maximumMatchDistance" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maximumMatchDistance,
(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
]
)
instance Core.ToPath CreateCustomDataIdentifier where
toPath :: CreateCustomDataIdentifier -> ByteString
toPath = ByteString -> CreateCustomDataIdentifier -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/custom-data-identifiers"
instance Core.ToQuery CreateCustomDataIdentifier where
toQuery :: CreateCustomDataIdentifier -> QueryString
toQuery = QueryString -> CreateCustomDataIdentifier -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateCustomDataIdentifierResponse = CreateCustomDataIdentifierResponse'
{
CreateCustomDataIdentifierResponse -> Maybe Text
customDataIdentifierId :: Prelude.Maybe Prelude.Text,
CreateCustomDataIdentifierResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateCustomDataIdentifierResponse
-> CreateCustomDataIdentifierResponse -> Bool
(CreateCustomDataIdentifierResponse
-> CreateCustomDataIdentifierResponse -> Bool)
-> (CreateCustomDataIdentifierResponse
-> CreateCustomDataIdentifierResponse -> Bool)
-> Eq CreateCustomDataIdentifierResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateCustomDataIdentifierResponse
-> CreateCustomDataIdentifierResponse -> Bool
$c/= :: CreateCustomDataIdentifierResponse
-> CreateCustomDataIdentifierResponse -> Bool
== :: CreateCustomDataIdentifierResponse
-> CreateCustomDataIdentifierResponse -> Bool
$c== :: CreateCustomDataIdentifierResponse
-> CreateCustomDataIdentifierResponse -> Bool
Prelude.Eq, ReadPrec [CreateCustomDataIdentifierResponse]
ReadPrec CreateCustomDataIdentifierResponse
Int -> ReadS CreateCustomDataIdentifierResponse
ReadS [CreateCustomDataIdentifierResponse]
(Int -> ReadS CreateCustomDataIdentifierResponse)
-> ReadS [CreateCustomDataIdentifierResponse]
-> ReadPrec CreateCustomDataIdentifierResponse
-> ReadPrec [CreateCustomDataIdentifierResponse]
-> Read CreateCustomDataIdentifierResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateCustomDataIdentifierResponse]
$creadListPrec :: ReadPrec [CreateCustomDataIdentifierResponse]
readPrec :: ReadPrec CreateCustomDataIdentifierResponse
$creadPrec :: ReadPrec CreateCustomDataIdentifierResponse
readList :: ReadS [CreateCustomDataIdentifierResponse]
$creadList :: ReadS [CreateCustomDataIdentifierResponse]
readsPrec :: Int -> ReadS CreateCustomDataIdentifierResponse
$creadsPrec :: Int -> ReadS CreateCustomDataIdentifierResponse
Prelude.Read, Int -> CreateCustomDataIdentifierResponse -> ShowS
[CreateCustomDataIdentifierResponse] -> ShowS
CreateCustomDataIdentifierResponse -> String
(Int -> CreateCustomDataIdentifierResponse -> ShowS)
-> (CreateCustomDataIdentifierResponse -> String)
-> ([CreateCustomDataIdentifierResponse] -> ShowS)
-> Show CreateCustomDataIdentifierResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateCustomDataIdentifierResponse] -> ShowS
$cshowList :: [CreateCustomDataIdentifierResponse] -> ShowS
show :: CreateCustomDataIdentifierResponse -> String
$cshow :: CreateCustomDataIdentifierResponse -> String
showsPrec :: Int -> CreateCustomDataIdentifierResponse -> ShowS
$cshowsPrec :: Int -> CreateCustomDataIdentifierResponse -> ShowS
Prelude.Show, (forall x.
CreateCustomDataIdentifierResponse
-> Rep CreateCustomDataIdentifierResponse x)
-> (forall x.
Rep CreateCustomDataIdentifierResponse x
-> CreateCustomDataIdentifierResponse)
-> Generic CreateCustomDataIdentifierResponse
forall x.
Rep CreateCustomDataIdentifierResponse x
-> CreateCustomDataIdentifierResponse
forall x.
CreateCustomDataIdentifierResponse
-> Rep CreateCustomDataIdentifierResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateCustomDataIdentifierResponse x
-> CreateCustomDataIdentifierResponse
$cfrom :: forall x.
CreateCustomDataIdentifierResponse
-> Rep CreateCustomDataIdentifierResponse x
Prelude.Generic)
newCreateCustomDataIdentifierResponse ::
Prelude.Int ->
CreateCustomDataIdentifierResponse
newCreateCustomDataIdentifierResponse :: Int -> CreateCustomDataIdentifierResponse
newCreateCustomDataIdentifierResponse Int
pHttpStatus_ =
CreateCustomDataIdentifierResponse' :: Maybe Text -> Int -> CreateCustomDataIdentifierResponse
CreateCustomDataIdentifierResponse'
{ $sel:customDataIdentifierId:CreateCustomDataIdentifierResponse' :: Maybe Text
customDataIdentifierId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateCustomDataIdentifierResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createCustomDataIdentifierResponse_customDataIdentifierId :: Lens.Lens' CreateCustomDataIdentifierResponse (Prelude.Maybe Prelude.Text)
createCustomDataIdentifierResponse_customDataIdentifierId :: (Maybe Text -> f (Maybe Text))
-> CreateCustomDataIdentifierResponse
-> f CreateCustomDataIdentifierResponse
createCustomDataIdentifierResponse_customDataIdentifierId = (CreateCustomDataIdentifierResponse -> Maybe Text)
-> (CreateCustomDataIdentifierResponse
-> Maybe Text -> CreateCustomDataIdentifierResponse)
-> Lens
CreateCustomDataIdentifierResponse
CreateCustomDataIdentifierResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomDataIdentifierResponse' {Maybe Text
customDataIdentifierId :: Maybe Text
$sel:customDataIdentifierId:CreateCustomDataIdentifierResponse' :: CreateCustomDataIdentifierResponse -> Maybe Text
customDataIdentifierId} -> Maybe Text
customDataIdentifierId) (\s :: CreateCustomDataIdentifierResponse
s@CreateCustomDataIdentifierResponse' {} Maybe Text
a -> CreateCustomDataIdentifierResponse
s {$sel:customDataIdentifierId:CreateCustomDataIdentifierResponse' :: Maybe Text
customDataIdentifierId = Maybe Text
a} :: CreateCustomDataIdentifierResponse)
createCustomDataIdentifierResponse_httpStatus :: Lens.Lens' CreateCustomDataIdentifierResponse Prelude.Int
createCustomDataIdentifierResponse_httpStatus :: (Int -> f Int)
-> CreateCustomDataIdentifierResponse
-> f CreateCustomDataIdentifierResponse
createCustomDataIdentifierResponse_httpStatus = (CreateCustomDataIdentifierResponse -> Int)
-> (CreateCustomDataIdentifierResponse
-> Int -> CreateCustomDataIdentifierResponse)
-> Lens
CreateCustomDataIdentifierResponse
CreateCustomDataIdentifierResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomDataIdentifierResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateCustomDataIdentifierResponse' :: CreateCustomDataIdentifierResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateCustomDataIdentifierResponse
s@CreateCustomDataIdentifierResponse' {} Int
a -> CreateCustomDataIdentifierResponse
s {$sel:httpStatus:CreateCustomDataIdentifierResponse' :: Int
httpStatus = Int
a} :: CreateCustomDataIdentifierResponse)
instance
Prelude.NFData
CreateCustomDataIdentifierResponse