{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Kendra.Types.BoxConfiguration
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
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

-- | Provides the configuration information to connect to Box as your data
-- source.
--
-- /See:/ 'newBoxConfiguration' smart constructor.
data BoxConfiguration = BoxConfiguration'
  { -- | A list of @DataSourceToIndexFieldMapping@ objects that map attributes or
    -- field names of Box comments to Amazon Kendra index field names. To
    -- create custom fields, use the @UpdateIndex@ API before you map to Box
    -- fields. For more information, see
    -- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
    -- The Box field names must exist in your Box custom metadata.
    BoxConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
commentFieldMappings :: Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping),
    -- | @TRUE@ to index comments.
    BoxConfiguration -> Maybe Bool
crawlComments :: Prelude.Maybe Prelude.Bool,
    -- | @TRUE@ to index the contents of tasks.
    BoxConfiguration -> Maybe Bool
crawlTasks :: Prelude.Maybe Prelude.Bool,
    -- | @TRUE@ to index web links.
    BoxConfiguration -> Maybe Bool
crawlWebLinks :: Prelude.Maybe Prelude.Bool,
    -- | A list of regular expression patterns to exclude certain files and
    -- folders from your Box platform. Files and folders that match the
    -- patterns are excluded from the index.Files and folders that don\'t match
    -- the patterns are included in the index. If a file or folder matches both
    -- an inclusion and exclusion pattern, the exclusion pattern takes
    -- precedence and the file or folder isn\'t included in the index.
    BoxConfiguration -> Maybe [Text]
exclusionPatterns :: Prelude.Maybe [Prelude.Text],
    -- | A list of @DataSourceToIndexFieldMapping@ objects that map attributes or
    -- field names of Box files to Amazon Kendra index field names. To create
    -- custom fields, use the @UpdateIndex@ API before you map to Box fields.
    -- For more information, see
    -- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
    -- The Box field names must exist in your Box custom metadata.
    BoxConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
fileFieldMappings :: Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping),
    -- | A list of regular expression patterns to include certain files and
    -- folders in your Box platform. Files and folders that match the patterns
    -- are included in the index. Files and folders that don\'t match the
    -- patterns are excluded from the index. If a file or folder matches both
    -- an inclusion and exclusion pattern, the exclusion pattern takes
    -- precedence and the file or folder isn\'t included in the index.
    BoxConfiguration -> Maybe [Text]
inclusionPatterns :: Prelude.Maybe [Prelude.Text],
    -- | A list of @DataSourceToIndexFieldMapping@ objects that map attributes or
    -- field names of Box tasks to Amazon Kendra index field names. To create
    -- custom fields, use the @UpdateIndex@ API before you map to Box fields.
    -- For more information, see
    -- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
    -- The Box field names must exist in your Box custom metadata.
    BoxConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
taskFieldMappings :: Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping),
    -- | @TRUE@ to use the Slack change log to determine which documents require
    -- updating in the index. Depending on the data source change log\'s size,
    -- it may take longer for Amazon Kendra to use the change log than to scan
    -- all of your documents.
    BoxConfiguration -> Maybe Bool
useChangeLog :: Prelude.Maybe Prelude.Bool,
    -- | Configuration information for an Amazon VPC to connect to your Box. For
    -- more information, see
    -- <https://docs.aws.amazon.com/kendra/latest/dg/vpc-configuration.html Configuring a VPC>.
    BoxConfiguration -> Maybe DataSourceVpcConfiguration
vpcConfiguration :: Prelude.Maybe DataSourceVpcConfiguration,
    -- | A list of @DataSourceToIndexFieldMapping@ objects that map attributes or
    -- field names of Box web links to Amazon Kendra index field names. To
    -- create custom fields, use the @UpdateIndex@ API before you map to Box
    -- fields. For more information, see
    -- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
    -- The Box field names must exist in your Box custom metadata.
    BoxConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
webLinkFieldMappings :: Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping),
    -- | The identifier of the Box Enterprise platform. You can find the
    -- enterprise ID in the Box Developer Console settings or when you create
    -- an app in Box and download your authentication credentials. For example,
    -- /801234567/.
    BoxConfiguration -> Text
enterpriseId :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of an Secrets Manager secret that
    -- contains the key-value pairs required to connect to your Box platform.
    -- The secret must contain a JSON structure with the following keys:
    --
    -- -   clientID—The identifier of the client OAuth 2.0 authentication
    --     application created in Box.
    --
    -- -   clientSecret—A set of characters known only to the OAuth 2.0
    --     authentication application created in Box.
    --
    -- -   publicKeyId—The identifier of the public key contained within an
    --     identity certificate.
    --
    -- -   privateKey—A set of characters that make up an encryption key.
    --
    -- -   passphrase—A set of characters that act like a password.
    --
    -- You create an application in Box to generate the keys or credentials
    -- required for the secret. For more information, see
    -- <https://docs.aws.amazon.com/kendra/latest/dg/data-source-box.html Using a Box data source>.
    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)

-- |
-- Create a value of 'BoxConfiguration' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'commentFieldMappings', 'boxConfiguration_commentFieldMappings' - A list of @DataSourceToIndexFieldMapping@ objects that map attributes or
-- field names of Box comments to Amazon Kendra index field names. To
-- create custom fields, use the @UpdateIndex@ API before you map to Box
-- fields. For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
-- The Box field names must exist in your Box custom metadata.
--
-- 'crawlComments', 'boxConfiguration_crawlComments' - @TRUE@ to index comments.
--
-- 'crawlTasks', 'boxConfiguration_crawlTasks' - @TRUE@ to index the contents of tasks.
--
-- 'crawlWebLinks', 'boxConfiguration_crawlWebLinks' - @TRUE@ to index web links.
--
-- 'exclusionPatterns', 'boxConfiguration_exclusionPatterns' - A list of regular expression patterns to exclude certain files and
-- folders from your Box platform. Files and folders that match the
-- patterns are excluded from the index.Files and folders that don\'t match
-- the patterns are included in the index. If a file or folder matches both
-- an inclusion and exclusion pattern, the exclusion pattern takes
-- precedence and the file or folder isn\'t included in the index.
--
-- 'fileFieldMappings', 'boxConfiguration_fileFieldMappings' - A list of @DataSourceToIndexFieldMapping@ objects that map attributes or
-- field names of Box files to Amazon Kendra index field names. To create
-- custom fields, use the @UpdateIndex@ API before you map to Box fields.
-- For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
-- The Box field names must exist in your Box custom metadata.
--
-- 'inclusionPatterns', 'boxConfiguration_inclusionPatterns' - A list of regular expression patterns to include certain files and
-- folders in your Box platform. Files and folders that match the patterns
-- are included in the index. Files and folders that don\'t match the
-- patterns are excluded from the index. If a file or folder matches both
-- an inclusion and exclusion pattern, the exclusion pattern takes
-- precedence and the file or folder isn\'t included in the index.
--
-- 'taskFieldMappings', 'boxConfiguration_taskFieldMappings' - A list of @DataSourceToIndexFieldMapping@ objects that map attributes or
-- field names of Box tasks to Amazon Kendra index field names. To create
-- custom fields, use the @UpdateIndex@ API before you map to Box fields.
-- For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
-- The Box field names must exist in your Box custom metadata.
--
-- 'useChangeLog', 'boxConfiguration_useChangeLog' - @TRUE@ to use the Slack change log to determine which documents require
-- updating in the index. Depending on the data source change log\'s size,
-- it may take longer for Amazon Kendra to use the change log than to scan
-- all of your documents.
--
-- 'vpcConfiguration', 'boxConfiguration_vpcConfiguration' - Configuration information for an Amazon VPC to connect to your Box. For
-- more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/vpc-configuration.html Configuring a VPC>.
--
-- 'webLinkFieldMappings', 'boxConfiguration_webLinkFieldMappings' - A list of @DataSourceToIndexFieldMapping@ objects that map attributes or
-- field names of Box web links to Amazon Kendra index field names. To
-- create custom fields, use the @UpdateIndex@ API before you map to Box
-- fields. For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
-- The Box field names must exist in your Box custom metadata.
--
-- 'enterpriseId', 'boxConfiguration_enterpriseId' - The identifier of the Box Enterprise platform. You can find the
-- enterprise ID in the Box Developer Console settings or when you create
-- an app in Box and download your authentication credentials. For example,
-- /801234567/.
--
-- 'secretArn', 'boxConfiguration_secretArn' - The Amazon Resource Name (ARN) of an Secrets Manager secret that
-- contains the key-value pairs required to connect to your Box platform.
-- The secret must contain a JSON structure with the following keys:
--
-- -   clientID—The identifier of the client OAuth 2.0 authentication
--     application created in Box.
--
-- -   clientSecret—A set of characters known only to the OAuth 2.0
--     authentication application created in Box.
--
-- -   publicKeyId—The identifier of the public key contained within an
--     identity certificate.
--
-- -   privateKey—A set of characters that make up an encryption key.
--
-- -   passphrase—A set of characters that act like a password.
--
-- You create an application in Box to generate the keys or credentials
-- required for the secret. For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/data-source-box.html Using a Box data source>.
newBoxConfiguration ::
  -- | 'enterpriseId'
  Prelude.Text ->
  -- | 'secretArn'
  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_
    }

-- | A list of @DataSourceToIndexFieldMapping@ objects that map attributes or
-- field names of Box comments to Amazon Kendra index field names. To
-- create custom fields, use the @UpdateIndex@ API before you map to Box
-- fields. For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
-- The Box field names must exist in your Box custom metadata.
boxConfiguration_commentFieldMappings :: Lens.Lens' BoxConfiguration (Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping))
boxConfiguration_commentFieldMappings :: Lens'
  BoxConfiguration (Maybe (NonEmpty DataSourceToIndexFieldMapping))
boxConfiguration_commentFieldMappings = 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

-- | @TRUE@ to index comments.
boxConfiguration_crawlComments :: Lens.Lens' BoxConfiguration (Prelude.Maybe Prelude.Bool)
boxConfiguration_crawlComments :: Lens' BoxConfiguration (Maybe Bool)
boxConfiguration_crawlComments = 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)

-- | @TRUE@ to index the contents of tasks.
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)

-- | @TRUE@ to index web links.
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)

-- | A list of regular expression patterns to exclude certain files and
-- folders from your Box platform. Files and folders that match the
-- patterns are excluded from the index.Files and folders that don\'t match
-- the patterns are included in the index. If a file or folder matches both
-- an inclusion and exclusion pattern, the exclusion pattern takes
-- precedence and the file or folder isn\'t included in the index.
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

-- | A list of @DataSourceToIndexFieldMapping@ objects that map attributes or
-- field names of Box files to Amazon Kendra index field names. To create
-- custom fields, use the @UpdateIndex@ API before you map to Box fields.
-- For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
-- The Box field names must exist in your Box custom metadata.
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

-- | A list of regular expression patterns to include certain files and
-- folders in your Box platform. Files and folders that match the patterns
-- are included in the index. Files and folders that don\'t match the
-- patterns are excluded from the index. If a file or folder matches both
-- an inclusion and exclusion pattern, the exclusion pattern takes
-- precedence and the file or folder isn\'t included in the index.
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

-- | A list of @DataSourceToIndexFieldMapping@ objects that map attributes or
-- field names of Box tasks to Amazon Kendra index field names. To create
-- custom fields, use the @UpdateIndex@ API before you map to Box fields.
-- For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
-- The Box field names must exist in your Box custom metadata.
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

-- | @TRUE@ to use the Slack change log to determine which documents require
-- updating in the index. Depending on the data source change log\'s size,
-- it may take longer for Amazon Kendra to use the change log than to scan
-- all of your documents.
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)

-- | Configuration information for an Amazon VPC to connect to your Box. For
-- more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/vpc-configuration.html Configuring a VPC>.
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)

-- | A list of @DataSourceToIndexFieldMapping@ objects that map attributes or
-- field names of Box web links to Amazon Kendra index field names. To
-- create custom fields, use the @UpdateIndex@ API before you map to Box
-- fields. For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
-- The Box field names must exist in your Box custom metadata.
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

-- | The identifier of the Box Enterprise platform. You can find the
-- enterprise ID in the Box Developer Console settings or when you create
-- an app in Box and download your authentication credentials. For example,
-- /801234567/.
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)

-- | The Amazon Resource Name (ARN) of an Secrets Manager secret that
-- contains the key-value pairs required to connect to your Box platform.
-- The secret must contain a JSON structure with the following keys:
--
-- -   clientID—The identifier of the client OAuth 2.0 authentication
--     application created in Box.
--
-- -   clientSecret—A set of characters known only to the OAuth 2.0
--     authentication application created in Box.
--
-- -   publicKeyId—The identifier of the public key contained within an
--     identity certificate.
--
-- -   privateKey—A set of characters that make up an encryption key.
--
-- -   passphrase—A set of characters that act like a password.
--
-- You create an application in Box to generate the keys or credentials
-- required for the secret. For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/data-source-box.html Using a Box data source>.
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)
          ]
      )