{-# 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.SageMaker.Types.IntegerParameterRangeSpecification where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data IntegerParameterRangeSpecification = IntegerParameterRangeSpecification'
{
IntegerParameterRangeSpecification -> Text
minValue :: Prelude.Text,
IntegerParameterRangeSpecification -> Text
maxValue :: Prelude.Text
}
deriving (IntegerParameterRangeSpecification
-> IntegerParameterRangeSpecification -> Bool
(IntegerParameterRangeSpecification
-> IntegerParameterRangeSpecification -> Bool)
-> (IntegerParameterRangeSpecification
-> IntegerParameterRangeSpecification -> Bool)
-> Eq IntegerParameterRangeSpecification
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IntegerParameterRangeSpecification
-> IntegerParameterRangeSpecification -> Bool
$c/= :: IntegerParameterRangeSpecification
-> IntegerParameterRangeSpecification -> Bool
== :: IntegerParameterRangeSpecification
-> IntegerParameterRangeSpecification -> Bool
$c== :: IntegerParameterRangeSpecification
-> IntegerParameterRangeSpecification -> Bool
Prelude.Eq, ReadPrec [IntegerParameterRangeSpecification]
ReadPrec IntegerParameterRangeSpecification
Int -> ReadS IntegerParameterRangeSpecification
ReadS [IntegerParameterRangeSpecification]
(Int -> ReadS IntegerParameterRangeSpecification)
-> ReadS [IntegerParameterRangeSpecification]
-> ReadPrec IntegerParameterRangeSpecification
-> ReadPrec [IntegerParameterRangeSpecification]
-> Read IntegerParameterRangeSpecification
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IntegerParameterRangeSpecification]
$creadListPrec :: ReadPrec [IntegerParameterRangeSpecification]
readPrec :: ReadPrec IntegerParameterRangeSpecification
$creadPrec :: ReadPrec IntegerParameterRangeSpecification
readList :: ReadS [IntegerParameterRangeSpecification]
$creadList :: ReadS [IntegerParameterRangeSpecification]
readsPrec :: Int -> ReadS IntegerParameterRangeSpecification
$creadsPrec :: Int -> ReadS IntegerParameterRangeSpecification
Prelude.Read, Int -> IntegerParameterRangeSpecification -> ShowS
[IntegerParameterRangeSpecification] -> ShowS
IntegerParameterRangeSpecification -> String
(Int -> IntegerParameterRangeSpecification -> ShowS)
-> (IntegerParameterRangeSpecification -> String)
-> ([IntegerParameterRangeSpecification] -> ShowS)
-> Show IntegerParameterRangeSpecification
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IntegerParameterRangeSpecification] -> ShowS
$cshowList :: [IntegerParameterRangeSpecification] -> ShowS
show :: IntegerParameterRangeSpecification -> String
$cshow :: IntegerParameterRangeSpecification -> String
showsPrec :: Int -> IntegerParameterRangeSpecification -> ShowS
$cshowsPrec :: Int -> IntegerParameterRangeSpecification -> ShowS
Prelude.Show, (forall x.
IntegerParameterRangeSpecification
-> Rep IntegerParameterRangeSpecification x)
-> (forall x.
Rep IntegerParameterRangeSpecification x
-> IntegerParameterRangeSpecification)
-> Generic IntegerParameterRangeSpecification
forall x.
Rep IntegerParameterRangeSpecification x
-> IntegerParameterRangeSpecification
forall x.
IntegerParameterRangeSpecification
-> Rep IntegerParameterRangeSpecification x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep IntegerParameterRangeSpecification x
-> IntegerParameterRangeSpecification
$cfrom :: forall x.
IntegerParameterRangeSpecification
-> Rep IntegerParameterRangeSpecification x
Prelude.Generic)
newIntegerParameterRangeSpecification ::
Prelude.Text ->
Prelude.Text ->
IntegerParameterRangeSpecification
newIntegerParameterRangeSpecification :: Text -> Text -> IntegerParameterRangeSpecification
newIntegerParameterRangeSpecification
Text
pMinValue_
Text
pMaxValue_ =
IntegerParameterRangeSpecification' :: Text -> Text -> IntegerParameterRangeSpecification
IntegerParameterRangeSpecification'
{ $sel:minValue:IntegerParameterRangeSpecification' :: Text
minValue =
Text
pMinValue_,
$sel:maxValue:IntegerParameterRangeSpecification' :: Text
maxValue = Text
pMaxValue_
}
integerParameterRangeSpecification_minValue :: Lens.Lens' IntegerParameterRangeSpecification Prelude.Text
integerParameterRangeSpecification_minValue :: (Text -> f Text)
-> IntegerParameterRangeSpecification
-> f IntegerParameterRangeSpecification
integerParameterRangeSpecification_minValue = (IntegerParameterRangeSpecification -> Text)
-> (IntegerParameterRangeSpecification
-> Text -> IntegerParameterRangeSpecification)
-> Lens
IntegerParameterRangeSpecification
IntegerParameterRangeSpecification
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IntegerParameterRangeSpecification' {Text
minValue :: Text
$sel:minValue:IntegerParameterRangeSpecification' :: IntegerParameterRangeSpecification -> Text
minValue} -> Text
minValue) (\s :: IntegerParameterRangeSpecification
s@IntegerParameterRangeSpecification' {} Text
a -> IntegerParameterRangeSpecification
s {$sel:minValue:IntegerParameterRangeSpecification' :: Text
minValue = Text
a} :: IntegerParameterRangeSpecification)
integerParameterRangeSpecification_maxValue :: Lens.Lens' IntegerParameterRangeSpecification Prelude.Text
integerParameterRangeSpecification_maxValue :: (Text -> f Text)
-> IntegerParameterRangeSpecification
-> f IntegerParameterRangeSpecification
integerParameterRangeSpecification_maxValue = (IntegerParameterRangeSpecification -> Text)
-> (IntegerParameterRangeSpecification
-> Text -> IntegerParameterRangeSpecification)
-> Lens
IntegerParameterRangeSpecification
IntegerParameterRangeSpecification
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IntegerParameterRangeSpecification' {Text
maxValue :: Text
$sel:maxValue:IntegerParameterRangeSpecification' :: IntegerParameterRangeSpecification -> Text
maxValue} -> Text
maxValue) (\s :: IntegerParameterRangeSpecification
s@IntegerParameterRangeSpecification' {} Text
a -> IntegerParameterRangeSpecification
s {$sel:maxValue:IntegerParameterRangeSpecification' :: Text
maxValue = Text
a} :: IntegerParameterRangeSpecification)
instance
Core.FromJSON
IntegerParameterRangeSpecification
where
parseJSON :: Value -> Parser IntegerParameterRangeSpecification
parseJSON =
String
-> (Object -> Parser IntegerParameterRangeSpecification)
-> Value
-> Parser IntegerParameterRangeSpecification
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"IntegerParameterRangeSpecification"
( \Object
x ->
Text -> Text -> IntegerParameterRangeSpecification
IntegerParameterRangeSpecification'
(Text -> Text -> IntegerParameterRangeSpecification)
-> Parser Text
-> Parser (Text -> IntegerParameterRangeSpecification)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"MinValue")
Parser (Text -> IntegerParameterRangeSpecification)
-> Parser Text -> Parser IntegerParameterRangeSpecification
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
"MaxValue")
)
instance
Prelude.Hashable
IntegerParameterRangeSpecification
instance
Prelude.NFData
IntegerParameterRangeSpecification
instance
Core.ToJSON
IntegerParameterRangeSpecification
where
toJSON :: IntegerParameterRangeSpecification -> Value
toJSON IntegerParameterRangeSpecification' {Text
maxValue :: Text
minValue :: Text
$sel:maxValue:IntegerParameterRangeSpecification' :: IntegerParameterRangeSpecification -> Text
$sel:minValue:IntegerParameterRangeSpecification' :: IntegerParameterRangeSpecification -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"MinValue" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
minValue),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"MaxValue" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
maxValue)
]
)