{-# 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.S3MachineLearningModelResourceData 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 S3MachineLearningModelResourceData = S3MachineLearningModelResourceData'
{ S3MachineLearningModelResourceData
-> Maybe ResourceDownloadOwnerSetting
ownerSetting :: Prelude.Maybe ResourceDownloadOwnerSetting,
S3MachineLearningModelResourceData -> Maybe Text
destinationPath :: Prelude.Maybe Prelude.Text,
S3MachineLearningModelResourceData -> Maybe Text
s3Uri :: Prelude.Maybe Prelude.Text
}
deriving (S3MachineLearningModelResourceData
-> S3MachineLearningModelResourceData -> Bool
(S3MachineLearningModelResourceData
-> S3MachineLearningModelResourceData -> Bool)
-> (S3MachineLearningModelResourceData
-> S3MachineLearningModelResourceData -> Bool)
-> Eq S3MachineLearningModelResourceData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: S3MachineLearningModelResourceData
-> S3MachineLearningModelResourceData -> Bool
$c/= :: S3MachineLearningModelResourceData
-> S3MachineLearningModelResourceData -> Bool
== :: S3MachineLearningModelResourceData
-> S3MachineLearningModelResourceData -> Bool
$c== :: S3MachineLearningModelResourceData
-> S3MachineLearningModelResourceData -> Bool
Prelude.Eq, ReadPrec [S3MachineLearningModelResourceData]
ReadPrec S3MachineLearningModelResourceData
Int -> ReadS S3MachineLearningModelResourceData
ReadS [S3MachineLearningModelResourceData]
(Int -> ReadS S3MachineLearningModelResourceData)
-> ReadS [S3MachineLearningModelResourceData]
-> ReadPrec S3MachineLearningModelResourceData
-> ReadPrec [S3MachineLearningModelResourceData]
-> Read S3MachineLearningModelResourceData
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [S3MachineLearningModelResourceData]
$creadListPrec :: ReadPrec [S3MachineLearningModelResourceData]
readPrec :: ReadPrec S3MachineLearningModelResourceData
$creadPrec :: ReadPrec S3MachineLearningModelResourceData
readList :: ReadS [S3MachineLearningModelResourceData]
$creadList :: ReadS [S3MachineLearningModelResourceData]
readsPrec :: Int -> ReadS S3MachineLearningModelResourceData
$creadsPrec :: Int -> ReadS S3MachineLearningModelResourceData
Prelude.Read, Int -> S3MachineLearningModelResourceData -> ShowS
[S3MachineLearningModelResourceData] -> ShowS
S3MachineLearningModelResourceData -> String
(Int -> S3MachineLearningModelResourceData -> ShowS)
-> (S3MachineLearningModelResourceData -> String)
-> ([S3MachineLearningModelResourceData] -> ShowS)
-> Show S3MachineLearningModelResourceData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [S3MachineLearningModelResourceData] -> ShowS
$cshowList :: [S3MachineLearningModelResourceData] -> ShowS
show :: S3MachineLearningModelResourceData -> String
$cshow :: S3MachineLearningModelResourceData -> String
showsPrec :: Int -> S3MachineLearningModelResourceData -> ShowS
$cshowsPrec :: Int -> S3MachineLearningModelResourceData -> ShowS
Prelude.Show, (forall x.
S3MachineLearningModelResourceData
-> Rep S3MachineLearningModelResourceData x)
-> (forall x.
Rep S3MachineLearningModelResourceData x
-> S3MachineLearningModelResourceData)
-> Generic S3MachineLearningModelResourceData
forall x.
Rep S3MachineLearningModelResourceData x
-> S3MachineLearningModelResourceData
forall x.
S3MachineLearningModelResourceData
-> Rep S3MachineLearningModelResourceData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep S3MachineLearningModelResourceData x
-> S3MachineLearningModelResourceData
$cfrom :: forall x.
S3MachineLearningModelResourceData
-> Rep S3MachineLearningModelResourceData x
Prelude.Generic)
newS3MachineLearningModelResourceData ::
S3MachineLearningModelResourceData
newS3MachineLearningModelResourceData :: S3MachineLearningModelResourceData
newS3MachineLearningModelResourceData =
S3MachineLearningModelResourceData' :: Maybe ResourceDownloadOwnerSetting
-> Maybe Text -> Maybe Text -> S3MachineLearningModelResourceData
S3MachineLearningModelResourceData'
{ $sel:ownerSetting:S3MachineLearningModelResourceData' :: Maybe ResourceDownloadOwnerSetting
ownerSetting =
Maybe ResourceDownloadOwnerSetting
forall a. Maybe a
Prelude.Nothing,
$sel:destinationPath:S3MachineLearningModelResourceData' :: Maybe Text
destinationPath = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:s3Uri:S3MachineLearningModelResourceData' :: Maybe Text
s3Uri = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
s3MachineLearningModelResourceData_ownerSetting :: Lens.Lens' S3MachineLearningModelResourceData (Prelude.Maybe ResourceDownloadOwnerSetting)
s3MachineLearningModelResourceData_ownerSetting :: (Maybe ResourceDownloadOwnerSetting
-> f (Maybe ResourceDownloadOwnerSetting))
-> S3MachineLearningModelResourceData
-> f S3MachineLearningModelResourceData
s3MachineLearningModelResourceData_ownerSetting = (S3MachineLearningModelResourceData
-> Maybe ResourceDownloadOwnerSetting)
-> (S3MachineLearningModelResourceData
-> Maybe ResourceDownloadOwnerSetting
-> S3MachineLearningModelResourceData)
-> Lens
S3MachineLearningModelResourceData
S3MachineLearningModelResourceData
(Maybe ResourceDownloadOwnerSetting)
(Maybe ResourceDownloadOwnerSetting)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3MachineLearningModelResourceData' {Maybe ResourceDownloadOwnerSetting
ownerSetting :: Maybe ResourceDownloadOwnerSetting
$sel:ownerSetting:S3MachineLearningModelResourceData' :: S3MachineLearningModelResourceData
-> Maybe ResourceDownloadOwnerSetting
ownerSetting} -> Maybe ResourceDownloadOwnerSetting
ownerSetting) (\s :: S3MachineLearningModelResourceData
s@S3MachineLearningModelResourceData' {} Maybe ResourceDownloadOwnerSetting
a -> S3MachineLearningModelResourceData
s {$sel:ownerSetting:S3MachineLearningModelResourceData' :: Maybe ResourceDownloadOwnerSetting
ownerSetting = Maybe ResourceDownloadOwnerSetting
a} :: S3MachineLearningModelResourceData)
s3MachineLearningModelResourceData_destinationPath :: Lens.Lens' S3MachineLearningModelResourceData (Prelude.Maybe Prelude.Text)
s3MachineLearningModelResourceData_destinationPath :: (Maybe Text -> f (Maybe Text))
-> S3MachineLearningModelResourceData
-> f S3MachineLearningModelResourceData
s3MachineLearningModelResourceData_destinationPath = (S3MachineLearningModelResourceData -> Maybe Text)
-> (S3MachineLearningModelResourceData
-> Maybe Text -> S3MachineLearningModelResourceData)
-> Lens
S3MachineLearningModelResourceData
S3MachineLearningModelResourceData
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3MachineLearningModelResourceData' {Maybe Text
destinationPath :: Maybe Text
$sel:destinationPath:S3MachineLearningModelResourceData' :: S3MachineLearningModelResourceData -> Maybe Text
destinationPath} -> Maybe Text
destinationPath) (\s :: S3MachineLearningModelResourceData
s@S3MachineLearningModelResourceData' {} Maybe Text
a -> S3MachineLearningModelResourceData
s {$sel:destinationPath:S3MachineLearningModelResourceData' :: Maybe Text
destinationPath = Maybe Text
a} :: S3MachineLearningModelResourceData)
s3MachineLearningModelResourceData_s3Uri :: Lens.Lens' S3MachineLearningModelResourceData (Prelude.Maybe Prelude.Text)
s3MachineLearningModelResourceData_s3Uri :: (Maybe Text -> f (Maybe Text))
-> S3MachineLearningModelResourceData
-> f S3MachineLearningModelResourceData
s3MachineLearningModelResourceData_s3Uri = (S3MachineLearningModelResourceData -> Maybe Text)
-> (S3MachineLearningModelResourceData
-> Maybe Text -> S3MachineLearningModelResourceData)
-> Lens
S3MachineLearningModelResourceData
S3MachineLearningModelResourceData
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3MachineLearningModelResourceData' {Maybe Text
s3Uri :: Maybe Text
$sel:s3Uri:S3MachineLearningModelResourceData' :: S3MachineLearningModelResourceData -> Maybe Text
s3Uri} -> Maybe Text
s3Uri) (\s :: S3MachineLearningModelResourceData
s@S3MachineLearningModelResourceData' {} Maybe Text
a -> S3MachineLearningModelResourceData
s {$sel:s3Uri:S3MachineLearningModelResourceData' :: Maybe Text
s3Uri = Maybe Text
a} :: S3MachineLearningModelResourceData)
instance
Core.FromJSON
S3MachineLearningModelResourceData
where
parseJSON :: Value -> Parser S3MachineLearningModelResourceData
parseJSON =
String
-> (Object -> Parser S3MachineLearningModelResourceData)
-> Value
-> Parser S3MachineLearningModelResourceData
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"S3MachineLearningModelResourceData"
( \Object
x ->
Maybe ResourceDownloadOwnerSetting
-> Maybe Text -> Maybe Text -> S3MachineLearningModelResourceData
S3MachineLearningModelResourceData'
(Maybe ResourceDownloadOwnerSetting
-> Maybe Text -> Maybe Text -> S3MachineLearningModelResourceData)
-> Parser (Maybe ResourceDownloadOwnerSetting)
-> Parser
(Maybe Text -> Maybe Text -> S3MachineLearningModelResourceData)
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 -> S3MachineLearningModelResourceData)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> S3MachineLearningModelResourceData)
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")
Parser (Maybe Text -> S3MachineLearningModelResourceData)
-> Parser (Maybe Text) -> Parser S3MachineLearningModelResourceData
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
"S3Uri")
)
instance
Prelude.Hashable
S3MachineLearningModelResourceData
instance
Prelude.NFData
S3MachineLearningModelResourceData
instance
Core.ToJSON
S3MachineLearningModelResourceData
where
toJSON :: S3MachineLearningModelResourceData -> Value
toJSON S3MachineLearningModelResourceData' {Maybe Text
Maybe ResourceDownloadOwnerSetting
s3Uri :: Maybe Text
destinationPath :: Maybe Text
ownerSetting :: Maybe ResourceDownloadOwnerSetting
$sel:s3Uri:S3MachineLearningModelResourceData' :: S3MachineLearningModelResourceData -> Maybe Text
$sel:destinationPath:S3MachineLearningModelResourceData' :: S3MachineLearningModelResourceData -> Maybe Text
$sel:ownerSetting:S3MachineLearningModelResourceData' :: S3MachineLearningModelResourceData
-> 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
"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,
(Text
"S3Uri" 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
s3Uri
]
)