{-# 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.Parent where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Parent = Parent'
{
Parent -> Maybe Text
experimentName :: Prelude.Maybe Prelude.Text,
Parent -> Maybe Text
trialName :: Prelude.Maybe Prelude.Text
}
deriving (Parent -> Parent -> Bool
(Parent -> Parent -> Bool)
-> (Parent -> Parent -> Bool) -> Eq Parent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Parent -> Parent -> Bool
$c/= :: Parent -> Parent -> Bool
== :: Parent -> Parent -> Bool
$c== :: Parent -> Parent -> Bool
Prelude.Eq, ReadPrec [Parent]
ReadPrec Parent
Int -> ReadS Parent
ReadS [Parent]
(Int -> ReadS Parent)
-> ReadS [Parent]
-> ReadPrec Parent
-> ReadPrec [Parent]
-> Read Parent
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Parent]
$creadListPrec :: ReadPrec [Parent]
readPrec :: ReadPrec Parent
$creadPrec :: ReadPrec Parent
readList :: ReadS [Parent]
$creadList :: ReadS [Parent]
readsPrec :: Int -> ReadS Parent
$creadsPrec :: Int -> ReadS Parent
Prelude.Read, Int -> Parent -> ShowS
[Parent] -> ShowS
Parent -> String
(Int -> Parent -> ShowS)
-> (Parent -> String) -> ([Parent] -> ShowS) -> Show Parent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Parent] -> ShowS
$cshowList :: [Parent] -> ShowS
show :: Parent -> String
$cshow :: Parent -> String
showsPrec :: Int -> Parent -> ShowS
$cshowsPrec :: Int -> Parent -> ShowS
Prelude.Show, (forall x. Parent -> Rep Parent x)
-> (forall x. Rep Parent x -> Parent) -> Generic Parent
forall x. Rep Parent x -> Parent
forall x. Parent -> Rep Parent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Parent x -> Parent
$cfrom :: forall x. Parent -> Rep Parent x
Prelude.Generic)
newParent ::
Parent
newParent :: Parent
newParent =
Parent' :: Maybe Text -> Maybe Text -> Parent
Parent'
{ $sel:experimentName:Parent' :: Maybe Text
experimentName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:trialName:Parent' :: Maybe Text
trialName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
parent_experimentName :: Lens.Lens' Parent (Prelude.Maybe Prelude.Text)
parent_experimentName :: (Maybe Text -> f (Maybe Text)) -> Parent -> f Parent
parent_experimentName = (Parent -> Maybe Text)
-> (Parent -> Maybe Text -> Parent)
-> Lens Parent Parent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Parent' {Maybe Text
experimentName :: Maybe Text
$sel:experimentName:Parent' :: Parent -> Maybe Text
experimentName} -> Maybe Text
experimentName) (\s :: Parent
s@Parent' {} Maybe Text
a -> Parent
s {$sel:experimentName:Parent' :: Maybe Text
experimentName = Maybe Text
a} :: Parent)
parent_trialName :: Lens.Lens' Parent (Prelude.Maybe Prelude.Text)
parent_trialName :: (Maybe Text -> f (Maybe Text)) -> Parent -> f Parent
parent_trialName = (Parent -> Maybe Text)
-> (Parent -> Maybe Text -> Parent)
-> Lens Parent Parent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Parent' {Maybe Text
trialName :: Maybe Text
$sel:trialName:Parent' :: Parent -> Maybe Text
trialName} -> Maybe Text
trialName) (\s :: Parent
s@Parent' {} Maybe Text
a -> Parent
s {$sel:trialName:Parent' :: Maybe Text
trialName = Maybe Text
a} :: Parent)
instance Core.FromJSON Parent where
parseJSON :: Value -> Parser Parent
parseJSON =
String -> (Object -> Parser Parent) -> Value -> Parser Parent
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Parent"
( \Object
x ->
Maybe Text -> Maybe Text -> Parent
Parent'
(Maybe Text -> Maybe Text -> Parent)
-> Parser (Maybe Text) -> Parser (Maybe Text -> Parent)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ExperimentName")
Parser (Maybe Text -> Parent)
-> Parser (Maybe Text) -> Parser Parent
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TrialName")
)
instance Prelude.Hashable Parent
instance Prelude.NFData Parent