{-# 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.Greengrass.Types.SageMakerMachineLearningModelResourceData where
import qualified Amazonka.Core as Core
import Amazonka.Greengrass.Types.ResourceDownloadOwnerSetting
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SageMakerMachineLearningModelResourceData = SageMakerMachineLearningModelResourceData'
{ SageMakerMachineLearningModelResourceData
-> Maybe ResourceDownloadOwnerSetting
ownerSetting :: Prelude.Maybe ResourceDownloadOwnerSetting,
SageMakerMachineLearningModelResourceData -> Maybe Text
sageMakerJobArn :: Prelude.Maybe Prelude.Text,
SageMakerMachineLearningModelResourceData -> Maybe Text
destinationPath :: Prelude.Maybe Prelude.Text
}
deriving (SageMakerMachineLearningModelResourceData
-> SageMakerMachineLearningModelResourceData -> Bool
(SageMakerMachineLearningModelResourceData
-> SageMakerMachineLearningModelResourceData -> Bool)
-> (SageMakerMachineLearningModelResourceData
-> SageMakerMachineLearningModelResourceData -> Bool)
-> Eq SageMakerMachineLearningModelResourceData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SageMakerMachineLearningModelResourceData
-> SageMakerMachineLearningModelResourceData -> Bool
$c/= :: SageMakerMachineLearningModelResourceData
-> SageMakerMachineLearningModelResourceData -> Bool
== :: SageMakerMachineLearningModelResourceData
-> SageMakerMachineLearningModelResourceData -> Bool
$c== :: SageMakerMachineLearningModelResourceData
-> SageMakerMachineLearningModelResourceData -> Bool
Prelude.Eq, ReadPrec [SageMakerMachineLearningModelResourceData]
ReadPrec SageMakerMachineLearningModelResourceData
Int -> ReadS SageMakerMachineLearningModelResourceData
ReadS [SageMakerMachineLearningModelResourceData]
(Int -> ReadS SageMakerMachineLearningModelResourceData)
-> ReadS [SageMakerMachineLearningModelResourceData]
-> ReadPrec SageMakerMachineLearningModelResourceData
-> ReadPrec [SageMakerMachineLearningModelResourceData]
-> Read SageMakerMachineLearningModelResourceData
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SageMakerMachineLearningModelResourceData]
$creadListPrec :: ReadPrec [SageMakerMachineLearningModelResourceData]
readPrec :: ReadPrec SageMakerMachineLearningModelResourceData
$creadPrec :: ReadPrec SageMakerMachineLearningModelResourceData
readList :: ReadS [SageMakerMachineLearningModelResourceData]
$creadList :: ReadS [SageMakerMachineLearningModelResourceData]
readsPrec :: Int -> ReadS SageMakerMachineLearningModelResourceData
$creadsPrec :: Int -> ReadS SageMakerMachineLearningModelResourceData
Prelude.Read, Int -> SageMakerMachineLearningModelResourceData -> ShowS
[SageMakerMachineLearningModelResourceData] -> ShowS
SageMakerMachineLearningModelResourceData -> String
(Int -> SageMakerMachineLearningModelResourceData -> ShowS)
-> (SageMakerMachineLearningModelResourceData -> String)
-> ([SageMakerMachineLearningModelResourceData] -> ShowS)
-> Show SageMakerMachineLearningModelResourceData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SageMakerMachineLearningModelResourceData] -> ShowS
$cshowList :: [SageMakerMachineLearningModelResourceData] -> ShowS
show :: SageMakerMachineLearningModelResourceData -> String
$cshow :: SageMakerMachineLearningModelResourceData -> String
showsPrec :: Int -> SageMakerMachineLearningModelResourceData -> ShowS
$cshowsPrec :: Int -> SageMakerMachineLearningModelResourceData -> ShowS
Prelude.Show, (forall x.
SageMakerMachineLearningModelResourceData
-> Rep SageMakerMachineLearningModelResourceData x)
-> (forall x.
Rep SageMakerMachineLearningModelResourceData x
-> SageMakerMachineLearningModelResourceData)
-> Generic SageMakerMachineLearningModelResourceData
forall x.
Rep SageMakerMachineLearningModelResourceData x
-> SageMakerMachineLearningModelResourceData
forall x.
SageMakerMachineLearningModelResourceData
-> Rep SageMakerMachineLearningModelResourceData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SageMakerMachineLearningModelResourceData x
-> SageMakerMachineLearningModelResourceData
$cfrom :: forall x.
SageMakerMachineLearningModelResourceData
-> Rep SageMakerMachineLearningModelResourceData x
Prelude.Generic)
newSageMakerMachineLearningModelResourceData ::
SageMakerMachineLearningModelResourceData
newSageMakerMachineLearningModelResourceData :: SageMakerMachineLearningModelResourceData
newSageMakerMachineLearningModelResourceData =
SageMakerMachineLearningModelResourceData' :: Maybe ResourceDownloadOwnerSetting
-> Maybe Text
-> Maybe Text
-> SageMakerMachineLearningModelResourceData
SageMakerMachineLearningModelResourceData'
{ $sel:ownerSetting:SageMakerMachineLearningModelResourceData' :: Maybe ResourceDownloadOwnerSetting
ownerSetting =
Maybe ResourceDownloadOwnerSetting
forall a. Maybe a
Prelude.Nothing,
$sel:sageMakerJobArn:SageMakerMachineLearningModelResourceData' :: Maybe Text
sageMakerJobArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:destinationPath:SageMakerMachineLearningModelResourceData' :: Maybe Text
destinationPath =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
sageMakerMachineLearningModelResourceData_ownerSetting :: Lens.Lens' SageMakerMachineLearningModelResourceData (Prelude.Maybe ResourceDownloadOwnerSetting)
sageMakerMachineLearningModelResourceData_ownerSetting :: (Maybe ResourceDownloadOwnerSetting
-> f (Maybe ResourceDownloadOwnerSetting))
-> SageMakerMachineLearningModelResourceData
-> f SageMakerMachineLearningModelResourceData
sageMakerMachineLearningModelResourceData_ownerSetting = (SageMakerMachineLearningModelResourceData
-> Maybe ResourceDownloadOwnerSetting)
-> (SageMakerMachineLearningModelResourceData
-> Maybe ResourceDownloadOwnerSetting
-> SageMakerMachineLearningModelResourceData)
-> Lens
SageMakerMachineLearningModelResourceData
SageMakerMachineLearningModelResourceData
(Maybe ResourceDownloadOwnerSetting)
(Maybe ResourceDownloadOwnerSetting)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SageMakerMachineLearningModelResourceData' {Maybe ResourceDownloadOwnerSetting
ownerSetting :: Maybe ResourceDownloadOwnerSetting
$sel:ownerSetting:SageMakerMachineLearningModelResourceData' :: SageMakerMachineLearningModelResourceData
-> Maybe ResourceDownloadOwnerSetting
ownerSetting} -> Maybe ResourceDownloadOwnerSetting
ownerSetting) (\s :: SageMakerMachineLearningModelResourceData
s@SageMakerMachineLearningModelResourceData' {} Maybe ResourceDownloadOwnerSetting
a -> SageMakerMachineLearningModelResourceData
s {$sel:ownerSetting:SageMakerMachineLearningModelResourceData' :: Maybe ResourceDownloadOwnerSetting
ownerSetting = Maybe ResourceDownloadOwnerSetting
a} :: SageMakerMachineLearningModelResourceData)
sageMakerMachineLearningModelResourceData_sageMakerJobArn :: Lens.Lens' SageMakerMachineLearningModelResourceData (Prelude.Maybe Prelude.Text)
sageMakerMachineLearningModelResourceData_sageMakerJobArn :: (Maybe Text -> f (Maybe Text))
-> SageMakerMachineLearningModelResourceData
-> f SageMakerMachineLearningModelResourceData
sageMakerMachineLearningModelResourceData_sageMakerJobArn = (SageMakerMachineLearningModelResourceData -> Maybe Text)
-> (SageMakerMachineLearningModelResourceData
-> Maybe Text -> SageMakerMachineLearningModelResourceData)
-> Lens
SageMakerMachineLearningModelResourceData
SageMakerMachineLearningModelResourceData
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SageMakerMachineLearningModelResourceData' {Maybe Text
sageMakerJobArn :: Maybe Text
$sel:sageMakerJobArn:SageMakerMachineLearningModelResourceData' :: SageMakerMachineLearningModelResourceData -> Maybe Text
sageMakerJobArn} -> Maybe Text
sageMakerJobArn) (\s :: SageMakerMachineLearningModelResourceData
s@SageMakerMachineLearningModelResourceData' {} Maybe Text
a -> SageMakerMachineLearningModelResourceData
s {$sel:sageMakerJobArn:SageMakerMachineLearningModelResourceData' :: Maybe Text
sageMakerJobArn = Maybe Text
a} :: SageMakerMachineLearningModelResourceData)
sageMakerMachineLearningModelResourceData_destinationPath :: Lens.Lens' SageMakerMachineLearningModelResourceData (Prelude.Maybe Prelude.Text)
sageMakerMachineLearningModelResourceData_destinationPath :: (Maybe Text -> f (Maybe Text))
-> SageMakerMachineLearningModelResourceData
-> f SageMakerMachineLearningModelResourceData
sageMakerMachineLearningModelResourceData_destinationPath = (SageMakerMachineLearningModelResourceData -> Maybe Text)
-> (SageMakerMachineLearningModelResourceData
-> Maybe Text -> SageMakerMachineLearningModelResourceData)
-> Lens
SageMakerMachineLearningModelResourceData
SageMakerMachineLearningModelResourceData
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SageMakerMachineLearningModelResourceData' {Maybe Text
destinationPath :: Maybe Text
$sel:destinationPath:SageMakerMachineLearningModelResourceData' :: SageMakerMachineLearningModelResourceData -> Maybe Text
destinationPath} -> Maybe Text
destinationPath) (\s :: SageMakerMachineLearningModelResourceData
s@SageMakerMachineLearningModelResourceData' {} Maybe Text
a -> SageMakerMachineLearningModelResourceData
s {$sel:destinationPath:SageMakerMachineLearningModelResourceData' :: Maybe Text
destinationPath = Maybe Text
a} :: SageMakerMachineLearningModelResourceData)
instance
Core.FromJSON
SageMakerMachineLearningModelResourceData
where
parseJSON :: Value -> Parser SageMakerMachineLearningModelResourceData
parseJSON =
String
-> (Object -> Parser SageMakerMachineLearningModelResourceData)
-> Value
-> Parser SageMakerMachineLearningModelResourceData
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SageMakerMachineLearningModelResourceData"
( \Object
x ->
Maybe ResourceDownloadOwnerSetting
-> Maybe Text
-> Maybe Text
-> SageMakerMachineLearningModelResourceData
SageMakerMachineLearningModelResourceData'
(Maybe ResourceDownloadOwnerSetting
-> Maybe Text
-> Maybe Text
-> SageMakerMachineLearningModelResourceData)
-> Parser (Maybe ResourceDownloadOwnerSetting)
-> Parser
(Maybe Text
-> Maybe Text -> SageMakerMachineLearningModelResourceData)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ResourceDownloadOwnerSetting)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OwnerSetting")
Parser
(Maybe Text
-> Maybe Text -> SageMakerMachineLearningModelResourceData)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> SageMakerMachineLearningModelResourceData)
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
"SageMakerJobArn")
Parser (Maybe Text -> SageMakerMachineLearningModelResourceData)
-> Parser (Maybe Text)
-> Parser SageMakerMachineLearningModelResourceData
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
"DestinationPath")
)
instance
Prelude.Hashable
SageMakerMachineLearningModelResourceData
instance
Prelude.NFData
SageMakerMachineLearningModelResourceData
instance
Core.ToJSON
SageMakerMachineLearningModelResourceData
where
toJSON :: SageMakerMachineLearningModelResourceData -> Value
toJSON SageMakerMachineLearningModelResourceData' {Maybe Text
Maybe ResourceDownloadOwnerSetting
destinationPath :: Maybe Text
sageMakerJobArn :: Maybe Text
ownerSetting :: Maybe ResourceDownloadOwnerSetting
$sel:destinationPath:SageMakerMachineLearningModelResourceData' :: SageMakerMachineLearningModelResourceData -> Maybe Text
$sel:sageMakerJobArn:SageMakerMachineLearningModelResourceData' :: SageMakerMachineLearningModelResourceData -> Maybe Text
$sel:ownerSetting:SageMakerMachineLearningModelResourceData' :: SageMakerMachineLearningModelResourceData
-> Maybe ResourceDownloadOwnerSetting
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"OwnerSetting" Text -> ResourceDownloadOwnerSetting -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ResourceDownloadOwnerSetting -> Pair)
-> Maybe ResourceDownloadOwnerSetting -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ResourceDownloadOwnerSetting
ownerSetting,
(Text
"SageMakerJobArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sageMakerJobArn,
(Text
"DestinationPath" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
destinationPath
]
)