{-# 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.JiraConfiguration
-- 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.JiraConfiguration 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.IssueSubEntity
import qualified Amazonka.Prelude as Prelude

-- | Provides the configuration information to connect to Jira as your data
-- source.
--
-- /See:/ 'newJiraConfiguration' smart constructor.
data JiraConfiguration = JiraConfiguration'
  { -- | A list of DataSourceToIndexFieldMapping objects that map attributes or
    -- field names of Jira attachments to Amazon Kendra index field names. To
    -- create custom fields, use the UpdateIndex API before you map to Jira
    -- fields. For more information, see
    -- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
    -- The Jira data source field names must exist in your Jira custom
    -- metadata.
    JiraConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
attachmentFieldMappings :: Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping),
    -- | A list of DataSourceToIndexFieldMapping objects that map attributes or
    -- field names of Jira comments to Amazon Kendra index field names. To
    -- create custom fields, use the UpdateIndex API before you map to Jira
    -- fields. For more information, see
    -- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
    -- The Jira data source field names must exist in your Jira custom
    -- metadata.
    JiraConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
commentFieldMappings :: Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping),
    -- | A list of regular expression patterns to exclude certain file paths,
    -- file names, and file types in your Jira data source. Files that match
    -- the patterns are excluded from the index. Files that don’t match the
    -- patterns are included in the index. If a file matches both an inclusion
    -- pattern and an exclusion pattern, the exclusion pattern takes precedence
    -- and the file isn\'t included in the index.
    JiraConfiguration -> Maybe [Text]
exclusionPatterns :: Prelude.Maybe [Prelude.Text],
    -- | A list of regular expression patterns to include certain file paths,
    -- file names, and file types in your Jira data source. Files that match
    -- the patterns are included in the index. Files that don\'t match the
    -- patterns are excluded from the index. If a file matches both an
    -- inclusion pattern and an exclusion pattern, the exclusion pattern takes
    -- precedence and the file isn\'t included in the index.
    JiraConfiguration -> Maybe [Text]
inclusionPatterns :: Prelude.Maybe [Prelude.Text],
    -- | A list of DataSourceToIndexFieldMapping objects that map attributes or
    -- field names of Jira issues to Amazon Kendra index field names. To create
    -- custom fields, use the UpdateIndex API before you map to Jira fields.
    -- For more information, see
    -- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
    -- The Jira data source field names must exist in your Jira custom
    -- metadata.
    JiraConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
issueFieldMappings :: Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping),
    -- | Specify whether to crawl comments, attachments, and work logs. You can
    -- specify one or more of these options.
    JiraConfiguration -> Maybe [IssueSubEntity]
issueSubEntityFilter :: Prelude.Maybe [IssueSubEntity],
    -- | Specify which issue types to crawl in your Jira data source. You can
    -- specify one or more of these options to crawl.
    JiraConfiguration -> Maybe [Text]
issueType :: Prelude.Maybe [Prelude.Text],
    -- | Specify which projects to crawl in your Jira data source. You can
    -- specify one or more Jira project IDs.
    JiraConfiguration -> Maybe [Text]
project :: Prelude.Maybe [Prelude.Text],
    -- | A list of DataSourceToIndexFieldMapping objects that map attributes or
    -- field names of Jira projects to Amazon Kendra index field names. To
    -- create custom fields, use the UpdateIndex API before you map to Jira
    -- fields. For more information, see
    -- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
    -- The Jira data source field names must exist in your Jira custom
    -- metadata.
    JiraConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
projectFieldMappings :: Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping),
    -- | Specify which statuses to crawl in your Jira data source. You can
    -- specify one or more of these options to crawl.
    JiraConfiguration -> Maybe [Text]
status :: Prelude.Maybe [Prelude.Text],
    -- | @TRUE@ to use the Jira 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 Jira.
    JiraConfiguration -> Maybe Bool
useChangeLog :: Prelude.Maybe Prelude.Bool,
    -- | Configuration information for an Amazon Virtual Private Cloud to connect
    -- to your Jira. Your Jira account must reside inside your VPC.
    JiraConfiguration -> Maybe DataSourceVpcConfiguration
vpcConfiguration :: Prelude.Maybe DataSourceVpcConfiguration,
    -- | A list of DataSourceToIndexFieldMapping objects that map attributes or
    -- field names of Jira work logs to Amazon Kendra index field names. To
    -- create custom fields, use the UpdateIndex API before you map to Jira
    -- fields. For more information, see
    -- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
    -- The Jira data source field names must exist in your Jira custom
    -- metadata.
    JiraConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
workLogFieldMappings :: Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping),
    -- | The URL of the Jira account. For example, /company.atlassian.net/ or
    -- /https:\/\/jira.company.com/. You can find your Jira account URL in the
    -- URL of your profile page for Jira desktop.
    JiraConfiguration -> Text
jiraAccountUrl :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of a secret in Secrets Manager contains
    -- the key-value pairs required to connect to your Jira data source. The
    -- secret must contain a JSON structure with the following keys:
    --
    -- -   jiraId—The Jira username.
    --
    -- -   jiraCredentials—The Jira API token. For more information on creating
    --     an API token in Jira, see
    --     <https://docs.aws.amazon.com/kendra/latest/dg/data-source-jira.html Using a Jira data source>.
    JiraConfiguration -> Text
secretArn :: Prelude.Text
  }
  deriving (JiraConfiguration -> JiraConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JiraConfiguration -> JiraConfiguration -> Bool
$c/= :: JiraConfiguration -> JiraConfiguration -> Bool
== :: JiraConfiguration -> JiraConfiguration -> Bool
$c== :: JiraConfiguration -> JiraConfiguration -> Bool
Prelude.Eq, ReadPrec [JiraConfiguration]
ReadPrec JiraConfiguration
Int -> ReadS JiraConfiguration
ReadS [JiraConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JiraConfiguration]
$creadListPrec :: ReadPrec [JiraConfiguration]
readPrec :: ReadPrec JiraConfiguration
$creadPrec :: ReadPrec JiraConfiguration
readList :: ReadS [JiraConfiguration]
$creadList :: ReadS [JiraConfiguration]
readsPrec :: Int -> ReadS JiraConfiguration
$creadsPrec :: Int -> ReadS JiraConfiguration
Prelude.Read, Int -> JiraConfiguration -> ShowS
[JiraConfiguration] -> ShowS
JiraConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JiraConfiguration] -> ShowS
$cshowList :: [JiraConfiguration] -> ShowS
show :: JiraConfiguration -> String
$cshow :: JiraConfiguration -> String
showsPrec :: Int -> JiraConfiguration -> ShowS
$cshowsPrec :: Int -> JiraConfiguration -> ShowS
Prelude.Show, forall x. Rep JiraConfiguration x -> JiraConfiguration
forall x. JiraConfiguration -> Rep JiraConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JiraConfiguration x -> JiraConfiguration
$cfrom :: forall x. JiraConfiguration -> Rep JiraConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'JiraConfiguration' 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:
--
-- 'attachmentFieldMappings', 'jiraConfiguration_attachmentFieldMappings' - A list of DataSourceToIndexFieldMapping objects that map attributes or
-- field names of Jira attachments to Amazon Kendra index field names. To
-- create custom fields, use the UpdateIndex API before you map to Jira
-- fields. For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
-- The Jira data source field names must exist in your Jira custom
-- metadata.
--
-- 'commentFieldMappings', 'jiraConfiguration_commentFieldMappings' - A list of DataSourceToIndexFieldMapping objects that map attributes or
-- field names of Jira comments to Amazon Kendra index field names. To
-- create custom fields, use the UpdateIndex API before you map to Jira
-- fields. For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
-- The Jira data source field names must exist in your Jira custom
-- metadata.
--
-- 'exclusionPatterns', 'jiraConfiguration_exclusionPatterns' - A list of regular expression patterns to exclude certain file paths,
-- file names, and file types in your Jira data source. Files that match
-- the patterns are excluded from the index. Files that don’t match the
-- patterns are included in the index. If a file matches both an inclusion
-- pattern and an exclusion pattern, the exclusion pattern takes precedence
-- and the file isn\'t included in the index.
--
-- 'inclusionPatterns', 'jiraConfiguration_inclusionPatterns' - A list of regular expression patterns to include certain file paths,
-- file names, and file types in your Jira data source. Files that match
-- the patterns are included in the index. Files that don\'t match the
-- patterns are excluded from the index. If a file matches both an
-- inclusion pattern and an exclusion pattern, the exclusion pattern takes
-- precedence and the file isn\'t included in the index.
--
-- 'issueFieldMappings', 'jiraConfiguration_issueFieldMappings' - A list of DataSourceToIndexFieldMapping objects that map attributes or
-- field names of Jira issues to Amazon Kendra index field names. To create
-- custom fields, use the UpdateIndex API before you map to Jira fields.
-- For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
-- The Jira data source field names must exist in your Jira custom
-- metadata.
--
-- 'issueSubEntityFilter', 'jiraConfiguration_issueSubEntityFilter' - Specify whether to crawl comments, attachments, and work logs. You can
-- specify one or more of these options.
--
-- 'issueType', 'jiraConfiguration_issueType' - Specify which issue types to crawl in your Jira data source. You can
-- specify one or more of these options to crawl.
--
-- 'project', 'jiraConfiguration_project' - Specify which projects to crawl in your Jira data source. You can
-- specify one or more Jira project IDs.
--
-- 'projectFieldMappings', 'jiraConfiguration_projectFieldMappings' - A list of DataSourceToIndexFieldMapping objects that map attributes or
-- field names of Jira projects to Amazon Kendra index field names. To
-- create custom fields, use the UpdateIndex API before you map to Jira
-- fields. For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
-- The Jira data source field names must exist in your Jira custom
-- metadata.
--
-- 'status', 'jiraConfiguration_status' - Specify which statuses to crawl in your Jira data source. You can
-- specify one or more of these options to crawl.
--
-- 'useChangeLog', 'jiraConfiguration_useChangeLog' - @TRUE@ to use the Jira 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 Jira.
--
-- 'vpcConfiguration', 'jiraConfiguration_vpcConfiguration' - Configuration information for an Amazon Virtual Private Cloud to connect
-- to your Jira. Your Jira account must reside inside your VPC.
--
-- 'workLogFieldMappings', 'jiraConfiguration_workLogFieldMappings' - A list of DataSourceToIndexFieldMapping objects that map attributes or
-- field names of Jira work logs to Amazon Kendra index field names. To
-- create custom fields, use the UpdateIndex API before you map to Jira
-- fields. For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
-- The Jira data source field names must exist in your Jira custom
-- metadata.
--
-- 'jiraAccountUrl', 'jiraConfiguration_jiraAccountUrl' - The URL of the Jira account. For example, /company.atlassian.net/ or
-- /https:\/\/jira.company.com/. You can find your Jira account URL in the
-- URL of your profile page for Jira desktop.
--
-- 'secretArn', 'jiraConfiguration_secretArn' - The Amazon Resource Name (ARN) of a secret in Secrets Manager contains
-- the key-value pairs required to connect to your Jira data source. The
-- secret must contain a JSON structure with the following keys:
--
-- -   jiraId—The Jira username.
--
-- -   jiraCredentials—The Jira API token. For more information on creating
--     an API token in Jira, see
--     <https://docs.aws.amazon.com/kendra/latest/dg/data-source-jira.html Using a Jira data source>.
newJiraConfiguration ::
  -- | 'jiraAccountUrl'
  Prelude.Text ->
  -- | 'secretArn'
  Prelude.Text ->
  JiraConfiguration
newJiraConfiguration :: Text -> Text -> JiraConfiguration
newJiraConfiguration Text
pJiraAccountUrl_ Text
pSecretArn_ =
  JiraConfiguration'
    { $sel:attachmentFieldMappings:JiraConfiguration' :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
attachmentFieldMappings =
        forall a. Maybe a
Prelude.Nothing,
      $sel:commentFieldMappings:JiraConfiguration' :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
commentFieldMappings = forall a. Maybe a
Prelude.Nothing,
      $sel:exclusionPatterns:JiraConfiguration' :: Maybe [Text]
exclusionPatterns = forall a. Maybe a
Prelude.Nothing,
      $sel:inclusionPatterns:JiraConfiguration' :: Maybe [Text]
inclusionPatterns = forall a. Maybe a
Prelude.Nothing,
      $sel:issueFieldMappings:JiraConfiguration' :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
issueFieldMappings = forall a. Maybe a
Prelude.Nothing,
      $sel:issueSubEntityFilter:JiraConfiguration' :: Maybe [IssueSubEntity]
issueSubEntityFilter = forall a. Maybe a
Prelude.Nothing,
      $sel:issueType:JiraConfiguration' :: Maybe [Text]
issueType = forall a. Maybe a
Prelude.Nothing,
      $sel:project:JiraConfiguration' :: Maybe [Text]
project = forall a. Maybe a
Prelude.Nothing,
      $sel:projectFieldMappings:JiraConfiguration' :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
projectFieldMappings = forall a. Maybe a
Prelude.Nothing,
      $sel:status:JiraConfiguration' :: Maybe [Text]
status = forall a. Maybe a
Prelude.Nothing,
      $sel:useChangeLog:JiraConfiguration' :: Maybe Bool
useChangeLog = forall a. Maybe a
Prelude.Nothing,
      $sel:vpcConfiguration:JiraConfiguration' :: Maybe DataSourceVpcConfiguration
vpcConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:workLogFieldMappings:JiraConfiguration' :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
workLogFieldMappings = forall a. Maybe a
Prelude.Nothing,
      $sel:jiraAccountUrl:JiraConfiguration' :: Text
jiraAccountUrl = Text
pJiraAccountUrl_,
      $sel:secretArn:JiraConfiguration' :: Text
secretArn = Text
pSecretArn_
    }

-- | A list of DataSourceToIndexFieldMapping objects that map attributes or
-- field names of Jira attachments to Amazon Kendra index field names. To
-- create custom fields, use the UpdateIndex API before you map to Jira
-- fields. For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
-- The Jira data source field names must exist in your Jira custom
-- metadata.
jiraConfiguration_attachmentFieldMappings :: Lens.Lens' JiraConfiguration (Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping))
jiraConfiguration_attachmentFieldMappings :: Lens'
  JiraConfiguration (Maybe (NonEmpty DataSourceToIndexFieldMapping))
jiraConfiguration_attachmentFieldMappings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JiraConfiguration' {Maybe (NonEmpty DataSourceToIndexFieldMapping)
attachmentFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:attachmentFieldMappings:JiraConfiguration' :: JiraConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
attachmentFieldMappings} -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
attachmentFieldMappings) (\s :: JiraConfiguration
s@JiraConfiguration' {} Maybe (NonEmpty DataSourceToIndexFieldMapping)
a -> JiraConfiguration
s {$sel:attachmentFieldMappings:JiraConfiguration' :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
attachmentFieldMappings = Maybe (NonEmpty DataSourceToIndexFieldMapping)
a} :: JiraConfiguration) 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 Jira comments to Amazon Kendra index field names. To
-- create custom fields, use the UpdateIndex API before you map to Jira
-- fields. For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
-- The Jira data source field names must exist in your Jira custom
-- metadata.
jiraConfiguration_commentFieldMappings :: Lens.Lens' JiraConfiguration (Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping))
jiraConfiguration_commentFieldMappings :: Lens'
  JiraConfiguration (Maybe (NonEmpty DataSourceToIndexFieldMapping))
jiraConfiguration_commentFieldMappings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JiraConfiguration' {Maybe (NonEmpty DataSourceToIndexFieldMapping)
commentFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:commentFieldMappings:JiraConfiguration' :: JiraConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
commentFieldMappings} -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
commentFieldMappings) (\s :: JiraConfiguration
s@JiraConfiguration' {} Maybe (NonEmpty DataSourceToIndexFieldMapping)
a -> JiraConfiguration
s {$sel:commentFieldMappings:JiraConfiguration' :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
commentFieldMappings = Maybe (NonEmpty DataSourceToIndexFieldMapping)
a} :: JiraConfiguration) 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 exclude certain file paths,
-- file names, and file types in your Jira data source. Files that match
-- the patterns are excluded from the index. Files that don’t match the
-- patterns are included in the index. If a file matches both an inclusion
-- pattern and an exclusion pattern, the exclusion pattern takes precedence
-- and the file isn\'t included in the index.
jiraConfiguration_exclusionPatterns :: Lens.Lens' JiraConfiguration (Prelude.Maybe [Prelude.Text])
jiraConfiguration_exclusionPatterns :: Lens' JiraConfiguration (Maybe [Text])
jiraConfiguration_exclusionPatterns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JiraConfiguration' {Maybe [Text]
exclusionPatterns :: Maybe [Text]
$sel:exclusionPatterns:JiraConfiguration' :: JiraConfiguration -> Maybe [Text]
exclusionPatterns} -> Maybe [Text]
exclusionPatterns) (\s :: JiraConfiguration
s@JiraConfiguration' {} Maybe [Text]
a -> JiraConfiguration
s {$sel:exclusionPatterns:JiraConfiguration' :: Maybe [Text]
exclusionPatterns = Maybe [Text]
a} :: JiraConfiguration) 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 file paths,
-- file names, and file types in your Jira data source. Files that match
-- the patterns are included in the index. Files that don\'t match the
-- patterns are excluded from the index. If a file matches both an
-- inclusion pattern and an exclusion pattern, the exclusion pattern takes
-- precedence and the file isn\'t included in the index.
jiraConfiguration_inclusionPatterns :: Lens.Lens' JiraConfiguration (Prelude.Maybe [Prelude.Text])
jiraConfiguration_inclusionPatterns :: Lens' JiraConfiguration (Maybe [Text])
jiraConfiguration_inclusionPatterns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JiraConfiguration' {Maybe [Text]
inclusionPatterns :: Maybe [Text]
$sel:inclusionPatterns:JiraConfiguration' :: JiraConfiguration -> Maybe [Text]
inclusionPatterns} -> Maybe [Text]
inclusionPatterns) (\s :: JiraConfiguration
s@JiraConfiguration' {} Maybe [Text]
a -> JiraConfiguration
s {$sel:inclusionPatterns:JiraConfiguration' :: Maybe [Text]
inclusionPatterns = Maybe [Text]
a} :: JiraConfiguration) 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 Jira issues to Amazon Kendra index field names. To create
-- custom fields, use the UpdateIndex API before you map to Jira fields.
-- For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
-- The Jira data source field names must exist in your Jira custom
-- metadata.
jiraConfiguration_issueFieldMappings :: Lens.Lens' JiraConfiguration (Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping))
jiraConfiguration_issueFieldMappings :: Lens'
  JiraConfiguration (Maybe (NonEmpty DataSourceToIndexFieldMapping))
jiraConfiguration_issueFieldMappings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JiraConfiguration' {Maybe (NonEmpty DataSourceToIndexFieldMapping)
issueFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:issueFieldMappings:JiraConfiguration' :: JiraConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
issueFieldMappings} -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
issueFieldMappings) (\s :: JiraConfiguration
s@JiraConfiguration' {} Maybe (NonEmpty DataSourceToIndexFieldMapping)
a -> JiraConfiguration
s {$sel:issueFieldMappings:JiraConfiguration' :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
issueFieldMappings = Maybe (NonEmpty DataSourceToIndexFieldMapping)
a} :: JiraConfiguration) 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

-- | Specify whether to crawl comments, attachments, and work logs. You can
-- specify one or more of these options.
jiraConfiguration_issueSubEntityFilter :: Lens.Lens' JiraConfiguration (Prelude.Maybe [IssueSubEntity])
jiraConfiguration_issueSubEntityFilter :: Lens' JiraConfiguration (Maybe [IssueSubEntity])
jiraConfiguration_issueSubEntityFilter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JiraConfiguration' {Maybe [IssueSubEntity]
issueSubEntityFilter :: Maybe [IssueSubEntity]
$sel:issueSubEntityFilter:JiraConfiguration' :: JiraConfiguration -> Maybe [IssueSubEntity]
issueSubEntityFilter} -> Maybe [IssueSubEntity]
issueSubEntityFilter) (\s :: JiraConfiguration
s@JiraConfiguration' {} Maybe [IssueSubEntity]
a -> JiraConfiguration
s {$sel:issueSubEntityFilter:JiraConfiguration' :: Maybe [IssueSubEntity]
issueSubEntityFilter = Maybe [IssueSubEntity]
a} :: JiraConfiguration) 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

-- | Specify which issue types to crawl in your Jira data source. You can
-- specify one or more of these options to crawl.
jiraConfiguration_issueType :: Lens.Lens' JiraConfiguration (Prelude.Maybe [Prelude.Text])
jiraConfiguration_issueType :: Lens' JiraConfiguration (Maybe [Text])
jiraConfiguration_issueType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JiraConfiguration' {Maybe [Text]
issueType :: Maybe [Text]
$sel:issueType:JiraConfiguration' :: JiraConfiguration -> Maybe [Text]
issueType} -> Maybe [Text]
issueType) (\s :: JiraConfiguration
s@JiraConfiguration' {} Maybe [Text]
a -> JiraConfiguration
s {$sel:issueType:JiraConfiguration' :: Maybe [Text]
issueType = Maybe [Text]
a} :: JiraConfiguration) 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

-- | Specify which projects to crawl in your Jira data source. You can
-- specify one or more Jira project IDs.
jiraConfiguration_project :: Lens.Lens' JiraConfiguration (Prelude.Maybe [Prelude.Text])
jiraConfiguration_project :: Lens' JiraConfiguration (Maybe [Text])
jiraConfiguration_project = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JiraConfiguration' {Maybe [Text]
project :: Maybe [Text]
$sel:project:JiraConfiguration' :: JiraConfiguration -> Maybe [Text]
project} -> Maybe [Text]
project) (\s :: JiraConfiguration
s@JiraConfiguration' {} Maybe [Text]
a -> JiraConfiguration
s {$sel:project:JiraConfiguration' :: Maybe [Text]
project = Maybe [Text]
a} :: JiraConfiguration) 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 Jira projects to Amazon Kendra index field names. To
-- create custom fields, use the UpdateIndex API before you map to Jira
-- fields. For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
-- The Jira data source field names must exist in your Jira custom
-- metadata.
jiraConfiguration_projectFieldMappings :: Lens.Lens' JiraConfiguration (Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping))
jiraConfiguration_projectFieldMappings :: Lens'
  JiraConfiguration (Maybe (NonEmpty DataSourceToIndexFieldMapping))
jiraConfiguration_projectFieldMappings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JiraConfiguration' {Maybe (NonEmpty DataSourceToIndexFieldMapping)
projectFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:projectFieldMappings:JiraConfiguration' :: JiraConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
projectFieldMappings} -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
projectFieldMappings) (\s :: JiraConfiguration
s@JiraConfiguration' {} Maybe (NonEmpty DataSourceToIndexFieldMapping)
a -> JiraConfiguration
s {$sel:projectFieldMappings:JiraConfiguration' :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
projectFieldMappings = Maybe (NonEmpty DataSourceToIndexFieldMapping)
a} :: JiraConfiguration) 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

-- | Specify which statuses to crawl in your Jira data source. You can
-- specify one or more of these options to crawl.
jiraConfiguration_status :: Lens.Lens' JiraConfiguration (Prelude.Maybe [Prelude.Text])
jiraConfiguration_status :: Lens' JiraConfiguration (Maybe [Text])
jiraConfiguration_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JiraConfiguration' {Maybe [Text]
status :: Maybe [Text]
$sel:status:JiraConfiguration' :: JiraConfiguration -> Maybe [Text]
status} -> Maybe [Text]
status) (\s :: JiraConfiguration
s@JiraConfiguration' {} Maybe [Text]
a -> JiraConfiguration
s {$sel:status:JiraConfiguration' :: Maybe [Text]
status = Maybe [Text]
a} :: JiraConfiguration) 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 Jira 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 Jira.
jiraConfiguration_useChangeLog :: Lens.Lens' JiraConfiguration (Prelude.Maybe Prelude.Bool)
jiraConfiguration_useChangeLog :: Lens' JiraConfiguration (Maybe Bool)
jiraConfiguration_useChangeLog = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JiraConfiguration' {Maybe Bool
useChangeLog :: Maybe Bool
$sel:useChangeLog:JiraConfiguration' :: JiraConfiguration -> Maybe Bool
useChangeLog} -> Maybe Bool
useChangeLog) (\s :: JiraConfiguration
s@JiraConfiguration' {} Maybe Bool
a -> JiraConfiguration
s {$sel:useChangeLog:JiraConfiguration' :: Maybe Bool
useChangeLog = Maybe Bool
a} :: JiraConfiguration)

-- | Configuration information for an Amazon Virtual Private Cloud to connect
-- to your Jira. Your Jira account must reside inside your VPC.
jiraConfiguration_vpcConfiguration :: Lens.Lens' JiraConfiguration (Prelude.Maybe DataSourceVpcConfiguration)
jiraConfiguration_vpcConfiguration :: Lens' JiraConfiguration (Maybe DataSourceVpcConfiguration)
jiraConfiguration_vpcConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JiraConfiguration' {Maybe DataSourceVpcConfiguration
vpcConfiguration :: Maybe DataSourceVpcConfiguration
$sel:vpcConfiguration:JiraConfiguration' :: JiraConfiguration -> Maybe DataSourceVpcConfiguration
vpcConfiguration} -> Maybe DataSourceVpcConfiguration
vpcConfiguration) (\s :: JiraConfiguration
s@JiraConfiguration' {} Maybe DataSourceVpcConfiguration
a -> JiraConfiguration
s {$sel:vpcConfiguration:JiraConfiguration' :: Maybe DataSourceVpcConfiguration
vpcConfiguration = Maybe DataSourceVpcConfiguration
a} :: JiraConfiguration)

-- | A list of DataSourceToIndexFieldMapping objects that map attributes or
-- field names of Jira work logs to Amazon Kendra index field names. To
-- create custom fields, use the UpdateIndex API before you map to Jira
-- fields. For more information, see
-- <https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html Mapping data source fields>.
-- The Jira data source field names must exist in your Jira custom
-- metadata.
jiraConfiguration_workLogFieldMappings :: Lens.Lens' JiraConfiguration (Prelude.Maybe (Prelude.NonEmpty DataSourceToIndexFieldMapping))
jiraConfiguration_workLogFieldMappings :: Lens'
  JiraConfiguration (Maybe (NonEmpty DataSourceToIndexFieldMapping))
jiraConfiguration_workLogFieldMappings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JiraConfiguration' {Maybe (NonEmpty DataSourceToIndexFieldMapping)
workLogFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:workLogFieldMappings:JiraConfiguration' :: JiraConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
workLogFieldMappings} -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
workLogFieldMappings) (\s :: JiraConfiguration
s@JiraConfiguration' {} Maybe (NonEmpty DataSourceToIndexFieldMapping)
a -> JiraConfiguration
s {$sel:workLogFieldMappings:JiraConfiguration' :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
workLogFieldMappings = Maybe (NonEmpty DataSourceToIndexFieldMapping)
a} :: JiraConfiguration) 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 URL of the Jira account. For example, /company.atlassian.net/ or
-- /https:\/\/jira.company.com/. You can find your Jira account URL in the
-- URL of your profile page for Jira desktop.
jiraConfiguration_jiraAccountUrl :: Lens.Lens' JiraConfiguration Prelude.Text
jiraConfiguration_jiraAccountUrl :: Lens' JiraConfiguration Text
jiraConfiguration_jiraAccountUrl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JiraConfiguration' {Text
jiraAccountUrl :: Text
$sel:jiraAccountUrl:JiraConfiguration' :: JiraConfiguration -> Text
jiraAccountUrl} -> Text
jiraAccountUrl) (\s :: JiraConfiguration
s@JiraConfiguration' {} Text
a -> JiraConfiguration
s {$sel:jiraAccountUrl:JiraConfiguration' :: Text
jiraAccountUrl = Text
a} :: JiraConfiguration)

-- | The Amazon Resource Name (ARN) of a secret in Secrets Manager contains
-- the key-value pairs required to connect to your Jira data source. The
-- secret must contain a JSON structure with the following keys:
--
-- -   jiraId—The Jira username.
--
-- -   jiraCredentials—The Jira API token. For more information on creating
--     an API token in Jira, see
--     <https://docs.aws.amazon.com/kendra/latest/dg/data-source-jira.html Using a Jira data source>.
jiraConfiguration_secretArn :: Lens.Lens' JiraConfiguration Prelude.Text
jiraConfiguration_secretArn :: Lens' JiraConfiguration Text
jiraConfiguration_secretArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JiraConfiguration' {Text
secretArn :: Text
$sel:secretArn:JiraConfiguration' :: JiraConfiguration -> Text
secretArn} -> Text
secretArn) (\s :: JiraConfiguration
s@JiraConfiguration' {} Text
a -> JiraConfiguration
s {$sel:secretArn:JiraConfiguration' :: Text
secretArn = Text
a} :: JiraConfiguration)

instance Data.FromJSON JiraConfiguration where
  parseJSON :: Value -> Parser JiraConfiguration
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"JiraConfiguration"
      ( \Object
x ->
          Maybe (NonEmpty DataSourceToIndexFieldMapping)
-> Maybe (NonEmpty DataSourceToIndexFieldMapping)
-> Maybe [Text]
-> Maybe [Text]
-> Maybe (NonEmpty DataSourceToIndexFieldMapping)
-> Maybe [IssueSubEntity]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe (NonEmpty DataSourceToIndexFieldMapping)
-> Maybe [Text]
-> Maybe Bool
-> Maybe DataSourceVpcConfiguration
-> Maybe (NonEmpty DataSourceToIndexFieldMapping)
-> Text
-> Text
-> JiraConfiguration
JiraConfiguration'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"AttachmentFieldMappings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"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
"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
"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
"IssueFieldMappings")
            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
"IssueSubEntityFilter"
                            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
"IssueType" 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
"Project" 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
"ProjectFieldMappings")
            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
"Status" 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
"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
"WorkLogFieldMappings")
            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
"JiraAccountUrl")
            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 JiraConfiguration where
  hashWithSalt :: Int -> JiraConfiguration -> Int
hashWithSalt Int
_salt JiraConfiguration' {Maybe Bool
Maybe [Text]
Maybe [IssueSubEntity]
Maybe (NonEmpty DataSourceToIndexFieldMapping)
Maybe DataSourceVpcConfiguration
Text
secretArn :: Text
jiraAccountUrl :: Text
workLogFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
vpcConfiguration :: Maybe DataSourceVpcConfiguration
useChangeLog :: Maybe Bool
status :: Maybe [Text]
projectFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
project :: Maybe [Text]
issueType :: Maybe [Text]
issueSubEntityFilter :: Maybe [IssueSubEntity]
issueFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
inclusionPatterns :: Maybe [Text]
exclusionPatterns :: Maybe [Text]
commentFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
attachmentFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:secretArn:JiraConfiguration' :: JiraConfiguration -> Text
$sel:jiraAccountUrl:JiraConfiguration' :: JiraConfiguration -> Text
$sel:workLogFieldMappings:JiraConfiguration' :: JiraConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:vpcConfiguration:JiraConfiguration' :: JiraConfiguration -> Maybe DataSourceVpcConfiguration
$sel:useChangeLog:JiraConfiguration' :: JiraConfiguration -> Maybe Bool
$sel:status:JiraConfiguration' :: JiraConfiguration -> Maybe [Text]
$sel:projectFieldMappings:JiraConfiguration' :: JiraConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:project:JiraConfiguration' :: JiraConfiguration -> Maybe [Text]
$sel:issueType:JiraConfiguration' :: JiraConfiguration -> Maybe [Text]
$sel:issueSubEntityFilter:JiraConfiguration' :: JiraConfiguration -> Maybe [IssueSubEntity]
$sel:issueFieldMappings:JiraConfiguration' :: JiraConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:inclusionPatterns:JiraConfiguration' :: JiraConfiguration -> Maybe [Text]
$sel:exclusionPatterns:JiraConfiguration' :: JiraConfiguration -> Maybe [Text]
$sel:commentFieldMappings:JiraConfiguration' :: JiraConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:attachmentFieldMappings:JiraConfiguration' :: JiraConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty DataSourceToIndexFieldMapping)
attachmentFieldMappings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty DataSourceToIndexFieldMapping)
commentFieldMappings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
exclusionPatterns
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
inclusionPatterns
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty DataSourceToIndexFieldMapping)
issueFieldMappings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [IssueSubEntity]
issueSubEntityFilter
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
issueType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
project
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty DataSourceToIndexFieldMapping)
projectFieldMappings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
status
      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)
workLogFieldMappings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
jiraAccountUrl
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
secretArn

instance Prelude.NFData JiraConfiguration where
  rnf :: JiraConfiguration -> ()
rnf JiraConfiguration' {Maybe Bool
Maybe [Text]
Maybe [IssueSubEntity]
Maybe (NonEmpty DataSourceToIndexFieldMapping)
Maybe DataSourceVpcConfiguration
Text
secretArn :: Text
jiraAccountUrl :: Text
workLogFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
vpcConfiguration :: Maybe DataSourceVpcConfiguration
useChangeLog :: Maybe Bool
status :: Maybe [Text]
projectFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
project :: Maybe [Text]
issueType :: Maybe [Text]
issueSubEntityFilter :: Maybe [IssueSubEntity]
issueFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
inclusionPatterns :: Maybe [Text]
exclusionPatterns :: Maybe [Text]
commentFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
attachmentFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:secretArn:JiraConfiguration' :: JiraConfiguration -> Text
$sel:jiraAccountUrl:JiraConfiguration' :: JiraConfiguration -> Text
$sel:workLogFieldMappings:JiraConfiguration' :: JiraConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:vpcConfiguration:JiraConfiguration' :: JiraConfiguration -> Maybe DataSourceVpcConfiguration
$sel:useChangeLog:JiraConfiguration' :: JiraConfiguration -> Maybe Bool
$sel:status:JiraConfiguration' :: JiraConfiguration -> Maybe [Text]
$sel:projectFieldMappings:JiraConfiguration' :: JiraConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:project:JiraConfiguration' :: JiraConfiguration -> Maybe [Text]
$sel:issueType:JiraConfiguration' :: JiraConfiguration -> Maybe [Text]
$sel:issueSubEntityFilter:JiraConfiguration' :: JiraConfiguration -> Maybe [IssueSubEntity]
$sel:issueFieldMappings:JiraConfiguration' :: JiraConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:inclusionPatterns:JiraConfiguration' :: JiraConfiguration -> Maybe [Text]
$sel:exclusionPatterns:JiraConfiguration' :: JiraConfiguration -> Maybe [Text]
$sel:commentFieldMappings:JiraConfiguration' :: JiraConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:attachmentFieldMappings:JiraConfiguration' :: JiraConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty DataSourceToIndexFieldMapping)
attachmentFieldMappings
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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 [Text]
exclusionPatterns
      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)
issueFieldMappings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [IssueSubEntity]
issueSubEntityFilter
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
issueType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
project
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty DataSourceToIndexFieldMapping)
projectFieldMappings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
status
      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)
workLogFieldMappings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
jiraAccountUrl
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
secretArn

instance Data.ToJSON JiraConfiguration where
  toJSON :: JiraConfiguration -> Value
toJSON JiraConfiguration' {Maybe Bool
Maybe [Text]
Maybe [IssueSubEntity]
Maybe (NonEmpty DataSourceToIndexFieldMapping)
Maybe DataSourceVpcConfiguration
Text
secretArn :: Text
jiraAccountUrl :: Text
workLogFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
vpcConfiguration :: Maybe DataSourceVpcConfiguration
useChangeLog :: Maybe Bool
status :: Maybe [Text]
projectFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
project :: Maybe [Text]
issueType :: Maybe [Text]
issueSubEntityFilter :: Maybe [IssueSubEntity]
issueFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
inclusionPatterns :: Maybe [Text]
exclusionPatterns :: Maybe [Text]
commentFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
attachmentFieldMappings :: Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:secretArn:JiraConfiguration' :: JiraConfiguration -> Text
$sel:jiraAccountUrl:JiraConfiguration' :: JiraConfiguration -> Text
$sel:workLogFieldMappings:JiraConfiguration' :: JiraConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:vpcConfiguration:JiraConfiguration' :: JiraConfiguration -> Maybe DataSourceVpcConfiguration
$sel:useChangeLog:JiraConfiguration' :: JiraConfiguration -> Maybe Bool
$sel:status:JiraConfiguration' :: JiraConfiguration -> Maybe [Text]
$sel:projectFieldMappings:JiraConfiguration' :: JiraConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:project:JiraConfiguration' :: JiraConfiguration -> Maybe [Text]
$sel:issueType:JiraConfiguration' :: JiraConfiguration -> Maybe [Text]
$sel:issueSubEntityFilter:JiraConfiguration' :: JiraConfiguration -> Maybe [IssueSubEntity]
$sel:issueFieldMappings:JiraConfiguration' :: JiraConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:inclusionPatterns:JiraConfiguration' :: JiraConfiguration -> Maybe [Text]
$sel:exclusionPatterns:JiraConfiguration' :: JiraConfiguration -> Maybe [Text]
$sel:commentFieldMappings:JiraConfiguration' :: JiraConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
$sel:attachmentFieldMappings:JiraConfiguration' :: JiraConfiguration -> Maybe (NonEmpty DataSourceToIndexFieldMapping)
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"AttachmentFieldMappings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty DataSourceToIndexFieldMapping)
attachmentFieldMappings,
            (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
"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
"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
"IssueFieldMappings" 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)
issueFieldMappings,
            (Key
"IssueSubEntityFilter" 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 [IssueSubEntity]
issueSubEntityFilter,
            (Key
"IssueType" 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]
issueType,
            (Key
"Project" 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]
project,
            (Key
"ProjectFieldMappings" 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)
projectFieldMappings,
            (Key
"Status" 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]
status,
            (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
"WorkLogFieldMappings" 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)
workLogFieldMappings,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"JiraAccountUrl" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
jiraAccountUrl),
            forall a. a -> Maybe a
Prelude.Just (Key
"SecretArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
secretArn)
          ]
      )