{-# 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.ConfluenceAttachmentConfiguration 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.ConfluenceAttachmentToIndexFieldMapping
import qualified Amazonka.Prelude as Prelude
data ConfluenceAttachmentConfiguration = ConfluenceAttachmentConfiguration'
{
ConfluenceAttachmentConfiguration
-> Maybe (NonEmpty ConfluenceAttachmentToIndexFieldMapping)
attachmentFieldMappings :: Prelude.Maybe (Prelude.NonEmpty ConfluenceAttachmentToIndexFieldMapping),
ConfluenceAttachmentConfiguration -> Maybe Bool
crawlAttachments :: Prelude.Maybe Prelude.Bool
}
deriving (ConfluenceAttachmentConfiguration
-> ConfluenceAttachmentConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfluenceAttachmentConfiguration
-> ConfluenceAttachmentConfiguration -> Bool
$c/= :: ConfluenceAttachmentConfiguration
-> ConfluenceAttachmentConfiguration -> Bool
== :: ConfluenceAttachmentConfiguration
-> ConfluenceAttachmentConfiguration -> Bool
$c== :: ConfluenceAttachmentConfiguration
-> ConfluenceAttachmentConfiguration -> Bool
Prelude.Eq, ReadPrec [ConfluenceAttachmentConfiguration]
ReadPrec ConfluenceAttachmentConfiguration
Int -> ReadS ConfluenceAttachmentConfiguration
ReadS [ConfluenceAttachmentConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConfluenceAttachmentConfiguration]
$creadListPrec :: ReadPrec [ConfluenceAttachmentConfiguration]
readPrec :: ReadPrec ConfluenceAttachmentConfiguration
$creadPrec :: ReadPrec ConfluenceAttachmentConfiguration
readList :: ReadS [ConfluenceAttachmentConfiguration]
$creadList :: ReadS [ConfluenceAttachmentConfiguration]
readsPrec :: Int -> ReadS ConfluenceAttachmentConfiguration
$creadsPrec :: Int -> ReadS ConfluenceAttachmentConfiguration
Prelude.Read, Int -> ConfluenceAttachmentConfiguration -> ShowS
[ConfluenceAttachmentConfiguration] -> ShowS
ConfluenceAttachmentConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfluenceAttachmentConfiguration] -> ShowS
$cshowList :: [ConfluenceAttachmentConfiguration] -> ShowS
show :: ConfluenceAttachmentConfiguration -> String
$cshow :: ConfluenceAttachmentConfiguration -> String
showsPrec :: Int -> ConfluenceAttachmentConfiguration -> ShowS
$cshowsPrec :: Int -> ConfluenceAttachmentConfiguration -> ShowS
Prelude.Show, forall x.
Rep ConfluenceAttachmentConfiguration x
-> ConfluenceAttachmentConfiguration
forall x.
ConfluenceAttachmentConfiguration
-> Rep ConfluenceAttachmentConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConfluenceAttachmentConfiguration x
-> ConfluenceAttachmentConfiguration
$cfrom :: forall x.
ConfluenceAttachmentConfiguration
-> Rep ConfluenceAttachmentConfiguration x
Prelude.Generic)
newConfluenceAttachmentConfiguration ::
ConfluenceAttachmentConfiguration
newConfluenceAttachmentConfiguration :: ConfluenceAttachmentConfiguration
newConfluenceAttachmentConfiguration =
ConfluenceAttachmentConfiguration'
{ $sel:attachmentFieldMappings:ConfluenceAttachmentConfiguration' :: Maybe (NonEmpty ConfluenceAttachmentToIndexFieldMapping)
attachmentFieldMappings =
forall a. Maybe a
Prelude.Nothing,
$sel:crawlAttachments:ConfluenceAttachmentConfiguration' :: Maybe Bool
crawlAttachments = forall a. Maybe a
Prelude.Nothing
}
confluenceAttachmentConfiguration_attachmentFieldMappings :: Lens.Lens' ConfluenceAttachmentConfiguration (Prelude.Maybe (Prelude.NonEmpty ConfluenceAttachmentToIndexFieldMapping))
confluenceAttachmentConfiguration_attachmentFieldMappings :: Lens'
ConfluenceAttachmentConfiguration
(Maybe (NonEmpty ConfluenceAttachmentToIndexFieldMapping))
confluenceAttachmentConfiguration_attachmentFieldMappings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfluenceAttachmentConfiguration' {Maybe (NonEmpty ConfluenceAttachmentToIndexFieldMapping)
attachmentFieldMappings :: Maybe (NonEmpty ConfluenceAttachmentToIndexFieldMapping)
$sel:attachmentFieldMappings:ConfluenceAttachmentConfiguration' :: ConfluenceAttachmentConfiguration
-> Maybe (NonEmpty ConfluenceAttachmentToIndexFieldMapping)
attachmentFieldMappings} -> Maybe (NonEmpty ConfluenceAttachmentToIndexFieldMapping)
attachmentFieldMappings) (\s :: ConfluenceAttachmentConfiguration
s@ConfluenceAttachmentConfiguration' {} Maybe (NonEmpty ConfluenceAttachmentToIndexFieldMapping)
a -> ConfluenceAttachmentConfiguration
s {$sel:attachmentFieldMappings:ConfluenceAttachmentConfiguration' :: Maybe (NonEmpty ConfluenceAttachmentToIndexFieldMapping)
attachmentFieldMappings = Maybe (NonEmpty ConfluenceAttachmentToIndexFieldMapping)
a} :: ConfluenceAttachmentConfiguration) 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
confluenceAttachmentConfiguration_crawlAttachments :: Lens.Lens' ConfluenceAttachmentConfiguration (Prelude.Maybe Prelude.Bool)
confluenceAttachmentConfiguration_crawlAttachments :: Lens' ConfluenceAttachmentConfiguration (Maybe Bool)
confluenceAttachmentConfiguration_crawlAttachments = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfluenceAttachmentConfiguration' {Maybe Bool
crawlAttachments :: Maybe Bool
$sel:crawlAttachments:ConfluenceAttachmentConfiguration' :: ConfluenceAttachmentConfiguration -> Maybe Bool
crawlAttachments} -> Maybe Bool
crawlAttachments) (\s :: ConfluenceAttachmentConfiguration
s@ConfluenceAttachmentConfiguration' {} Maybe Bool
a -> ConfluenceAttachmentConfiguration
s {$sel:crawlAttachments:ConfluenceAttachmentConfiguration' :: Maybe Bool
crawlAttachments = Maybe Bool
a} :: ConfluenceAttachmentConfiguration)
instance
Data.FromJSON
ConfluenceAttachmentConfiguration
where
parseJSON :: Value -> Parser ConfluenceAttachmentConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ConfluenceAttachmentConfiguration"
( \Object
x ->
Maybe (NonEmpty ConfluenceAttachmentToIndexFieldMapping)
-> Maybe Bool -> ConfluenceAttachmentConfiguration
ConfluenceAttachmentConfiguration'
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
"AttachmentFieldMappings")
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
"CrawlAttachments")
)
instance
Prelude.Hashable
ConfluenceAttachmentConfiguration
where
hashWithSalt :: Int -> ConfluenceAttachmentConfiguration -> Int
hashWithSalt
Int
_salt
ConfluenceAttachmentConfiguration' {Maybe Bool
Maybe (NonEmpty ConfluenceAttachmentToIndexFieldMapping)
crawlAttachments :: Maybe Bool
attachmentFieldMappings :: Maybe (NonEmpty ConfluenceAttachmentToIndexFieldMapping)
$sel:crawlAttachments:ConfluenceAttachmentConfiguration' :: ConfluenceAttachmentConfiguration -> Maybe Bool
$sel:attachmentFieldMappings:ConfluenceAttachmentConfiguration' :: ConfluenceAttachmentConfiguration
-> Maybe (NonEmpty ConfluenceAttachmentToIndexFieldMapping)
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty ConfluenceAttachmentToIndexFieldMapping)
attachmentFieldMappings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
crawlAttachments
instance
Prelude.NFData
ConfluenceAttachmentConfiguration
where
rnf :: ConfluenceAttachmentConfiguration -> ()
rnf ConfluenceAttachmentConfiguration' {Maybe Bool
Maybe (NonEmpty ConfluenceAttachmentToIndexFieldMapping)
crawlAttachments :: Maybe Bool
attachmentFieldMappings :: Maybe (NonEmpty ConfluenceAttachmentToIndexFieldMapping)
$sel:crawlAttachments:ConfluenceAttachmentConfiguration' :: ConfluenceAttachmentConfiguration -> Maybe Bool
$sel:attachmentFieldMappings:ConfluenceAttachmentConfiguration' :: ConfluenceAttachmentConfiguration
-> Maybe (NonEmpty ConfluenceAttachmentToIndexFieldMapping)
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty ConfluenceAttachmentToIndexFieldMapping)
attachmentFieldMappings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
crawlAttachments
instance
Data.ToJSON
ConfluenceAttachmentConfiguration
where
toJSON :: ConfluenceAttachmentConfiguration -> Value
toJSON ConfluenceAttachmentConfiguration' {Maybe Bool
Maybe (NonEmpty ConfluenceAttachmentToIndexFieldMapping)
crawlAttachments :: Maybe Bool
attachmentFieldMappings :: Maybe (NonEmpty ConfluenceAttachmentToIndexFieldMapping)
$sel:crawlAttachments:ConfluenceAttachmentConfiguration' :: ConfluenceAttachmentConfiguration -> Maybe Bool
$sel:attachmentFieldMappings:ConfluenceAttachmentConfiguration' :: ConfluenceAttachmentConfiguration
-> Maybe (NonEmpty ConfluenceAttachmentToIndexFieldMapping)
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"AttachmentFieldMappings" 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 ConfluenceAttachmentToIndexFieldMapping)
attachmentFieldMappings,
(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
]
)