{-# 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.KinesisAnalyticsV2.Types.InputUpdate
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.KinesisAnalyticsV2.Types.InputUpdate where

import qualified Amazonka.Core as Core
import Amazonka.KinesisAnalyticsV2.Types.InputParallelismUpdate
import Amazonka.KinesisAnalyticsV2.Types.InputProcessingConfigurationUpdate
import Amazonka.KinesisAnalyticsV2.Types.InputSchemaUpdate
import Amazonka.KinesisAnalyticsV2.Types.KinesisFirehoseInputUpdate
import Amazonka.KinesisAnalyticsV2.Types.KinesisStreamsInputUpdate
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | For a SQL-based Kinesis Data Analytics application, describes updates to
-- a specific input configuration (identified by the @InputId@ of an
-- application).
--
-- /See:/ 'newInputUpdate' smart constructor.
data InputUpdate = InputUpdate'
  { -- | Describes updates to an InputProcessingConfiguration.
    InputUpdate -> Maybe InputProcessingConfigurationUpdate
inputProcessingConfigurationUpdate :: Prelude.Maybe InputProcessingConfigurationUpdate,
    -- | If a Kinesis data stream is the streaming source to be updated, provides
    -- an updated stream Amazon Resource Name (ARN).
    InputUpdate -> Maybe KinesisStreamsInputUpdate
kinesisStreamsInputUpdate :: Prelude.Maybe KinesisStreamsInputUpdate,
    -- | Describes the parallelism updates (the number of in-application streams
    -- Kinesis Data Analytics creates for the specific streaming source).
    InputUpdate -> Maybe InputParallelismUpdate
inputParallelismUpdate :: Prelude.Maybe InputParallelismUpdate,
    -- | The name prefix for in-application streams that Kinesis Data Analytics
    -- creates for the specific streaming source.
    InputUpdate -> Maybe Text
namePrefixUpdate :: Prelude.Maybe Prelude.Text,
    -- | Describes the data format on the streaming source, and how record
    -- elements on the streaming source map to columns of the in-application
    -- stream that is created.
    InputUpdate -> Maybe InputSchemaUpdate
inputSchemaUpdate :: Prelude.Maybe InputSchemaUpdate,
    -- | If a Kinesis Data Firehose delivery stream is the streaming source to be
    -- updated, provides an updated stream ARN.
    InputUpdate -> Maybe KinesisFirehoseInputUpdate
kinesisFirehoseInputUpdate :: Prelude.Maybe KinesisFirehoseInputUpdate,
    -- | The input ID of the application input to be updated.
    InputUpdate -> Text
inputId :: Prelude.Text
  }
  deriving (InputUpdate -> InputUpdate -> Bool
(InputUpdate -> InputUpdate -> Bool)
-> (InputUpdate -> InputUpdate -> Bool) -> Eq InputUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InputUpdate -> InputUpdate -> Bool
$c/= :: InputUpdate -> InputUpdate -> Bool
== :: InputUpdate -> InputUpdate -> Bool
$c== :: InputUpdate -> InputUpdate -> Bool
Prelude.Eq, ReadPrec [InputUpdate]
ReadPrec InputUpdate
Int -> ReadS InputUpdate
ReadS [InputUpdate]
(Int -> ReadS InputUpdate)
-> ReadS [InputUpdate]
-> ReadPrec InputUpdate
-> ReadPrec [InputUpdate]
-> Read InputUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InputUpdate]
$creadListPrec :: ReadPrec [InputUpdate]
readPrec :: ReadPrec InputUpdate
$creadPrec :: ReadPrec InputUpdate
readList :: ReadS [InputUpdate]
$creadList :: ReadS [InputUpdate]
readsPrec :: Int -> ReadS InputUpdate
$creadsPrec :: Int -> ReadS InputUpdate
Prelude.Read, Int -> InputUpdate -> ShowS
[InputUpdate] -> ShowS
InputUpdate -> String
(Int -> InputUpdate -> ShowS)
-> (InputUpdate -> String)
-> ([InputUpdate] -> ShowS)
-> Show InputUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InputUpdate] -> ShowS
$cshowList :: [InputUpdate] -> ShowS
show :: InputUpdate -> String
$cshow :: InputUpdate -> String
showsPrec :: Int -> InputUpdate -> ShowS
$cshowsPrec :: Int -> InputUpdate -> ShowS
Prelude.Show, (forall x. InputUpdate -> Rep InputUpdate x)
-> (forall x. Rep InputUpdate x -> InputUpdate)
-> Generic InputUpdate
forall x. Rep InputUpdate x -> InputUpdate
forall x. InputUpdate -> Rep InputUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InputUpdate x -> InputUpdate
$cfrom :: forall x. InputUpdate -> Rep InputUpdate x
Prelude.Generic)

-- |
-- Create a value of 'InputUpdate' 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:
--
-- 'inputProcessingConfigurationUpdate', 'inputUpdate_inputProcessingConfigurationUpdate' - Describes updates to an InputProcessingConfiguration.
--
-- 'kinesisStreamsInputUpdate', 'inputUpdate_kinesisStreamsInputUpdate' - If a Kinesis data stream is the streaming source to be updated, provides
-- an updated stream Amazon Resource Name (ARN).
--
-- 'inputParallelismUpdate', 'inputUpdate_inputParallelismUpdate' - Describes the parallelism updates (the number of in-application streams
-- Kinesis Data Analytics creates for the specific streaming source).
--
-- 'namePrefixUpdate', 'inputUpdate_namePrefixUpdate' - The name prefix for in-application streams that Kinesis Data Analytics
-- creates for the specific streaming source.
--
-- 'inputSchemaUpdate', 'inputUpdate_inputSchemaUpdate' - Describes the data format on the streaming source, and how record
-- elements on the streaming source map to columns of the in-application
-- stream that is created.
--
-- 'kinesisFirehoseInputUpdate', 'inputUpdate_kinesisFirehoseInputUpdate' - If a Kinesis Data Firehose delivery stream is the streaming source to be
-- updated, provides an updated stream ARN.
--
-- 'inputId', 'inputUpdate_inputId' - The input ID of the application input to be updated.
newInputUpdate ::
  -- | 'inputId'
  Prelude.Text ->
  InputUpdate
newInputUpdate :: Text -> InputUpdate
newInputUpdate Text
pInputId_ =
  InputUpdate' :: Maybe InputProcessingConfigurationUpdate
-> Maybe KinesisStreamsInputUpdate
-> Maybe InputParallelismUpdate
-> Maybe Text
-> Maybe InputSchemaUpdate
-> Maybe KinesisFirehoseInputUpdate
-> Text
-> InputUpdate
InputUpdate'
    { $sel:inputProcessingConfigurationUpdate:InputUpdate' :: Maybe InputProcessingConfigurationUpdate
inputProcessingConfigurationUpdate =
        Maybe InputProcessingConfigurationUpdate
forall a. Maybe a
Prelude.Nothing,
      $sel:kinesisStreamsInputUpdate:InputUpdate' :: Maybe KinesisStreamsInputUpdate
kinesisStreamsInputUpdate = Maybe KinesisStreamsInputUpdate
forall a. Maybe a
Prelude.Nothing,
      $sel:inputParallelismUpdate:InputUpdate' :: Maybe InputParallelismUpdate
inputParallelismUpdate = Maybe InputParallelismUpdate
forall a. Maybe a
Prelude.Nothing,
      $sel:namePrefixUpdate:InputUpdate' :: Maybe Text
namePrefixUpdate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:inputSchemaUpdate:InputUpdate' :: Maybe InputSchemaUpdate
inputSchemaUpdate = Maybe InputSchemaUpdate
forall a. Maybe a
Prelude.Nothing,
      $sel:kinesisFirehoseInputUpdate:InputUpdate' :: Maybe KinesisFirehoseInputUpdate
kinesisFirehoseInputUpdate = Maybe KinesisFirehoseInputUpdate
forall a. Maybe a
Prelude.Nothing,
      $sel:inputId:InputUpdate' :: Text
inputId = Text
pInputId_
    }

-- | Describes updates to an InputProcessingConfiguration.
inputUpdate_inputProcessingConfigurationUpdate :: Lens.Lens' InputUpdate (Prelude.Maybe InputProcessingConfigurationUpdate)
inputUpdate_inputProcessingConfigurationUpdate :: (Maybe InputProcessingConfigurationUpdate
 -> f (Maybe InputProcessingConfigurationUpdate))
-> InputUpdate -> f InputUpdate
inputUpdate_inputProcessingConfigurationUpdate = (InputUpdate -> Maybe InputProcessingConfigurationUpdate)
-> (InputUpdate
    -> Maybe InputProcessingConfigurationUpdate -> InputUpdate)
-> Lens
     InputUpdate
     InputUpdate
     (Maybe InputProcessingConfigurationUpdate)
     (Maybe InputProcessingConfigurationUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputUpdate' {Maybe InputProcessingConfigurationUpdate
inputProcessingConfigurationUpdate :: Maybe InputProcessingConfigurationUpdate
$sel:inputProcessingConfigurationUpdate:InputUpdate' :: InputUpdate -> Maybe InputProcessingConfigurationUpdate
inputProcessingConfigurationUpdate} -> Maybe InputProcessingConfigurationUpdate
inputProcessingConfigurationUpdate) (\s :: InputUpdate
s@InputUpdate' {} Maybe InputProcessingConfigurationUpdate
a -> InputUpdate
s {$sel:inputProcessingConfigurationUpdate:InputUpdate' :: Maybe InputProcessingConfigurationUpdate
inputProcessingConfigurationUpdate = Maybe InputProcessingConfigurationUpdate
a} :: InputUpdate)

-- | If a Kinesis data stream is the streaming source to be updated, provides
-- an updated stream Amazon Resource Name (ARN).
inputUpdate_kinesisStreamsInputUpdate :: Lens.Lens' InputUpdate (Prelude.Maybe KinesisStreamsInputUpdate)
inputUpdate_kinesisStreamsInputUpdate :: (Maybe KinesisStreamsInputUpdate
 -> f (Maybe KinesisStreamsInputUpdate))
-> InputUpdate -> f InputUpdate
inputUpdate_kinesisStreamsInputUpdate = (InputUpdate -> Maybe KinesisStreamsInputUpdate)
-> (InputUpdate -> Maybe KinesisStreamsInputUpdate -> InputUpdate)
-> Lens
     InputUpdate
     InputUpdate
     (Maybe KinesisStreamsInputUpdate)
     (Maybe KinesisStreamsInputUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputUpdate' {Maybe KinesisStreamsInputUpdate
kinesisStreamsInputUpdate :: Maybe KinesisStreamsInputUpdate
$sel:kinesisStreamsInputUpdate:InputUpdate' :: InputUpdate -> Maybe KinesisStreamsInputUpdate
kinesisStreamsInputUpdate} -> Maybe KinesisStreamsInputUpdate
kinesisStreamsInputUpdate) (\s :: InputUpdate
s@InputUpdate' {} Maybe KinesisStreamsInputUpdate
a -> InputUpdate
s {$sel:kinesisStreamsInputUpdate:InputUpdate' :: Maybe KinesisStreamsInputUpdate
kinesisStreamsInputUpdate = Maybe KinesisStreamsInputUpdate
a} :: InputUpdate)

-- | Describes the parallelism updates (the number of in-application streams
-- Kinesis Data Analytics creates for the specific streaming source).
inputUpdate_inputParallelismUpdate :: Lens.Lens' InputUpdate (Prelude.Maybe InputParallelismUpdate)
inputUpdate_inputParallelismUpdate :: (Maybe InputParallelismUpdate -> f (Maybe InputParallelismUpdate))
-> InputUpdate -> f InputUpdate
inputUpdate_inputParallelismUpdate = (InputUpdate -> Maybe InputParallelismUpdate)
-> (InputUpdate -> Maybe InputParallelismUpdate -> InputUpdate)
-> Lens
     InputUpdate
     InputUpdate
     (Maybe InputParallelismUpdate)
     (Maybe InputParallelismUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputUpdate' {Maybe InputParallelismUpdate
inputParallelismUpdate :: Maybe InputParallelismUpdate
$sel:inputParallelismUpdate:InputUpdate' :: InputUpdate -> Maybe InputParallelismUpdate
inputParallelismUpdate} -> Maybe InputParallelismUpdate
inputParallelismUpdate) (\s :: InputUpdate
s@InputUpdate' {} Maybe InputParallelismUpdate
a -> InputUpdate
s {$sel:inputParallelismUpdate:InputUpdate' :: Maybe InputParallelismUpdate
inputParallelismUpdate = Maybe InputParallelismUpdate
a} :: InputUpdate)

-- | The name prefix for in-application streams that Kinesis Data Analytics
-- creates for the specific streaming source.
inputUpdate_namePrefixUpdate :: Lens.Lens' InputUpdate (Prelude.Maybe Prelude.Text)
inputUpdate_namePrefixUpdate :: (Maybe Text -> f (Maybe Text)) -> InputUpdate -> f InputUpdate
inputUpdate_namePrefixUpdate = (InputUpdate -> Maybe Text)
-> (InputUpdate -> Maybe Text -> InputUpdate)
-> Lens InputUpdate InputUpdate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputUpdate' {Maybe Text
namePrefixUpdate :: Maybe Text
$sel:namePrefixUpdate:InputUpdate' :: InputUpdate -> Maybe Text
namePrefixUpdate} -> Maybe Text
namePrefixUpdate) (\s :: InputUpdate
s@InputUpdate' {} Maybe Text
a -> InputUpdate
s {$sel:namePrefixUpdate:InputUpdate' :: Maybe Text
namePrefixUpdate = Maybe Text
a} :: InputUpdate)

-- | Describes the data format on the streaming source, and how record
-- elements on the streaming source map to columns of the in-application
-- stream that is created.
inputUpdate_inputSchemaUpdate :: Lens.Lens' InputUpdate (Prelude.Maybe InputSchemaUpdate)
inputUpdate_inputSchemaUpdate :: (Maybe InputSchemaUpdate -> f (Maybe InputSchemaUpdate))
-> InputUpdate -> f InputUpdate
inputUpdate_inputSchemaUpdate = (InputUpdate -> Maybe InputSchemaUpdate)
-> (InputUpdate -> Maybe InputSchemaUpdate -> InputUpdate)
-> Lens
     InputUpdate
     InputUpdate
     (Maybe InputSchemaUpdate)
     (Maybe InputSchemaUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputUpdate' {Maybe InputSchemaUpdate
inputSchemaUpdate :: Maybe InputSchemaUpdate
$sel:inputSchemaUpdate:InputUpdate' :: InputUpdate -> Maybe InputSchemaUpdate
inputSchemaUpdate} -> Maybe InputSchemaUpdate
inputSchemaUpdate) (\s :: InputUpdate
s@InputUpdate' {} Maybe InputSchemaUpdate
a -> InputUpdate
s {$sel:inputSchemaUpdate:InputUpdate' :: Maybe InputSchemaUpdate
inputSchemaUpdate = Maybe InputSchemaUpdate
a} :: InputUpdate)

-- | If a Kinesis Data Firehose delivery stream is the streaming source to be
-- updated, provides an updated stream ARN.
inputUpdate_kinesisFirehoseInputUpdate :: Lens.Lens' InputUpdate (Prelude.Maybe KinesisFirehoseInputUpdate)
inputUpdate_kinesisFirehoseInputUpdate :: (Maybe KinesisFirehoseInputUpdate
 -> f (Maybe KinesisFirehoseInputUpdate))
-> InputUpdate -> f InputUpdate
inputUpdate_kinesisFirehoseInputUpdate = (InputUpdate -> Maybe KinesisFirehoseInputUpdate)
-> (InputUpdate -> Maybe KinesisFirehoseInputUpdate -> InputUpdate)
-> Lens
     InputUpdate
     InputUpdate
     (Maybe KinesisFirehoseInputUpdate)
     (Maybe KinesisFirehoseInputUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputUpdate' {Maybe KinesisFirehoseInputUpdate
kinesisFirehoseInputUpdate :: Maybe KinesisFirehoseInputUpdate
$sel:kinesisFirehoseInputUpdate:InputUpdate' :: InputUpdate -> Maybe KinesisFirehoseInputUpdate
kinesisFirehoseInputUpdate} -> Maybe KinesisFirehoseInputUpdate
kinesisFirehoseInputUpdate) (\s :: InputUpdate
s@InputUpdate' {} Maybe KinesisFirehoseInputUpdate
a -> InputUpdate
s {$sel:kinesisFirehoseInputUpdate:InputUpdate' :: Maybe KinesisFirehoseInputUpdate
kinesisFirehoseInputUpdate = Maybe KinesisFirehoseInputUpdate
a} :: InputUpdate)

-- | The input ID of the application input to be updated.
inputUpdate_inputId :: Lens.Lens' InputUpdate Prelude.Text
inputUpdate_inputId :: (Text -> f Text) -> InputUpdate -> f InputUpdate
inputUpdate_inputId = (InputUpdate -> Text)
-> (InputUpdate -> Text -> InputUpdate)
-> Lens InputUpdate InputUpdate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputUpdate' {Text
inputId :: Text
$sel:inputId:InputUpdate' :: InputUpdate -> Text
inputId} -> Text
inputId) (\s :: InputUpdate
s@InputUpdate' {} Text
a -> InputUpdate
s {$sel:inputId:InputUpdate' :: Text
inputId = Text
a} :: InputUpdate)

instance Prelude.Hashable InputUpdate

instance Prelude.NFData InputUpdate

instance Core.ToJSON InputUpdate where
  toJSON :: InputUpdate -> Value
toJSON InputUpdate' {Maybe Text
Maybe InputParallelismUpdate
Maybe InputProcessingConfigurationUpdate
Maybe KinesisFirehoseInputUpdate
Maybe KinesisStreamsInputUpdate
Maybe InputSchemaUpdate
Text
inputId :: Text
kinesisFirehoseInputUpdate :: Maybe KinesisFirehoseInputUpdate
inputSchemaUpdate :: Maybe InputSchemaUpdate
namePrefixUpdate :: Maybe Text
inputParallelismUpdate :: Maybe InputParallelismUpdate
kinesisStreamsInputUpdate :: Maybe KinesisStreamsInputUpdate
inputProcessingConfigurationUpdate :: Maybe InputProcessingConfigurationUpdate
$sel:inputId:InputUpdate' :: InputUpdate -> Text
$sel:kinesisFirehoseInputUpdate:InputUpdate' :: InputUpdate -> Maybe KinesisFirehoseInputUpdate
$sel:inputSchemaUpdate:InputUpdate' :: InputUpdate -> Maybe InputSchemaUpdate
$sel:namePrefixUpdate:InputUpdate' :: InputUpdate -> Maybe Text
$sel:inputParallelismUpdate:InputUpdate' :: InputUpdate -> Maybe InputParallelismUpdate
$sel:kinesisStreamsInputUpdate:InputUpdate' :: InputUpdate -> Maybe KinesisStreamsInputUpdate
$sel:inputProcessingConfigurationUpdate:InputUpdate' :: InputUpdate -> Maybe InputProcessingConfigurationUpdate
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"InputProcessingConfigurationUpdate" Text -> InputProcessingConfigurationUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (InputProcessingConfigurationUpdate -> Pair)
-> Maybe InputProcessingConfigurationUpdate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InputProcessingConfigurationUpdate
inputProcessingConfigurationUpdate,
            (Text
"KinesisStreamsInputUpdate" Text -> KinesisStreamsInputUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (KinesisStreamsInputUpdate -> Pair)
-> Maybe KinesisStreamsInputUpdate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe KinesisStreamsInputUpdate
kinesisStreamsInputUpdate,
            (Text
"InputParallelismUpdate" Text -> InputParallelismUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (InputParallelismUpdate -> Pair)
-> Maybe InputParallelismUpdate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InputParallelismUpdate
inputParallelismUpdate,
            (Text
"NamePrefixUpdate" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
namePrefixUpdate,
            (Text
"InputSchemaUpdate" Text -> InputSchemaUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (InputSchemaUpdate -> Pair)
-> Maybe InputSchemaUpdate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InputSchemaUpdate
inputSchemaUpdate,
            (Text
"KinesisFirehoseInputUpdate" Text -> KinesisFirehoseInputUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (KinesisFirehoseInputUpdate -> Pair)
-> Maybe KinesisFirehoseInputUpdate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe KinesisFirehoseInputUpdate
kinesisFirehoseInputUpdate,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"InputId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
inputId)
          ]
      )