{-# 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.VariantProperty where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.VariantPropertyType
data VariantProperty = VariantProperty'
{
VariantProperty -> VariantPropertyType
variantPropertyType :: VariantPropertyType
}
deriving (VariantProperty -> VariantProperty -> Bool
(VariantProperty -> VariantProperty -> Bool)
-> (VariantProperty -> VariantProperty -> Bool)
-> Eq VariantProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VariantProperty -> VariantProperty -> Bool
$c/= :: VariantProperty -> VariantProperty -> Bool
== :: VariantProperty -> VariantProperty -> Bool
$c== :: VariantProperty -> VariantProperty -> Bool
Prelude.Eq, ReadPrec [VariantProperty]
ReadPrec VariantProperty
Int -> ReadS VariantProperty
ReadS [VariantProperty]
(Int -> ReadS VariantProperty)
-> ReadS [VariantProperty]
-> ReadPrec VariantProperty
-> ReadPrec [VariantProperty]
-> Read VariantProperty
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VariantProperty]
$creadListPrec :: ReadPrec [VariantProperty]
readPrec :: ReadPrec VariantProperty
$creadPrec :: ReadPrec VariantProperty
readList :: ReadS [VariantProperty]
$creadList :: ReadS [VariantProperty]
readsPrec :: Int -> ReadS VariantProperty
$creadsPrec :: Int -> ReadS VariantProperty
Prelude.Read, Int -> VariantProperty -> ShowS
[VariantProperty] -> ShowS
VariantProperty -> String
(Int -> VariantProperty -> ShowS)
-> (VariantProperty -> String)
-> ([VariantProperty] -> ShowS)
-> Show VariantProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VariantProperty] -> ShowS
$cshowList :: [VariantProperty] -> ShowS
show :: VariantProperty -> String
$cshow :: VariantProperty -> String
showsPrec :: Int -> VariantProperty -> ShowS
$cshowsPrec :: Int -> VariantProperty -> ShowS
Prelude.Show, (forall x. VariantProperty -> Rep VariantProperty x)
-> (forall x. Rep VariantProperty x -> VariantProperty)
-> Generic VariantProperty
forall x. Rep VariantProperty x -> VariantProperty
forall x. VariantProperty -> Rep VariantProperty x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VariantProperty x -> VariantProperty
$cfrom :: forall x. VariantProperty -> Rep VariantProperty x
Prelude.Generic)
newVariantProperty ::
VariantPropertyType ->
VariantProperty
newVariantProperty :: VariantPropertyType -> VariantProperty
newVariantProperty VariantPropertyType
pVariantPropertyType_ =
VariantProperty' :: VariantPropertyType -> VariantProperty
VariantProperty'
{ $sel:variantPropertyType:VariantProperty' :: VariantPropertyType
variantPropertyType =
VariantPropertyType
pVariantPropertyType_
}
variantProperty_variantPropertyType :: Lens.Lens' VariantProperty VariantPropertyType
variantProperty_variantPropertyType :: (VariantPropertyType -> f VariantPropertyType)
-> VariantProperty -> f VariantProperty
variantProperty_variantPropertyType = (VariantProperty -> VariantPropertyType)
-> (VariantProperty -> VariantPropertyType -> VariantProperty)
-> Lens
VariantProperty
VariantProperty
VariantPropertyType
VariantPropertyType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VariantProperty' {VariantPropertyType
variantPropertyType :: VariantPropertyType
$sel:variantPropertyType:VariantProperty' :: VariantProperty -> VariantPropertyType
variantPropertyType} -> VariantPropertyType
variantPropertyType) (\s :: VariantProperty
s@VariantProperty' {} VariantPropertyType
a -> VariantProperty
s {$sel:variantPropertyType:VariantProperty' :: VariantPropertyType
variantPropertyType = VariantPropertyType
a} :: VariantProperty)
instance Prelude.Hashable VariantProperty
instance Prelude.NFData VariantProperty
instance Core.ToJSON VariantProperty where
toJSON :: VariantProperty -> Value
toJSON VariantProperty' {VariantPropertyType
variantPropertyType :: VariantPropertyType
$sel:variantPropertyType:VariantProperty' :: VariantProperty -> VariantPropertyType
..} =
[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
"VariantPropertyType" Text -> VariantPropertyType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= VariantPropertyType
variantPropertyType)
]
)