{-# 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.FraudDetector.Types.ExternalModel
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.FraudDetector.Types.ExternalModel where

import qualified Amazonka.Core as Core
import Amazonka.FraudDetector.Types.ModelEndpointStatus
import Amazonka.FraudDetector.Types.ModelInputConfiguration
import Amazonka.FraudDetector.Types.ModelOutputConfiguration
import Amazonka.FraudDetector.Types.ModelSource
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The Amazon SageMaker model.
--
-- /See:/ 'newExternalModel' smart constructor.
data ExternalModel = ExternalModel'
  { -- | The Amazon SageMaker model endpoints.
    ExternalModel -> Maybe Text
modelEndpoint :: Prelude.Maybe Prelude.Text,
    -- | The source of the model.
    ExternalModel -> Maybe ModelSource
modelSource :: Prelude.Maybe ModelSource,
    -- | Timestamp of when the model was last updated.
    ExternalModel -> Maybe Text
lastUpdatedTime :: Prelude.Maybe Prelude.Text,
    -- | The model ARN.
    ExternalModel -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Timestamp of when the model was last created.
    ExternalModel -> Maybe Text
createdTime :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Fraud Detector status for the external model endpoint
    ExternalModel -> Maybe ModelEndpointStatus
modelEndpointStatus :: Prelude.Maybe ModelEndpointStatus,
    -- | The output configuration.
    ExternalModel -> Maybe ModelOutputConfiguration
outputConfiguration :: Prelude.Maybe ModelOutputConfiguration,
    -- | The role used to invoke the model.
    ExternalModel -> Maybe Text
invokeModelEndpointRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The input configuration.
    ExternalModel -> Maybe ModelInputConfiguration
inputConfiguration :: Prelude.Maybe ModelInputConfiguration
  }
  deriving (ExternalModel -> ExternalModel -> Bool
(ExternalModel -> ExternalModel -> Bool)
-> (ExternalModel -> ExternalModel -> Bool) -> Eq ExternalModel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExternalModel -> ExternalModel -> Bool
$c/= :: ExternalModel -> ExternalModel -> Bool
== :: ExternalModel -> ExternalModel -> Bool
$c== :: ExternalModel -> ExternalModel -> Bool
Prelude.Eq, ReadPrec [ExternalModel]
ReadPrec ExternalModel
Int -> ReadS ExternalModel
ReadS [ExternalModel]
(Int -> ReadS ExternalModel)
-> ReadS [ExternalModel]
-> ReadPrec ExternalModel
-> ReadPrec [ExternalModel]
-> Read ExternalModel
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExternalModel]
$creadListPrec :: ReadPrec [ExternalModel]
readPrec :: ReadPrec ExternalModel
$creadPrec :: ReadPrec ExternalModel
readList :: ReadS [ExternalModel]
$creadList :: ReadS [ExternalModel]
readsPrec :: Int -> ReadS ExternalModel
$creadsPrec :: Int -> ReadS ExternalModel
Prelude.Read, Int -> ExternalModel -> ShowS
[ExternalModel] -> ShowS
ExternalModel -> String
(Int -> ExternalModel -> ShowS)
-> (ExternalModel -> String)
-> ([ExternalModel] -> ShowS)
-> Show ExternalModel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExternalModel] -> ShowS
$cshowList :: [ExternalModel] -> ShowS
show :: ExternalModel -> String
$cshow :: ExternalModel -> String
showsPrec :: Int -> ExternalModel -> ShowS
$cshowsPrec :: Int -> ExternalModel -> ShowS
Prelude.Show, (forall x. ExternalModel -> Rep ExternalModel x)
-> (forall x. Rep ExternalModel x -> ExternalModel)
-> Generic ExternalModel
forall x. Rep ExternalModel x -> ExternalModel
forall x. ExternalModel -> Rep ExternalModel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ExternalModel x -> ExternalModel
$cfrom :: forall x. ExternalModel -> Rep ExternalModel x
Prelude.Generic)

-- |
-- Create a value of 'ExternalModel' 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:
--
-- 'modelEndpoint', 'externalModel_modelEndpoint' - The Amazon SageMaker model endpoints.
--
-- 'modelSource', 'externalModel_modelSource' - The source of the model.
--
-- 'lastUpdatedTime', 'externalModel_lastUpdatedTime' - Timestamp of when the model was last updated.
--
-- 'arn', 'externalModel_arn' - The model ARN.
--
-- 'createdTime', 'externalModel_createdTime' - Timestamp of when the model was last created.
--
-- 'modelEndpointStatus', 'externalModel_modelEndpointStatus' - The Amazon Fraud Detector status for the external model endpoint
--
-- 'outputConfiguration', 'externalModel_outputConfiguration' - The output configuration.
--
-- 'invokeModelEndpointRoleArn', 'externalModel_invokeModelEndpointRoleArn' - The role used to invoke the model.
--
-- 'inputConfiguration', 'externalModel_inputConfiguration' - The input configuration.
newExternalModel ::
  ExternalModel
newExternalModel :: ExternalModel
newExternalModel =
  ExternalModel' :: Maybe Text
-> Maybe ModelSource
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ModelEndpointStatus
-> Maybe ModelOutputConfiguration
-> Maybe Text
-> Maybe ModelInputConfiguration
-> ExternalModel
ExternalModel'
    { $sel:modelEndpoint:ExternalModel' :: Maybe Text
modelEndpoint = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:modelSource:ExternalModel' :: Maybe ModelSource
modelSource = Maybe ModelSource
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedTime:ExternalModel' :: Maybe Text
lastUpdatedTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:ExternalModel' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdTime:ExternalModel' :: Maybe Text
createdTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:modelEndpointStatus:ExternalModel' :: Maybe ModelEndpointStatus
modelEndpointStatus = Maybe ModelEndpointStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:outputConfiguration:ExternalModel' :: Maybe ModelOutputConfiguration
outputConfiguration = Maybe ModelOutputConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:invokeModelEndpointRoleArn:ExternalModel' :: Maybe Text
invokeModelEndpointRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:inputConfiguration:ExternalModel' :: Maybe ModelInputConfiguration
inputConfiguration = Maybe ModelInputConfiguration
forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon SageMaker model endpoints.
externalModel_modelEndpoint :: Lens.Lens' ExternalModel (Prelude.Maybe Prelude.Text)
externalModel_modelEndpoint :: (Maybe Text -> f (Maybe Text)) -> ExternalModel -> f ExternalModel
externalModel_modelEndpoint = (ExternalModel -> Maybe Text)
-> (ExternalModel -> Maybe Text -> ExternalModel)
-> Lens ExternalModel ExternalModel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExternalModel' {Maybe Text
modelEndpoint :: Maybe Text
$sel:modelEndpoint:ExternalModel' :: ExternalModel -> Maybe Text
modelEndpoint} -> Maybe Text
modelEndpoint) (\s :: ExternalModel
s@ExternalModel' {} Maybe Text
a -> ExternalModel
s {$sel:modelEndpoint:ExternalModel' :: Maybe Text
modelEndpoint = Maybe Text
a} :: ExternalModel)

-- | The source of the model.
externalModel_modelSource :: Lens.Lens' ExternalModel (Prelude.Maybe ModelSource)
externalModel_modelSource :: (Maybe ModelSource -> f (Maybe ModelSource))
-> ExternalModel -> f ExternalModel
externalModel_modelSource = (ExternalModel -> Maybe ModelSource)
-> (ExternalModel -> Maybe ModelSource -> ExternalModel)
-> Lens
     ExternalModel ExternalModel (Maybe ModelSource) (Maybe ModelSource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExternalModel' {Maybe ModelSource
modelSource :: Maybe ModelSource
$sel:modelSource:ExternalModel' :: ExternalModel -> Maybe ModelSource
modelSource} -> Maybe ModelSource
modelSource) (\s :: ExternalModel
s@ExternalModel' {} Maybe ModelSource
a -> ExternalModel
s {$sel:modelSource:ExternalModel' :: Maybe ModelSource
modelSource = Maybe ModelSource
a} :: ExternalModel)

-- | Timestamp of when the model was last updated.
externalModel_lastUpdatedTime :: Lens.Lens' ExternalModel (Prelude.Maybe Prelude.Text)
externalModel_lastUpdatedTime :: (Maybe Text -> f (Maybe Text)) -> ExternalModel -> f ExternalModel
externalModel_lastUpdatedTime = (ExternalModel -> Maybe Text)
-> (ExternalModel -> Maybe Text -> ExternalModel)
-> Lens ExternalModel ExternalModel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExternalModel' {Maybe Text
lastUpdatedTime :: Maybe Text
$sel:lastUpdatedTime:ExternalModel' :: ExternalModel -> Maybe Text
lastUpdatedTime} -> Maybe Text
lastUpdatedTime) (\s :: ExternalModel
s@ExternalModel' {} Maybe Text
a -> ExternalModel
s {$sel:lastUpdatedTime:ExternalModel' :: Maybe Text
lastUpdatedTime = Maybe Text
a} :: ExternalModel)

-- | The model ARN.
externalModel_arn :: Lens.Lens' ExternalModel (Prelude.Maybe Prelude.Text)
externalModel_arn :: (Maybe Text -> f (Maybe Text)) -> ExternalModel -> f ExternalModel
externalModel_arn = (ExternalModel -> Maybe Text)
-> (ExternalModel -> Maybe Text -> ExternalModel)
-> Lens ExternalModel ExternalModel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExternalModel' {Maybe Text
arn :: Maybe Text
$sel:arn:ExternalModel' :: ExternalModel -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ExternalModel
s@ExternalModel' {} Maybe Text
a -> ExternalModel
s {$sel:arn:ExternalModel' :: Maybe Text
arn = Maybe Text
a} :: ExternalModel)

-- | Timestamp of when the model was last created.
externalModel_createdTime :: Lens.Lens' ExternalModel (Prelude.Maybe Prelude.Text)
externalModel_createdTime :: (Maybe Text -> f (Maybe Text)) -> ExternalModel -> f ExternalModel
externalModel_createdTime = (ExternalModel -> Maybe Text)
-> (ExternalModel -> Maybe Text -> ExternalModel)
-> Lens ExternalModel ExternalModel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExternalModel' {Maybe Text
createdTime :: Maybe Text
$sel:createdTime:ExternalModel' :: ExternalModel -> Maybe Text
createdTime} -> Maybe Text
createdTime) (\s :: ExternalModel
s@ExternalModel' {} Maybe Text
a -> ExternalModel
s {$sel:createdTime:ExternalModel' :: Maybe Text
createdTime = Maybe Text
a} :: ExternalModel)

-- | The Amazon Fraud Detector status for the external model endpoint
externalModel_modelEndpointStatus :: Lens.Lens' ExternalModel (Prelude.Maybe ModelEndpointStatus)
externalModel_modelEndpointStatus :: (Maybe ModelEndpointStatus -> f (Maybe ModelEndpointStatus))
-> ExternalModel -> f ExternalModel
externalModel_modelEndpointStatus = (ExternalModel -> Maybe ModelEndpointStatus)
-> (ExternalModel -> Maybe ModelEndpointStatus -> ExternalModel)
-> Lens
     ExternalModel
     ExternalModel
     (Maybe ModelEndpointStatus)
     (Maybe ModelEndpointStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExternalModel' {Maybe ModelEndpointStatus
modelEndpointStatus :: Maybe ModelEndpointStatus
$sel:modelEndpointStatus:ExternalModel' :: ExternalModel -> Maybe ModelEndpointStatus
modelEndpointStatus} -> Maybe ModelEndpointStatus
modelEndpointStatus) (\s :: ExternalModel
s@ExternalModel' {} Maybe ModelEndpointStatus
a -> ExternalModel
s {$sel:modelEndpointStatus:ExternalModel' :: Maybe ModelEndpointStatus
modelEndpointStatus = Maybe ModelEndpointStatus
a} :: ExternalModel)

-- | The output configuration.
externalModel_outputConfiguration :: Lens.Lens' ExternalModel (Prelude.Maybe ModelOutputConfiguration)
externalModel_outputConfiguration :: (Maybe ModelOutputConfiguration
 -> f (Maybe ModelOutputConfiguration))
-> ExternalModel -> f ExternalModel
externalModel_outputConfiguration = (ExternalModel -> Maybe ModelOutputConfiguration)
-> (ExternalModel
    -> Maybe ModelOutputConfiguration -> ExternalModel)
-> Lens
     ExternalModel
     ExternalModel
     (Maybe ModelOutputConfiguration)
     (Maybe ModelOutputConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExternalModel' {Maybe ModelOutputConfiguration
outputConfiguration :: Maybe ModelOutputConfiguration
$sel:outputConfiguration:ExternalModel' :: ExternalModel -> Maybe ModelOutputConfiguration
outputConfiguration} -> Maybe ModelOutputConfiguration
outputConfiguration) (\s :: ExternalModel
s@ExternalModel' {} Maybe ModelOutputConfiguration
a -> ExternalModel
s {$sel:outputConfiguration:ExternalModel' :: Maybe ModelOutputConfiguration
outputConfiguration = Maybe ModelOutputConfiguration
a} :: ExternalModel)

-- | The role used to invoke the model.
externalModel_invokeModelEndpointRoleArn :: Lens.Lens' ExternalModel (Prelude.Maybe Prelude.Text)
externalModel_invokeModelEndpointRoleArn :: (Maybe Text -> f (Maybe Text)) -> ExternalModel -> f ExternalModel
externalModel_invokeModelEndpointRoleArn = (ExternalModel -> Maybe Text)
-> (ExternalModel -> Maybe Text -> ExternalModel)
-> Lens ExternalModel ExternalModel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExternalModel' {Maybe Text
invokeModelEndpointRoleArn :: Maybe Text
$sel:invokeModelEndpointRoleArn:ExternalModel' :: ExternalModel -> Maybe Text
invokeModelEndpointRoleArn} -> Maybe Text
invokeModelEndpointRoleArn) (\s :: ExternalModel
s@ExternalModel' {} Maybe Text
a -> ExternalModel
s {$sel:invokeModelEndpointRoleArn:ExternalModel' :: Maybe Text
invokeModelEndpointRoleArn = Maybe Text
a} :: ExternalModel)

-- | The input configuration.
externalModel_inputConfiguration :: Lens.Lens' ExternalModel (Prelude.Maybe ModelInputConfiguration)
externalModel_inputConfiguration :: (Maybe ModelInputConfiguration
 -> f (Maybe ModelInputConfiguration))
-> ExternalModel -> f ExternalModel
externalModel_inputConfiguration = (ExternalModel -> Maybe ModelInputConfiguration)
-> (ExternalModel
    -> Maybe ModelInputConfiguration -> ExternalModel)
-> Lens
     ExternalModel
     ExternalModel
     (Maybe ModelInputConfiguration)
     (Maybe ModelInputConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExternalModel' {Maybe ModelInputConfiguration
inputConfiguration :: Maybe ModelInputConfiguration
$sel:inputConfiguration:ExternalModel' :: ExternalModel -> Maybe ModelInputConfiguration
inputConfiguration} -> Maybe ModelInputConfiguration
inputConfiguration) (\s :: ExternalModel
s@ExternalModel' {} Maybe ModelInputConfiguration
a -> ExternalModel
s {$sel:inputConfiguration:ExternalModel' :: Maybe ModelInputConfiguration
inputConfiguration = Maybe ModelInputConfiguration
a} :: ExternalModel)

instance Core.FromJSON ExternalModel where
  parseJSON :: Value -> Parser ExternalModel
parseJSON =
    String
-> (Object -> Parser ExternalModel)
-> Value
-> Parser ExternalModel
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ExternalModel"
      ( \Object
x ->
          Maybe Text
-> Maybe ModelSource
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ModelEndpointStatus
-> Maybe ModelOutputConfiguration
-> Maybe Text
-> Maybe ModelInputConfiguration
-> ExternalModel
ExternalModel'
            (Maybe Text
 -> Maybe ModelSource
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe ModelEndpointStatus
 -> Maybe ModelOutputConfiguration
 -> Maybe Text
 -> Maybe ModelInputConfiguration
 -> ExternalModel)
-> Parser (Maybe Text)
-> Parser
     (Maybe ModelSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ModelEndpointStatus
      -> Maybe ModelOutputConfiguration
      -> Maybe Text
      -> Maybe ModelInputConfiguration
      -> ExternalModel)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"modelEndpoint")
            Parser
  (Maybe ModelSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ModelEndpointStatus
   -> Maybe ModelOutputConfiguration
   -> Maybe Text
   -> Maybe ModelInputConfiguration
   -> ExternalModel)
-> Parser (Maybe ModelSource)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ModelEndpointStatus
      -> Maybe ModelOutputConfiguration
      -> Maybe Text
      -> Maybe ModelInputConfiguration
      -> ExternalModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ModelSource)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"modelSource")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ModelEndpointStatus
   -> Maybe ModelOutputConfiguration
   -> Maybe Text
   -> Maybe ModelInputConfiguration
   -> ExternalModel)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe ModelEndpointStatus
      -> Maybe ModelOutputConfiguration
      -> Maybe Text
      -> Maybe ModelInputConfiguration
      -> ExternalModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastUpdatedTime")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe ModelEndpointStatus
   -> Maybe ModelOutputConfiguration
   -> Maybe Text
   -> Maybe ModelInputConfiguration
   -> ExternalModel)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe ModelEndpointStatus
      -> Maybe ModelOutputConfiguration
      -> Maybe Text
      -> Maybe ModelInputConfiguration
      -> ExternalModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"arn")
            Parser
  (Maybe Text
   -> Maybe ModelEndpointStatus
   -> Maybe ModelOutputConfiguration
   -> Maybe Text
   -> Maybe ModelInputConfiguration
   -> ExternalModel)
-> Parser (Maybe Text)
-> Parser
     (Maybe ModelEndpointStatus
      -> Maybe ModelOutputConfiguration
      -> Maybe Text
      -> Maybe ModelInputConfiguration
      -> ExternalModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"createdTime")
            Parser
  (Maybe ModelEndpointStatus
   -> Maybe ModelOutputConfiguration
   -> Maybe Text
   -> Maybe ModelInputConfiguration
   -> ExternalModel)
-> Parser (Maybe ModelEndpointStatus)
-> Parser
     (Maybe ModelOutputConfiguration
      -> Maybe Text -> Maybe ModelInputConfiguration -> ExternalModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ModelEndpointStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"modelEndpointStatus")
            Parser
  (Maybe ModelOutputConfiguration
   -> Maybe Text -> Maybe ModelInputConfiguration -> ExternalModel)
-> Parser (Maybe ModelOutputConfiguration)
-> Parser
     (Maybe Text -> Maybe ModelInputConfiguration -> ExternalModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ModelOutputConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"outputConfiguration")
            Parser
  (Maybe Text -> Maybe ModelInputConfiguration -> ExternalModel)
-> Parser (Maybe Text)
-> Parser (Maybe ModelInputConfiguration -> ExternalModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"invokeModelEndpointRoleArn")
            Parser (Maybe ModelInputConfiguration -> ExternalModel)
-> Parser (Maybe ModelInputConfiguration) -> Parser ExternalModel
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ModelInputConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"inputConfiguration")
      )

instance Prelude.Hashable ExternalModel

instance Prelude.NFData ExternalModel