{-# 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.DebugRuleConfiguration 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
import Amazonka.SageMaker.Types.ProcessingInstanceType
data DebugRuleConfiguration = DebugRuleConfiguration'
{
DebugRuleConfiguration -> Maybe ProcessingInstanceType
instanceType :: Prelude.Maybe ProcessingInstanceType,
DebugRuleConfiguration -> Maybe Text
localPath :: Prelude.Maybe Prelude.Text,
DebugRuleConfiguration -> Maybe (HashMap Text Text)
ruleParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
DebugRuleConfiguration -> Maybe Text
s3OutputPath :: Prelude.Maybe Prelude.Text,
DebugRuleConfiguration -> Maybe Natural
volumeSizeInGB :: Prelude.Maybe Prelude.Natural,
DebugRuleConfiguration -> Text
ruleConfigurationName :: Prelude.Text,
DebugRuleConfiguration -> Text
ruleEvaluatorImage :: Prelude.Text
}
deriving (DebugRuleConfiguration -> DebugRuleConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DebugRuleConfiguration -> DebugRuleConfiguration -> Bool
$c/= :: DebugRuleConfiguration -> DebugRuleConfiguration -> Bool
== :: DebugRuleConfiguration -> DebugRuleConfiguration -> Bool
$c== :: DebugRuleConfiguration -> DebugRuleConfiguration -> Bool
Prelude.Eq, ReadPrec [DebugRuleConfiguration]
ReadPrec DebugRuleConfiguration
Int -> ReadS DebugRuleConfiguration
ReadS [DebugRuleConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DebugRuleConfiguration]
$creadListPrec :: ReadPrec [DebugRuleConfiguration]
readPrec :: ReadPrec DebugRuleConfiguration
$creadPrec :: ReadPrec DebugRuleConfiguration
readList :: ReadS [DebugRuleConfiguration]
$creadList :: ReadS [DebugRuleConfiguration]
readsPrec :: Int -> ReadS DebugRuleConfiguration
$creadsPrec :: Int -> ReadS DebugRuleConfiguration
Prelude.Read, Int -> DebugRuleConfiguration -> ShowS
[DebugRuleConfiguration] -> ShowS
DebugRuleConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DebugRuleConfiguration] -> ShowS
$cshowList :: [DebugRuleConfiguration] -> ShowS
show :: DebugRuleConfiguration -> String
$cshow :: DebugRuleConfiguration -> String
showsPrec :: Int -> DebugRuleConfiguration -> ShowS
$cshowsPrec :: Int -> DebugRuleConfiguration -> ShowS
Prelude.Show, forall x. Rep DebugRuleConfiguration x -> DebugRuleConfiguration
forall x. DebugRuleConfiguration -> Rep DebugRuleConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DebugRuleConfiguration x -> DebugRuleConfiguration
$cfrom :: forall x. DebugRuleConfiguration -> Rep DebugRuleConfiguration x
Prelude.Generic)
newDebugRuleConfiguration ::
Prelude.Text ->
Prelude.Text ->
DebugRuleConfiguration
newDebugRuleConfiguration :: Text -> Text -> DebugRuleConfiguration
newDebugRuleConfiguration
Text
pRuleConfigurationName_
Text
pRuleEvaluatorImage_ =
DebugRuleConfiguration'
{ $sel:instanceType:DebugRuleConfiguration' :: Maybe ProcessingInstanceType
instanceType =
forall a. Maybe a
Prelude.Nothing,
$sel:localPath:DebugRuleConfiguration' :: Maybe Text
localPath = forall a. Maybe a
Prelude.Nothing,
$sel:ruleParameters:DebugRuleConfiguration' :: Maybe (HashMap Text Text)
ruleParameters = forall a. Maybe a
Prelude.Nothing,
$sel:s3OutputPath:DebugRuleConfiguration' :: Maybe Text
s3OutputPath = forall a. Maybe a
Prelude.Nothing,
$sel:volumeSizeInGB:DebugRuleConfiguration' :: Maybe Natural
volumeSizeInGB = forall a. Maybe a
Prelude.Nothing,
$sel:ruleConfigurationName:DebugRuleConfiguration' :: Text
ruleConfigurationName = Text
pRuleConfigurationName_,
$sel:ruleEvaluatorImage:DebugRuleConfiguration' :: Text
ruleEvaluatorImage = Text
pRuleEvaluatorImage_
}
debugRuleConfiguration_instanceType :: Lens.Lens' DebugRuleConfiguration (Prelude.Maybe ProcessingInstanceType)
debugRuleConfiguration_instanceType :: Lens' DebugRuleConfiguration (Maybe ProcessingInstanceType)
debugRuleConfiguration_instanceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DebugRuleConfiguration' {Maybe ProcessingInstanceType
instanceType :: Maybe ProcessingInstanceType
$sel:instanceType:DebugRuleConfiguration' :: DebugRuleConfiguration -> Maybe ProcessingInstanceType
instanceType} -> Maybe ProcessingInstanceType
instanceType) (\s :: DebugRuleConfiguration
s@DebugRuleConfiguration' {} Maybe ProcessingInstanceType
a -> DebugRuleConfiguration
s {$sel:instanceType:DebugRuleConfiguration' :: Maybe ProcessingInstanceType
instanceType = Maybe ProcessingInstanceType
a} :: DebugRuleConfiguration)
debugRuleConfiguration_localPath :: Lens.Lens' DebugRuleConfiguration (Prelude.Maybe Prelude.Text)
debugRuleConfiguration_localPath :: Lens' DebugRuleConfiguration (Maybe Text)
debugRuleConfiguration_localPath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DebugRuleConfiguration' {Maybe Text
localPath :: Maybe Text
$sel:localPath:DebugRuleConfiguration' :: DebugRuleConfiguration -> Maybe Text
localPath} -> Maybe Text
localPath) (\s :: DebugRuleConfiguration
s@DebugRuleConfiguration' {} Maybe Text
a -> DebugRuleConfiguration
s {$sel:localPath:DebugRuleConfiguration' :: Maybe Text
localPath = Maybe Text
a} :: DebugRuleConfiguration)
debugRuleConfiguration_ruleParameters :: Lens.Lens' DebugRuleConfiguration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
debugRuleConfiguration_ruleParameters :: Lens' DebugRuleConfiguration (Maybe (HashMap Text Text))
debugRuleConfiguration_ruleParameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DebugRuleConfiguration' {Maybe (HashMap Text Text)
ruleParameters :: Maybe (HashMap Text Text)
$sel:ruleParameters:DebugRuleConfiguration' :: DebugRuleConfiguration -> Maybe (HashMap Text Text)
ruleParameters} -> Maybe (HashMap Text Text)
ruleParameters) (\s :: DebugRuleConfiguration
s@DebugRuleConfiguration' {} Maybe (HashMap Text Text)
a -> DebugRuleConfiguration
s {$sel:ruleParameters:DebugRuleConfiguration' :: Maybe (HashMap Text Text)
ruleParameters = Maybe (HashMap Text Text)
a} :: DebugRuleConfiguration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
debugRuleConfiguration_s3OutputPath :: Lens.Lens' DebugRuleConfiguration (Prelude.Maybe Prelude.Text)
debugRuleConfiguration_s3OutputPath :: Lens' DebugRuleConfiguration (Maybe Text)
debugRuleConfiguration_s3OutputPath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DebugRuleConfiguration' {Maybe Text
s3OutputPath :: Maybe Text
$sel:s3OutputPath:DebugRuleConfiguration' :: DebugRuleConfiguration -> Maybe Text
s3OutputPath} -> Maybe Text
s3OutputPath) (\s :: DebugRuleConfiguration
s@DebugRuleConfiguration' {} Maybe Text
a -> DebugRuleConfiguration
s {$sel:s3OutputPath:DebugRuleConfiguration' :: Maybe Text
s3OutputPath = Maybe Text
a} :: DebugRuleConfiguration)
debugRuleConfiguration_volumeSizeInGB :: Lens.Lens' DebugRuleConfiguration (Prelude.Maybe Prelude.Natural)
debugRuleConfiguration_volumeSizeInGB :: Lens' DebugRuleConfiguration (Maybe Natural)
debugRuleConfiguration_volumeSizeInGB = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DebugRuleConfiguration' {Maybe Natural
volumeSizeInGB :: Maybe Natural
$sel:volumeSizeInGB:DebugRuleConfiguration' :: DebugRuleConfiguration -> Maybe Natural
volumeSizeInGB} -> Maybe Natural
volumeSizeInGB) (\s :: DebugRuleConfiguration
s@DebugRuleConfiguration' {} Maybe Natural
a -> DebugRuleConfiguration
s {$sel:volumeSizeInGB:DebugRuleConfiguration' :: Maybe Natural
volumeSizeInGB = Maybe Natural
a} :: DebugRuleConfiguration)
debugRuleConfiguration_ruleConfigurationName :: Lens.Lens' DebugRuleConfiguration Prelude.Text
debugRuleConfiguration_ruleConfigurationName :: Lens' DebugRuleConfiguration Text
debugRuleConfiguration_ruleConfigurationName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DebugRuleConfiguration' {Text
ruleConfigurationName :: Text
$sel:ruleConfigurationName:DebugRuleConfiguration' :: DebugRuleConfiguration -> Text
ruleConfigurationName} -> Text
ruleConfigurationName) (\s :: DebugRuleConfiguration
s@DebugRuleConfiguration' {} Text
a -> DebugRuleConfiguration
s {$sel:ruleConfigurationName:DebugRuleConfiguration' :: Text
ruleConfigurationName = Text
a} :: DebugRuleConfiguration)
debugRuleConfiguration_ruleEvaluatorImage :: Lens.Lens' DebugRuleConfiguration Prelude.Text
debugRuleConfiguration_ruleEvaluatorImage :: Lens' DebugRuleConfiguration Text
debugRuleConfiguration_ruleEvaluatorImage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DebugRuleConfiguration' {Text
ruleEvaluatorImage :: Text
$sel:ruleEvaluatorImage:DebugRuleConfiguration' :: DebugRuleConfiguration -> Text
ruleEvaluatorImage} -> Text
ruleEvaluatorImage) (\s :: DebugRuleConfiguration
s@DebugRuleConfiguration' {} Text
a -> DebugRuleConfiguration
s {$sel:ruleEvaluatorImage:DebugRuleConfiguration' :: Text
ruleEvaluatorImage = Text
a} :: DebugRuleConfiguration)
instance Data.FromJSON DebugRuleConfiguration where
parseJSON :: Value -> Parser DebugRuleConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DebugRuleConfiguration"
( \Object
x ->
Maybe ProcessingInstanceType
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Natural
-> Text
-> Text
-> DebugRuleConfiguration
DebugRuleConfiguration'
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
"InstanceType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LocalPath")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RuleParameters" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"S3OutputPath")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"VolumeSizeInGB")
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
"RuleConfigurationName")
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
"RuleEvaluatorImage")
)
instance Prelude.Hashable DebugRuleConfiguration where
hashWithSalt :: Int -> DebugRuleConfiguration -> Int
hashWithSalt Int
_salt DebugRuleConfiguration' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe ProcessingInstanceType
Text
ruleEvaluatorImage :: Text
ruleConfigurationName :: Text
volumeSizeInGB :: Maybe Natural
s3OutputPath :: Maybe Text
ruleParameters :: Maybe (HashMap Text Text)
localPath :: Maybe Text
instanceType :: Maybe ProcessingInstanceType
$sel:ruleEvaluatorImage:DebugRuleConfiguration' :: DebugRuleConfiguration -> Text
$sel:ruleConfigurationName:DebugRuleConfiguration' :: DebugRuleConfiguration -> Text
$sel:volumeSizeInGB:DebugRuleConfiguration' :: DebugRuleConfiguration -> Maybe Natural
$sel:s3OutputPath:DebugRuleConfiguration' :: DebugRuleConfiguration -> Maybe Text
$sel:ruleParameters:DebugRuleConfiguration' :: DebugRuleConfiguration -> Maybe (HashMap Text Text)
$sel:localPath:DebugRuleConfiguration' :: DebugRuleConfiguration -> Maybe Text
$sel:instanceType:DebugRuleConfiguration' :: DebugRuleConfiguration -> Maybe ProcessingInstanceType
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProcessingInstanceType
instanceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
localPath
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
ruleParameters
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
s3OutputPath
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
volumeSizeInGB
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
ruleConfigurationName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
ruleEvaluatorImage
instance Prelude.NFData DebugRuleConfiguration where
rnf :: DebugRuleConfiguration -> ()
rnf DebugRuleConfiguration' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe ProcessingInstanceType
Text
ruleEvaluatorImage :: Text
ruleConfigurationName :: Text
volumeSizeInGB :: Maybe Natural
s3OutputPath :: Maybe Text
ruleParameters :: Maybe (HashMap Text Text)
localPath :: Maybe Text
instanceType :: Maybe ProcessingInstanceType
$sel:ruleEvaluatorImage:DebugRuleConfiguration' :: DebugRuleConfiguration -> Text
$sel:ruleConfigurationName:DebugRuleConfiguration' :: DebugRuleConfiguration -> Text
$sel:volumeSizeInGB:DebugRuleConfiguration' :: DebugRuleConfiguration -> Maybe Natural
$sel:s3OutputPath:DebugRuleConfiguration' :: DebugRuleConfiguration -> Maybe Text
$sel:ruleParameters:DebugRuleConfiguration' :: DebugRuleConfiguration -> Maybe (HashMap Text Text)
$sel:localPath:DebugRuleConfiguration' :: DebugRuleConfiguration -> Maybe Text
$sel:instanceType:DebugRuleConfiguration' :: DebugRuleConfiguration -> Maybe ProcessingInstanceType
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ProcessingInstanceType
instanceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
localPath
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
ruleParameters
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
s3OutputPath
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
volumeSizeInGB
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
ruleConfigurationName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
ruleEvaluatorImage
instance Data.ToJSON DebugRuleConfiguration where
toJSON :: DebugRuleConfiguration -> Value
toJSON DebugRuleConfiguration' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe ProcessingInstanceType
Text
ruleEvaluatorImage :: Text
ruleConfigurationName :: Text
volumeSizeInGB :: Maybe Natural
s3OutputPath :: Maybe Text
ruleParameters :: Maybe (HashMap Text Text)
localPath :: Maybe Text
instanceType :: Maybe ProcessingInstanceType
$sel:ruleEvaluatorImage:DebugRuleConfiguration' :: DebugRuleConfiguration -> Text
$sel:ruleConfigurationName:DebugRuleConfiguration' :: DebugRuleConfiguration -> Text
$sel:volumeSizeInGB:DebugRuleConfiguration' :: DebugRuleConfiguration -> Maybe Natural
$sel:s3OutputPath:DebugRuleConfiguration' :: DebugRuleConfiguration -> Maybe Text
$sel:ruleParameters:DebugRuleConfiguration' :: DebugRuleConfiguration -> Maybe (HashMap Text Text)
$sel:localPath:DebugRuleConfiguration' :: DebugRuleConfiguration -> Maybe Text
$sel:instanceType:DebugRuleConfiguration' :: DebugRuleConfiguration -> Maybe ProcessingInstanceType
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"InstanceType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProcessingInstanceType
instanceType,
(Key
"LocalPath" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
localPath,
(Key
"RuleParameters" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
ruleParameters,
(Key
"S3OutputPath" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
s3OutputPath,
(Key
"VolumeSizeInGB" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
volumeSizeInGB,
forall a. a -> Maybe a
Prelude.Just
( Key
"RuleConfigurationName"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
ruleConfigurationName
),
forall a. a -> Maybe a
Prelude.Just
(Key
"RuleEvaluatorImage" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
ruleEvaluatorImage)
]
)