{-# 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.ProfilerConfigForUpdate where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ProfilerConfigForUpdate = ProfilerConfigForUpdate'
{
ProfilerConfigForUpdate -> Maybe (HashMap Text Text)
profilingParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
ProfilerConfigForUpdate -> Maybe Text
s3OutputPath :: Prelude.Maybe Prelude.Text,
ProfilerConfigForUpdate -> Maybe Integer
profilingIntervalInMilliseconds :: Prelude.Maybe Prelude.Integer,
ProfilerConfigForUpdate -> Maybe Bool
disableProfiler :: Prelude.Maybe Prelude.Bool
}
deriving (ProfilerConfigForUpdate -> ProfilerConfigForUpdate -> Bool
(ProfilerConfigForUpdate -> ProfilerConfigForUpdate -> Bool)
-> (ProfilerConfigForUpdate -> ProfilerConfigForUpdate -> Bool)
-> Eq ProfilerConfigForUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProfilerConfigForUpdate -> ProfilerConfigForUpdate -> Bool
$c/= :: ProfilerConfigForUpdate -> ProfilerConfigForUpdate -> Bool
== :: ProfilerConfigForUpdate -> ProfilerConfigForUpdate -> Bool
$c== :: ProfilerConfigForUpdate -> ProfilerConfigForUpdate -> Bool
Prelude.Eq, ReadPrec [ProfilerConfigForUpdate]
ReadPrec ProfilerConfigForUpdate
Int -> ReadS ProfilerConfigForUpdate
ReadS [ProfilerConfigForUpdate]
(Int -> ReadS ProfilerConfigForUpdate)
-> ReadS [ProfilerConfigForUpdate]
-> ReadPrec ProfilerConfigForUpdate
-> ReadPrec [ProfilerConfigForUpdate]
-> Read ProfilerConfigForUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProfilerConfigForUpdate]
$creadListPrec :: ReadPrec [ProfilerConfigForUpdate]
readPrec :: ReadPrec ProfilerConfigForUpdate
$creadPrec :: ReadPrec ProfilerConfigForUpdate
readList :: ReadS [ProfilerConfigForUpdate]
$creadList :: ReadS [ProfilerConfigForUpdate]
readsPrec :: Int -> ReadS ProfilerConfigForUpdate
$creadsPrec :: Int -> ReadS ProfilerConfigForUpdate
Prelude.Read, Int -> ProfilerConfigForUpdate -> ShowS
[ProfilerConfigForUpdate] -> ShowS
ProfilerConfigForUpdate -> String
(Int -> ProfilerConfigForUpdate -> ShowS)
-> (ProfilerConfigForUpdate -> String)
-> ([ProfilerConfigForUpdate] -> ShowS)
-> Show ProfilerConfigForUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProfilerConfigForUpdate] -> ShowS
$cshowList :: [ProfilerConfigForUpdate] -> ShowS
show :: ProfilerConfigForUpdate -> String
$cshow :: ProfilerConfigForUpdate -> String
showsPrec :: Int -> ProfilerConfigForUpdate -> ShowS
$cshowsPrec :: Int -> ProfilerConfigForUpdate -> ShowS
Prelude.Show, (forall x.
ProfilerConfigForUpdate -> Rep ProfilerConfigForUpdate x)
-> (forall x.
Rep ProfilerConfigForUpdate x -> ProfilerConfigForUpdate)
-> Generic ProfilerConfigForUpdate
forall x. Rep ProfilerConfigForUpdate x -> ProfilerConfigForUpdate
forall x. ProfilerConfigForUpdate -> Rep ProfilerConfigForUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProfilerConfigForUpdate x -> ProfilerConfigForUpdate
$cfrom :: forall x. ProfilerConfigForUpdate -> Rep ProfilerConfigForUpdate x
Prelude.Generic)
newProfilerConfigForUpdate ::
ProfilerConfigForUpdate
newProfilerConfigForUpdate :: ProfilerConfigForUpdate
newProfilerConfigForUpdate =
ProfilerConfigForUpdate' :: Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Integer
-> Maybe Bool
-> ProfilerConfigForUpdate
ProfilerConfigForUpdate'
{ $sel:profilingParameters:ProfilerConfigForUpdate' :: Maybe (HashMap Text Text)
profilingParameters =
Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:s3OutputPath:ProfilerConfigForUpdate' :: Maybe Text
s3OutputPath = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:profilingIntervalInMilliseconds:ProfilerConfigForUpdate' :: Maybe Integer
profilingIntervalInMilliseconds = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:disableProfiler:ProfilerConfigForUpdate' :: Maybe Bool
disableProfiler = Maybe Bool
forall a. Maybe a
Prelude.Nothing
}
profilerConfigForUpdate_profilingParameters :: Lens.Lens' ProfilerConfigForUpdate (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
profilerConfigForUpdate_profilingParameters :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ProfilerConfigForUpdate -> f ProfilerConfigForUpdate
profilerConfigForUpdate_profilingParameters = (ProfilerConfigForUpdate -> Maybe (HashMap Text Text))
-> (ProfilerConfigForUpdate
-> Maybe (HashMap Text Text) -> ProfilerConfigForUpdate)
-> Lens
ProfilerConfigForUpdate
ProfilerConfigForUpdate
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilerConfigForUpdate' {Maybe (HashMap Text Text)
profilingParameters :: Maybe (HashMap Text Text)
$sel:profilingParameters:ProfilerConfigForUpdate' :: ProfilerConfigForUpdate -> Maybe (HashMap Text Text)
profilingParameters} -> Maybe (HashMap Text Text)
profilingParameters) (\s :: ProfilerConfigForUpdate
s@ProfilerConfigForUpdate' {} Maybe (HashMap Text Text)
a -> ProfilerConfigForUpdate
s {$sel:profilingParameters:ProfilerConfigForUpdate' :: Maybe (HashMap Text Text)
profilingParameters = Maybe (HashMap Text Text)
a} :: ProfilerConfigForUpdate) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ProfilerConfigForUpdate -> f ProfilerConfigForUpdate)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ProfilerConfigForUpdate
-> f ProfilerConfigForUpdate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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 AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
profilerConfigForUpdate_s3OutputPath :: Lens.Lens' ProfilerConfigForUpdate (Prelude.Maybe Prelude.Text)
profilerConfigForUpdate_s3OutputPath :: (Maybe Text -> f (Maybe Text))
-> ProfilerConfigForUpdate -> f ProfilerConfigForUpdate
profilerConfigForUpdate_s3OutputPath = (ProfilerConfigForUpdate -> Maybe Text)
-> (ProfilerConfigForUpdate
-> Maybe Text -> ProfilerConfigForUpdate)
-> Lens
ProfilerConfigForUpdate
ProfilerConfigForUpdate
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilerConfigForUpdate' {Maybe Text
s3OutputPath :: Maybe Text
$sel:s3OutputPath:ProfilerConfigForUpdate' :: ProfilerConfigForUpdate -> Maybe Text
s3OutputPath} -> Maybe Text
s3OutputPath) (\s :: ProfilerConfigForUpdate
s@ProfilerConfigForUpdate' {} Maybe Text
a -> ProfilerConfigForUpdate
s {$sel:s3OutputPath:ProfilerConfigForUpdate' :: Maybe Text
s3OutputPath = Maybe Text
a} :: ProfilerConfigForUpdate)
profilerConfigForUpdate_profilingIntervalInMilliseconds :: Lens.Lens' ProfilerConfigForUpdate (Prelude.Maybe Prelude.Integer)
profilerConfigForUpdate_profilingIntervalInMilliseconds :: (Maybe Integer -> f (Maybe Integer))
-> ProfilerConfigForUpdate -> f ProfilerConfigForUpdate
profilerConfigForUpdate_profilingIntervalInMilliseconds = (ProfilerConfigForUpdate -> Maybe Integer)
-> (ProfilerConfigForUpdate
-> Maybe Integer -> ProfilerConfigForUpdate)
-> Lens
ProfilerConfigForUpdate
ProfilerConfigForUpdate
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilerConfigForUpdate' {Maybe Integer
profilingIntervalInMilliseconds :: Maybe Integer
$sel:profilingIntervalInMilliseconds:ProfilerConfigForUpdate' :: ProfilerConfigForUpdate -> Maybe Integer
profilingIntervalInMilliseconds} -> Maybe Integer
profilingIntervalInMilliseconds) (\s :: ProfilerConfigForUpdate
s@ProfilerConfigForUpdate' {} Maybe Integer
a -> ProfilerConfigForUpdate
s {$sel:profilingIntervalInMilliseconds:ProfilerConfigForUpdate' :: Maybe Integer
profilingIntervalInMilliseconds = Maybe Integer
a} :: ProfilerConfigForUpdate)
profilerConfigForUpdate_disableProfiler :: Lens.Lens' ProfilerConfigForUpdate (Prelude.Maybe Prelude.Bool)
profilerConfigForUpdate_disableProfiler :: (Maybe Bool -> f (Maybe Bool))
-> ProfilerConfigForUpdate -> f ProfilerConfigForUpdate
profilerConfigForUpdate_disableProfiler = (ProfilerConfigForUpdate -> Maybe Bool)
-> (ProfilerConfigForUpdate
-> Maybe Bool -> ProfilerConfigForUpdate)
-> Lens
ProfilerConfigForUpdate
ProfilerConfigForUpdate
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilerConfigForUpdate' {Maybe Bool
disableProfiler :: Maybe Bool
$sel:disableProfiler:ProfilerConfigForUpdate' :: ProfilerConfigForUpdate -> Maybe Bool
disableProfiler} -> Maybe Bool
disableProfiler) (\s :: ProfilerConfigForUpdate
s@ProfilerConfigForUpdate' {} Maybe Bool
a -> ProfilerConfigForUpdate
s {$sel:disableProfiler:ProfilerConfigForUpdate' :: Maybe Bool
disableProfiler = Maybe Bool
a} :: ProfilerConfigForUpdate)
instance Prelude.Hashable ProfilerConfigForUpdate
instance Prelude.NFData ProfilerConfigForUpdate
instance Core.ToJSON ProfilerConfigForUpdate where
toJSON :: ProfilerConfigForUpdate -> Value
toJSON ProfilerConfigForUpdate' {Maybe Bool
Maybe Integer
Maybe Text
Maybe (HashMap Text Text)
disableProfiler :: Maybe Bool
profilingIntervalInMilliseconds :: Maybe Integer
s3OutputPath :: Maybe Text
profilingParameters :: Maybe (HashMap Text Text)
$sel:disableProfiler:ProfilerConfigForUpdate' :: ProfilerConfigForUpdate -> Maybe Bool
$sel:profilingIntervalInMilliseconds:ProfilerConfigForUpdate' :: ProfilerConfigForUpdate -> Maybe Integer
$sel:s3OutputPath:ProfilerConfigForUpdate' :: ProfilerConfigForUpdate -> Maybe Text
$sel:profilingParameters:ProfilerConfigForUpdate' :: ProfilerConfigForUpdate -> Maybe (HashMap Text Text)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ProfilingParameters" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
profilingParameters,
(Text
"S3OutputPath" 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
s3OutputPath,
(Text
"ProfilingIntervalInMilliseconds" Text -> Integer -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Integer -> Pair) -> Maybe Integer -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Integer
profilingIntervalInMilliseconds,
(Text
"DisableProfiler" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
disableProfiler
]
)