{-# 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.BoxConfiguration 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 Amazonka.Kendra.Types.DataSourceVpcConfiguration
import qualified Amazonka.Prelude as Prelude
data BoxConfiguration = BoxConfiguration'
{
:: Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping),
:: Prelude.Maybe Prelude.Bool,
BoxConfiguration -> Maybe Bool
crawlTasks :: Prelude.Maybe Prelude.Bool,
BoxConfiguration -> Maybe Bool
crawlWebLinks :: Prelude.Maybe Prelude.Bool,
BoxConfiguration -> Maybe [Text]
exclusionPatterns :: Prelude.Maybe [Prelude.Text],
BoxConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
fileFieldMappings :: Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping),
BoxConfiguration -> Maybe [Text]
inclusionPatterns :: Prelude.Maybe [Prelude.Text],
BoxConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
taskFieldMappings :: Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping),
BoxConfiguration -> Maybe Bool
useChangeLog :: Prelude.Maybe Prelude.Bool,
BoxConfiguration -> Maybe DataSourceVpcConfiguration
vpcConfiguration :: Prelude.Maybe DataSourceVpcConfiguration,
BoxConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
webLinkFieldMappings :: Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping),
BoxConfiguration -> Text
enterpriseId :: Prelude.Text,
BoxConfiguration -> Text
secretArn :: Prelude.Text
}
deriving (BoxConfiguration -> BoxConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BoxConfiguration -> BoxConfiguration -> Bool
$c/= :: BoxConfiguration -> BoxConfiguration -> Bool
== :: BoxConfiguration -> BoxConfiguration -> Bool
$c== :: BoxConfiguration -> BoxConfiguration -> Bool
Prelude.Eq, ReadPrec [BoxConfiguration]
ReadPrec BoxConfiguration
Int -> ReadS BoxConfiguration
ReadS [BoxConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BoxConfiguration]
$creadListPrec :: ReadPrec [BoxConfiguration]
readPrec :: ReadPrec BoxConfiguration
$creadPrec :: ReadPrec BoxConfiguration
readList :: ReadS [BoxConfiguration]
$creadList :: ReadS [BoxConfiguration]
readsPrec :: Int -> ReadS BoxConfiguration
$creadsPrec :: Int -> ReadS BoxConfiguration
Prelude.Read, Int -> BoxConfiguration -> ShowS
[BoxConfiguration] -> ShowS
BoxConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BoxConfiguration] -> ShowS
$cshowList :: [BoxConfiguration] -> ShowS
show :: BoxConfiguration -> String
$cshow :: BoxConfiguration -> String
showsPrec :: Int -> BoxConfiguration -> ShowS
$cshowsPrec :: Int -> BoxConfiguration -> ShowS
Prelude.Show, forall x. Rep BoxConfiguration x -> BoxConfiguration
forall x. BoxConfiguration -> Rep BoxConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BoxConfiguration x -> BoxConfiguration
$cfrom :: forall x. BoxConfiguration -> Rep BoxConfiguration x
Prelude.Generic)
newBoxConfiguration ::
Prelude.Text ->
Prelude.Text ->
BoxConfiguration
newBoxConfiguration :: Text -> Text -> BoxConfiguration
newBoxConfiguration Text
pEnterpriseId_ Text
pSecretArn_ =
BoxConfiguration'
{ $sel:commentFieldMappings:BoxConfiguration' :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
commentFieldMappings =
forall a. Maybe a
Prelude.Nothing,
$sel:crawlComments:BoxConfiguration' :: Maybe Bool
crawlComments = forall a. Maybe a
Prelude.Nothing,
$sel:crawlTasks:BoxConfiguration' :: Maybe Bool
crawlTasks = forall a. Maybe a
Prelude.Nothing,
$sel:crawlWebLinks:BoxConfiguration' :: Maybe Bool
crawlWebLinks = forall a. Maybe a
Prelude.Nothing,
$sel:exclusionPatterns:BoxConfiguration' :: Maybe [Text]
exclusionPatterns = forall a. Maybe a
Prelude.Nothing,
$sel:fileFieldMappings:BoxConfiguration' :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
fileFieldMappings = forall a. Maybe a
Prelude.Nothing,
$sel:inclusionPatterns:BoxConfiguration' :: Maybe [Text]
inclusionPatterns = forall a. Maybe a
Prelude.Nothing,
$sel:taskFieldMappings:BoxConfiguration' :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
taskFieldMappings = forall a. Maybe a
Prelude.Nothing,
$sel:useChangeLog:BoxConfiguration' :: Maybe Bool
useChangeLog = forall a. Maybe a
Prelude.Nothing,
$sel:vpcConfiguration:BoxConfiguration' :: Maybe DataSourceVpcConfiguration
vpcConfiguration = forall a. Maybe a
Prelude.Nothing,
$sel:webLinkFieldMappings:BoxConfiguration' :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
webLinkFieldMappings = forall a. Maybe a
Prelude.Nothing,
$sel:enterpriseId:BoxConfiguration' :: Text
enterpriseId = Text
pEnterpriseId_,
$sel:secretArn:BoxConfiguration' :: Text
secretArn = Text
pSecretArn_
}
boxConfiguration_commentFieldMappings :: Lens.Lens' BoxConfiguration (Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping))
= forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BoxConfiguration' {Maybe (NonEmpty DataSourceToIndexFieldMapping)
commentFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:commentFieldMappings:BoxConfiguration' :: BoxConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
commentFieldMappings} -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
commentFieldMappings) (\s :: BoxConfiguration
s@BoxConfiguration' {} Maybe (NonEmpty DataSourceToIndexFieldMapping)
a -> BoxConfiguration
s {$sel:commentFieldMappings:BoxConfiguration' :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
commentFieldMappings = Maybe (NonEmpty DataSourceToIndexFieldMapping)
a} :: BoxConfiguration) 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
boxConfiguration_crawlComments :: Lens.Lens' BoxConfiguration (Prelude.Maybe Prelude.Bool)
= forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BoxConfiguration' {Maybe Bool
crawlComments :: Maybe Bool
$sel:crawlComments:BoxConfiguration' :: BoxConfiguration -> Maybe Bool
crawlComments} -> Maybe Bool
crawlComments) (\s :: BoxConfiguration
s@BoxConfiguration' {} Maybe Bool
a -> BoxConfiguration
s {$sel:crawlComments:BoxConfiguration' :: Maybe Bool
crawlComments = Maybe Bool
a} :: BoxConfiguration)
boxConfiguration_crawlTasks :: Lens.Lens' BoxConfiguration (Prelude.Maybe Prelude.Bool)
boxConfiguration_crawlTasks :: Lens' BoxConfiguration (Maybe Bool)
boxConfiguration_crawlTasks = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BoxConfiguration' {Maybe Bool
crawlTasks :: Maybe Bool
$sel:crawlTasks:BoxConfiguration' :: BoxConfiguration -> Maybe Bool
crawlTasks} -> Maybe Bool
crawlTasks) (\s :: BoxConfiguration
s@BoxConfiguration' {} Maybe Bool
a -> BoxConfiguration
s {$sel:crawlTasks:BoxConfiguration' :: Maybe Bool
crawlTasks = Maybe Bool
a} :: BoxConfiguration)
boxConfiguration_crawlWebLinks :: Lens.Lens' BoxConfiguration (Prelude.Maybe Prelude.Bool)
boxConfiguration_crawlWebLinks :: Lens' BoxConfiguration (Maybe Bool)
boxConfiguration_crawlWebLinks = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BoxConfiguration' {Maybe Bool
crawlWebLinks :: Maybe Bool
$sel:crawlWebLinks:BoxConfiguration' :: BoxConfiguration -> Maybe Bool
crawlWebLinks} -> Maybe Bool
crawlWebLinks) (\s :: BoxConfiguration
s@BoxConfiguration' {} Maybe Bool
a -> BoxConfiguration
s {$sel:crawlWebLinks:BoxConfiguration' :: Maybe Bool
crawlWebLinks = Maybe Bool
a} :: BoxConfiguration)
boxConfiguration_exclusionPatterns :: Lens.Lens' BoxConfiguration (Prelude.Maybe [Prelude.Text])
boxConfiguration_exclusionPatterns :: Lens' BoxConfiguration (Maybe [Text])
boxConfiguration_exclusionPatterns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BoxConfiguration' {Maybe [Text]
exclusionPatterns :: Maybe [Text]
$sel:exclusionPatterns:BoxConfiguration' :: BoxConfiguration -> Maybe [Text]
exclusionPatterns} -> Maybe [Text]
exclusionPatterns) (\s :: BoxConfiguration
s@BoxConfiguration' {} Maybe [Text]
a -> BoxConfiguration
s {$sel:exclusionPatterns:BoxConfiguration' :: Maybe [Text]
exclusionPatterns = Maybe [Text]
a} :: BoxConfiguration) 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
boxConfiguration_fileFieldMappings :: Lens.Lens' BoxConfiguration (Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping))
boxConfiguration_fileFieldMappings :: Lens'
BoxConfiguration (Maybe (NonEmpty DataSourceToIndexFieldMapping))
boxConfiguration_fileFieldMappings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BoxConfiguration' {Maybe (NonEmpty DataSourceToIndexFieldMapping)
fileFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:fileFieldMappings:BoxConfiguration' :: BoxConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
fileFieldMappings} -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
fileFieldMappings) (\s :: BoxConfiguration
s@BoxConfiguration' {} Maybe (NonEmpty DataSourceToIndexFieldMapping)
a -> BoxConfiguration
s {$sel:fileFieldMappings:BoxConfiguration' :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
fileFieldMappings = Maybe (NonEmpty DataSourceToIndexFieldMapping)
a} :: BoxConfiguration) 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
boxConfiguration_inclusionPatterns :: Lens.Lens' BoxConfiguration (Prelude.Maybe [Prelude.Text])
boxConfiguration_inclusionPatterns :: Lens' BoxConfiguration (Maybe [Text])
boxConfiguration_inclusionPatterns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BoxConfiguration' {Maybe [Text]
inclusionPatterns :: Maybe [Text]
$sel:inclusionPatterns:BoxConfiguration' :: BoxConfiguration -> Maybe [Text]
inclusionPatterns} -> Maybe [Text]
inclusionPatterns) (\s :: BoxConfiguration
s@BoxConfiguration' {} Maybe [Text]
a -> BoxConfiguration
s {$sel:inclusionPatterns:BoxConfiguration' :: Maybe [Text]
inclusionPatterns = Maybe [Text]
a} :: BoxConfiguration) 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
boxConfiguration_taskFieldMappings :: Lens.Lens' BoxConfiguration (Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping))
boxConfiguration_taskFieldMappings :: Lens'
BoxConfiguration (Maybe (NonEmpty DataSourceToIndexFieldMapping))
boxConfiguration_taskFieldMappings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BoxConfiguration' {Maybe (NonEmpty DataSourceToIndexFieldMapping)
taskFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:taskFieldMappings:BoxConfiguration' :: BoxConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
taskFieldMappings} -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
taskFieldMappings) (\s :: BoxConfiguration
s@BoxConfiguration' {} Maybe (NonEmpty DataSourceToIndexFieldMapping)
a -> BoxConfiguration
s {$sel:taskFieldMappings:BoxConfiguration' :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
taskFieldMappings = Maybe (NonEmpty DataSourceToIndexFieldMapping)
a} :: BoxConfiguration) 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
boxConfiguration_useChangeLog :: Lens.Lens' BoxConfiguration (Prelude.Maybe Prelude.Bool)
boxConfiguration_useChangeLog :: Lens' BoxConfiguration (Maybe Bool)
boxConfiguration_useChangeLog = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BoxConfiguration' {Maybe Bool
useChangeLog :: Maybe Bool
$sel:useChangeLog:BoxConfiguration' :: BoxConfiguration -> Maybe Bool
useChangeLog} -> Maybe Bool
useChangeLog) (\s :: BoxConfiguration
s@BoxConfiguration' {} Maybe Bool
a -> BoxConfiguration
s {$sel:useChangeLog:BoxConfiguration' :: Maybe Bool
useChangeLog = Maybe Bool
a} :: BoxConfiguration)
boxConfiguration_vpcConfiguration :: Lens.Lens' BoxConfiguration (Prelude.Maybe DataSourceVpcConfiguration)
boxConfiguration_vpcConfiguration :: Lens' BoxConfiguration (Maybe DataSourceVpcConfiguration)
boxConfiguration_vpcConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BoxConfiguration' {Maybe DataSourceVpcConfiguration
vpcConfiguration :: Maybe DataSourceVpcConfiguration
$sel:vpcConfiguration:BoxConfiguration' :: BoxConfiguration -> Maybe DataSourceVpcConfiguration
vpcConfiguration} -> Maybe DataSourceVpcConfiguration
vpcConfiguration) (\s :: BoxConfiguration
s@BoxConfiguration' {} Maybe DataSourceVpcConfiguration
a -> BoxConfiguration
s {$sel:vpcConfiguration:BoxConfiguration' :: Maybe DataSourceVpcConfiguration
vpcConfiguration = Maybe DataSourceVpcConfiguration
a} :: BoxConfiguration)
boxConfiguration_webLinkFieldMappings :: Lens.Lens' BoxConfiguration (Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping))
boxConfiguration_webLinkFieldMappings :: Lens'
BoxConfiguration (Maybe (NonEmpty DataSourceToIndexFieldMapping))
boxConfiguration_webLinkFieldMappings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BoxConfiguration' {Maybe (NonEmpty DataSourceToIndexFieldMapping)
webLinkFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:webLinkFieldMappings:BoxConfiguration' :: BoxConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
webLinkFieldMappings} -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
webLinkFieldMappings) (\s :: BoxConfiguration
s@BoxConfiguration' {} Maybe (NonEmpty DataSourceToIndexFieldMapping)
a -> BoxConfiguration
s {$sel:webLinkFieldMappings:BoxConfiguration' :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
webLinkFieldMappings = Maybe (NonEmpty DataSourceToIndexFieldMapping)
a} :: BoxConfiguration) 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
boxConfiguration_enterpriseId :: Lens.Lens' BoxConfiguration Prelude.Text
boxConfiguration_enterpriseId :: Lens' BoxConfiguration Text
boxConfiguration_enterpriseId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BoxConfiguration' {Text
enterpriseId :: Text
$sel:enterpriseId:BoxConfiguration' :: BoxConfiguration -> Text
enterpriseId} -> Text
enterpriseId) (\s :: BoxConfiguration
s@BoxConfiguration' {} Text
a -> BoxConfiguration
s {$sel:enterpriseId:BoxConfiguration' :: Text
enterpriseId = Text
a} :: BoxConfiguration)
boxConfiguration_secretArn :: Lens.Lens' BoxConfiguration Prelude.Text
boxConfiguration_secretArn :: Lens' BoxConfiguration Text
boxConfiguration_secretArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BoxConfiguration' {Text
secretArn :: Text
$sel:secretArn:BoxConfiguration' :: BoxConfiguration -> Text
secretArn} -> Text
secretArn) (\s :: BoxConfiguration
s@BoxConfiguration' {} Text
a -> BoxConfiguration
s {$sel:secretArn:BoxConfiguration' :: Text
secretArn = Text
a} :: BoxConfiguration)
instance Data.FromJSON BoxConfiguration where
parseJSON :: Value -> Parser BoxConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BoxConfiguration"
( \Object
x ->
Maybe (NonEmpty DataSourceToIndexFieldMapping)
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> Maybe (NonEmpty DataSourceToIndexFieldMapping)
-> Maybe [Text]
-> Maybe (NonEmpty DataSourceToIndexFieldMapping)
-> Maybe Bool
-> Maybe DataSourceVpcConfiguration
-> Maybe (NonEmpty DataSourceToIndexFieldMapping)
-> Text
-> Text
-> BoxConfiguration
BoxConfiguration'
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
"CommentFieldMappings")
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
"CrawlComments")
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
"CrawlTasks")
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
"CrawlWebLinks")
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
"ExclusionPatterns"
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
"FileFieldMappings")
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
"InclusionPatterns"
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
"TaskFieldMappings")
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
"UseChangeLog")
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
"VpcConfiguration")
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
"WebLinkFieldMappings")
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
"EnterpriseId")
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
"SecretArn")
)
instance Prelude.Hashable BoxConfiguration where
hashWithSalt :: Int -> BoxConfiguration -> Int
hashWithSalt Int
_salt BoxConfiguration' {Maybe Bool
Maybe [Text]
Maybe (NonEmpty DataSourceToIndexFieldMapping)
Maybe DataSourceVpcConfiguration
Text
secretArn :: Text
enterpriseId :: Text
webLinkFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
vpcConfiguration :: Maybe DataSourceVpcConfiguration
useChangeLog :: Maybe Bool
taskFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
inclusionPatterns :: Maybe [Text]
fileFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
exclusionPatterns :: Maybe [Text]
crawlWebLinks :: Maybe Bool
crawlTasks :: Maybe Bool
crawlComments :: Maybe Bool
commentFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:secretArn:BoxConfiguration' :: BoxConfiguration -> Text
$sel:enterpriseId:BoxConfiguration' :: BoxConfiguration -> Text
$sel:webLinkFieldMappings:BoxConfiguration' :: BoxConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:vpcConfiguration:BoxConfiguration' :: BoxConfiguration -> Maybe DataSourceVpcConfiguration
$sel:useChangeLog:BoxConfiguration' :: BoxConfiguration -> Maybe Bool
$sel:taskFieldMappings:BoxConfiguration' :: BoxConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:inclusionPatterns:BoxConfiguration' :: BoxConfiguration -> Maybe [Text]
$sel:fileFieldMappings:BoxConfiguration' :: BoxConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:exclusionPatterns:BoxConfiguration' :: BoxConfiguration -> Maybe [Text]
$sel:crawlWebLinks:BoxConfiguration' :: BoxConfiguration -> Maybe Bool
$sel:crawlTasks:BoxConfiguration' :: BoxConfiguration -> Maybe Bool
$sel:crawlComments:BoxConfiguration' :: BoxConfiguration -> Maybe Bool
$sel:commentFieldMappings:BoxConfiguration' :: BoxConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty DataSourceToIndexFieldMapping)
commentFieldMappings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
crawlComments
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
crawlTasks
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
crawlWebLinks
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
exclusionPatterns
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty DataSourceToIndexFieldMapping)
fileFieldMappings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
inclusionPatterns
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty DataSourceToIndexFieldMapping)
taskFieldMappings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
useChangeLog
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DataSourceVpcConfiguration
vpcConfiguration
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty DataSourceToIndexFieldMapping)
webLinkFieldMappings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
enterpriseId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
secretArn
instance Prelude.NFData BoxConfiguration where
rnf :: BoxConfiguration -> ()
rnf BoxConfiguration' {Maybe Bool
Maybe [Text]
Maybe (NonEmpty DataSourceToIndexFieldMapping)
Maybe DataSourceVpcConfiguration
Text
secretArn :: Text
enterpriseId :: Text
webLinkFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
vpcConfiguration :: Maybe DataSourceVpcConfiguration
useChangeLog :: Maybe Bool
taskFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
inclusionPatterns :: Maybe [Text]
fileFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
exclusionPatterns :: Maybe [Text]
crawlWebLinks :: Maybe Bool
crawlTasks :: Maybe Bool
crawlComments :: Maybe Bool
commentFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:secretArn:BoxConfiguration' :: BoxConfiguration -> Text
$sel:enterpriseId:BoxConfiguration' :: BoxConfiguration -> Text
$sel:webLinkFieldMappings:BoxConfiguration' :: BoxConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:vpcConfiguration:BoxConfiguration' :: BoxConfiguration -> Maybe DataSourceVpcConfiguration
$sel:useChangeLog:BoxConfiguration' :: BoxConfiguration -> Maybe Bool
$sel:taskFieldMappings:BoxConfiguration' :: BoxConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:inclusionPatterns:BoxConfiguration' :: BoxConfiguration -> Maybe [Text]
$sel:fileFieldMappings:BoxConfiguration' :: BoxConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:exclusionPatterns:BoxConfiguration' :: BoxConfiguration -> Maybe [Text]
$sel:crawlWebLinks:BoxConfiguration' :: BoxConfiguration -> Maybe Bool
$sel:crawlTasks:BoxConfiguration' :: BoxConfiguration -> Maybe Bool
$sel:crawlComments:BoxConfiguration' :: BoxConfiguration -> Maybe Bool
$sel:commentFieldMappings:BoxConfiguration' :: BoxConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty DataSourceToIndexFieldMapping)
commentFieldMappings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
crawlComments
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
crawlTasks
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
crawlWebLinks
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
exclusionPatterns
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty DataSourceToIndexFieldMapping)
fileFieldMappings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
inclusionPatterns
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty DataSourceToIndexFieldMapping)
taskFieldMappings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
useChangeLog
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DataSourceVpcConfiguration
vpcConfiguration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty DataSourceToIndexFieldMapping)
webLinkFieldMappings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
enterpriseId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
secretArn
instance Data.ToJSON BoxConfiguration where
toJSON :: BoxConfiguration -> Value
toJSON BoxConfiguration' {Maybe Bool
Maybe [Text]
Maybe (NonEmpty DataSourceToIndexFieldMapping)
Maybe DataSourceVpcConfiguration
Text
secretArn :: Text
enterpriseId :: Text
webLinkFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
vpcConfiguration :: Maybe DataSourceVpcConfiguration
useChangeLog :: Maybe Bool
taskFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
inclusionPatterns :: Maybe [Text]
fileFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
exclusionPatterns :: Maybe [Text]
crawlWebLinks :: Maybe Bool
crawlTasks :: Maybe Bool
crawlComments :: Maybe Bool
commentFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:secretArn:BoxConfiguration' :: BoxConfiguration -> Text
$sel:enterpriseId:BoxConfiguration' :: BoxConfiguration -> Text
$sel:webLinkFieldMappings:BoxConfiguration' :: BoxConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:vpcConfiguration:BoxConfiguration' :: BoxConfiguration -> Maybe DataSourceVpcConfiguration
$sel:useChangeLog:BoxConfiguration' :: BoxConfiguration -> Maybe Bool
$sel:taskFieldMappings:BoxConfiguration' :: BoxConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:inclusionPatterns:BoxConfiguration' :: BoxConfiguration -> Maybe [Text]
$sel:fileFieldMappings:BoxConfiguration' :: BoxConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:exclusionPatterns:BoxConfiguration' :: BoxConfiguration -> Maybe [Text]
$sel:crawlWebLinks:BoxConfiguration' :: BoxConfiguration -> Maybe Bool
$sel:crawlTasks:BoxConfiguration' :: BoxConfiguration -> Maybe Bool
$sel:crawlComments:BoxConfiguration' :: BoxConfiguration -> Maybe Bool
$sel:commentFieldMappings:BoxConfiguration' :: BoxConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"CommentFieldMappings" 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)
commentFieldMappings,
(Key
"CrawlComments" 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
crawlComments,
(Key
"CrawlTasks" 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
crawlTasks,
(Key
"CrawlWebLinks" 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
crawlWebLinks,
(Key
"ExclusionPatterns" 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]
exclusionPatterns,
(Key
"FileFieldMappings" 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)
fileFieldMappings,
(Key
"InclusionPatterns" 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]
inclusionPatterns,
(Key
"TaskFieldMappings" 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)
taskFieldMappings,
(Key
"UseChangeLog" 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
useChangeLog,
(Key
"VpcConfiguration" 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 DataSourceVpcConfiguration
vpcConfiguration,
(Key
"WebLinkFieldMappings" 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)
webLinkFieldMappings,
forall a. a -> Maybe a
Prelude.Just (Key
"EnterpriseId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
enterpriseId),
forall a. a -> Maybe a
Prelude.Just (Key
"SecretArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
secretArn)
]
)