{-# 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.ModelExplainabilityAppSpecification where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ModelExplainabilityAppSpecification = ModelExplainabilityAppSpecification'
{
ModelExplainabilityAppSpecification -> Maybe (HashMap Text Text)
environment :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
ModelExplainabilityAppSpecification -> Text
imageUri :: Prelude.Text,
ModelExplainabilityAppSpecification -> Text
configUri :: Prelude.Text
}
deriving (ModelExplainabilityAppSpecification
-> ModelExplainabilityAppSpecification -> Bool
(ModelExplainabilityAppSpecification
-> ModelExplainabilityAppSpecification -> Bool)
-> (ModelExplainabilityAppSpecification
-> ModelExplainabilityAppSpecification -> Bool)
-> Eq ModelExplainabilityAppSpecification
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModelExplainabilityAppSpecification
-> ModelExplainabilityAppSpecification -> Bool
$c/= :: ModelExplainabilityAppSpecification
-> ModelExplainabilityAppSpecification -> Bool
== :: ModelExplainabilityAppSpecification
-> ModelExplainabilityAppSpecification -> Bool
$c== :: ModelExplainabilityAppSpecification
-> ModelExplainabilityAppSpecification -> Bool
Prelude.Eq, ReadPrec [ModelExplainabilityAppSpecification]
ReadPrec ModelExplainabilityAppSpecification
Int -> ReadS ModelExplainabilityAppSpecification
ReadS [ModelExplainabilityAppSpecification]
(Int -> ReadS ModelExplainabilityAppSpecification)
-> ReadS [ModelExplainabilityAppSpecification]
-> ReadPrec ModelExplainabilityAppSpecification
-> ReadPrec [ModelExplainabilityAppSpecification]
-> Read ModelExplainabilityAppSpecification
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModelExplainabilityAppSpecification]
$creadListPrec :: ReadPrec [ModelExplainabilityAppSpecification]
readPrec :: ReadPrec ModelExplainabilityAppSpecification
$creadPrec :: ReadPrec ModelExplainabilityAppSpecification
readList :: ReadS [ModelExplainabilityAppSpecification]
$creadList :: ReadS [ModelExplainabilityAppSpecification]
readsPrec :: Int -> ReadS ModelExplainabilityAppSpecification
$creadsPrec :: Int -> ReadS ModelExplainabilityAppSpecification
Prelude.Read, Int -> ModelExplainabilityAppSpecification -> ShowS
[ModelExplainabilityAppSpecification] -> ShowS
ModelExplainabilityAppSpecification -> String
(Int -> ModelExplainabilityAppSpecification -> ShowS)
-> (ModelExplainabilityAppSpecification -> String)
-> ([ModelExplainabilityAppSpecification] -> ShowS)
-> Show ModelExplainabilityAppSpecification
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModelExplainabilityAppSpecification] -> ShowS
$cshowList :: [ModelExplainabilityAppSpecification] -> ShowS
show :: ModelExplainabilityAppSpecification -> String
$cshow :: ModelExplainabilityAppSpecification -> String
showsPrec :: Int -> ModelExplainabilityAppSpecification -> ShowS
$cshowsPrec :: Int -> ModelExplainabilityAppSpecification -> ShowS
Prelude.Show, (forall x.
ModelExplainabilityAppSpecification
-> Rep ModelExplainabilityAppSpecification x)
-> (forall x.
Rep ModelExplainabilityAppSpecification x
-> ModelExplainabilityAppSpecification)
-> Generic ModelExplainabilityAppSpecification
forall x.
Rep ModelExplainabilityAppSpecification x
-> ModelExplainabilityAppSpecification
forall x.
ModelExplainabilityAppSpecification
-> Rep ModelExplainabilityAppSpecification x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModelExplainabilityAppSpecification x
-> ModelExplainabilityAppSpecification
$cfrom :: forall x.
ModelExplainabilityAppSpecification
-> Rep ModelExplainabilityAppSpecification x
Prelude.Generic)
newModelExplainabilityAppSpecification ::
Prelude.Text ->
Prelude.Text ->
ModelExplainabilityAppSpecification
newModelExplainabilityAppSpecification :: Text -> Text -> ModelExplainabilityAppSpecification
newModelExplainabilityAppSpecification
Text
pImageUri_
Text
pConfigUri_ =
ModelExplainabilityAppSpecification' :: Maybe (HashMap Text Text)
-> Text -> Text -> ModelExplainabilityAppSpecification
ModelExplainabilityAppSpecification'
{ $sel:environment:ModelExplainabilityAppSpecification' :: Maybe (HashMap Text Text)
environment =
Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:imageUri:ModelExplainabilityAppSpecification' :: Text
imageUri = Text
pImageUri_,
$sel:configUri:ModelExplainabilityAppSpecification' :: Text
configUri = Text
pConfigUri_
}
modelExplainabilityAppSpecification_environment :: Lens.Lens' ModelExplainabilityAppSpecification (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
modelExplainabilityAppSpecification_environment :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ModelExplainabilityAppSpecification
-> f ModelExplainabilityAppSpecification
modelExplainabilityAppSpecification_environment = (ModelExplainabilityAppSpecification -> Maybe (HashMap Text Text))
-> (ModelExplainabilityAppSpecification
-> Maybe (HashMap Text Text)
-> ModelExplainabilityAppSpecification)
-> Lens
ModelExplainabilityAppSpecification
ModelExplainabilityAppSpecification
(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 (\ModelExplainabilityAppSpecification' {Maybe (HashMap Text Text)
environment :: Maybe (HashMap Text Text)
$sel:environment:ModelExplainabilityAppSpecification' :: ModelExplainabilityAppSpecification -> Maybe (HashMap Text Text)
environment} -> Maybe (HashMap Text Text)
environment) (\s :: ModelExplainabilityAppSpecification
s@ModelExplainabilityAppSpecification' {} Maybe (HashMap Text Text)
a -> ModelExplainabilityAppSpecification
s {$sel:environment:ModelExplainabilityAppSpecification' :: Maybe (HashMap Text Text)
environment = Maybe (HashMap Text Text)
a} :: ModelExplainabilityAppSpecification) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ModelExplainabilityAppSpecification
-> f ModelExplainabilityAppSpecification)
-> ((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)))
-> ModelExplainabilityAppSpecification
-> f ModelExplainabilityAppSpecification
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
modelExplainabilityAppSpecification_imageUri :: Lens.Lens' ModelExplainabilityAppSpecification Prelude.Text
modelExplainabilityAppSpecification_imageUri :: (Text -> f Text)
-> ModelExplainabilityAppSpecification
-> f ModelExplainabilityAppSpecification
modelExplainabilityAppSpecification_imageUri = (ModelExplainabilityAppSpecification -> Text)
-> (ModelExplainabilityAppSpecification
-> Text -> ModelExplainabilityAppSpecification)
-> Lens
ModelExplainabilityAppSpecification
ModelExplainabilityAppSpecification
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelExplainabilityAppSpecification' {Text
imageUri :: Text
$sel:imageUri:ModelExplainabilityAppSpecification' :: ModelExplainabilityAppSpecification -> Text
imageUri} -> Text
imageUri) (\s :: ModelExplainabilityAppSpecification
s@ModelExplainabilityAppSpecification' {} Text
a -> ModelExplainabilityAppSpecification
s {$sel:imageUri:ModelExplainabilityAppSpecification' :: Text
imageUri = Text
a} :: ModelExplainabilityAppSpecification)
modelExplainabilityAppSpecification_configUri :: Lens.Lens' ModelExplainabilityAppSpecification Prelude.Text
modelExplainabilityAppSpecification_configUri :: (Text -> f Text)
-> ModelExplainabilityAppSpecification
-> f ModelExplainabilityAppSpecification
modelExplainabilityAppSpecification_configUri = (ModelExplainabilityAppSpecification -> Text)
-> (ModelExplainabilityAppSpecification
-> Text -> ModelExplainabilityAppSpecification)
-> Lens
ModelExplainabilityAppSpecification
ModelExplainabilityAppSpecification
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelExplainabilityAppSpecification' {Text
configUri :: Text
$sel:configUri:ModelExplainabilityAppSpecification' :: ModelExplainabilityAppSpecification -> Text
configUri} -> Text
configUri) (\s :: ModelExplainabilityAppSpecification
s@ModelExplainabilityAppSpecification' {} Text
a -> ModelExplainabilityAppSpecification
s {$sel:configUri:ModelExplainabilityAppSpecification' :: Text
configUri = Text
a} :: ModelExplainabilityAppSpecification)
instance
Core.FromJSON
ModelExplainabilityAppSpecification
where
parseJSON :: Value -> Parser ModelExplainabilityAppSpecification
parseJSON =
String
-> (Object -> Parser ModelExplainabilityAppSpecification)
-> Value
-> Parser ModelExplainabilityAppSpecification
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ModelExplainabilityAppSpecification"
( \Object
x ->
Maybe (HashMap Text Text)
-> Text -> Text -> ModelExplainabilityAppSpecification
ModelExplainabilityAppSpecification'
(Maybe (HashMap Text Text)
-> Text -> Text -> ModelExplainabilityAppSpecification)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Text -> Text -> ModelExplainabilityAppSpecification)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Environment" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Parser (Text -> Text -> ModelExplainabilityAppSpecification)
-> Parser Text
-> Parser (Text -> ModelExplainabilityAppSpecification)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ImageUri")
Parser (Text -> ModelExplainabilityAppSpecification)
-> Parser Text -> Parser ModelExplainabilityAppSpecification
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ConfigUri")
)
instance
Prelude.Hashable
ModelExplainabilityAppSpecification
instance
Prelude.NFData
ModelExplainabilityAppSpecification
instance
Core.ToJSON
ModelExplainabilityAppSpecification
where
toJSON :: ModelExplainabilityAppSpecification -> Value
toJSON ModelExplainabilityAppSpecification' {Maybe (HashMap Text Text)
Text
configUri :: Text
imageUri :: Text
environment :: Maybe (HashMap Text Text)
$sel:configUri:ModelExplainabilityAppSpecification' :: ModelExplainabilityAppSpecification -> Text
$sel:imageUri:ModelExplainabilityAppSpecification' :: ModelExplainabilityAppSpecification -> Text
$sel:environment:ModelExplainabilityAppSpecification' :: ModelExplainabilityAppSpecification -> Maybe (HashMap Text Text)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Environment" 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)
environment,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ImageUri" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
imageUri),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ConfigUri" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
configUri)
]
)