{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SageMaker.Types.ProfilerRuleConfiguration
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SageMaker.Types.ProfilerRuleConfiguration 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

-- | Configuration information for profiling rules.
--
-- /See:/ 'newProfilerRuleConfiguration' smart constructor.
data ProfilerRuleConfiguration = ProfilerRuleConfiguration'
  { -- | The instance type to deploy a custom rule for profiling a training job.
    ProfilerRuleConfiguration -> Maybe ProcessingInstanceType
instanceType :: Prelude.Maybe ProcessingInstanceType,
    -- | Path to local storage location for output of rules. Defaults to
    -- @\/opt\/ml\/processing\/output\/rule\/@.
    ProfilerRuleConfiguration -> Maybe Text
localPath :: Prelude.Maybe Prelude.Text,
    -- | Runtime configuration for rule container.
    ProfilerRuleConfiguration -> Maybe (HashMap Text Text)
ruleParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Path to Amazon S3 storage location for rules.
    ProfilerRuleConfiguration -> Maybe Text
s3OutputPath :: Prelude.Maybe Prelude.Text,
    -- | The size, in GB, of the ML storage volume attached to the processing
    -- instance.
    ProfilerRuleConfiguration -> Maybe Natural
volumeSizeInGB :: Prelude.Maybe Prelude.Natural,
    -- | The name of the rule configuration. It must be unique relative to other
    -- rule configuration names.
    ProfilerRuleConfiguration -> Text
ruleConfigurationName :: Prelude.Text,
    -- | The Amazon Elastic Container Registry Image for the managed rule
    -- evaluation.
    ProfilerRuleConfiguration -> Text
ruleEvaluatorImage :: Prelude.Text
  }
  deriving (ProfilerRuleConfiguration -> ProfilerRuleConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProfilerRuleConfiguration -> ProfilerRuleConfiguration -> Bool
$c/= :: ProfilerRuleConfiguration -> ProfilerRuleConfiguration -> Bool
== :: ProfilerRuleConfiguration -> ProfilerRuleConfiguration -> Bool
$c== :: ProfilerRuleConfiguration -> ProfilerRuleConfiguration -> Bool
Prelude.Eq, ReadPrec [ProfilerRuleConfiguration]
ReadPrec ProfilerRuleConfiguration
Int -> ReadS ProfilerRuleConfiguration
ReadS [ProfilerRuleConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProfilerRuleConfiguration]
$creadListPrec :: ReadPrec [ProfilerRuleConfiguration]
readPrec :: ReadPrec ProfilerRuleConfiguration
$creadPrec :: ReadPrec ProfilerRuleConfiguration
readList :: ReadS [ProfilerRuleConfiguration]
$creadList :: ReadS [ProfilerRuleConfiguration]
readsPrec :: Int -> ReadS ProfilerRuleConfiguration
$creadsPrec :: Int -> ReadS ProfilerRuleConfiguration
Prelude.Read, Int -> ProfilerRuleConfiguration -> ShowS
[ProfilerRuleConfiguration] -> ShowS
ProfilerRuleConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProfilerRuleConfiguration] -> ShowS
$cshowList :: [ProfilerRuleConfiguration] -> ShowS
show :: ProfilerRuleConfiguration -> String
$cshow :: ProfilerRuleConfiguration -> String
showsPrec :: Int -> ProfilerRuleConfiguration -> ShowS
$cshowsPrec :: Int -> ProfilerRuleConfiguration -> ShowS
Prelude.Show, forall x.
Rep ProfilerRuleConfiguration x -> ProfilerRuleConfiguration
forall x.
ProfilerRuleConfiguration -> Rep ProfilerRuleConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ProfilerRuleConfiguration x -> ProfilerRuleConfiguration
$cfrom :: forall x.
ProfilerRuleConfiguration -> Rep ProfilerRuleConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'ProfilerRuleConfiguration' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'instanceType', 'profilerRuleConfiguration_instanceType' - The instance type to deploy a custom rule for profiling a training job.
--
-- 'localPath', 'profilerRuleConfiguration_localPath' - Path to local storage location for output of rules. Defaults to
-- @\/opt\/ml\/processing\/output\/rule\/@.
--
-- 'ruleParameters', 'profilerRuleConfiguration_ruleParameters' - Runtime configuration for rule container.
--
-- 's3OutputPath', 'profilerRuleConfiguration_s3OutputPath' - Path to Amazon S3 storage location for rules.
--
-- 'volumeSizeInGB', 'profilerRuleConfiguration_volumeSizeInGB' - The size, in GB, of the ML storage volume attached to the processing
-- instance.
--
-- 'ruleConfigurationName', 'profilerRuleConfiguration_ruleConfigurationName' - The name of the rule configuration. It must be unique relative to other
-- rule configuration names.
--
-- 'ruleEvaluatorImage', 'profilerRuleConfiguration_ruleEvaluatorImage' - The Amazon Elastic Container Registry Image for the managed rule
-- evaluation.
newProfilerRuleConfiguration ::
  -- | 'ruleConfigurationName'
  Prelude.Text ->
  -- | 'ruleEvaluatorImage'
  Prelude.Text ->
  ProfilerRuleConfiguration
newProfilerRuleConfiguration :: Text -> Text -> ProfilerRuleConfiguration
newProfilerRuleConfiguration
  Text
pRuleConfigurationName_
  Text
pRuleEvaluatorImage_ =
    ProfilerRuleConfiguration'
      { $sel:instanceType:ProfilerRuleConfiguration' :: Maybe ProcessingInstanceType
instanceType =
          forall a. Maybe a
Prelude.Nothing,
        $sel:localPath:ProfilerRuleConfiguration' :: Maybe Text
localPath = forall a. Maybe a
Prelude.Nothing,
        $sel:ruleParameters:ProfilerRuleConfiguration' :: Maybe (HashMap Text Text)
ruleParameters = forall a. Maybe a
Prelude.Nothing,
        $sel:s3OutputPath:ProfilerRuleConfiguration' :: Maybe Text
s3OutputPath = forall a. Maybe a
Prelude.Nothing,
        $sel:volumeSizeInGB:ProfilerRuleConfiguration' :: Maybe Natural
volumeSizeInGB = forall a. Maybe a
Prelude.Nothing,
        $sel:ruleConfigurationName:ProfilerRuleConfiguration' :: Text
ruleConfigurationName = Text
pRuleConfigurationName_,
        $sel:ruleEvaluatorImage:ProfilerRuleConfiguration' :: Text
ruleEvaluatorImage = Text
pRuleEvaluatorImage_
      }

-- | The instance type to deploy a custom rule for profiling a training job.
profilerRuleConfiguration_instanceType :: Lens.Lens' ProfilerRuleConfiguration (Prelude.Maybe ProcessingInstanceType)
profilerRuleConfiguration_instanceType :: Lens' ProfilerRuleConfiguration (Maybe ProcessingInstanceType)
profilerRuleConfiguration_instanceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilerRuleConfiguration' {Maybe ProcessingInstanceType
instanceType :: Maybe ProcessingInstanceType
$sel:instanceType:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> Maybe ProcessingInstanceType
instanceType} -> Maybe ProcessingInstanceType
instanceType) (\s :: ProfilerRuleConfiguration
s@ProfilerRuleConfiguration' {} Maybe ProcessingInstanceType
a -> ProfilerRuleConfiguration
s {$sel:instanceType:ProfilerRuleConfiguration' :: Maybe ProcessingInstanceType
instanceType = Maybe ProcessingInstanceType
a} :: ProfilerRuleConfiguration)

-- | Path to local storage location for output of rules. Defaults to
-- @\/opt\/ml\/processing\/output\/rule\/@.
profilerRuleConfiguration_localPath :: Lens.Lens' ProfilerRuleConfiguration (Prelude.Maybe Prelude.Text)
profilerRuleConfiguration_localPath :: Lens' ProfilerRuleConfiguration (Maybe Text)
profilerRuleConfiguration_localPath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilerRuleConfiguration' {Maybe Text
localPath :: Maybe Text
$sel:localPath:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> Maybe Text
localPath} -> Maybe Text
localPath) (\s :: ProfilerRuleConfiguration
s@ProfilerRuleConfiguration' {} Maybe Text
a -> ProfilerRuleConfiguration
s {$sel:localPath:ProfilerRuleConfiguration' :: Maybe Text
localPath = Maybe Text
a} :: ProfilerRuleConfiguration)

-- | Runtime configuration for rule container.
profilerRuleConfiguration_ruleParameters :: Lens.Lens' ProfilerRuleConfiguration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
profilerRuleConfiguration_ruleParameters :: Lens' ProfilerRuleConfiguration (Maybe (HashMap Text Text))
profilerRuleConfiguration_ruleParameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilerRuleConfiguration' {Maybe (HashMap Text Text)
ruleParameters :: Maybe (HashMap Text Text)
$sel:ruleParameters:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> Maybe (HashMap Text Text)
ruleParameters} -> Maybe (HashMap Text Text)
ruleParameters) (\s :: ProfilerRuleConfiguration
s@ProfilerRuleConfiguration' {} Maybe (HashMap Text Text)
a -> ProfilerRuleConfiguration
s {$sel:ruleParameters:ProfilerRuleConfiguration' :: Maybe (HashMap Text Text)
ruleParameters = Maybe (HashMap Text Text)
a} :: ProfilerRuleConfiguration) 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

-- | Path to Amazon S3 storage location for rules.
profilerRuleConfiguration_s3OutputPath :: Lens.Lens' ProfilerRuleConfiguration (Prelude.Maybe Prelude.Text)
profilerRuleConfiguration_s3OutputPath :: Lens' ProfilerRuleConfiguration (Maybe Text)
profilerRuleConfiguration_s3OutputPath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilerRuleConfiguration' {Maybe Text
s3OutputPath :: Maybe Text
$sel:s3OutputPath:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> Maybe Text
s3OutputPath} -> Maybe Text
s3OutputPath) (\s :: ProfilerRuleConfiguration
s@ProfilerRuleConfiguration' {} Maybe Text
a -> ProfilerRuleConfiguration
s {$sel:s3OutputPath:ProfilerRuleConfiguration' :: Maybe Text
s3OutputPath = Maybe Text
a} :: ProfilerRuleConfiguration)

-- | The size, in GB, of the ML storage volume attached to the processing
-- instance.
profilerRuleConfiguration_volumeSizeInGB :: Lens.Lens' ProfilerRuleConfiguration (Prelude.Maybe Prelude.Natural)
profilerRuleConfiguration_volumeSizeInGB :: Lens' ProfilerRuleConfiguration (Maybe Natural)
profilerRuleConfiguration_volumeSizeInGB = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilerRuleConfiguration' {Maybe Natural
volumeSizeInGB :: Maybe Natural
$sel:volumeSizeInGB:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> Maybe Natural
volumeSizeInGB} -> Maybe Natural
volumeSizeInGB) (\s :: ProfilerRuleConfiguration
s@ProfilerRuleConfiguration' {} Maybe Natural
a -> ProfilerRuleConfiguration
s {$sel:volumeSizeInGB:ProfilerRuleConfiguration' :: Maybe Natural
volumeSizeInGB = Maybe Natural
a} :: ProfilerRuleConfiguration)

-- | The name of the rule configuration. It must be unique relative to other
-- rule configuration names.
profilerRuleConfiguration_ruleConfigurationName :: Lens.Lens' ProfilerRuleConfiguration Prelude.Text
profilerRuleConfiguration_ruleConfigurationName :: Lens' ProfilerRuleConfiguration Text
profilerRuleConfiguration_ruleConfigurationName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilerRuleConfiguration' {Text
ruleConfigurationName :: Text
$sel:ruleConfigurationName:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> Text
ruleConfigurationName} -> Text
ruleConfigurationName) (\s :: ProfilerRuleConfiguration
s@ProfilerRuleConfiguration' {} Text
a -> ProfilerRuleConfiguration
s {$sel:ruleConfigurationName:ProfilerRuleConfiguration' :: Text
ruleConfigurationName = Text
a} :: ProfilerRuleConfiguration)

-- | The Amazon Elastic Container Registry Image for the managed rule
-- evaluation.
profilerRuleConfiguration_ruleEvaluatorImage :: Lens.Lens' ProfilerRuleConfiguration Prelude.Text
profilerRuleConfiguration_ruleEvaluatorImage :: Lens' ProfilerRuleConfiguration Text
profilerRuleConfiguration_ruleEvaluatorImage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilerRuleConfiguration' {Text
ruleEvaluatorImage :: Text
$sel:ruleEvaluatorImage:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> Text
ruleEvaluatorImage} -> Text
ruleEvaluatorImage) (\s :: ProfilerRuleConfiguration
s@ProfilerRuleConfiguration' {} Text
a -> ProfilerRuleConfiguration
s {$sel:ruleEvaluatorImage:ProfilerRuleConfiguration' :: Text
ruleEvaluatorImage = Text
a} :: ProfilerRuleConfiguration)

instance Data.FromJSON ProfilerRuleConfiguration where
  parseJSON :: Value -> Parser ProfilerRuleConfiguration
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ProfilerRuleConfiguration"
      ( \Object
x ->
          Maybe ProcessingInstanceType
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Natural
-> Text
-> Text
-> ProfilerRuleConfiguration
ProfilerRuleConfiguration'
            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 ProfilerRuleConfiguration where
  hashWithSalt :: Int -> ProfilerRuleConfiguration -> Int
hashWithSalt Int
_salt ProfilerRuleConfiguration' {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:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> Text
$sel:ruleConfigurationName:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> Text
$sel:volumeSizeInGB:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> Maybe Natural
$sel:s3OutputPath:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> Maybe Text
$sel:ruleParameters:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> Maybe (HashMap Text Text)
$sel:localPath:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> Maybe Text
$sel:instanceType:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> 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 ProfilerRuleConfiguration where
  rnf :: ProfilerRuleConfiguration -> ()
rnf ProfilerRuleConfiguration' {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:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> Text
$sel:ruleConfigurationName:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> Text
$sel:volumeSizeInGB:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> Maybe Natural
$sel:s3OutputPath:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> Maybe Text
$sel:ruleParameters:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> Maybe (HashMap Text Text)
$sel:localPath:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> Maybe Text
$sel:instanceType:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> 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 ProfilerRuleConfiguration where
  toJSON :: ProfilerRuleConfiguration -> Value
toJSON ProfilerRuleConfiguration' {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:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> Text
$sel:ruleConfigurationName:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> Text
$sel:volumeSizeInGB:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> Maybe Natural
$sel:s3OutputPath:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> Maybe Text
$sel:ruleParameters:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> Maybe (HashMap Text Text)
$sel:localPath:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> Maybe Text
$sel:instanceType:ProfilerRuleConfiguration' :: ProfilerRuleConfiguration -> 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)
          ]
      )