{-# 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.ModelQualityAppSpecification
-- 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.ModelQualityAppSpecification 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.MonitoringProblemType

-- | Container image configuration object for the monitoring job.
--
-- /See:/ 'newModelQualityAppSpecification' smart constructor.
data ModelQualityAppSpecification = ModelQualityAppSpecification'
  { -- | An array of arguments for the container used to run the monitoring job.
    ModelQualityAppSpecification -> Maybe (NonEmpty Text)
containerArguments :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | Specifies the entrypoint for a container that the monitoring job runs.
    ModelQualityAppSpecification -> Maybe (NonEmpty Text)
containerEntrypoint :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | Sets the environment variables in the container that the monitoring job
    -- runs.
    ModelQualityAppSpecification -> Maybe (HashMap Text Text)
environment :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | An Amazon S3 URI to a script that is called after analysis has been
    -- performed. Applicable only for the built-in (first party) containers.
    ModelQualityAppSpecification -> Maybe Text
postAnalyticsProcessorSourceUri :: Prelude.Maybe Prelude.Text,
    -- | The machine learning problem type of the model that the monitoring job
    -- monitors.
    ModelQualityAppSpecification -> Maybe MonitoringProblemType
problemType :: Prelude.Maybe MonitoringProblemType,
    -- | An Amazon S3 URI to a script that is called per row prior to running
    -- analysis. It can base64 decode the payload and convert it into a flatted
    -- json so that the built-in container can use the converted data.
    -- Applicable only for the built-in (first party) containers.
    ModelQualityAppSpecification -> Maybe Text
recordPreprocessorSourceUri :: Prelude.Maybe Prelude.Text,
    -- | The address of the container image that the monitoring job runs.
    ModelQualityAppSpecification -> Text
imageUri :: Prelude.Text
  }
  deriving (ModelQualityAppSpecification
-> ModelQualityAppSpecification -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModelQualityAppSpecification
-> ModelQualityAppSpecification -> Bool
$c/= :: ModelQualityAppSpecification
-> ModelQualityAppSpecification -> Bool
== :: ModelQualityAppSpecification
-> ModelQualityAppSpecification -> Bool
$c== :: ModelQualityAppSpecification
-> ModelQualityAppSpecification -> Bool
Prelude.Eq, ReadPrec [ModelQualityAppSpecification]
ReadPrec ModelQualityAppSpecification
Int -> ReadS ModelQualityAppSpecification
ReadS [ModelQualityAppSpecification]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModelQualityAppSpecification]
$creadListPrec :: ReadPrec [ModelQualityAppSpecification]
readPrec :: ReadPrec ModelQualityAppSpecification
$creadPrec :: ReadPrec ModelQualityAppSpecification
readList :: ReadS [ModelQualityAppSpecification]
$creadList :: ReadS [ModelQualityAppSpecification]
readsPrec :: Int -> ReadS ModelQualityAppSpecification
$creadsPrec :: Int -> ReadS ModelQualityAppSpecification
Prelude.Read, Int -> ModelQualityAppSpecification -> ShowS
[ModelQualityAppSpecification] -> ShowS
ModelQualityAppSpecification -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModelQualityAppSpecification] -> ShowS
$cshowList :: [ModelQualityAppSpecification] -> ShowS
show :: ModelQualityAppSpecification -> String
$cshow :: ModelQualityAppSpecification -> String
showsPrec :: Int -> ModelQualityAppSpecification -> ShowS
$cshowsPrec :: Int -> ModelQualityAppSpecification -> ShowS
Prelude.Show, forall x.
Rep ModelQualityAppSpecification x -> ModelQualityAppSpecification
forall x.
ModelQualityAppSpecification -> Rep ModelQualityAppSpecification x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModelQualityAppSpecification x -> ModelQualityAppSpecification
$cfrom :: forall x.
ModelQualityAppSpecification -> Rep ModelQualityAppSpecification x
Prelude.Generic)

-- |
-- Create a value of 'ModelQualityAppSpecification' 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:
--
-- 'containerArguments', 'modelQualityAppSpecification_containerArguments' - An array of arguments for the container used to run the monitoring job.
--
-- 'containerEntrypoint', 'modelQualityAppSpecification_containerEntrypoint' - Specifies the entrypoint for a container that the monitoring job runs.
--
-- 'environment', 'modelQualityAppSpecification_environment' - Sets the environment variables in the container that the monitoring job
-- runs.
--
-- 'postAnalyticsProcessorSourceUri', 'modelQualityAppSpecification_postAnalyticsProcessorSourceUri' - An Amazon S3 URI to a script that is called after analysis has been
-- performed. Applicable only for the built-in (first party) containers.
--
-- 'problemType', 'modelQualityAppSpecification_problemType' - The machine learning problem type of the model that the monitoring job
-- monitors.
--
-- 'recordPreprocessorSourceUri', 'modelQualityAppSpecification_recordPreprocessorSourceUri' - An Amazon S3 URI to a script that is called per row prior to running
-- analysis. It can base64 decode the payload and convert it into a flatted
-- json so that the built-in container can use the converted data.
-- Applicable only for the built-in (first party) containers.
--
-- 'imageUri', 'modelQualityAppSpecification_imageUri' - The address of the container image that the monitoring job runs.
newModelQualityAppSpecification ::
  -- | 'imageUri'
  Prelude.Text ->
  ModelQualityAppSpecification
newModelQualityAppSpecification :: Text -> ModelQualityAppSpecification
newModelQualityAppSpecification Text
pImageUri_ =
  ModelQualityAppSpecification'
    { $sel:containerArguments:ModelQualityAppSpecification' :: Maybe (NonEmpty Text)
containerArguments =
        forall a. Maybe a
Prelude.Nothing,
      $sel:containerEntrypoint:ModelQualityAppSpecification' :: Maybe (NonEmpty Text)
containerEntrypoint = forall a. Maybe a
Prelude.Nothing,
      $sel:environment:ModelQualityAppSpecification' :: Maybe (HashMap Text Text)
environment = forall a. Maybe a
Prelude.Nothing,
      $sel:postAnalyticsProcessorSourceUri:ModelQualityAppSpecification' :: Maybe Text
postAnalyticsProcessorSourceUri =
        forall a. Maybe a
Prelude.Nothing,
      $sel:problemType:ModelQualityAppSpecification' :: Maybe MonitoringProblemType
problemType = forall a. Maybe a
Prelude.Nothing,
      $sel:recordPreprocessorSourceUri:ModelQualityAppSpecification' :: Maybe Text
recordPreprocessorSourceUri = forall a. Maybe a
Prelude.Nothing,
      $sel:imageUri:ModelQualityAppSpecification' :: Text
imageUri = Text
pImageUri_
    }

-- | An array of arguments for the container used to run the monitoring job.
modelQualityAppSpecification_containerArguments :: Lens.Lens' ModelQualityAppSpecification (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
modelQualityAppSpecification_containerArguments :: Lens' ModelQualityAppSpecification (Maybe (NonEmpty Text))
modelQualityAppSpecification_containerArguments = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelQualityAppSpecification' {Maybe (NonEmpty Text)
containerArguments :: Maybe (NonEmpty Text)
$sel:containerArguments:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Maybe (NonEmpty Text)
containerArguments} -> Maybe (NonEmpty Text)
containerArguments) (\s :: ModelQualityAppSpecification
s@ModelQualityAppSpecification' {} Maybe (NonEmpty Text)
a -> ModelQualityAppSpecification
s {$sel:containerArguments:ModelQualityAppSpecification' :: Maybe (NonEmpty Text)
containerArguments = Maybe (NonEmpty Text)
a} :: ModelQualityAppSpecification) 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

-- | Specifies the entrypoint for a container that the monitoring job runs.
modelQualityAppSpecification_containerEntrypoint :: Lens.Lens' ModelQualityAppSpecification (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
modelQualityAppSpecification_containerEntrypoint :: Lens' ModelQualityAppSpecification (Maybe (NonEmpty Text))
modelQualityAppSpecification_containerEntrypoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelQualityAppSpecification' {Maybe (NonEmpty Text)
containerEntrypoint :: Maybe (NonEmpty Text)
$sel:containerEntrypoint:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Maybe (NonEmpty Text)
containerEntrypoint} -> Maybe (NonEmpty Text)
containerEntrypoint) (\s :: ModelQualityAppSpecification
s@ModelQualityAppSpecification' {} Maybe (NonEmpty Text)
a -> ModelQualityAppSpecification
s {$sel:containerEntrypoint:ModelQualityAppSpecification' :: Maybe (NonEmpty Text)
containerEntrypoint = Maybe (NonEmpty Text)
a} :: ModelQualityAppSpecification) 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

-- | Sets the environment variables in the container that the monitoring job
-- runs.
modelQualityAppSpecification_environment :: Lens.Lens' ModelQualityAppSpecification (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
modelQualityAppSpecification_environment :: Lens' ModelQualityAppSpecification (Maybe (HashMap Text Text))
modelQualityAppSpecification_environment = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelQualityAppSpecification' {Maybe (HashMap Text Text)
environment :: Maybe (HashMap Text Text)
$sel:environment:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Maybe (HashMap Text Text)
environment} -> Maybe (HashMap Text Text)
environment) (\s :: ModelQualityAppSpecification
s@ModelQualityAppSpecification' {} Maybe (HashMap Text Text)
a -> ModelQualityAppSpecification
s {$sel:environment:ModelQualityAppSpecification' :: Maybe (HashMap Text Text)
environment = Maybe (HashMap Text Text)
a} :: ModelQualityAppSpecification) 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

-- | An Amazon S3 URI to a script that is called after analysis has been
-- performed. Applicable only for the built-in (first party) containers.
modelQualityAppSpecification_postAnalyticsProcessorSourceUri :: Lens.Lens' ModelQualityAppSpecification (Prelude.Maybe Prelude.Text)
modelQualityAppSpecification_postAnalyticsProcessorSourceUri :: Lens' ModelQualityAppSpecification (Maybe Text)
modelQualityAppSpecification_postAnalyticsProcessorSourceUri = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelQualityAppSpecification' {Maybe Text
postAnalyticsProcessorSourceUri :: Maybe Text
$sel:postAnalyticsProcessorSourceUri:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Maybe Text
postAnalyticsProcessorSourceUri} -> Maybe Text
postAnalyticsProcessorSourceUri) (\s :: ModelQualityAppSpecification
s@ModelQualityAppSpecification' {} Maybe Text
a -> ModelQualityAppSpecification
s {$sel:postAnalyticsProcessorSourceUri:ModelQualityAppSpecification' :: Maybe Text
postAnalyticsProcessorSourceUri = Maybe Text
a} :: ModelQualityAppSpecification)

-- | The machine learning problem type of the model that the monitoring job
-- monitors.
modelQualityAppSpecification_problemType :: Lens.Lens' ModelQualityAppSpecification (Prelude.Maybe MonitoringProblemType)
modelQualityAppSpecification_problemType :: Lens' ModelQualityAppSpecification (Maybe MonitoringProblemType)
modelQualityAppSpecification_problemType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelQualityAppSpecification' {Maybe MonitoringProblemType
problemType :: Maybe MonitoringProblemType
$sel:problemType:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Maybe MonitoringProblemType
problemType} -> Maybe MonitoringProblemType
problemType) (\s :: ModelQualityAppSpecification
s@ModelQualityAppSpecification' {} Maybe MonitoringProblemType
a -> ModelQualityAppSpecification
s {$sel:problemType:ModelQualityAppSpecification' :: Maybe MonitoringProblemType
problemType = Maybe MonitoringProblemType
a} :: ModelQualityAppSpecification)

-- | An Amazon S3 URI to a script that is called per row prior to running
-- analysis. It can base64 decode the payload and convert it into a flatted
-- json so that the built-in container can use the converted data.
-- Applicable only for the built-in (first party) containers.
modelQualityAppSpecification_recordPreprocessorSourceUri :: Lens.Lens' ModelQualityAppSpecification (Prelude.Maybe Prelude.Text)
modelQualityAppSpecification_recordPreprocessorSourceUri :: Lens' ModelQualityAppSpecification (Maybe Text)
modelQualityAppSpecification_recordPreprocessorSourceUri = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelQualityAppSpecification' {Maybe Text
recordPreprocessorSourceUri :: Maybe Text
$sel:recordPreprocessorSourceUri:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Maybe Text
recordPreprocessorSourceUri} -> Maybe Text
recordPreprocessorSourceUri) (\s :: ModelQualityAppSpecification
s@ModelQualityAppSpecification' {} Maybe Text
a -> ModelQualityAppSpecification
s {$sel:recordPreprocessorSourceUri:ModelQualityAppSpecification' :: Maybe Text
recordPreprocessorSourceUri = Maybe Text
a} :: ModelQualityAppSpecification)

-- | The address of the container image that the monitoring job runs.
modelQualityAppSpecification_imageUri :: Lens.Lens' ModelQualityAppSpecification Prelude.Text
modelQualityAppSpecification_imageUri :: Lens' ModelQualityAppSpecification Text
modelQualityAppSpecification_imageUri = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelQualityAppSpecification' {Text
imageUri :: Text
$sel:imageUri:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Text
imageUri} -> Text
imageUri) (\s :: ModelQualityAppSpecification
s@ModelQualityAppSpecification' {} Text
a -> ModelQualityAppSpecification
s {$sel:imageUri:ModelQualityAppSpecification' :: Text
imageUri = Text
a} :: ModelQualityAppSpecification)

instance Data.FromJSON ModelQualityAppSpecification where
  parseJSON :: Value -> Parser ModelQualityAppSpecification
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ModelQualityAppSpecification"
      ( \Object
x ->
          Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe MonitoringProblemType
-> Maybe Text
-> Text
-> ModelQualityAppSpecification
ModelQualityAppSpecification'
            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
"ContainerArguments")
            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
"ContainerEntrypoint")
            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
"Environment" 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
"PostAnalyticsProcessorSourceUri")
            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
"ProblemType")
            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
"RecordPreprocessorSourceUri")
            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
"ImageUri")
      )

instance
  Prelude.Hashable
    ModelQualityAppSpecification
  where
  hashWithSalt :: Int -> ModelQualityAppSpecification -> Int
hashWithSalt Int
_salt ModelQualityAppSpecification' {Maybe (NonEmpty Text)
Maybe Text
Maybe (HashMap Text Text)
Maybe MonitoringProblemType
Text
imageUri :: Text
recordPreprocessorSourceUri :: Maybe Text
problemType :: Maybe MonitoringProblemType
postAnalyticsProcessorSourceUri :: Maybe Text
environment :: Maybe (HashMap Text Text)
containerEntrypoint :: Maybe (NonEmpty Text)
containerArguments :: Maybe (NonEmpty Text)
$sel:imageUri:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Text
$sel:recordPreprocessorSourceUri:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Maybe Text
$sel:problemType:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Maybe MonitoringProblemType
$sel:postAnalyticsProcessorSourceUri:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Maybe Text
$sel:environment:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Maybe (HashMap Text Text)
$sel:containerEntrypoint:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Maybe (NonEmpty Text)
$sel:containerArguments:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Maybe (NonEmpty Text)
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
containerArguments
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
containerEntrypoint
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
environment
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
postAnalyticsProcessorSourceUri
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MonitoringProblemType
problemType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
recordPreprocessorSourceUri
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
imageUri

instance Prelude.NFData ModelQualityAppSpecification where
  rnf :: ModelQualityAppSpecification -> ()
rnf ModelQualityAppSpecification' {Maybe (NonEmpty Text)
Maybe Text
Maybe (HashMap Text Text)
Maybe MonitoringProblemType
Text
imageUri :: Text
recordPreprocessorSourceUri :: Maybe Text
problemType :: Maybe MonitoringProblemType
postAnalyticsProcessorSourceUri :: Maybe Text
environment :: Maybe (HashMap Text Text)
containerEntrypoint :: Maybe (NonEmpty Text)
containerArguments :: Maybe (NonEmpty Text)
$sel:imageUri:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Text
$sel:recordPreprocessorSourceUri:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Maybe Text
$sel:problemType:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Maybe MonitoringProblemType
$sel:postAnalyticsProcessorSourceUri:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Maybe Text
$sel:environment:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Maybe (HashMap Text Text)
$sel:containerEntrypoint:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Maybe (NonEmpty Text)
$sel:containerArguments:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Maybe (NonEmpty Text)
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
containerArguments
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
containerEntrypoint
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
environment
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
postAnalyticsProcessorSourceUri
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MonitoringProblemType
problemType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
recordPreprocessorSourceUri
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
imageUri

instance Data.ToJSON ModelQualityAppSpecification where
  toJSON :: ModelQualityAppSpecification -> Value
toJSON ModelQualityAppSpecification' {Maybe (NonEmpty Text)
Maybe Text
Maybe (HashMap Text Text)
Maybe MonitoringProblemType
Text
imageUri :: Text
recordPreprocessorSourceUri :: Maybe Text
problemType :: Maybe MonitoringProblemType
postAnalyticsProcessorSourceUri :: Maybe Text
environment :: Maybe (HashMap Text Text)
containerEntrypoint :: Maybe (NonEmpty Text)
containerArguments :: Maybe (NonEmpty Text)
$sel:imageUri:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Text
$sel:recordPreprocessorSourceUri:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Maybe Text
$sel:problemType:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Maybe MonitoringProblemType
$sel:postAnalyticsProcessorSourceUri:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Maybe Text
$sel:environment:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Maybe (HashMap Text Text)
$sel:containerEntrypoint:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Maybe (NonEmpty Text)
$sel:containerArguments:ModelQualityAppSpecification' :: ModelQualityAppSpecification -> Maybe (NonEmpty Text)
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"ContainerArguments" 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 (NonEmpty Text)
containerArguments,
            (Key
"ContainerEntrypoint" 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 (NonEmpty Text)
containerEntrypoint,
            (Key
"Environment" 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)
environment,
            (Key
"PostAnalyticsProcessorSourceUri" 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
postAnalyticsProcessorSourceUri,
            (Key
"ProblemType" 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 MonitoringProblemType
problemType,
            (Key
"RecordPreprocessorSourceUri" 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
recordPreprocessorSourceUri,
            forall a. a -> Maybe a
Prelude.Just (Key
"ImageUri" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
imageUri)
          ]
      )