{-# 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.TrialSource 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 TrialSource = TrialSource'
{
TrialSource -> Maybe Text
sourceType :: Prelude.Maybe Prelude.Text,
TrialSource -> Text
sourceArn :: Prelude.Text
}
deriving (TrialSource -> TrialSource -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TrialSource -> TrialSource -> Bool
$c/= :: TrialSource -> TrialSource -> Bool
== :: TrialSource -> TrialSource -> Bool
$c== :: TrialSource -> TrialSource -> Bool
Prelude.Eq, ReadPrec [TrialSource]
ReadPrec TrialSource
Int -> ReadS TrialSource
ReadS [TrialSource]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TrialSource]
$creadListPrec :: ReadPrec [TrialSource]
readPrec :: ReadPrec TrialSource
$creadPrec :: ReadPrec TrialSource
readList :: ReadS [TrialSource]
$creadList :: ReadS [TrialSource]
readsPrec :: Int -> ReadS TrialSource
$creadsPrec :: Int -> ReadS TrialSource
Prelude.Read, Int -> TrialSource -> ShowS
[TrialSource] -> ShowS
TrialSource -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TrialSource] -> ShowS
$cshowList :: [TrialSource] -> ShowS
show :: TrialSource -> String
$cshow :: TrialSource -> String
showsPrec :: Int -> TrialSource -> ShowS
$cshowsPrec :: Int -> TrialSource -> ShowS
Prelude.Show, forall x. Rep TrialSource x -> TrialSource
forall x. TrialSource -> Rep TrialSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TrialSource x -> TrialSource
$cfrom :: forall x. TrialSource -> Rep TrialSource x
Prelude.Generic)
newTrialSource ::
Prelude.Text ->
TrialSource
newTrialSource :: Text -> TrialSource
newTrialSource Text
pSourceArn_ =
TrialSource'
{ $sel:sourceType:TrialSource' :: Maybe Text
sourceType = forall a. Maybe a
Prelude.Nothing,
$sel:sourceArn:TrialSource' :: Text
sourceArn = Text
pSourceArn_
}
trialSource_sourceType :: Lens.Lens' TrialSource (Prelude.Maybe Prelude.Text)
trialSource_sourceType :: Lens' TrialSource (Maybe Text)
trialSource_sourceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialSource' {Maybe Text
sourceType :: Maybe Text
$sel:sourceType:TrialSource' :: TrialSource -> Maybe Text
sourceType} -> Maybe Text
sourceType) (\s :: TrialSource
s@TrialSource' {} Maybe Text
a -> TrialSource
s {$sel:sourceType:TrialSource' :: Maybe Text
sourceType = Maybe Text
a} :: TrialSource)
trialSource_sourceArn :: Lens.Lens' TrialSource Prelude.Text
trialSource_sourceArn :: Lens' TrialSource Text
trialSource_sourceArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialSource' {Text
sourceArn :: Text
$sel:sourceArn:TrialSource' :: TrialSource -> Text
sourceArn} -> Text
sourceArn) (\s :: TrialSource
s@TrialSource' {} Text
a -> TrialSource
s {$sel:sourceArn:TrialSource' :: Text
sourceArn = Text
a} :: TrialSource)
instance Data.FromJSON TrialSource where
parseJSON :: Value -> Parser TrialSource
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TrialSource"
( \Object
x ->
Maybe Text -> Text -> TrialSource
TrialSource'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SourceType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"SourceArn")
)
instance Prelude.Hashable TrialSource where
hashWithSalt :: Int -> TrialSource -> Int
hashWithSalt Int
_salt TrialSource' {Maybe Text
Text
sourceArn :: Text
sourceType :: Maybe Text
$sel:sourceArn:TrialSource' :: TrialSource -> Text
$sel:sourceType:TrialSource' :: TrialSource -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
sourceArn
instance Prelude.NFData TrialSource where
rnf :: TrialSource -> ()
rnf TrialSource' {Maybe Text
Text
sourceArn :: Text
sourceType :: Maybe Text
$sel:sourceArn:TrialSource' :: TrialSource -> Text
$sel:sourceType:TrialSource' :: TrialSource -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
sourceArn