{-# 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 #-}
module Amazonka.ServerlessApplicationRepository.Types.ParameterDefinition where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ParameterDefinition = ParameterDefinition'
{
ParameterDefinition -> Maybe Int
maxValue :: Prelude.Maybe Prelude.Int,
ParameterDefinition -> Maybe Int
maxLength :: Prelude.Maybe Prelude.Int,
ParameterDefinition -> Maybe Text
constraintDescription :: Prelude.Maybe Prelude.Text,
ParameterDefinition -> Maybe Int
minLength :: Prelude.Maybe Prelude.Int,
ParameterDefinition -> Maybe Text
defaultValue :: Prelude.Maybe Prelude.Text,
ParameterDefinition -> Maybe Text
allowedPattern :: Prelude.Maybe Prelude.Text,
ParameterDefinition -> Maybe Bool
noEcho :: Prelude.Maybe Prelude.Bool,
ParameterDefinition -> Maybe Text
type' :: Prelude.Maybe Prelude.Text,
ParameterDefinition -> Maybe [Text]
allowedValues :: Prelude.Maybe [Prelude.Text],
ParameterDefinition -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
ParameterDefinition -> Maybe Int
minValue :: Prelude.Maybe Prelude.Int,
ParameterDefinition -> [Text]
referencedByResources :: [Prelude.Text],
ParameterDefinition -> Text
name :: Prelude.Text
}
deriving (ParameterDefinition -> ParameterDefinition -> Bool
(ParameterDefinition -> ParameterDefinition -> Bool)
-> (ParameterDefinition -> ParameterDefinition -> Bool)
-> Eq ParameterDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ParameterDefinition -> ParameterDefinition -> Bool
$c/= :: ParameterDefinition -> ParameterDefinition -> Bool
== :: ParameterDefinition -> ParameterDefinition -> Bool
$c== :: ParameterDefinition -> ParameterDefinition -> Bool
Prelude.Eq, ReadPrec [ParameterDefinition]
ReadPrec ParameterDefinition
Int -> ReadS ParameterDefinition
ReadS [ParameterDefinition]
(Int -> ReadS ParameterDefinition)
-> ReadS [ParameterDefinition]
-> ReadPrec ParameterDefinition
-> ReadPrec [ParameterDefinition]
-> Read ParameterDefinition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ParameterDefinition]
$creadListPrec :: ReadPrec [ParameterDefinition]
readPrec :: ReadPrec ParameterDefinition
$creadPrec :: ReadPrec ParameterDefinition
readList :: ReadS [ParameterDefinition]
$creadList :: ReadS [ParameterDefinition]
readsPrec :: Int -> ReadS ParameterDefinition
$creadsPrec :: Int -> ReadS ParameterDefinition
Prelude.Read, Int -> ParameterDefinition -> ShowS
[ParameterDefinition] -> ShowS
ParameterDefinition -> String
(Int -> ParameterDefinition -> ShowS)
-> (ParameterDefinition -> String)
-> ([ParameterDefinition] -> ShowS)
-> Show ParameterDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ParameterDefinition] -> ShowS
$cshowList :: [ParameterDefinition] -> ShowS
show :: ParameterDefinition -> String
$cshow :: ParameterDefinition -> String
showsPrec :: Int -> ParameterDefinition -> ShowS
$cshowsPrec :: Int -> ParameterDefinition -> ShowS
Prelude.Show, (forall x. ParameterDefinition -> Rep ParameterDefinition x)
-> (forall x. Rep ParameterDefinition x -> ParameterDefinition)
-> Generic ParameterDefinition
forall x. Rep ParameterDefinition x -> ParameterDefinition
forall x. ParameterDefinition -> Rep ParameterDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ParameterDefinition x -> ParameterDefinition
$cfrom :: forall x. ParameterDefinition -> Rep ParameterDefinition x
Prelude.Generic)
newParameterDefinition ::
Prelude.Text ->
ParameterDefinition
newParameterDefinition :: Text -> ParameterDefinition
newParameterDefinition Text
pName_ =
ParameterDefinition' :: Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Int
-> [Text]
-> Text
-> ParameterDefinition
ParameterDefinition'
{ $sel:maxValue:ParameterDefinition' :: Maybe Int
maxValue = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:maxLength:ParameterDefinition' :: Maybe Int
maxLength = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:constraintDescription:ParameterDefinition' :: Maybe Text
constraintDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:minLength:ParameterDefinition' :: Maybe Int
minLength = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:defaultValue:ParameterDefinition' :: Maybe Text
defaultValue = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:allowedPattern:ParameterDefinition' :: Maybe Text
allowedPattern = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:noEcho:ParameterDefinition' :: Maybe Bool
noEcho = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:type':ParameterDefinition' :: Maybe Text
type' = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:allowedValues:ParameterDefinition' :: Maybe [Text]
allowedValues = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:description:ParameterDefinition' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:minValue:ParameterDefinition' :: Maybe Int
minValue = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:referencedByResources:ParameterDefinition' :: [Text]
referencedByResources = [Text]
forall a. Monoid a => a
Prelude.mempty,
$sel:name:ParameterDefinition' :: Text
name = Text
pName_
}
parameterDefinition_maxValue :: Lens.Lens' ParameterDefinition (Prelude.Maybe Prelude.Int)
parameterDefinition_maxValue :: (Maybe Int -> f (Maybe Int))
-> ParameterDefinition -> f ParameterDefinition
parameterDefinition_maxValue = (ParameterDefinition -> Maybe Int)
-> (ParameterDefinition -> Maybe Int -> ParameterDefinition)
-> Lens
ParameterDefinition ParameterDefinition (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterDefinition' {Maybe Int
maxValue :: Maybe Int
$sel:maxValue:ParameterDefinition' :: ParameterDefinition -> Maybe Int
maxValue} -> Maybe Int
maxValue) (\s :: ParameterDefinition
s@ParameterDefinition' {} Maybe Int
a -> ParameterDefinition
s {$sel:maxValue:ParameterDefinition' :: Maybe Int
maxValue = Maybe Int
a} :: ParameterDefinition)
parameterDefinition_maxLength :: Lens.Lens' ParameterDefinition (Prelude.Maybe Prelude.Int)
parameterDefinition_maxLength :: (Maybe Int -> f (Maybe Int))
-> ParameterDefinition -> f ParameterDefinition
parameterDefinition_maxLength = (ParameterDefinition -> Maybe Int)
-> (ParameterDefinition -> Maybe Int -> ParameterDefinition)
-> Lens
ParameterDefinition ParameterDefinition (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterDefinition' {Maybe Int
maxLength :: Maybe Int
$sel:maxLength:ParameterDefinition' :: ParameterDefinition -> Maybe Int
maxLength} -> Maybe Int
maxLength) (\s :: ParameterDefinition
s@ParameterDefinition' {} Maybe Int
a -> ParameterDefinition
s {$sel:maxLength:ParameterDefinition' :: Maybe Int
maxLength = Maybe Int
a} :: ParameterDefinition)
parameterDefinition_constraintDescription :: Lens.Lens' ParameterDefinition (Prelude.Maybe Prelude.Text)
parameterDefinition_constraintDescription :: (Maybe Text -> f (Maybe Text))
-> ParameterDefinition -> f ParameterDefinition
parameterDefinition_constraintDescription = (ParameterDefinition -> Maybe Text)
-> (ParameterDefinition -> Maybe Text -> ParameterDefinition)
-> Lens
ParameterDefinition ParameterDefinition (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterDefinition' {Maybe Text
constraintDescription :: Maybe Text
$sel:constraintDescription:ParameterDefinition' :: ParameterDefinition -> Maybe Text
constraintDescription} -> Maybe Text
constraintDescription) (\s :: ParameterDefinition
s@ParameterDefinition' {} Maybe Text
a -> ParameterDefinition
s {$sel:constraintDescription:ParameterDefinition' :: Maybe Text
constraintDescription = Maybe Text
a} :: ParameterDefinition)
parameterDefinition_minLength :: Lens.Lens' ParameterDefinition (Prelude.Maybe Prelude.Int)
parameterDefinition_minLength :: (Maybe Int -> f (Maybe Int))
-> ParameterDefinition -> f ParameterDefinition
parameterDefinition_minLength = (ParameterDefinition -> Maybe Int)
-> (ParameterDefinition -> Maybe Int -> ParameterDefinition)
-> Lens
ParameterDefinition ParameterDefinition (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterDefinition' {Maybe Int
minLength :: Maybe Int
$sel:minLength:ParameterDefinition' :: ParameterDefinition -> Maybe Int
minLength} -> Maybe Int
minLength) (\s :: ParameterDefinition
s@ParameterDefinition' {} Maybe Int
a -> ParameterDefinition
s {$sel:minLength:ParameterDefinition' :: Maybe Int
minLength = Maybe Int
a} :: ParameterDefinition)
parameterDefinition_defaultValue :: Lens.Lens' ParameterDefinition (Prelude.Maybe Prelude.Text)
parameterDefinition_defaultValue :: (Maybe Text -> f (Maybe Text))
-> ParameterDefinition -> f ParameterDefinition
parameterDefinition_defaultValue = (ParameterDefinition -> Maybe Text)
-> (ParameterDefinition -> Maybe Text -> ParameterDefinition)
-> Lens
ParameterDefinition ParameterDefinition (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterDefinition' {Maybe Text
defaultValue :: Maybe Text
$sel:defaultValue:ParameterDefinition' :: ParameterDefinition -> Maybe Text
defaultValue} -> Maybe Text
defaultValue) (\s :: ParameterDefinition
s@ParameterDefinition' {} Maybe Text
a -> ParameterDefinition
s {$sel:defaultValue:ParameterDefinition' :: Maybe Text
defaultValue = Maybe Text
a} :: ParameterDefinition)
parameterDefinition_allowedPattern :: Lens.Lens' ParameterDefinition (Prelude.Maybe Prelude.Text)
parameterDefinition_allowedPattern :: (Maybe Text -> f (Maybe Text))
-> ParameterDefinition -> f ParameterDefinition
parameterDefinition_allowedPattern = (ParameterDefinition -> Maybe Text)
-> (ParameterDefinition -> Maybe Text -> ParameterDefinition)
-> Lens
ParameterDefinition ParameterDefinition (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterDefinition' {Maybe Text
allowedPattern :: Maybe Text
$sel:allowedPattern:ParameterDefinition' :: ParameterDefinition -> Maybe Text
allowedPattern} -> Maybe Text
allowedPattern) (\s :: ParameterDefinition
s@ParameterDefinition' {} Maybe Text
a -> ParameterDefinition
s {$sel:allowedPattern:ParameterDefinition' :: Maybe Text
allowedPattern = Maybe Text
a} :: ParameterDefinition)
parameterDefinition_noEcho :: Lens.Lens' ParameterDefinition (Prelude.Maybe Prelude.Bool)
parameterDefinition_noEcho :: (Maybe Bool -> f (Maybe Bool))
-> ParameterDefinition -> f ParameterDefinition
parameterDefinition_noEcho = (ParameterDefinition -> Maybe Bool)
-> (ParameterDefinition -> Maybe Bool -> ParameterDefinition)
-> Lens
ParameterDefinition ParameterDefinition (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterDefinition' {Maybe Bool
noEcho :: Maybe Bool
$sel:noEcho:ParameterDefinition' :: ParameterDefinition -> Maybe Bool
noEcho} -> Maybe Bool
noEcho) (\s :: ParameterDefinition
s@ParameterDefinition' {} Maybe Bool
a -> ParameterDefinition
s {$sel:noEcho:ParameterDefinition' :: Maybe Bool
noEcho = Maybe Bool
a} :: ParameterDefinition)
parameterDefinition_type :: Lens.Lens' ParameterDefinition (Prelude.Maybe Prelude.Text)
parameterDefinition_type :: (Maybe Text -> f (Maybe Text))
-> ParameterDefinition -> f ParameterDefinition
parameterDefinition_type = (ParameterDefinition -> Maybe Text)
-> (ParameterDefinition -> Maybe Text -> ParameterDefinition)
-> Lens
ParameterDefinition ParameterDefinition (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterDefinition' {Maybe Text
type' :: Maybe Text
$sel:type':ParameterDefinition' :: ParameterDefinition -> Maybe Text
type'} -> Maybe Text
type') (\s :: ParameterDefinition
s@ParameterDefinition' {} Maybe Text
a -> ParameterDefinition
s {$sel:type':ParameterDefinition' :: Maybe Text
type' = Maybe Text
a} :: ParameterDefinition)
parameterDefinition_allowedValues :: Lens.Lens' ParameterDefinition (Prelude.Maybe [Prelude.Text])
parameterDefinition_allowedValues :: (Maybe [Text] -> f (Maybe [Text]))
-> ParameterDefinition -> f ParameterDefinition
parameterDefinition_allowedValues = (ParameterDefinition -> Maybe [Text])
-> (ParameterDefinition -> Maybe [Text] -> ParameterDefinition)
-> Lens
ParameterDefinition
ParameterDefinition
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterDefinition' {Maybe [Text]
allowedValues :: Maybe [Text]
$sel:allowedValues:ParameterDefinition' :: ParameterDefinition -> Maybe [Text]
allowedValues} -> Maybe [Text]
allowedValues) (\s :: ParameterDefinition
s@ParameterDefinition' {} Maybe [Text]
a -> ParameterDefinition
s {$sel:allowedValues:ParameterDefinition' :: Maybe [Text]
allowedValues = Maybe [Text]
a} :: ParameterDefinition) ((Maybe [Text] -> f (Maybe [Text]))
-> ParameterDefinition -> f ParameterDefinition)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ParameterDefinition
-> f ParameterDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
parameterDefinition_description :: Lens.Lens' ParameterDefinition (Prelude.Maybe Prelude.Text)
parameterDefinition_description :: (Maybe Text -> f (Maybe Text))
-> ParameterDefinition -> f ParameterDefinition
parameterDefinition_description = (ParameterDefinition -> Maybe Text)
-> (ParameterDefinition -> Maybe Text -> ParameterDefinition)
-> Lens
ParameterDefinition ParameterDefinition (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterDefinition' {Maybe Text
description :: Maybe Text
$sel:description:ParameterDefinition' :: ParameterDefinition -> Maybe Text
description} -> Maybe Text
description) (\s :: ParameterDefinition
s@ParameterDefinition' {} Maybe Text
a -> ParameterDefinition
s {$sel:description:ParameterDefinition' :: Maybe Text
description = Maybe Text
a} :: ParameterDefinition)
parameterDefinition_minValue :: Lens.Lens' ParameterDefinition (Prelude.Maybe Prelude.Int)
parameterDefinition_minValue :: (Maybe Int -> f (Maybe Int))
-> ParameterDefinition -> f ParameterDefinition
parameterDefinition_minValue = (ParameterDefinition -> Maybe Int)
-> (ParameterDefinition -> Maybe Int -> ParameterDefinition)
-> Lens
ParameterDefinition ParameterDefinition (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterDefinition' {Maybe Int
minValue :: Maybe Int
$sel:minValue:ParameterDefinition' :: ParameterDefinition -> Maybe Int
minValue} -> Maybe Int
minValue) (\s :: ParameterDefinition
s@ParameterDefinition' {} Maybe Int
a -> ParameterDefinition
s {$sel:minValue:ParameterDefinition' :: Maybe Int
minValue = Maybe Int
a} :: ParameterDefinition)
parameterDefinition_referencedByResources :: Lens.Lens' ParameterDefinition [Prelude.Text]
parameterDefinition_referencedByResources :: ([Text] -> f [Text])
-> ParameterDefinition -> f ParameterDefinition
parameterDefinition_referencedByResources = (ParameterDefinition -> [Text])
-> (ParameterDefinition -> [Text] -> ParameterDefinition)
-> Lens ParameterDefinition ParameterDefinition [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterDefinition' {[Text]
referencedByResources :: [Text]
$sel:referencedByResources:ParameterDefinition' :: ParameterDefinition -> [Text]
referencedByResources} -> [Text]
referencedByResources) (\s :: ParameterDefinition
s@ParameterDefinition' {} [Text]
a -> ParameterDefinition
s {$sel:referencedByResources:ParameterDefinition' :: [Text]
referencedByResources = [Text]
a} :: ParameterDefinition) (([Text] -> f [Text])
-> ParameterDefinition -> f ParameterDefinition)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> ParameterDefinition
-> f ParameterDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
parameterDefinition_name :: Lens.Lens' ParameterDefinition Prelude.Text
parameterDefinition_name :: (Text -> f Text) -> ParameterDefinition -> f ParameterDefinition
parameterDefinition_name = (ParameterDefinition -> Text)
-> (ParameterDefinition -> Text -> ParameterDefinition)
-> Lens ParameterDefinition ParameterDefinition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterDefinition' {Text
name :: Text
$sel:name:ParameterDefinition' :: ParameterDefinition -> Text
name} -> Text
name) (\s :: ParameterDefinition
s@ParameterDefinition' {} Text
a -> ParameterDefinition
s {$sel:name:ParameterDefinition' :: Text
name = Text
a} :: ParameterDefinition)
instance Core.FromJSON ParameterDefinition where
parseJSON :: Value -> Parser ParameterDefinition
parseJSON =
String
-> (Object -> Parser ParameterDefinition)
-> Value
-> Parser ParameterDefinition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ParameterDefinition"
( \Object
x ->
Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Int
-> [Text]
-> Text
-> ParameterDefinition
ParameterDefinition'
(Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Int
-> [Text]
-> Text
-> ParameterDefinition)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Int
-> [Text]
-> Text
-> ParameterDefinition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"maxValue")
Parser
(Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Int
-> [Text]
-> Text
-> ParameterDefinition)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Int
-> [Text]
-> Text
-> ParameterDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"maxLength")
Parser
(Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Int
-> [Text]
-> Text
-> ParameterDefinition)
-> Parser (Maybe Text)
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Int
-> [Text]
-> Text
-> ParameterDefinition)
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
"constraintDescription")
Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Int
-> [Text]
-> Text
-> ParameterDefinition)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Int
-> [Text]
-> Text
-> ParameterDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"minLength")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Int
-> [Text]
-> Text
-> ParameterDefinition)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Int
-> [Text]
-> Text
-> ParameterDefinition)
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 Text
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Int
-> [Text]
-> Text
-> ParameterDefinition)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Int
-> [Text]
-> Text
-> ParameterDefinition)
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
"allowedPattern")
Parser
(Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Int
-> [Text]
-> Text
-> ParameterDefinition)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Int
-> [Text]
-> Text
-> ParameterDefinition)
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
"noEcho")
Parser
(Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Int
-> [Text]
-> Text
-> ParameterDefinition)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Int
-> [Text]
-> Text
-> ParameterDefinition)
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
"type")
Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Int
-> [Text]
-> Text
-> ParameterDefinition)
-> Parser (Maybe [Text])
-> Parser
(Maybe Text -> Maybe Int -> [Text] -> Text -> ParameterDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"allowedValues" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Text -> Maybe Int -> [Text] -> Text -> ParameterDefinition)
-> Parser (Maybe Text)
-> Parser (Maybe Int -> [Text] -> Text -> ParameterDefinition)
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 (Maybe Int -> [Text] -> Text -> ParameterDefinition)
-> Parser (Maybe Int)
-> Parser ([Text] -> Text -> ParameterDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"minValue")
Parser ([Text] -> Text -> ParameterDefinition)
-> Parser [Text] -> Parser (Text -> ParameterDefinition)
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
"referencedByResources"
Parser (Maybe [Text]) -> [Text] -> Parser [Text]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [Text]
forall a. Monoid a => a
Prelude.mempty
)
Parser (Text -> ParameterDefinition)
-> Parser Text -> Parser ParameterDefinition
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")
)
instance Prelude.Hashable ParameterDefinition
instance Prelude.NFData ParameterDefinition