{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.VariantPropertyType
data VariantProperty = VariantProperty'
{
VariantProperty -> VariantPropertyType
variantPropertyType :: VariantPropertyType
}
deriving (VariantProperty -> VariantProperty -> Bool
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]
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
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. 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'
{ $sel:variantPropertyType:VariantProperty' :: VariantPropertyType
variantPropertyType =
VariantPropertyType
pVariantPropertyType_
}
variantProperty_variantPropertyType :: Lens.Lens' VariantProperty VariantPropertyType
variantProperty_variantPropertyType :: Lens' VariantProperty VariantPropertyType
variantProperty_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 where
hashWithSalt :: Int -> VariantProperty -> Int
hashWithSalt Int
_salt VariantProperty' {VariantPropertyType
variantPropertyType :: VariantPropertyType
$sel:variantPropertyType:VariantProperty' :: VariantProperty -> VariantPropertyType
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` VariantPropertyType
variantPropertyType
instance Prelude.NFData VariantProperty where
rnf :: VariantProperty -> ()
rnf VariantProperty' {VariantPropertyType
variantPropertyType :: VariantPropertyType
$sel:variantPropertyType:VariantProperty' :: VariantProperty -> VariantPropertyType
..} =
forall a. NFData a => a -> ()
Prelude.rnf VariantPropertyType
variantPropertyType
instance Data.ToJSON VariantProperty where
toJSON :: VariantProperty -> Value
toJSON VariantProperty' {VariantPropertyType
variantPropertyType :: VariantPropertyType
$sel:variantPropertyType:VariantProperty' :: VariantProperty -> VariantPropertyType
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"VariantPropertyType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= VariantPropertyType
variantPropertyType)
]
)