{-# 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.QuickSight.Types.FilterDropDownControl
-- 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.QuickSight.Types.FilterDropDownControl where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.QuickSight.Types.CascadingControlConfiguration
import Amazonka.QuickSight.Types.DropDownControlDisplayOptions
import Amazonka.QuickSight.Types.FilterSelectableValues
import Amazonka.QuickSight.Types.SheetControlListType

-- | A control to display a dropdown list with buttons that are used to
-- select a single value.
--
-- /See:/ 'newFilterDropDownControl' smart constructor.
data FilterDropDownControl = FilterDropDownControl'
  { -- | The values that are displayed in a control can be configured to only
    -- show values that are valid based on what\'s selected in other controls.
    FilterDropDownControl -> Maybe CascadingControlConfiguration
cascadingControlConfiguration :: Prelude.Maybe CascadingControlConfiguration,
    -- | The display options of the @FilterDropDownControl@.
    FilterDropDownControl -> Maybe DropDownControlDisplayOptions
displayOptions :: Prelude.Maybe DropDownControlDisplayOptions,
    -- | A list of selectable values that are used in a control.
    FilterDropDownControl -> Maybe FilterSelectableValues
selectableValues :: Prelude.Maybe FilterSelectableValues,
    -- | The type of the @FilterDropDownControl@. Choose one of the following
    -- options:
    --
    -- -   @MULTI_SELECT@: The user can select multiple entries from a dropdown
    --     menu.
    --
    -- -   @SINGLE_SELECT@: The user can select a single entry from a dropdown
    --     menu.
    FilterDropDownControl -> Maybe SheetControlListType
type' :: Prelude.Maybe SheetControlListType,
    -- | The ID of the @FilterDropDownControl@.
    FilterDropDownControl -> Text
filterControlId :: Prelude.Text,
    -- | The title of the @FilterDropDownControl@.
    FilterDropDownControl -> Text
title :: Prelude.Text,
    -- | The source filter ID of the @FilterDropDownControl@.
    FilterDropDownControl -> Text
sourceFilterId :: Prelude.Text
  }
  deriving (FilterDropDownControl -> FilterDropDownControl -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FilterDropDownControl -> FilterDropDownControl -> Bool
$c/= :: FilterDropDownControl -> FilterDropDownControl -> Bool
== :: FilterDropDownControl -> FilterDropDownControl -> Bool
$c== :: FilterDropDownControl -> FilterDropDownControl -> Bool
Prelude.Eq, ReadPrec [FilterDropDownControl]
ReadPrec FilterDropDownControl
Int -> ReadS FilterDropDownControl
ReadS [FilterDropDownControl]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FilterDropDownControl]
$creadListPrec :: ReadPrec [FilterDropDownControl]
readPrec :: ReadPrec FilterDropDownControl
$creadPrec :: ReadPrec FilterDropDownControl
readList :: ReadS [FilterDropDownControl]
$creadList :: ReadS [FilterDropDownControl]
readsPrec :: Int -> ReadS FilterDropDownControl
$creadsPrec :: Int -> ReadS FilterDropDownControl
Prelude.Read, Int -> FilterDropDownControl -> ShowS
[FilterDropDownControl] -> ShowS
FilterDropDownControl -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FilterDropDownControl] -> ShowS
$cshowList :: [FilterDropDownControl] -> ShowS
show :: FilterDropDownControl -> String
$cshow :: FilterDropDownControl -> String
showsPrec :: Int -> FilterDropDownControl -> ShowS
$cshowsPrec :: Int -> FilterDropDownControl -> ShowS
Prelude.Show, forall x. Rep FilterDropDownControl x -> FilterDropDownControl
forall x. FilterDropDownControl -> Rep FilterDropDownControl x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FilterDropDownControl x -> FilterDropDownControl
$cfrom :: forall x. FilterDropDownControl -> Rep FilterDropDownControl x
Prelude.Generic)

-- |
-- Create a value of 'FilterDropDownControl' 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:
--
-- 'cascadingControlConfiguration', 'filterDropDownControl_cascadingControlConfiguration' - The values that are displayed in a control can be configured to only
-- show values that are valid based on what\'s selected in other controls.
--
-- 'displayOptions', 'filterDropDownControl_displayOptions' - The display options of the @FilterDropDownControl@.
--
-- 'selectableValues', 'filterDropDownControl_selectableValues' - A list of selectable values that are used in a control.
--
-- 'type'', 'filterDropDownControl_type' - The type of the @FilterDropDownControl@. Choose one of the following
-- options:
--
-- -   @MULTI_SELECT@: The user can select multiple entries from a dropdown
--     menu.
--
-- -   @SINGLE_SELECT@: The user can select a single entry from a dropdown
--     menu.
--
-- 'filterControlId', 'filterDropDownControl_filterControlId' - The ID of the @FilterDropDownControl@.
--
-- 'title', 'filterDropDownControl_title' - The title of the @FilterDropDownControl@.
--
-- 'sourceFilterId', 'filterDropDownControl_sourceFilterId' - The source filter ID of the @FilterDropDownControl@.
newFilterDropDownControl ::
  -- | 'filterControlId'
  Prelude.Text ->
  -- | 'title'
  Prelude.Text ->
  -- | 'sourceFilterId'
  Prelude.Text ->
  FilterDropDownControl
newFilterDropDownControl :: Text -> Text -> Text -> FilterDropDownControl
newFilterDropDownControl
  Text
pFilterControlId_
  Text
pTitle_
  Text
pSourceFilterId_ =
    FilterDropDownControl'
      { $sel:cascadingControlConfiguration:FilterDropDownControl' :: Maybe CascadingControlConfiguration
cascadingControlConfiguration =
          forall a. Maybe a
Prelude.Nothing,
        $sel:displayOptions:FilterDropDownControl' :: Maybe DropDownControlDisplayOptions
displayOptions = forall a. Maybe a
Prelude.Nothing,
        $sel:selectableValues:FilterDropDownControl' :: Maybe FilterSelectableValues
selectableValues = forall a. Maybe a
Prelude.Nothing,
        $sel:type':FilterDropDownControl' :: Maybe SheetControlListType
type' = forall a. Maybe a
Prelude.Nothing,
        $sel:filterControlId:FilterDropDownControl' :: Text
filterControlId = Text
pFilterControlId_,
        $sel:title:FilterDropDownControl' :: Text
title = Text
pTitle_,
        $sel:sourceFilterId:FilterDropDownControl' :: Text
sourceFilterId = Text
pSourceFilterId_
      }

-- | The values that are displayed in a control can be configured to only
-- show values that are valid based on what\'s selected in other controls.
filterDropDownControl_cascadingControlConfiguration :: Lens.Lens' FilterDropDownControl (Prelude.Maybe CascadingControlConfiguration)
filterDropDownControl_cascadingControlConfiguration :: Lens' FilterDropDownControl (Maybe CascadingControlConfiguration)
filterDropDownControl_cascadingControlConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FilterDropDownControl' {Maybe CascadingControlConfiguration
cascadingControlConfiguration :: Maybe CascadingControlConfiguration
$sel:cascadingControlConfiguration:FilterDropDownControl' :: FilterDropDownControl -> Maybe CascadingControlConfiguration
cascadingControlConfiguration} -> Maybe CascadingControlConfiguration
cascadingControlConfiguration) (\s :: FilterDropDownControl
s@FilterDropDownControl' {} Maybe CascadingControlConfiguration
a -> FilterDropDownControl
s {$sel:cascadingControlConfiguration:FilterDropDownControl' :: Maybe CascadingControlConfiguration
cascadingControlConfiguration = Maybe CascadingControlConfiguration
a} :: FilterDropDownControl)

-- | The display options of the @FilterDropDownControl@.
filterDropDownControl_displayOptions :: Lens.Lens' FilterDropDownControl (Prelude.Maybe DropDownControlDisplayOptions)
filterDropDownControl_displayOptions :: Lens' FilterDropDownControl (Maybe DropDownControlDisplayOptions)
filterDropDownControl_displayOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FilterDropDownControl' {Maybe DropDownControlDisplayOptions
displayOptions :: Maybe DropDownControlDisplayOptions
$sel:displayOptions:FilterDropDownControl' :: FilterDropDownControl -> Maybe DropDownControlDisplayOptions
displayOptions} -> Maybe DropDownControlDisplayOptions
displayOptions) (\s :: FilterDropDownControl
s@FilterDropDownControl' {} Maybe DropDownControlDisplayOptions
a -> FilterDropDownControl
s {$sel:displayOptions:FilterDropDownControl' :: Maybe DropDownControlDisplayOptions
displayOptions = Maybe DropDownControlDisplayOptions
a} :: FilterDropDownControl)

-- | A list of selectable values that are used in a control.
filterDropDownControl_selectableValues :: Lens.Lens' FilterDropDownControl (Prelude.Maybe FilterSelectableValues)
filterDropDownControl_selectableValues :: Lens' FilterDropDownControl (Maybe FilterSelectableValues)
filterDropDownControl_selectableValues = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FilterDropDownControl' {Maybe FilterSelectableValues
selectableValues :: Maybe FilterSelectableValues
$sel:selectableValues:FilterDropDownControl' :: FilterDropDownControl -> Maybe FilterSelectableValues
selectableValues} -> Maybe FilterSelectableValues
selectableValues) (\s :: FilterDropDownControl
s@FilterDropDownControl' {} Maybe FilterSelectableValues
a -> FilterDropDownControl
s {$sel:selectableValues:FilterDropDownControl' :: Maybe FilterSelectableValues
selectableValues = Maybe FilterSelectableValues
a} :: FilterDropDownControl)

-- | The type of the @FilterDropDownControl@. Choose one of the following
-- options:
--
-- -   @MULTI_SELECT@: The user can select multiple entries from a dropdown
--     menu.
--
-- -   @SINGLE_SELECT@: The user can select a single entry from a dropdown
--     menu.
filterDropDownControl_type :: Lens.Lens' FilterDropDownControl (Prelude.Maybe SheetControlListType)
filterDropDownControl_type :: Lens' FilterDropDownControl (Maybe SheetControlListType)
filterDropDownControl_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FilterDropDownControl' {Maybe SheetControlListType
type' :: Maybe SheetControlListType
$sel:type':FilterDropDownControl' :: FilterDropDownControl -> Maybe SheetControlListType
type'} -> Maybe SheetControlListType
type') (\s :: FilterDropDownControl
s@FilterDropDownControl' {} Maybe SheetControlListType
a -> FilterDropDownControl
s {$sel:type':FilterDropDownControl' :: Maybe SheetControlListType
type' = Maybe SheetControlListType
a} :: FilterDropDownControl)

-- | The ID of the @FilterDropDownControl@.
filterDropDownControl_filterControlId :: Lens.Lens' FilterDropDownControl Prelude.Text
filterDropDownControl_filterControlId :: Lens' FilterDropDownControl Text
filterDropDownControl_filterControlId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FilterDropDownControl' {Text
filterControlId :: Text
$sel:filterControlId:FilterDropDownControl' :: FilterDropDownControl -> Text
filterControlId} -> Text
filterControlId) (\s :: FilterDropDownControl
s@FilterDropDownControl' {} Text
a -> FilterDropDownControl
s {$sel:filterControlId:FilterDropDownControl' :: Text
filterControlId = Text
a} :: FilterDropDownControl)

-- | The title of the @FilterDropDownControl@.
filterDropDownControl_title :: Lens.Lens' FilterDropDownControl Prelude.Text
filterDropDownControl_title :: Lens' FilterDropDownControl Text
filterDropDownControl_title = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FilterDropDownControl' {Text
title :: Text
$sel:title:FilterDropDownControl' :: FilterDropDownControl -> Text
title} -> Text
title) (\s :: FilterDropDownControl
s@FilterDropDownControl' {} Text
a -> FilterDropDownControl
s {$sel:title:FilterDropDownControl' :: Text
title = Text
a} :: FilterDropDownControl)

-- | The source filter ID of the @FilterDropDownControl@.
filterDropDownControl_sourceFilterId :: Lens.Lens' FilterDropDownControl Prelude.Text
filterDropDownControl_sourceFilterId :: Lens' FilterDropDownControl Text
filterDropDownControl_sourceFilterId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FilterDropDownControl' {Text
sourceFilterId :: Text
$sel:sourceFilterId:FilterDropDownControl' :: FilterDropDownControl -> Text
sourceFilterId} -> Text
sourceFilterId) (\s :: FilterDropDownControl
s@FilterDropDownControl' {} Text
a -> FilterDropDownControl
s {$sel:sourceFilterId:FilterDropDownControl' :: Text
sourceFilterId = Text
a} :: FilterDropDownControl)

instance Data.FromJSON FilterDropDownControl where
  parseJSON :: Value -> Parser FilterDropDownControl
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"FilterDropDownControl"
      ( \Object
x ->
          Maybe CascadingControlConfiguration
-> Maybe DropDownControlDisplayOptions
-> Maybe FilterSelectableValues
-> Maybe SheetControlListType
-> Text
-> Text
-> Text
-> FilterDropDownControl
FilterDropDownControl'
            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
"CascadingControlConfiguration")
            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
"DisplayOptions")
            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
"SelectableValues")
            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
"Type")
            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
"FilterControlId")
            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
"Title")
            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
"SourceFilterId")
      )

instance Prelude.Hashable FilterDropDownControl where
  hashWithSalt :: Int -> FilterDropDownControl -> Int
hashWithSalt Int
_salt FilterDropDownControl' {Maybe CascadingControlConfiguration
Maybe FilterSelectableValues
Maybe SheetControlListType
Maybe DropDownControlDisplayOptions
Text
sourceFilterId :: Text
title :: Text
filterControlId :: Text
type' :: Maybe SheetControlListType
selectableValues :: Maybe FilterSelectableValues
displayOptions :: Maybe DropDownControlDisplayOptions
cascadingControlConfiguration :: Maybe CascadingControlConfiguration
$sel:sourceFilterId:FilterDropDownControl' :: FilterDropDownControl -> Text
$sel:title:FilterDropDownControl' :: FilterDropDownControl -> Text
$sel:filterControlId:FilterDropDownControl' :: FilterDropDownControl -> Text
$sel:type':FilterDropDownControl' :: FilterDropDownControl -> Maybe SheetControlListType
$sel:selectableValues:FilterDropDownControl' :: FilterDropDownControl -> Maybe FilterSelectableValues
$sel:displayOptions:FilterDropDownControl' :: FilterDropDownControl -> Maybe DropDownControlDisplayOptions
$sel:cascadingControlConfiguration:FilterDropDownControl' :: FilterDropDownControl -> Maybe CascadingControlConfiguration
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CascadingControlConfiguration
cascadingControlConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DropDownControlDisplayOptions
displayOptions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FilterSelectableValues
selectableValues
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SheetControlListType
type'
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
filterControlId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
title
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
sourceFilterId

instance Prelude.NFData FilterDropDownControl where
  rnf :: FilterDropDownControl -> ()
rnf FilterDropDownControl' {Maybe CascadingControlConfiguration
Maybe FilterSelectableValues
Maybe SheetControlListType
Maybe DropDownControlDisplayOptions
Text
sourceFilterId :: Text
title :: Text
filterControlId :: Text
type' :: Maybe SheetControlListType
selectableValues :: Maybe FilterSelectableValues
displayOptions :: Maybe DropDownControlDisplayOptions
cascadingControlConfiguration :: Maybe CascadingControlConfiguration
$sel:sourceFilterId:FilterDropDownControl' :: FilterDropDownControl -> Text
$sel:title:FilterDropDownControl' :: FilterDropDownControl -> Text
$sel:filterControlId:FilterDropDownControl' :: FilterDropDownControl -> Text
$sel:type':FilterDropDownControl' :: FilterDropDownControl -> Maybe SheetControlListType
$sel:selectableValues:FilterDropDownControl' :: FilterDropDownControl -> Maybe FilterSelectableValues
$sel:displayOptions:FilterDropDownControl' :: FilterDropDownControl -> Maybe DropDownControlDisplayOptions
$sel:cascadingControlConfiguration:FilterDropDownControl' :: FilterDropDownControl -> Maybe CascadingControlConfiguration
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe CascadingControlConfiguration
cascadingControlConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DropDownControlDisplayOptions
displayOptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FilterSelectableValues
selectableValues
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SheetControlListType
type'
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
filterControlId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
title
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
sourceFilterId

instance Data.ToJSON FilterDropDownControl where
  toJSON :: FilterDropDownControl -> Value
toJSON FilterDropDownControl' {Maybe CascadingControlConfiguration
Maybe FilterSelectableValues
Maybe SheetControlListType
Maybe DropDownControlDisplayOptions
Text
sourceFilterId :: Text
title :: Text
filterControlId :: Text
type' :: Maybe SheetControlListType
selectableValues :: Maybe FilterSelectableValues
displayOptions :: Maybe DropDownControlDisplayOptions
cascadingControlConfiguration :: Maybe CascadingControlConfiguration
$sel:sourceFilterId:FilterDropDownControl' :: FilterDropDownControl -> Text
$sel:title:FilterDropDownControl' :: FilterDropDownControl -> Text
$sel:filterControlId:FilterDropDownControl' :: FilterDropDownControl -> Text
$sel:type':FilterDropDownControl' :: FilterDropDownControl -> Maybe SheetControlListType
$sel:selectableValues:FilterDropDownControl' :: FilterDropDownControl -> Maybe FilterSelectableValues
$sel:displayOptions:FilterDropDownControl' :: FilterDropDownControl -> Maybe DropDownControlDisplayOptions
$sel:cascadingControlConfiguration:FilterDropDownControl' :: FilterDropDownControl -> Maybe CascadingControlConfiguration
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"CascadingControlConfiguration" 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 CascadingControlConfiguration
cascadingControlConfiguration,
            (Key
"DisplayOptions" 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 DropDownControlDisplayOptions
displayOptions,
            (Key
"SelectableValues" 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 FilterSelectableValues
selectableValues,
            (Key
"Type" 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 SheetControlListType
type',
            forall a. a -> Maybe a
Prelude.Just
              (Key
"FilterControlId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
filterControlId),
            forall a. a -> Maybe a
Prelude.Just (Key
"Title" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
title),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"SourceFilterId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
sourceFilterId)
          ]
      )