{-# 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.SharePointConfiguration
-- 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.SharePointConfiguration 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 Amazonka.Kendra.Types.ProxyConfiguration
import Amazonka.Kendra.Types.S3Path
import Amazonka.Kendra.Types.SharePointOnlineAuthenticationType
import Amazonka.Kendra.Types.SharePointVersion
import qualified Amazonka.Prelude as Prelude

-- | Provides the configuration information to connect to Microsoft
-- SharePoint as your data source.
--
-- /See:/ 'newSharePointConfiguration' smart constructor.
data SharePointConfiguration = SharePointConfiguration'
  { -- | Whether you want to connect to SharePoint using basic authentication of
    -- user name and password, or OAuth authentication of user name, password,
    -- client ID, and client secret. You can use OAuth authentication for
    -- SharePoint Online.
    SharePointConfiguration -> Maybe SharePointOnlineAuthenticationType
authenticationType :: Prelude.Maybe SharePointOnlineAuthenticationType,
    -- | @TRUE@ to index document attachments.
    SharePointConfiguration -> Maybe Bool
crawlAttachments :: Prelude.Maybe Prelude.Bool,
    -- | @TRUE@ to disable local groups information.
    SharePointConfiguration -> Maybe Bool
disableLocalGroups :: Prelude.Maybe Prelude.Bool,
    -- | The Microsoft SharePoint attribute field that contains the title of the
    -- document.
    SharePointConfiguration -> Maybe Text
documentTitleFieldName :: Prelude.Maybe Prelude.Text,
    -- | A list of regular expression patterns to exclude certain documents in
    -- your SharePoint. Documents that match the patterns are excluded from the
    -- index. Documents that don\'t match the patterns are included in the
    -- index. If a document matches both an inclusion and exclusion pattern,
    -- the exclusion pattern takes precedence and the document isn\'t included
    -- in the index.
    --
    -- The regex applies to the display URL of the SharePoint document.
    SharePointConfiguration -> Maybe [Text]
exclusionPatterns :: Prelude.Maybe [Prelude.Text],
    -- | A list of @DataSourceToIndexFieldMapping@ objects that map SharePoint
    -- data source attributes or field names to Amazon Kendra index field
    -- names. To create custom fields, use the @UpdateIndex@ API before you map
    -- to SharePoint fields. For more information, see
    -- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
    -- The SharePoint data source field names must exist in your SharePoint
    -- custom metadata.
    SharePointConfiguration
-> Maybe (NonEmpty DataSourceToIndexFieldMapping)
fieldMappings :: Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping),
    -- | A list of regular expression patterns to include certain documents in
    -- your SharePoint. Documents that match the patterns are included in the
    -- index. Documents that don\'t match the patterns are excluded from the
    -- index. If a document matches both an inclusion and exclusion pattern,
    -- the exclusion pattern takes precedence and the document isn\'t included
    -- in the index.
    --
    -- The regex applies to the display URL of the SharePoint document.
    SharePointConfiguration -> Maybe [Text]
inclusionPatterns :: Prelude.Maybe [Prelude.Text],
    -- | Configuration information to connect to your Microsoft SharePoint site
    -- URLs via instance via a web proxy. You can use this option for
    -- SharePoint Server.
    --
    -- You must provide the website host name and port number. For example, the
    -- host name of /https:\/\/a.example.com\/page1.html/ is \"a.example.com\"
    -- and the port is 443, the standard port for HTTPS.
    --
    -- Web proxy credentials are optional and you can use them to connect to a
    -- web proxy server that requires basic authentication of user name and
    -- password. To store web proxy credentials, you use a secret in Secrets
    -- Manager.
    --
    -- It is recommended that you follow best security practices when
    -- configuring your web proxy. This includes setting up throttling, setting
    -- up logging and monitoring, and applying security patches on a regular
    -- basis. If you use your web proxy with multiple data sources, sync jobs
    -- that occur at the same time could strain the load on your proxy. It is
    -- recommended you prepare your proxy beforehand for any security and load
    -- requirements.
    SharePointConfiguration -> Maybe ProxyConfiguration
proxyConfiguration :: Prelude.Maybe ProxyConfiguration,
    -- | The path to the SSL certificate stored in an Amazon S3 bucket. You use
    -- this to connect to SharePoint Server if you require a secure SSL
    -- connection.
    --
    -- You can simply generate a self-signed X509 certificate on any computer
    -- using OpenSSL. For an example of using OpenSSL to create an X509
    -- certificate, see
    -- <https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https-ssl.html Create and sign an X509 certificate>.
    SharePointConfiguration -> Maybe S3Path
sslCertificateS3Path :: Prelude.Maybe S3Path,
    -- | @TRUE@ to use the SharePoint change log to determine which documents
    -- require updating in the index. Depending on the change log\'s size, it
    -- may take longer for Amazon Kendra to use the change log than to scan all
    -- of your documents in SharePoint.
    SharePointConfiguration -> Maybe Bool
useChangeLog :: Prelude.Maybe Prelude.Bool,
    -- | Configuration information for an Amazon Virtual Private Cloud to connect
    -- to your Microsoft SharePoint. For more information, see
    -- <https://docs.aws.amazon.com/kendra/latest/dg/vpc-configuration.html Configuring a VPC>.
    SharePointConfiguration -> Maybe DataSourceVpcConfiguration
vpcConfiguration :: Prelude.Maybe DataSourceVpcConfiguration,
    -- | The version of Microsoft SharePoint that you use.
    SharePointConfiguration -> SharePointVersion
sharePointVersion :: SharePointVersion,
    -- | The Microsoft SharePoint site URLs for the documents you want to index.
    SharePointConfiguration -> NonEmpty Text
urls :: Prelude.NonEmpty Prelude.Text,
    -- | The Amazon Resource Name (ARN) of an Secrets Manager secret that
    -- contains the user name and password required to connect to the
    -- SharePoint instance. If you use SharePoint Server, you also need to
    -- provide the sever domain name as part of the credentials. For more
    -- information, see
    -- <https://docs.aws.amazon.com/kendra/latest/dg/data-source-sharepoint.html Using a Microsoft SharePoint Data Source>.
    --
    -- You can also provide OAuth authentication credentials of user name,
    -- password, client ID, and client secret. For more information, see
    -- <https://docs.aws.amazon.com/kendra/latest/dg/data-source-sharepoint.html Using a SharePoint data source>.
    SharePointConfiguration -> Text
secretArn :: Prelude.Text
  }
  deriving (SharePointConfiguration -> SharePointConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SharePointConfiguration -> SharePointConfiguration -> Bool
$c/= :: SharePointConfiguration -> SharePointConfiguration -> Bool
== :: SharePointConfiguration -> SharePointConfiguration -> Bool
$c== :: SharePointConfiguration -> SharePointConfiguration -> Bool
Prelude.Eq, ReadPrec [SharePointConfiguration]
ReadPrec SharePointConfiguration
Int -> ReadS SharePointConfiguration
ReadS [SharePointConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SharePointConfiguration]
$creadListPrec :: ReadPrec [SharePointConfiguration]
readPrec :: ReadPrec SharePointConfiguration
$creadPrec :: ReadPrec SharePointConfiguration
readList :: ReadS [SharePointConfiguration]
$creadList :: ReadS [SharePointConfiguration]
readsPrec :: Int -> ReadS SharePointConfiguration
$creadsPrec :: Int -> ReadS SharePointConfiguration
Prelude.Read, Int -> SharePointConfiguration -> ShowS
[SharePointConfiguration] -> ShowS
SharePointConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SharePointConfiguration] -> ShowS
$cshowList :: [SharePointConfiguration] -> ShowS
show :: SharePointConfiguration -> String
$cshow :: SharePointConfiguration -> String
showsPrec :: Int -> SharePointConfiguration -> ShowS
$cshowsPrec :: Int -> SharePointConfiguration -> ShowS
Prelude.Show, forall x. Rep SharePointConfiguration x -> SharePointConfiguration
forall x. SharePointConfiguration -> Rep SharePointConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SharePointConfiguration x -> SharePointConfiguration
$cfrom :: forall x. SharePointConfiguration -> Rep SharePointConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'SharePointConfiguration' 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:
--
-- 'authenticationType', 'sharePointConfiguration_authenticationType' - Whether you want to connect to SharePoint using basic authentication of
-- user name and password, or OAuth authentication of user name, password,
-- client ID, and client secret. You can use OAuth authentication for
-- SharePoint Online.
--
-- 'crawlAttachments', 'sharePointConfiguration_crawlAttachments' - @TRUE@ to index document attachments.
--
-- 'disableLocalGroups', 'sharePointConfiguration_disableLocalGroups' - @TRUE@ to disable local groups information.
--
-- 'documentTitleFieldName', 'sharePointConfiguration_documentTitleFieldName' - The Microsoft SharePoint attribute field that contains the title of the
-- document.
--
-- 'exclusionPatterns', 'sharePointConfiguration_exclusionPatterns' - A list of regular expression patterns to exclude certain documents in
-- your SharePoint. Documents that match the patterns are excluded from the
-- index. Documents that don\'t match the patterns are included in the
-- index. If a document matches both an inclusion and exclusion pattern,
-- the exclusion pattern takes precedence and the document isn\'t included
-- in the index.
--
-- The regex applies to the display URL of the SharePoint document.
--
-- 'fieldMappings', 'sharePointConfiguration_fieldMappings' - A list of @DataSourceToIndexFieldMapping@ objects that map SharePoint
-- data source attributes or field names to Amazon Kendra index field
-- names. To create custom fields, use the @UpdateIndex@ API before you map
-- to SharePoint fields. For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
-- The SharePoint data source field names must exist in your SharePoint
-- custom metadata.
--
-- 'inclusionPatterns', 'sharePointConfiguration_inclusionPatterns' - A list of regular expression patterns to include certain documents in
-- your SharePoint. Documents that match the patterns are included in the
-- index. Documents that don\'t match the patterns are excluded from the
-- index. If a document matches both an inclusion and exclusion pattern,
-- the exclusion pattern takes precedence and the document isn\'t included
-- in the index.
--
-- The regex applies to the display URL of the SharePoint document.
--
-- 'proxyConfiguration', 'sharePointConfiguration_proxyConfiguration' - Configuration information to connect to your Microsoft SharePoint site
-- URLs via instance via a web proxy. You can use this option for
-- SharePoint Server.
--
-- You must provide the website host name and port number. For example, the
-- host name of /https:\/\/a.example.com\/page1.html/ is \"a.example.com\"
-- and the port is 443, the standard port for HTTPS.
--
-- Web proxy credentials are optional and you can use them to connect to a
-- web proxy server that requires basic authentication of user name and
-- password. To store web proxy credentials, you use a secret in Secrets
-- Manager.
--
-- It is recommended that you follow best security practices when
-- configuring your web proxy. This includes setting up throttling, setting
-- up logging and monitoring, and applying security patches on a regular
-- basis. If you use your web proxy with multiple data sources, sync jobs
-- that occur at the same time could strain the load on your proxy. It is
-- recommended you prepare your proxy beforehand for any security and load
-- requirements.
--
-- 'sslCertificateS3Path', 'sharePointConfiguration_sslCertificateS3Path' - The path to the SSL certificate stored in an Amazon S3 bucket. You use
-- this to connect to SharePoint Server if you require a secure SSL
-- connection.
--
-- You can simply generate a self-signed X509 certificate on any computer
-- using OpenSSL. For an example of using OpenSSL to create an X509
-- certificate, see
-- <https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https-ssl.html Create and sign an X509 certificate>.
--
-- 'useChangeLog', 'sharePointConfiguration_useChangeLog' - @TRUE@ to use the SharePoint change log to determine which documents
-- require updating in the index. Depending on the change log\'s size, it
-- may take longer for Amazon Kendra to use the change log than to scan all
-- of your documents in SharePoint.
--
-- 'vpcConfiguration', 'sharePointConfiguration_vpcConfiguration' - Configuration information for an Amazon Virtual Private Cloud to connect
-- to your Microsoft SharePoint. For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/vpc-configuration.html Configuring a VPC>.
--
-- 'sharePointVersion', 'sharePointConfiguration_sharePointVersion' - The version of Microsoft SharePoint that you use.
--
-- 'urls', 'sharePointConfiguration_urls' - The Microsoft SharePoint site URLs for the documents you want to index.
--
-- 'secretArn', 'sharePointConfiguration_secretArn' - The Amazon Resource Name (ARN) of an Secrets Manager secret that
-- contains the user name and password required to connect to the
-- SharePoint instance. If you use SharePoint Server, you also need to
-- provide the sever domain name as part of the credentials. For more
-- information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/data-source-sharepoint.html Using a Microsoft SharePoint Data Source>.
--
-- You can also provide OAuth authentication credentials of user name,
-- password, client ID, and client secret. For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/data-source-sharepoint.html Using a SharePoint data source>.
newSharePointConfiguration ::
  -- | 'sharePointVersion'
  SharePointVersion ->
  -- | 'urls'
  Prelude.NonEmpty Prelude.Text ->
  -- | 'secretArn'
  Prelude.Text ->
  SharePointConfiguration
newSharePointConfiguration :: SharePointVersion
-> NonEmpty Text -> Text -> SharePointConfiguration
newSharePointConfiguration
  SharePointVersion
pSharePointVersion_
  NonEmpty Text
pUrls_
  Text
pSecretArn_ =
    SharePointConfiguration'
      { $sel:authenticationType:SharePointConfiguration' :: Maybe SharePointOnlineAuthenticationType
authenticationType =
          forall a. Maybe a
Prelude.Nothing,
        $sel:crawlAttachments:SharePointConfiguration' :: Maybe Bool
crawlAttachments = forall a. Maybe a
Prelude.Nothing,
        $sel:disableLocalGroups:SharePointConfiguration' :: Maybe Bool
disableLocalGroups = forall a. Maybe a
Prelude.Nothing,
        $sel:documentTitleFieldName:SharePointConfiguration' :: Maybe Text
documentTitleFieldName = forall a. Maybe a
Prelude.Nothing,
        $sel:exclusionPatterns:SharePointConfiguration' :: Maybe [Text]
exclusionPatterns = forall a. Maybe a
Prelude.Nothing,
        $sel:fieldMappings:SharePointConfiguration' :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
fieldMappings = forall a. Maybe a
Prelude.Nothing,
        $sel:inclusionPatterns:SharePointConfiguration' :: Maybe [Text]
inclusionPatterns = forall a. Maybe a
Prelude.Nothing,
        $sel:proxyConfiguration:SharePointConfiguration' :: Maybe ProxyConfiguration
proxyConfiguration = forall a. Maybe a
Prelude.Nothing,
        $sel:sslCertificateS3Path:SharePointConfiguration' :: Maybe S3Path
sslCertificateS3Path = forall a. Maybe a
Prelude.Nothing,
        $sel:useChangeLog:SharePointConfiguration' :: Maybe Bool
useChangeLog = forall a. Maybe a
Prelude.Nothing,
        $sel:vpcConfiguration:SharePointConfiguration' :: Maybe DataSourceVpcConfiguration
vpcConfiguration = forall a. Maybe a
Prelude.Nothing,
        $sel:sharePointVersion:SharePointConfiguration' :: SharePointVersion
sharePointVersion = SharePointVersion
pSharePointVersion_,
        $sel:urls:SharePointConfiguration' :: NonEmpty Text
urls = forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pUrls_,
        $sel:secretArn:SharePointConfiguration' :: Text
secretArn = Text
pSecretArn_
      }

-- | Whether you want to connect to SharePoint using basic authentication of
-- user name and password, or OAuth authentication of user name, password,
-- client ID, and client secret. You can use OAuth authentication for
-- SharePoint Online.
sharePointConfiguration_authenticationType :: Lens.Lens' SharePointConfiguration (Prelude.Maybe SharePointOnlineAuthenticationType)
sharePointConfiguration_authenticationType :: Lens'
  SharePointConfiguration (Maybe SharePointOnlineAuthenticationType)
sharePointConfiguration_authenticationType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharePointConfiguration' {Maybe SharePointOnlineAuthenticationType
authenticationType :: Maybe SharePointOnlineAuthenticationType
$sel:authenticationType:SharePointConfiguration' :: SharePointConfiguration -> Maybe SharePointOnlineAuthenticationType
authenticationType} -> Maybe SharePointOnlineAuthenticationType
authenticationType) (\s :: SharePointConfiguration
s@SharePointConfiguration' {} Maybe SharePointOnlineAuthenticationType
a -> SharePointConfiguration
s {$sel:authenticationType:SharePointConfiguration' :: Maybe SharePointOnlineAuthenticationType
authenticationType = Maybe SharePointOnlineAuthenticationType
a} :: SharePointConfiguration)

-- | @TRUE@ to index document attachments.
sharePointConfiguration_crawlAttachments :: Lens.Lens' SharePointConfiguration (Prelude.Maybe Prelude.Bool)
sharePointConfiguration_crawlAttachments :: Lens' SharePointConfiguration (Maybe Bool)
sharePointConfiguration_crawlAttachments = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharePointConfiguration' {Maybe Bool
crawlAttachments :: Maybe Bool
$sel:crawlAttachments:SharePointConfiguration' :: SharePointConfiguration -> Maybe Bool
crawlAttachments} -> Maybe Bool
crawlAttachments) (\s :: SharePointConfiguration
s@SharePointConfiguration' {} Maybe Bool
a -> SharePointConfiguration
s {$sel:crawlAttachments:SharePointConfiguration' :: Maybe Bool
crawlAttachments = Maybe Bool
a} :: SharePointConfiguration)

-- | @TRUE@ to disable local groups information.
sharePointConfiguration_disableLocalGroups :: Lens.Lens' SharePointConfiguration (Prelude.Maybe Prelude.Bool)
sharePointConfiguration_disableLocalGroups :: Lens' SharePointConfiguration (Maybe Bool)
sharePointConfiguration_disableLocalGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharePointConfiguration' {Maybe Bool
disableLocalGroups :: Maybe Bool
$sel:disableLocalGroups:SharePointConfiguration' :: SharePointConfiguration -> Maybe Bool
disableLocalGroups} -> Maybe Bool
disableLocalGroups) (\s :: SharePointConfiguration
s@SharePointConfiguration' {} Maybe Bool
a -> SharePointConfiguration
s {$sel:disableLocalGroups:SharePointConfiguration' :: Maybe Bool
disableLocalGroups = Maybe Bool
a} :: SharePointConfiguration)

-- | The Microsoft SharePoint attribute field that contains the title of the
-- document.
sharePointConfiguration_documentTitleFieldName :: Lens.Lens' SharePointConfiguration (Prelude.Maybe Prelude.Text)
sharePointConfiguration_documentTitleFieldName :: Lens' SharePointConfiguration (Maybe Text)
sharePointConfiguration_documentTitleFieldName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharePointConfiguration' {Maybe Text
documentTitleFieldName :: Maybe Text
$sel:documentTitleFieldName:SharePointConfiguration' :: SharePointConfiguration -> Maybe Text
documentTitleFieldName} -> Maybe Text
documentTitleFieldName) (\s :: SharePointConfiguration
s@SharePointConfiguration' {} Maybe Text
a -> SharePointConfiguration
s {$sel:documentTitleFieldName:SharePointConfiguration' :: Maybe Text
documentTitleFieldName = Maybe Text
a} :: SharePointConfiguration)

-- | A list of regular expression patterns to exclude certain documents in
-- your SharePoint. Documents that match the patterns are excluded from the
-- index. Documents that don\'t match the patterns are included in the
-- index. If a document matches both an inclusion and exclusion pattern,
-- the exclusion pattern takes precedence and the document isn\'t included
-- in the index.
--
-- The regex applies to the display URL of the SharePoint document.
sharePointConfiguration_exclusionPatterns :: Lens.Lens' SharePointConfiguration (Prelude.Maybe [Prelude.Text])
sharePointConfiguration_exclusionPatterns :: Lens' SharePointConfiguration (Maybe [Text])
sharePointConfiguration_exclusionPatterns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharePointConfiguration' {Maybe [Text]
exclusionPatterns :: Maybe [Text]
$sel:exclusionPatterns:SharePointConfiguration' :: SharePointConfiguration -> Maybe [Text]
exclusionPatterns} -> Maybe [Text]
exclusionPatterns) (\s :: SharePointConfiguration
s@SharePointConfiguration' {} Maybe [Text]
a -> SharePointConfiguration
s {$sel:exclusionPatterns:SharePointConfiguration' :: Maybe [Text]
exclusionPatterns = Maybe [Text]
a} :: SharePointConfiguration) 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 SharePoint
-- data source attributes or field names to Amazon Kendra index field
-- names. To create custom fields, use the @UpdateIndex@ API before you map
-- to SharePoint fields. For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
-- The SharePoint data source field names must exist in your SharePoint
-- custom metadata.
sharePointConfiguration_fieldMappings :: Lens.Lens' SharePointConfiguration (Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping))
sharePointConfiguration_fieldMappings :: Lens'
  SharePointConfiguration
  (Maybe (NonEmpty DataSourceToIndexFieldMapping))
sharePointConfiguration_fieldMappings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharePointConfiguration' {Maybe (NonEmpty DataSourceToIndexFieldMapping)
fieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:fieldMappings:SharePointConfiguration' :: SharePointConfiguration
-> Maybe (NonEmpty DataSourceToIndexFieldMapping)
fieldMappings} -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
fieldMappings) (\s :: SharePointConfiguration
s@SharePointConfiguration' {} Maybe (NonEmpty DataSourceToIndexFieldMapping)
a -> SharePointConfiguration
s {$sel:fieldMappings:SharePointConfiguration' :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
fieldMappings = Maybe (NonEmpty DataSourceToIndexFieldMapping)
a} :: SharePointConfiguration) 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 documents in
-- your SharePoint. Documents that match the patterns are included in the
-- index. Documents that don\'t match the patterns are excluded from the
-- index. If a document matches both an inclusion and exclusion pattern,
-- the exclusion pattern takes precedence and the document isn\'t included
-- in the index.
--
-- The regex applies to the display URL of the SharePoint document.
sharePointConfiguration_inclusionPatterns :: Lens.Lens' SharePointConfiguration (Prelude.Maybe [Prelude.Text])
sharePointConfiguration_inclusionPatterns :: Lens' SharePointConfiguration (Maybe [Text])
sharePointConfiguration_inclusionPatterns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharePointConfiguration' {Maybe [Text]
inclusionPatterns :: Maybe [Text]
$sel:inclusionPatterns:SharePointConfiguration' :: SharePointConfiguration -> Maybe [Text]
inclusionPatterns} -> Maybe [Text]
inclusionPatterns) (\s :: SharePointConfiguration
s@SharePointConfiguration' {} Maybe [Text]
a -> SharePointConfiguration
s {$sel:inclusionPatterns:SharePointConfiguration' :: Maybe [Text]
inclusionPatterns = Maybe [Text]
a} :: SharePointConfiguration) 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

-- | Configuration information to connect to your Microsoft SharePoint site
-- URLs via instance via a web proxy. You can use this option for
-- SharePoint Server.
--
-- You must provide the website host name and port number. For example, the
-- host name of /https:\/\/a.example.com\/page1.html/ is \"a.example.com\"
-- and the port is 443, the standard port for HTTPS.
--
-- Web proxy credentials are optional and you can use them to connect to a
-- web proxy server that requires basic authentication of user name and
-- password. To store web proxy credentials, you use a secret in Secrets
-- Manager.
--
-- It is recommended that you follow best security practices when
-- configuring your web proxy. This includes setting up throttling, setting
-- up logging and monitoring, and applying security patches on a regular
-- basis. If you use your web proxy with multiple data sources, sync jobs
-- that occur at the same time could strain the load on your proxy. It is
-- recommended you prepare your proxy beforehand for any security and load
-- requirements.
sharePointConfiguration_proxyConfiguration :: Lens.Lens' SharePointConfiguration (Prelude.Maybe ProxyConfiguration)
sharePointConfiguration_proxyConfiguration :: Lens' SharePointConfiguration (Maybe ProxyConfiguration)
sharePointConfiguration_proxyConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharePointConfiguration' {Maybe ProxyConfiguration
proxyConfiguration :: Maybe ProxyConfiguration
$sel:proxyConfiguration:SharePointConfiguration' :: SharePointConfiguration -> Maybe ProxyConfiguration
proxyConfiguration} -> Maybe ProxyConfiguration
proxyConfiguration) (\s :: SharePointConfiguration
s@SharePointConfiguration' {} Maybe ProxyConfiguration
a -> SharePointConfiguration
s {$sel:proxyConfiguration:SharePointConfiguration' :: Maybe ProxyConfiguration
proxyConfiguration = Maybe ProxyConfiguration
a} :: SharePointConfiguration)

-- | The path to the SSL certificate stored in an Amazon S3 bucket. You use
-- this to connect to SharePoint Server if you require a secure SSL
-- connection.
--
-- You can simply generate a self-signed X509 certificate on any computer
-- using OpenSSL. For an example of using OpenSSL to create an X509
-- certificate, see
-- <https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https-ssl.html Create and sign an X509 certificate>.
sharePointConfiguration_sslCertificateS3Path :: Lens.Lens' SharePointConfiguration (Prelude.Maybe S3Path)
sharePointConfiguration_sslCertificateS3Path :: Lens' SharePointConfiguration (Maybe S3Path)
sharePointConfiguration_sslCertificateS3Path = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharePointConfiguration' {Maybe S3Path
sslCertificateS3Path :: Maybe S3Path
$sel:sslCertificateS3Path:SharePointConfiguration' :: SharePointConfiguration -> Maybe S3Path
sslCertificateS3Path} -> Maybe S3Path
sslCertificateS3Path) (\s :: SharePointConfiguration
s@SharePointConfiguration' {} Maybe S3Path
a -> SharePointConfiguration
s {$sel:sslCertificateS3Path:SharePointConfiguration' :: Maybe S3Path
sslCertificateS3Path = Maybe S3Path
a} :: SharePointConfiguration)

-- | @TRUE@ to use the SharePoint change log to determine which documents
-- require updating in the index. Depending on the change log\'s size, it
-- may take longer for Amazon Kendra to use the change log than to scan all
-- of your documents in SharePoint.
sharePointConfiguration_useChangeLog :: Lens.Lens' SharePointConfiguration (Prelude.Maybe Prelude.Bool)
sharePointConfiguration_useChangeLog :: Lens' SharePointConfiguration (Maybe Bool)
sharePointConfiguration_useChangeLog = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharePointConfiguration' {Maybe Bool
useChangeLog :: Maybe Bool
$sel:useChangeLog:SharePointConfiguration' :: SharePointConfiguration -> Maybe Bool
useChangeLog} -> Maybe Bool
useChangeLog) (\s :: SharePointConfiguration
s@SharePointConfiguration' {} Maybe Bool
a -> SharePointConfiguration
s {$sel:useChangeLog:SharePointConfiguration' :: Maybe Bool
useChangeLog = Maybe Bool
a} :: SharePointConfiguration)

-- | Configuration information for an Amazon Virtual Private Cloud to connect
-- to your Microsoft SharePoint. For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/vpc-configuration.html Configuring a VPC>.
sharePointConfiguration_vpcConfiguration :: Lens.Lens' SharePointConfiguration (Prelude.Maybe DataSourceVpcConfiguration)
sharePointConfiguration_vpcConfiguration :: Lens' SharePointConfiguration (Maybe DataSourceVpcConfiguration)
sharePointConfiguration_vpcConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharePointConfiguration' {Maybe DataSourceVpcConfiguration
vpcConfiguration :: Maybe DataSourceVpcConfiguration
$sel:vpcConfiguration:SharePointConfiguration' :: SharePointConfiguration -> Maybe DataSourceVpcConfiguration
vpcConfiguration} -> Maybe DataSourceVpcConfiguration
vpcConfiguration) (\s :: SharePointConfiguration
s@SharePointConfiguration' {} Maybe DataSourceVpcConfiguration
a -> SharePointConfiguration
s {$sel:vpcConfiguration:SharePointConfiguration' :: Maybe DataSourceVpcConfiguration
vpcConfiguration = Maybe DataSourceVpcConfiguration
a} :: SharePointConfiguration)

-- | The version of Microsoft SharePoint that you use.
sharePointConfiguration_sharePointVersion :: Lens.Lens' SharePointConfiguration SharePointVersion
sharePointConfiguration_sharePointVersion :: Lens' SharePointConfiguration SharePointVersion
sharePointConfiguration_sharePointVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharePointConfiguration' {SharePointVersion
sharePointVersion :: SharePointVersion
$sel:sharePointVersion:SharePointConfiguration' :: SharePointConfiguration -> SharePointVersion
sharePointVersion} -> SharePointVersion
sharePointVersion) (\s :: SharePointConfiguration
s@SharePointConfiguration' {} SharePointVersion
a -> SharePointConfiguration
s {$sel:sharePointVersion:SharePointConfiguration' :: SharePointVersion
sharePointVersion = SharePointVersion
a} :: SharePointConfiguration)

-- | The Microsoft SharePoint site URLs for the documents you want to index.
sharePointConfiguration_urls :: Lens.Lens' SharePointConfiguration (Prelude.NonEmpty Prelude.Text)
sharePointConfiguration_urls :: Lens' SharePointConfiguration (NonEmpty Text)
sharePointConfiguration_urls = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharePointConfiguration' {NonEmpty Text
urls :: NonEmpty Text
$sel:urls:SharePointConfiguration' :: SharePointConfiguration -> NonEmpty Text
urls} -> NonEmpty Text
urls) (\s :: SharePointConfiguration
s@SharePointConfiguration' {} NonEmpty Text
a -> SharePointConfiguration
s {$sel:urls:SharePointConfiguration' :: NonEmpty Text
urls = NonEmpty Text
a} :: SharePointConfiguration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resource Name (ARN) of an Secrets Manager secret that
-- contains the user name and password required to connect to the
-- SharePoint instance. If you use SharePoint Server, you also need to
-- provide the sever domain name as part of the credentials. For more
-- information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/data-source-sharepoint.html Using a Microsoft SharePoint Data Source>.
--
-- You can also provide OAuth authentication credentials of user name,
-- password, client ID, and client secret. For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/data-source-sharepoint.html Using a SharePoint data source>.
sharePointConfiguration_secretArn :: Lens.Lens' SharePointConfiguration Prelude.Text
sharePointConfiguration_secretArn :: Lens' SharePointConfiguration Text
sharePointConfiguration_secretArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharePointConfiguration' {Text
secretArn :: Text
$sel:secretArn:SharePointConfiguration' :: SharePointConfiguration -> Text
secretArn} -> Text
secretArn) (\s :: SharePointConfiguration
s@SharePointConfiguration' {} Text
a -> SharePointConfiguration
s {$sel:secretArn:SharePointConfiguration' :: Text
secretArn = Text
a} :: SharePointConfiguration)

instance Data.FromJSON SharePointConfiguration where
  parseJSON :: Value -> Parser SharePointConfiguration
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"SharePointConfiguration"
      ( \Object
x ->
          Maybe SharePointOnlineAuthenticationType
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe (NonEmpty DataSourceToIndexFieldMapping)
-> Maybe [Text]
-> Maybe ProxyConfiguration
-> Maybe S3Path
-> Maybe Bool
-> Maybe DataSourceVpcConfiguration
-> SharePointVersion
-> NonEmpty Text
-> Text
-> SharePointConfiguration
SharePointConfiguration'
            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
"AuthenticationType")
            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")
            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
"DisableLocalGroups")
            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
"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
"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
"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
"ProxyConfiguration")
            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
"SslCertificateS3Path")
            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 a
Data..: Key
"SharePointVersion")
            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
"Urls")
            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 SharePointConfiguration where
  hashWithSalt :: Int -> SharePointConfiguration -> Int
hashWithSalt Int
_salt SharePointConfiguration' {Maybe Bool
Maybe [Text]
Maybe (NonEmpty DataSourceToIndexFieldMapping)
Maybe Text
Maybe DataSourceVpcConfiguration
Maybe ProxyConfiguration
Maybe S3Path
Maybe SharePointOnlineAuthenticationType
NonEmpty Text
Text
SharePointVersion
secretArn :: Text
urls :: NonEmpty Text
sharePointVersion :: SharePointVersion
vpcConfiguration :: Maybe DataSourceVpcConfiguration
useChangeLog :: Maybe Bool
sslCertificateS3Path :: Maybe S3Path
proxyConfiguration :: Maybe ProxyConfiguration
inclusionPatterns :: Maybe [Text]
fieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
exclusionPatterns :: Maybe [Text]
documentTitleFieldName :: Maybe Text
disableLocalGroups :: Maybe Bool
crawlAttachments :: Maybe Bool
authenticationType :: Maybe SharePointOnlineAuthenticationType
$sel:secretArn:SharePointConfiguration' :: SharePointConfiguration -> Text
$sel:urls:SharePointConfiguration' :: SharePointConfiguration -> NonEmpty Text
$sel:sharePointVersion:SharePointConfiguration' :: SharePointConfiguration -> SharePointVersion
$sel:vpcConfiguration:SharePointConfiguration' :: SharePointConfiguration -> Maybe DataSourceVpcConfiguration
$sel:useChangeLog:SharePointConfiguration' :: SharePointConfiguration -> Maybe Bool
$sel:sslCertificateS3Path:SharePointConfiguration' :: SharePointConfiguration -> Maybe S3Path
$sel:proxyConfiguration:SharePointConfiguration' :: SharePointConfiguration -> Maybe ProxyConfiguration
$sel:inclusionPatterns:SharePointConfiguration' :: SharePointConfiguration -> Maybe [Text]
$sel:fieldMappings:SharePointConfiguration' :: SharePointConfiguration
-> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:exclusionPatterns:SharePointConfiguration' :: SharePointConfiguration -> Maybe [Text]
$sel:documentTitleFieldName:SharePointConfiguration' :: SharePointConfiguration -> Maybe Text
$sel:disableLocalGroups:SharePointConfiguration' :: SharePointConfiguration -> Maybe Bool
$sel:crawlAttachments:SharePointConfiguration' :: SharePointConfiguration -> Maybe Bool
$sel:authenticationType:SharePointConfiguration' :: SharePointConfiguration -> Maybe SharePointOnlineAuthenticationType
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SharePointOnlineAuthenticationType
authenticationType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
crawlAttachments
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
disableLocalGroups
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
documentTitleFieldName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
exclusionPatterns
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty DataSourceToIndexFieldMapping)
fieldMappings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
inclusionPatterns
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProxyConfiguration
proxyConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe S3Path
sslCertificateS3Path
      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` SharePointVersion
sharePointVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty Text
urls
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
secretArn

instance Prelude.NFData SharePointConfiguration where
  rnf :: SharePointConfiguration -> ()
rnf SharePointConfiguration' {Maybe Bool
Maybe [Text]
Maybe (NonEmpty DataSourceToIndexFieldMapping)
Maybe Text
Maybe DataSourceVpcConfiguration
Maybe ProxyConfiguration
Maybe S3Path
Maybe SharePointOnlineAuthenticationType
NonEmpty Text
Text
SharePointVersion
secretArn :: Text
urls :: NonEmpty Text
sharePointVersion :: SharePointVersion
vpcConfiguration :: Maybe DataSourceVpcConfiguration
useChangeLog :: Maybe Bool
sslCertificateS3Path :: Maybe S3Path
proxyConfiguration :: Maybe ProxyConfiguration
inclusionPatterns :: Maybe [Text]
fieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
exclusionPatterns :: Maybe [Text]
documentTitleFieldName :: Maybe Text
disableLocalGroups :: Maybe Bool
crawlAttachments :: Maybe Bool
authenticationType :: Maybe SharePointOnlineAuthenticationType
$sel:secretArn:SharePointConfiguration' :: SharePointConfiguration -> Text
$sel:urls:SharePointConfiguration' :: SharePointConfiguration -> NonEmpty Text
$sel:sharePointVersion:SharePointConfiguration' :: SharePointConfiguration -> SharePointVersion
$sel:vpcConfiguration:SharePointConfiguration' :: SharePointConfiguration -> Maybe DataSourceVpcConfiguration
$sel:useChangeLog:SharePointConfiguration' :: SharePointConfiguration -> Maybe Bool
$sel:sslCertificateS3Path:SharePointConfiguration' :: SharePointConfiguration -> Maybe S3Path
$sel:proxyConfiguration:SharePointConfiguration' :: SharePointConfiguration -> Maybe ProxyConfiguration
$sel:inclusionPatterns:SharePointConfiguration' :: SharePointConfiguration -> Maybe [Text]
$sel:fieldMappings:SharePointConfiguration' :: SharePointConfiguration
-> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:exclusionPatterns:SharePointConfiguration' :: SharePointConfiguration -> Maybe [Text]
$sel:documentTitleFieldName:SharePointConfiguration' :: SharePointConfiguration -> Maybe Text
$sel:disableLocalGroups:SharePointConfiguration' :: SharePointConfiguration -> Maybe Bool
$sel:crawlAttachments:SharePointConfiguration' :: SharePointConfiguration -> Maybe Bool
$sel:authenticationType:SharePointConfiguration' :: SharePointConfiguration -> Maybe SharePointOnlineAuthenticationType
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe SharePointOnlineAuthenticationType
authenticationType
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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 Bool
disableLocalGroups
      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]
exclusionPatterns
      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]
inclusionPatterns
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProxyConfiguration
proxyConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe S3Path
sslCertificateS3Path
      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 SharePointVersion
sharePointVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NonEmpty Text
urls
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
secretArn

instance Data.ToJSON SharePointConfiguration where
  toJSON :: SharePointConfiguration -> Value
toJSON SharePointConfiguration' {Maybe Bool
Maybe [Text]
Maybe (NonEmpty DataSourceToIndexFieldMapping)
Maybe Text
Maybe DataSourceVpcConfiguration
Maybe ProxyConfiguration
Maybe S3Path
Maybe SharePointOnlineAuthenticationType
NonEmpty Text
Text
SharePointVersion
secretArn :: Text
urls :: NonEmpty Text
sharePointVersion :: SharePointVersion
vpcConfiguration :: Maybe DataSourceVpcConfiguration
useChangeLog :: Maybe Bool
sslCertificateS3Path :: Maybe S3Path
proxyConfiguration :: Maybe ProxyConfiguration
inclusionPatterns :: Maybe [Text]
fieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
exclusionPatterns :: Maybe [Text]
documentTitleFieldName :: Maybe Text
disableLocalGroups :: Maybe Bool
crawlAttachments :: Maybe Bool
authenticationType :: Maybe SharePointOnlineAuthenticationType
$sel:secretArn:SharePointConfiguration' :: SharePointConfiguration -> Text
$sel:urls:SharePointConfiguration' :: SharePointConfiguration -> NonEmpty Text
$sel:sharePointVersion:SharePointConfiguration' :: SharePointConfiguration -> SharePointVersion
$sel:vpcConfiguration:SharePointConfiguration' :: SharePointConfiguration -> Maybe DataSourceVpcConfiguration
$sel:useChangeLog:SharePointConfiguration' :: SharePointConfiguration -> Maybe Bool
$sel:sslCertificateS3Path:SharePointConfiguration' :: SharePointConfiguration -> Maybe S3Path
$sel:proxyConfiguration:SharePointConfiguration' :: SharePointConfiguration -> Maybe ProxyConfiguration
$sel:inclusionPatterns:SharePointConfiguration' :: SharePointConfiguration -> Maybe [Text]
$sel:fieldMappings:SharePointConfiguration' :: SharePointConfiguration
-> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:exclusionPatterns:SharePointConfiguration' :: SharePointConfiguration -> Maybe [Text]
$sel:documentTitleFieldName:SharePointConfiguration' :: SharePointConfiguration -> Maybe Text
$sel:disableLocalGroups:SharePointConfiguration' :: SharePointConfiguration -> Maybe Bool
$sel:crawlAttachments:SharePointConfiguration' :: SharePointConfiguration -> Maybe Bool
$sel:authenticationType:SharePointConfiguration' :: SharePointConfiguration -> Maybe SharePointOnlineAuthenticationType
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"AuthenticationType" 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 SharePointOnlineAuthenticationType
authenticationType,
            (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
"DisableLocalGroups" 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
disableLocalGroups,
            (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
"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
"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
"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
"ProxyConfiguration" 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 ProxyConfiguration
proxyConfiguration,
            (Key
"SslCertificateS3Path" 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 S3Path
sslCertificateS3Path,
            (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,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"SharePointVersion" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= SharePointVersion
sharePointVersion),
            forall a. a -> Maybe a
Prelude.Just (Key
"Urls" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NonEmpty Text
urls),
            forall a. a -> Maybe a
Prelude.Just (Key
"SecretArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
secretArn)
          ]
      )