{-# 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.ModelInput 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
data ModelInput = ModelInput'
{
ModelInput -> Text
dataInputConfig :: Prelude.Text
}
deriving (ModelInput -> ModelInput -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModelInput -> ModelInput -> Bool
$c/= :: ModelInput -> ModelInput -> Bool
== :: ModelInput -> ModelInput -> Bool
$c== :: ModelInput -> ModelInput -> Bool
Prelude.Eq, ReadPrec [ModelInput]
ReadPrec ModelInput
Int -> ReadS ModelInput
ReadS [ModelInput]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModelInput]
$creadListPrec :: ReadPrec [ModelInput]
readPrec :: ReadPrec ModelInput
$creadPrec :: ReadPrec ModelInput
readList :: ReadS [ModelInput]
$creadList :: ReadS [ModelInput]
readsPrec :: Int -> ReadS ModelInput
$creadsPrec :: Int -> ReadS ModelInput
Prelude.Read, Int -> ModelInput -> ShowS
[ModelInput] -> ShowS
ModelInput -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModelInput] -> ShowS
$cshowList :: [ModelInput] -> ShowS
show :: ModelInput -> String
$cshow :: ModelInput -> String
showsPrec :: Int -> ModelInput -> ShowS
$cshowsPrec :: Int -> ModelInput -> ShowS
Prelude.Show, forall x. Rep ModelInput x -> ModelInput
forall x. ModelInput -> Rep ModelInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModelInput x -> ModelInput
$cfrom :: forall x. ModelInput -> Rep ModelInput x
Prelude.Generic)
newModelInput ::
Prelude.Text ->
ModelInput
newModelInput :: Text -> ModelInput
newModelInput Text
pDataInputConfig_ =
ModelInput' {$sel:dataInputConfig:ModelInput' :: Text
dataInputConfig = Text
pDataInputConfig_}
modelInput_dataInputConfig :: Lens.Lens' ModelInput Prelude.Text
modelInput_dataInputConfig :: Lens' ModelInput Text
modelInput_dataInputConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelInput' {Text
dataInputConfig :: Text
$sel:dataInputConfig:ModelInput' :: ModelInput -> Text
dataInputConfig} -> Text
dataInputConfig) (\s :: ModelInput
s@ModelInput' {} Text
a -> ModelInput
s {$sel:dataInputConfig:ModelInput' :: Text
dataInputConfig = Text
a} :: ModelInput)
instance Data.FromJSON ModelInput where
parseJSON :: Value -> Parser ModelInput
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ModelInput"
( \Object
x ->
Text -> ModelInput
ModelInput'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"DataInputConfig")
)
instance Prelude.Hashable ModelInput where
hashWithSalt :: Int -> ModelInput -> Int
hashWithSalt Int
_salt ModelInput' {Text
dataInputConfig :: Text
$sel:dataInputConfig:ModelInput' :: ModelInput -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dataInputConfig
instance Prelude.NFData ModelInput where
rnf :: ModelInput -> ()
rnf ModelInput' {Text
dataInputConfig :: Text
$sel:dataInputConfig:ModelInput' :: ModelInput -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
dataInputConfig
instance Data.ToJSON ModelInput where
toJSON :: ModelInput -> Value
toJSON ModelInput' {Text
dataInputConfig :: Text
$sel:dataInputConfig:ModelInput' :: ModelInput -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"DataInputConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
dataInputConfig)
]
)