{-# 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 #-}
module Amazonka.Kendra.Types.ServiceNowKnowledgeArticleConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Kendra.Types.DataSourceToIndexFieldMapping
import qualified Amazonka.Prelude as Prelude
data ServiceNowKnowledgeArticleConfiguration = ServiceNowKnowledgeArticleConfiguration'
{
ServiceNowKnowledgeArticleConfiguration -> Maybe Bool
crawlAttachments :: Prelude.Maybe Prelude.Bool,
ServiceNowKnowledgeArticleConfiguration -> Maybe Text
documentTitleFieldName :: Prelude.Maybe Prelude.Text,
ServiceNowKnowledgeArticleConfiguration -> Maybe [Text]
excludeAttachmentFilePatterns :: Prelude.Maybe [Prelude.Text],
ServiceNowKnowledgeArticleConfiguration
-> Maybe (NonEmpty DataSourceToIndexFieldMapping)
fieldMappings :: Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping),
ServiceNowKnowledgeArticleConfiguration -> Maybe Text
filterQuery :: Prelude.Maybe Prelude.Text,
ServiceNowKnowledgeArticleConfiguration -> Maybe [Text]
includeAttachmentFilePatterns :: Prelude.Maybe [Prelude.Text],
ServiceNowKnowledgeArticleConfiguration -> Text
documentDataFieldName :: Prelude.Text
}
deriving (ServiceNowKnowledgeArticleConfiguration
-> ServiceNowKnowledgeArticleConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServiceNowKnowledgeArticleConfiguration
-> ServiceNowKnowledgeArticleConfiguration -> Bool
$c/= :: ServiceNowKnowledgeArticleConfiguration
-> ServiceNowKnowledgeArticleConfiguration -> Bool
== :: ServiceNowKnowledgeArticleConfiguration
-> ServiceNowKnowledgeArticleConfiguration -> Bool
$c== :: ServiceNowKnowledgeArticleConfiguration
-> ServiceNowKnowledgeArticleConfiguration -> Bool
Prelude.Eq, ReadPrec [ServiceNowKnowledgeArticleConfiguration]
ReadPrec ServiceNowKnowledgeArticleConfiguration
Int -> ReadS ServiceNowKnowledgeArticleConfiguration
ReadS [ServiceNowKnowledgeArticleConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ServiceNowKnowledgeArticleConfiguration]
$creadListPrec :: ReadPrec [ServiceNowKnowledgeArticleConfiguration]
readPrec :: ReadPrec ServiceNowKnowledgeArticleConfiguration
$creadPrec :: ReadPrec ServiceNowKnowledgeArticleConfiguration
readList :: ReadS [ServiceNowKnowledgeArticleConfiguration]
$creadList :: ReadS [ServiceNowKnowledgeArticleConfiguration]
readsPrec :: Int -> ReadS ServiceNowKnowledgeArticleConfiguration
$creadsPrec :: Int -> ReadS ServiceNowKnowledgeArticleConfiguration
Prelude.Read, Int -> ServiceNowKnowledgeArticleConfiguration -> ShowS
[ServiceNowKnowledgeArticleConfiguration] -> ShowS
ServiceNowKnowledgeArticleConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServiceNowKnowledgeArticleConfiguration] -> ShowS
$cshowList :: [ServiceNowKnowledgeArticleConfiguration] -> ShowS
show :: ServiceNowKnowledgeArticleConfiguration -> String
$cshow :: ServiceNowKnowledgeArticleConfiguration -> String
showsPrec :: Int -> ServiceNowKnowledgeArticleConfiguration -> ShowS
$cshowsPrec :: Int -> ServiceNowKnowledgeArticleConfiguration -> ShowS
Prelude.Show, forall x.
Rep ServiceNowKnowledgeArticleConfiguration x
-> ServiceNowKnowledgeArticleConfiguration
forall x.
ServiceNowKnowledgeArticleConfiguration
-> Rep ServiceNowKnowledgeArticleConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ServiceNowKnowledgeArticleConfiguration x
-> ServiceNowKnowledgeArticleConfiguration
$cfrom :: forall x.
ServiceNowKnowledgeArticleConfiguration
-> Rep ServiceNowKnowledgeArticleConfiguration x
Prelude.Generic)
newServiceNowKnowledgeArticleConfiguration ::
Prelude.Text ->
ServiceNowKnowledgeArticleConfiguration
newServiceNowKnowledgeArticleConfiguration :: Text -> ServiceNowKnowledgeArticleConfiguration
newServiceNowKnowledgeArticleConfiguration
Text
pDocumentDataFieldName_ =
ServiceNowKnowledgeArticleConfiguration'
{ $sel:crawlAttachments:ServiceNowKnowledgeArticleConfiguration' :: Maybe Bool
crawlAttachments =
forall a. Maybe a
Prelude.Nothing,
$sel:documentTitleFieldName:ServiceNowKnowledgeArticleConfiguration' :: Maybe Text
documentTitleFieldName =
forall a. Maybe a
Prelude.Nothing,
$sel:excludeAttachmentFilePatterns:ServiceNowKnowledgeArticleConfiguration' :: Maybe [Text]
excludeAttachmentFilePatterns =
forall a. Maybe a
Prelude.Nothing,
$sel:fieldMappings:ServiceNowKnowledgeArticleConfiguration' :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
fieldMappings = forall a. Maybe a
Prelude.Nothing,
$sel:filterQuery:ServiceNowKnowledgeArticleConfiguration' :: Maybe Text
filterQuery = forall a. Maybe a
Prelude.Nothing,
$sel:includeAttachmentFilePatterns:ServiceNowKnowledgeArticleConfiguration' :: Maybe [Text]
includeAttachmentFilePatterns =
forall a. Maybe a
Prelude.Nothing,
$sel:documentDataFieldName:ServiceNowKnowledgeArticleConfiguration' :: Text
documentDataFieldName =
Text
pDocumentDataFieldName_
}
serviceNowKnowledgeArticleConfiguration_crawlAttachments :: Lens.Lens' ServiceNowKnowledgeArticleConfiguration (Prelude.Maybe Prelude.Bool)
serviceNowKnowledgeArticleConfiguration_crawlAttachments :: Lens' ServiceNowKnowledgeArticleConfiguration (Maybe Bool)
serviceNowKnowledgeArticleConfiguration_crawlAttachments = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceNowKnowledgeArticleConfiguration' {Maybe Bool
crawlAttachments :: Maybe Bool
$sel:crawlAttachments:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration -> Maybe Bool
crawlAttachments} -> Maybe Bool
crawlAttachments) (\s :: ServiceNowKnowledgeArticleConfiguration
s@ServiceNowKnowledgeArticleConfiguration' {} Maybe Bool
a -> ServiceNowKnowledgeArticleConfiguration
s {$sel:crawlAttachments:ServiceNowKnowledgeArticleConfiguration' :: Maybe Bool
crawlAttachments = Maybe Bool
a} :: ServiceNowKnowledgeArticleConfiguration)
serviceNowKnowledgeArticleConfiguration_documentTitleFieldName :: Lens.Lens' ServiceNowKnowledgeArticleConfiguration (Prelude.Maybe Prelude.Text)
serviceNowKnowledgeArticleConfiguration_documentTitleFieldName :: Lens' ServiceNowKnowledgeArticleConfiguration (Maybe Text)
serviceNowKnowledgeArticleConfiguration_documentTitleFieldName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceNowKnowledgeArticleConfiguration' {Maybe Text
documentTitleFieldName :: Maybe Text
$sel:documentTitleFieldName:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration -> Maybe Text
documentTitleFieldName} -> Maybe Text
documentTitleFieldName) (\s :: ServiceNowKnowledgeArticleConfiguration
s@ServiceNowKnowledgeArticleConfiguration' {} Maybe Text
a -> ServiceNowKnowledgeArticleConfiguration
s {$sel:documentTitleFieldName:ServiceNowKnowledgeArticleConfiguration' :: Maybe Text
documentTitleFieldName = Maybe Text
a} :: ServiceNowKnowledgeArticleConfiguration)
serviceNowKnowledgeArticleConfiguration_excludeAttachmentFilePatterns :: Lens.Lens' ServiceNowKnowledgeArticleConfiguration (Prelude.Maybe [Prelude.Text])
serviceNowKnowledgeArticleConfiguration_excludeAttachmentFilePatterns :: Lens' ServiceNowKnowledgeArticleConfiguration (Maybe [Text])
serviceNowKnowledgeArticleConfiguration_excludeAttachmentFilePatterns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceNowKnowledgeArticleConfiguration' {Maybe [Text]
excludeAttachmentFilePatterns :: Maybe [Text]
$sel:excludeAttachmentFilePatterns:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration -> Maybe [Text]
excludeAttachmentFilePatterns} -> Maybe [Text]
excludeAttachmentFilePatterns) (\s :: ServiceNowKnowledgeArticleConfiguration
s@ServiceNowKnowledgeArticleConfiguration' {} Maybe [Text]
a -> ServiceNowKnowledgeArticleConfiguration
s {$sel:excludeAttachmentFilePatterns:ServiceNowKnowledgeArticleConfiguration' :: Maybe [Text]
excludeAttachmentFilePatterns = Maybe [Text]
a} :: ServiceNowKnowledgeArticleConfiguration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
serviceNowKnowledgeArticleConfiguration_fieldMappings :: Lens.Lens' ServiceNowKnowledgeArticleConfiguration (Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping))
serviceNowKnowledgeArticleConfiguration_fieldMappings :: Lens'
ServiceNowKnowledgeArticleConfiguration
(Maybe (NonEmpty DataSourceToIndexFieldMapping))
serviceNowKnowledgeArticleConfiguration_fieldMappings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceNowKnowledgeArticleConfiguration' {Maybe (NonEmpty DataSourceToIndexFieldMapping)
fieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:fieldMappings:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration
-> Maybe (NonEmpty DataSourceToIndexFieldMapping)
fieldMappings} -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
fieldMappings) (\s :: ServiceNowKnowledgeArticleConfiguration
s@ServiceNowKnowledgeArticleConfiguration' {} Maybe (NonEmpty DataSourceToIndexFieldMapping)
a -> ServiceNowKnowledgeArticleConfiguration
s {$sel:fieldMappings:ServiceNowKnowledgeArticleConfiguration' :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
fieldMappings = Maybe (NonEmpty DataSourceToIndexFieldMapping)
a} :: ServiceNowKnowledgeArticleConfiguration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
serviceNowKnowledgeArticleConfiguration_filterQuery :: Lens.Lens' ServiceNowKnowledgeArticleConfiguration (Prelude.Maybe Prelude.Text)
serviceNowKnowledgeArticleConfiguration_filterQuery :: Lens' ServiceNowKnowledgeArticleConfiguration (Maybe Text)
serviceNowKnowledgeArticleConfiguration_filterQuery = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceNowKnowledgeArticleConfiguration' {Maybe Text
filterQuery :: Maybe Text
$sel:filterQuery:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration -> Maybe Text
filterQuery} -> Maybe Text
filterQuery) (\s :: ServiceNowKnowledgeArticleConfiguration
s@ServiceNowKnowledgeArticleConfiguration' {} Maybe Text
a -> ServiceNowKnowledgeArticleConfiguration
s {$sel:filterQuery:ServiceNowKnowledgeArticleConfiguration' :: Maybe Text
filterQuery = Maybe Text
a} :: ServiceNowKnowledgeArticleConfiguration)
serviceNowKnowledgeArticleConfiguration_includeAttachmentFilePatterns :: Lens.Lens' ServiceNowKnowledgeArticleConfiguration (Prelude.Maybe [Prelude.Text])
serviceNowKnowledgeArticleConfiguration_includeAttachmentFilePatterns :: Lens' ServiceNowKnowledgeArticleConfiguration (Maybe [Text])
serviceNowKnowledgeArticleConfiguration_includeAttachmentFilePatterns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceNowKnowledgeArticleConfiguration' {Maybe [Text]
includeAttachmentFilePatterns :: Maybe [Text]
$sel:includeAttachmentFilePatterns:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration -> Maybe [Text]
includeAttachmentFilePatterns} -> Maybe [Text]
includeAttachmentFilePatterns) (\s :: ServiceNowKnowledgeArticleConfiguration
s@ServiceNowKnowledgeArticleConfiguration' {} Maybe [Text]
a -> ServiceNowKnowledgeArticleConfiguration
s {$sel:includeAttachmentFilePatterns:ServiceNowKnowledgeArticleConfiguration' :: Maybe [Text]
includeAttachmentFilePatterns = Maybe [Text]
a} :: ServiceNowKnowledgeArticleConfiguration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
serviceNowKnowledgeArticleConfiguration_documentDataFieldName :: Lens.Lens' ServiceNowKnowledgeArticleConfiguration Prelude.Text
serviceNowKnowledgeArticleConfiguration_documentDataFieldName :: Lens' ServiceNowKnowledgeArticleConfiguration Text
serviceNowKnowledgeArticleConfiguration_documentDataFieldName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceNowKnowledgeArticleConfiguration' {Text
documentDataFieldName :: Text
$sel:documentDataFieldName:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration -> Text
documentDataFieldName} -> Text
documentDataFieldName) (\s :: ServiceNowKnowledgeArticleConfiguration
s@ServiceNowKnowledgeArticleConfiguration' {} Text
a -> ServiceNowKnowledgeArticleConfiguration
s {$sel:documentDataFieldName:ServiceNowKnowledgeArticleConfiguration' :: Text
documentDataFieldName = Text
a} :: ServiceNowKnowledgeArticleConfiguration)
instance
Data.FromJSON
ServiceNowKnowledgeArticleConfiguration
where
parseJSON :: Value -> Parser ServiceNowKnowledgeArticleConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ServiceNowKnowledgeArticleConfiguration"
( \Object
x ->
Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe (NonEmpty DataSourceToIndexFieldMapping)
-> Maybe Text
-> Maybe [Text]
-> Text
-> ServiceNowKnowledgeArticleConfiguration
ServiceNowKnowledgeArticleConfiguration'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CrawlAttachments")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DocumentTitleFieldName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ExcludeAttachmentFilePatterns"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"FieldMappings")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"FilterQuery")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"IncludeAttachmentFilePatterns"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"DocumentDataFieldName")
)
instance
Prelude.Hashable
ServiceNowKnowledgeArticleConfiguration
where
hashWithSalt :: Int -> ServiceNowKnowledgeArticleConfiguration -> Int
hashWithSalt
Int
_salt
ServiceNowKnowledgeArticleConfiguration' {Maybe Bool
Maybe [Text]
Maybe (NonEmpty DataSourceToIndexFieldMapping)
Maybe Text
Text
documentDataFieldName :: Text
includeAttachmentFilePatterns :: Maybe [Text]
filterQuery :: Maybe Text
fieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
excludeAttachmentFilePatterns :: Maybe [Text]
documentTitleFieldName :: Maybe Text
crawlAttachments :: Maybe Bool
$sel:documentDataFieldName:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration -> Text
$sel:includeAttachmentFilePatterns:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration -> Maybe [Text]
$sel:filterQuery:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration -> Maybe Text
$sel:fieldMappings:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration
-> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:excludeAttachmentFilePatterns:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration -> Maybe [Text]
$sel:documentTitleFieldName:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration -> Maybe Text
$sel:crawlAttachments:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
crawlAttachments
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
documentTitleFieldName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
excludeAttachmentFilePatterns
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty DataSourceToIndexFieldMapping)
fieldMappings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
filterQuery
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
includeAttachmentFilePatterns
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
documentDataFieldName
instance
Prelude.NFData
ServiceNowKnowledgeArticleConfiguration
where
rnf :: ServiceNowKnowledgeArticleConfiguration -> ()
rnf ServiceNowKnowledgeArticleConfiguration' {Maybe Bool
Maybe [Text]
Maybe (NonEmpty DataSourceToIndexFieldMapping)
Maybe Text
Text
documentDataFieldName :: Text
includeAttachmentFilePatterns :: Maybe [Text]
filterQuery :: Maybe Text
fieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
excludeAttachmentFilePatterns :: Maybe [Text]
documentTitleFieldName :: Maybe Text
crawlAttachments :: Maybe Bool
$sel:documentDataFieldName:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration -> Text
$sel:includeAttachmentFilePatterns:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration -> Maybe [Text]
$sel:filterQuery:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration -> Maybe Text
$sel:fieldMappings:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration
-> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:excludeAttachmentFilePatterns:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration -> Maybe [Text]
$sel:documentTitleFieldName:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration -> Maybe Text
$sel:crawlAttachments:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
crawlAttachments
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
documentTitleFieldName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
excludeAttachmentFilePatterns
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty DataSourceToIndexFieldMapping)
fieldMappings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
filterQuery
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
includeAttachmentFilePatterns
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
documentDataFieldName
instance
Data.ToJSON
ServiceNowKnowledgeArticleConfiguration
where
toJSON :: ServiceNowKnowledgeArticleConfiguration -> Value
toJSON ServiceNowKnowledgeArticleConfiguration' {Maybe Bool
Maybe [Text]
Maybe (NonEmpty DataSourceToIndexFieldMapping)
Maybe Text
Text
documentDataFieldName :: Text
includeAttachmentFilePatterns :: Maybe [Text]
filterQuery :: Maybe Text
fieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
excludeAttachmentFilePatterns :: Maybe [Text]
documentTitleFieldName :: Maybe Text
crawlAttachments :: Maybe Bool
$sel:documentDataFieldName:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration -> Text
$sel:includeAttachmentFilePatterns:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration -> Maybe [Text]
$sel:filterQuery:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration -> Maybe Text
$sel:fieldMappings:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration
-> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:excludeAttachmentFilePatterns:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration -> Maybe [Text]
$sel:documentTitleFieldName:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration -> Maybe Text
$sel:crawlAttachments:ServiceNowKnowledgeArticleConfiguration' :: ServiceNowKnowledgeArticleConfiguration -> Maybe Bool
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"CrawlAttachments" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
crawlAttachments,
(Key
"DocumentTitleFieldName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
documentTitleFieldName,
(Key
"ExcludeAttachmentFilePatterns" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
excludeAttachmentFilePatterns,
(Key
"FieldMappings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty DataSourceToIndexFieldMapping)
fieldMappings,
(Key
"FilterQuery" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
filterQuery,
(Key
"IncludeAttachmentFilePatterns" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
includeAttachmentFilePatterns,
forall a. a -> Maybe a
Prelude.Just
( Key
"DocumentDataFieldName"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
documentDataFieldName
)
]
)