{-# 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.SageMaker.Types.HyperParameterSpecification
-- 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.SageMaker.Types.HyperParameterSpecification where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.ParameterRange
import Amazonka.SageMaker.Types.ParameterType

-- | Defines a hyperparameter to be used by an algorithm.
--
-- /See:/ 'newHyperParameterSpecification' smart constructor.
data HyperParameterSpecification = HyperParameterSpecification'
  { -- | Indicates whether this hyperparameter is tunable in a hyperparameter
    -- tuning job.
    HyperParameterSpecification -> Maybe Bool
isTunable :: Prelude.Maybe Prelude.Bool,
    -- | The allowed range for this hyperparameter.
    HyperParameterSpecification -> Maybe ParameterRange
range :: Prelude.Maybe ParameterRange,
    -- | The default value for this hyperparameter. If a default value is
    -- specified, a hyperparameter cannot be required.
    HyperParameterSpecification -> Maybe Text
defaultValue :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether this hyperparameter is required.
    HyperParameterSpecification -> Maybe Bool
isRequired :: Prelude.Maybe Prelude.Bool,
    -- | A brief description of the hyperparameter.
    HyperParameterSpecification -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The name of this hyperparameter. The name must be unique.
    HyperParameterSpecification -> Text
name :: Prelude.Text,
    -- | The type of this hyperparameter. The valid types are @Integer@,
    -- @Continuous@, @Categorical@, and @FreeText@.
    HyperParameterSpecification -> ParameterType
type' :: ParameterType
  }
  deriving (HyperParameterSpecification -> HyperParameterSpecification -> Bool
(HyperParameterSpecification
 -> HyperParameterSpecification -> Bool)
-> (HyperParameterSpecification
    -> HyperParameterSpecification -> Bool)
-> Eq HyperParameterSpecification
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HyperParameterSpecification -> HyperParameterSpecification -> Bool
$c/= :: HyperParameterSpecification -> HyperParameterSpecification -> Bool
== :: HyperParameterSpecification -> HyperParameterSpecification -> Bool
$c== :: HyperParameterSpecification -> HyperParameterSpecification -> Bool
Prelude.Eq, ReadPrec [HyperParameterSpecification]
ReadPrec HyperParameterSpecification
Int -> ReadS HyperParameterSpecification
ReadS [HyperParameterSpecification]
(Int -> ReadS HyperParameterSpecification)
-> ReadS [HyperParameterSpecification]
-> ReadPrec HyperParameterSpecification
-> ReadPrec [HyperParameterSpecification]
-> Read HyperParameterSpecification
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HyperParameterSpecification]
$creadListPrec :: ReadPrec [HyperParameterSpecification]
readPrec :: ReadPrec HyperParameterSpecification
$creadPrec :: ReadPrec HyperParameterSpecification
readList :: ReadS [HyperParameterSpecification]
$creadList :: ReadS [HyperParameterSpecification]
readsPrec :: Int -> ReadS HyperParameterSpecification
$creadsPrec :: Int -> ReadS HyperParameterSpecification
Prelude.Read, Int -> HyperParameterSpecification -> ShowS
[HyperParameterSpecification] -> ShowS
HyperParameterSpecification -> String
(Int -> HyperParameterSpecification -> ShowS)
-> (HyperParameterSpecification -> String)
-> ([HyperParameterSpecification] -> ShowS)
-> Show HyperParameterSpecification
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HyperParameterSpecification] -> ShowS
$cshowList :: [HyperParameterSpecification] -> ShowS
show :: HyperParameterSpecification -> String
$cshow :: HyperParameterSpecification -> String
showsPrec :: Int -> HyperParameterSpecification -> ShowS
$cshowsPrec :: Int -> HyperParameterSpecification -> ShowS
Prelude.Show, (forall x.
 HyperParameterSpecification -> Rep HyperParameterSpecification x)
-> (forall x.
    Rep HyperParameterSpecification x -> HyperParameterSpecification)
-> Generic HyperParameterSpecification
forall x.
Rep HyperParameterSpecification x -> HyperParameterSpecification
forall x.
HyperParameterSpecification -> Rep HyperParameterSpecification x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep HyperParameterSpecification x -> HyperParameterSpecification
$cfrom :: forall x.
HyperParameterSpecification -> Rep HyperParameterSpecification x
Prelude.Generic)

-- |
-- Create a value of 'HyperParameterSpecification' 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:
--
-- 'isTunable', 'hyperParameterSpecification_isTunable' - Indicates whether this hyperparameter is tunable in a hyperparameter
-- tuning job.
--
-- 'range', 'hyperParameterSpecification_range' - The allowed range for this hyperparameter.
--
-- 'defaultValue', 'hyperParameterSpecification_defaultValue' - The default value for this hyperparameter. If a default value is
-- specified, a hyperparameter cannot be required.
--
-- 'isRequired', 'hyperParameterSpecification_isRequired' - Indicates whether this hyperparameter is required.
--
-- 'description', 'hyperParameterSpecification_description' - A brief description of the hyperparameter.
--
-- 'name', 'hyperParameterSpecification_name' - The name of this hyperparameter. The name must be unique.
--
-- 'type'', 'hyperParameterSpecification_type' - The type of this hyperparameter. The valid types are @Integer@,
-- @Continuous@, @Categorical@, and @FreeText@.
newHyperParameterSpecification ::
  -- | 'name'
  Prelude.Text ->
  -- | 'type''
  ParameterType ->
  HyperParameterSpecification
newHyperParameterSpecification :: Text -> ParameterType -> HyperParameterSpecification
newHyperParameterSpecification Text
pName_ ParameterType
pType_ =
  HyperParameterSpecification' :: Maybe Bool
-> Maybe ParameterRange
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Text
-> ParameterType
-> HyperParameterSpecification
HyperParameterSpecification'
    { $sel:isTunable:HyperParameterSpecification' :: Maybe Bool
isTunable =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:range:HyperParameterSpecification' :: Maybe ParameterRange
range = Maybe ParameterRange
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultValue:HyperParameterSpecification' :: Maybe Text
defaultValue = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:isRequired:HyperParameterSpecification' :: Maybe Bool
isRequired = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:description:HyperParameterSpecification' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:HyperParameterSpecification' :: Text
name = Text
pName_,
      $sel:type':HyperParameterSpecification' :: ParameterType
type' = ParameterType
pType_
    }

-- | Indicates whether this hyperparameter is tunable in a hyperparameter
-- tuning job.
hyperParameterSpecification_isTunable :: Lens.Lens' HyperParameterSpecification (Prelude.Maybe Prelude.Bool)
hyperParameterSpecification_isTunable :: (Maybe Bool -> f (Maybe Bool))
-> HyperParameterSpecification -> f HyperParameterSpecification
hyperParameterSpecification_isTunable = (HyperParameterSpecification -> Maybe Bool)
-> (HyperParameterSpecification
    -> Maybe Bool -> HyperParameterSpecification)
-> Lens
     HyperParameterSpecification
     HyperParameterSpecification
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterSpecification' {Maybe Bool
isTunable :: Maybe Bool
$sel:isTunable:HyperParameterSpecification' :: HyperParameterSpecification -> Maybe Bool
isTunable} -> Maybe Bool
isTunable) (\s :: HyperParameterSpecification
s@HyperParameterSpecification' {} Maybe Bool
a -> HyperParameterSpecification
s {$sel:isTunable:HyperParameterSpecification' :: Maybe Bool
isTunable = Maybe Bool
a} :: HyperParameterSpecification)

-- | The allowed range for this hyperparameter.
hyperParameterSpecification_range :: Lens.Lens' HyperParameterSpecification (Prelude.Maybe ParameterRange)
hyperParameterSpecification_range :: (Maybe ParameterRange -> f (Maybe ParameterRange))
-> HyperParameterSpecification -> f HyperParameterSpecification
hyperParameterSpecification_range = (HyperParameterSpecification -> Maybe ParameterRange)
-> (HyperParameterSpecification
    -> Maybe ParameterRange -> HyperParameterSpecification)
-> Lens
     HyperParameterSpecification
     HyperParameterSpecification
     (Maybe ParameterRange)
     (Maybe ParameterRange)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterSpecification' {Maybe ParameterRange
range :: Maybe ParameterRange
$sel:range:HyperParameterSpecification' :: HyperParameterSpecification -> Maybe ParameterRange
range} -> Maybe ParameterRange
range) (\s :: HyperParameterSpecification
s@HyperParameterSpecification' {} Maybe ParameterRange
a -> HyperParameterSpecification
s {$sel:range:HyperParameterSpecification' :: Maybe ParameterRange
range = Maybe ParameterRange
a} :: HyperParameterSpecification)

-- | The default value for this hyperparameter. If a default value is
-- specified, a hyperparameter cannot be required.
hyperParameterSpecification_defaultValue :: Lens.Lens' HyperParameterSpecification (Prelude.Maybe Prelude.Text)
hyperParameterSpecification_defaultValue :: (Maybe Text -> f (Maybe Text))
-> HyperParameterSpecification -> f HyperParameterSpecification
hyperParameterSpecification_defaultValue = (HyperParameterSpecification -> Maybe Text)
-> (HyperParameterSpecification
    -> Maybe Text -> HyperParameterSpecification)
-> Lens
     HyperParameterSpecification
     HyperParameterSpecification
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterSpecification' {Maybe Text
defaultValue :: Maybe Text
$sel:defaultValue:HyperParameterSpecification' :: HyperParameterSpecification -> Maybe Text
defaultValue} -> Maybe Text
defaultValue) (\s :: HyperParameterSpecification
s@HyperParameterSpecification' {} Maybe Text
a -> HyperParameterSpecification
s {$sel:defaultValue:HyperParameterSpecification' :: Maybe Text
defaultValue = Maybe Text
a} :: HyperParameterSpecification)

-- | Indicates whether this hyperparameter is required.
hyperParameterSpecification_isRequired :: Lens.Lens' HyperParameterSpecification (Prelude.Maybe Prelude.Bool)
hyperParameterSpecification_isRequired :: (Maybe Bool -> f (Maybe Bool))
-> HyperParameterSpecification -> f HyperParameterSpecification
hyperParameterSpecification_isRequired = (HyperParameterSpecification -> Maybe Bool)
-> (HyperParameterSpecification
    -> Maybe Bool -> HyperParameterSpecification)
-> Lens
     HyperParameterSpecification
     HyperParameterSpecification
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterSpecification' {Maybe Bool
isRequired :: Maybe Bool
$sel:isRequired:HyperParameterSpecification' :: HyperParameterSpecification -> Maybe Bool
isRequired} -> Maybe Bool
isRequired) (\s :: HyperParameterSpecification
s@HyperParameterSpecification' {} Maybe Bool
a -> HyperParameterSpecification
s {$sel:isRequired:HyperParameterSpecification' :: Maybe Bool
isRequired = Maybe Bool
a} :: HyperParameterSpecification)

-- | A brief description of the hyperparameter.
hyperParameterSpecification_description :: Lens.Lens' HyperParameterSpecification (Prelude.Maybe Prelude.Text)
hyperParameterSpecification_description :: (Maybe Text -> f (Maybe Text))
-> HyperParameterSpecification -> f HyperParameterSpecification
hyperParameterSpecification_description = (HyperParameterSpecification -> Maybe Text)
-> (HyperParameterSpecification
    -> Maybe Text -> HyperParameterSpecification)
-> Lens
     HyperParameterSpecification
     HyperParameterSpecification
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterSpecification' {Maybe Text
description :: Maybe Text
$sel:description:HyperParameterSpecification' :: HyperParameterSpecification -> Maybe Text
description} -> Maybe Text
description) (\s :: HyperParameterSpecification
s@HyperParameterSpecification' {} Maybe Text
a -> HyperParameterSpecification
s {$sel:description:HyperParameterSpecification' :: Maybe Text
description = Maybe Text
a} :: HyperParameterSpecification)

-- | The name of this hyperparameter. The name must be unique.
hyperParameterSpecification_name :: Lens.Lens' HyperParameterSpecification Prelude.Text
hyperParameterSpecification_name :: (Text -> f Text)
-> HyperParameterSpecification -> f HyperParameterSpecification
hyperParameterSpecification_name = (HyperParameterSpecification -> Text)
-> (HyperParameterSpecification
    -> Text -> HyperParameterSpecification)
-> Lens
     HyperParameterSpecification HyperParameterSpecification Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterSpecification' {Text
name :: Text
$sel:name:HyperParameterSpecification' :: HyperParameterSpecification -> Text
name} -> Text
name) (\s :: HyperParameterSpecification
s@HyperParameterSpecification' {} Text
a -> HyperParameterSpecification
s {$sel:name:HyperParameterSpecification' :: Text
name = Text
a} :: HyperParameterSpecification)

-- | The type of this hyperparameter. The valid types are @Integer@,
-- @Continuous@, @Categorical@, and @FreeText@.
hyperParameterSpecification_type :: Lens.Lens' HyperParameterSpecification ParameterType
hyperParameterSpecification_type :: (ParameterType -> f ParameterType)
-> HyperParameterSpecification -> f HyperParameterSpecification
hyperParameterSpecification_type = (HyperParameterSpecification -> ParameterType)
-> (HyperParameterSpecification
    -> ParameterType -> HyperParameterSpecification)
-> Lens
     HyperParameterSpecification
     HyperParameterSpecification
     ParameterType
     ParameterType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterSpecification' {ParameterType
type' :: ParameterType
$sel:type':HyperParameterSpecification' :: HyperParameterSpecification -> ParameterType
type'} -> ParameterType
type') (\s :: HyperParameterSpecification
s@HyperParameterSpecification' {} ParameterType
a -> HyperParameterSpecification
s {$sel:type':HyperParameterSpecification' :: ParameterType
type' = ParameterType
a} :: HyperParameterSpecification)

instance Core.FromJSON HyperParameterSpecification where
  parseJSON :: Value -> Parser HyperParameterSpecification
parseJSON =
    String
-> (Object -> Parser HyperParameterSpecification)
-> Value
-> Parser HyperParameterSpecification
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"HyperParameterSpecification"
      ( \Object
x ->
          Maybe Bool
-> Maybe ParameterRange
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Text
-> ParameterType
-> HyperParameterSpecification
HyperParameterSpecification'
            (Maybe Bool
 -> Maybe ParameterRange
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Text
 -> ParameterType
 -> HyperParameterSpecification)
-> Parser (Maybe Bool)
-> Parser
     (Maybe ParameterRange
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Text
      -> ParameterType
      -> HyperParameterSpecification)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IsTunable")
            Parser
  (Maybe ParameterRange
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Text
   -> ParameterType
   -> HyperParameterSpecification)
-> Parser (Maybe ParameterRange)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Text
      -> ParameterType
      -> HyperParameterSpecification)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ParameterRange)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Range")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Text
   -> ParameterType
   -> HyperParameterSpecification)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Text
      -> ParameterType
      -> HyperParameterSpecification)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DefaultValue")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Text
   -> ParameterType
   -> HyperParameterSpecification)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Text -> ParameterType -> HyperParameterSpecification)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IsRequired")
            Parser
  (Maybe Text
   -> Text -> ParameterType -> HyperParameterSpecification)
-> Parser (Maybe Text)
-> Parser (Text -> ParameterType -> HyperParameterSpecification)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Description")
            Parser (Text -> ParameterType -> HyperParameterSpecification)
-> Parser Text
-> Parser (ParameterType -> HyperParameterSpecification)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Name")
            Parser (ParameterType -> HyperParameterSpecification)
-> Parser ParameterType -> Parser HyperParameterSpecification
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ParameterType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Type")
      )

instance Prelude.Hashable HyperParameterSpecification

instance Prelude.NFData HyperParameterSpecification

instance Core.ToJSON HyperParameterSpecification where
  toJSON :: HyperParameterSpecification -> Value
toJSON HyperParameterSpecification' {Maybe Bool
Maybe Text
Maybe ParameterRange
Text
ParameterType
type' :: ParameterType
name :: Text
description :: Maybe Text
isRequired :: Maybe Bool
defaultValue :: Maybe Text
range :: Maybe ParameterRange
isTunable :: Maybe Bool
$sel:type':HyperParameterSpecification' :: HyperParameterSpecification -> ParameterType
$sel:name:HyperParameterSpecification' :: HyperParameterSpecification -> Text
$sel:description:HyperParameterSpecification' :: HyperParameterSpecification -> Maybe Text
$sel:isRequired:HyperParameterSpecification' :: HyperParameterSpecification -> Maybe Bool
$sel:defaultValue:HyperParameterSpecification' :: HyperParameterSpecification -> Maybe Text
$sel:range:HyperParameterSpecification' :: HyperParameterSpecification -> Maybe ParameterRange
$sel:isTunable:HyperParameterSpecification' :: HyperParameterSpecification -> Maybe Bool
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"IsTunable" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
isTunable,
            (Text
"Range" Text -> ParameterRange -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ParameterRange -> Pair) -> Maybe ParameterRange -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ParameterRange
range,
            (Text
"DefaultValue" 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
defaultValue,
            (Text
"IsRequired" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
isRequired,
            (Text
"Description" 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
description,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Type" Text -> ParameterType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ParameterType
type')
          ]
      )