{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.DescribeModel
-- 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)
--
-- Describes a model that you created using the @CreateModel@ API.
module Amazonka.SageMaker.DescribeModel
  ( -- * Creating a Request
    DescribeModel (..),
    newDescribeModel,

    -- * Request Lenses
    describeModel_modelName,

    -- * Destructuring the Response
    DescribeModelResponse (..),
    newDescribeModelResponse,

    -- * Response Lenses
    describeModelResponse_primaryContainer,
    describeModelResponse_enableNetworkIsolation,
    describeModelResponse_containers,
    describeModelResponse_vpcConfig,
    describeModelResponse_inferenceExecutionConfig,
    describeModelResponse_httpStatus,
    describeModelResponse_modelName,
    describeModelResponse_executionRoleArn,
    describeModelResponse_creationTime,
    describeModelResponse_modelArn,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SageMaker.Types

-- | /See:/ 'newDescribeModel' smart constructor.
data DescribeModel = DescribeModel'
  { -- | The name of the model.
    DescribeModel -> Text
modelName :: Prelude.Text
  }
  deriving (DescribeModel -> DescribeModel -> Bool
(DescribeModel -> DescribeModel -> Bool)
-> (DescribeModel -> DescribeModel -> Bool) -> Eq DescribeModel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeModel -> DescribeModel -> Bool
$c/= :: DescribeModel -> DescribeModel -> Bool
== :: DescribeModel -> DescribeModel -> Bool
$c== :: DescribeModel -> DescribeModel -> Bool
Prelude.Eq, ReadPrec [DescribeModel]
ReadPrec DescribeModel
Int -> ReadS DescribeModel
ReadS [DescribeModel]
(Int -> ReadS DescribeModel)
-> ReadS [DescribeModel]
-> ReadPrec DescribeModel
-> ReadPrec [DescribeModel]
-> Read DescribeModel
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeModel]
$creadListPrec :: ReadPrec [DescribeModel]
readPrec :: ReadPrec DescribeModel
$creadPrec :: ReadPrec DescribeModel
readList :: ReadS [DescribeModel]
$creadList :: ReadS [DescribeModel]
readsPrec :: Int -> ReadS DescribeModel
$creadsPrec :: Int -> ReadS DescribeModel
Prelude.Read, Int -> DescribeModel -> ShowS
[DescribeModel] -> ShowS
DescribeModel -> String
(Int -> DescribeModel -> ShowS)
-> (DescribeModel -> String)
-> ([DescribeModel] -> ShowS)
-> Show DescribeModel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeModel] -> ShowS
$cshowList :: [DescribeModel] -> ShowS
show :: DescribeModel -> String
$cshow :: DescribeModel -> String
showsPrec :: Int -> DescribeModel -> ShowS
$cshowsPrec :: Int -> DescribeModel -> ShowS
Prelude.Show, (forall x. DescribeModel -> Rep DescribeModel x)
-> (forall x. Rep DescribeModel x -> DescribeModel)
-> Generic DescribeModel
forall x. Rep DescribeModel x -> DescribeModel
forall x. DescribeModel -> Rep DescribeModel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeModel x -> DescribeModel
$cfrom :: forall x. DescribeModel -> Rep DescribeModel x
Prelude.Generic)

-- |
-- Create a value of 'DescribeModel' 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:
--
-- 'modelName', 'describeModel_modelName' - The name of the model.
newDescribeModel ::
  -- | 'modelName'
  Prelude.Text ->
  DescribeModel
newDescribeModel :: Text -> DescribeModel
newDescribeModel Text
pModelName_ =
  DescribeModel' :: Text -> DescribeModel
DescribeModel' {$sel:modelName:DescribeModel' :: Text
modelName = Text
pModelName_}

-- | The name of the model.
describeModel_modelName :: Lens.Lens' DescribeModel Prelude.Text
describeModel_modelName :: (Text -> f Text) -> DescribeModel -> f DescribeModel
describeModel_modelName = (DescribeModel -> Text)
-> (DescribeModel -> Text -> DescribeModel)
-> Lens DescribeModel DescribeModel Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeModel' {Text
modelName :: Text
$sel:modelName:DescribeModel' :: DescribeModel -> Text
modelName} -> Text
modelName) (\s :: DescribeModel
s@DescribeModel' {} Text
a -> DescribeModel
s {$sel:modelName:DescribeModel' :: Text
modelName = Text
a} :: DescribeModel)

instance Core.AWSRequest DescribeModel where
  type
    AWSResponse DescribeModel =
      DescribeModelResponse
  request :: DescribeModel -> Request DescribeModel
request = Service -> DescribeModel -> Request DescribeModel
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeModel
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeModel)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeModel))
-> Logger
-> Service
-> Proxy DescribeModel
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeModel)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe ContainerDefinition
-> Maybe Bool
-> Maybe [ContainerDefinition]
-> Maybe VpcConfig
-> Maybe InferenceExecutionConfig
-> Int
-> Text
-> Text
-> POSIX
-> Text
-> DescribeModelResponse
DescribeModelResponse'
            (Maybe ContainerDefinition
 -> Maybe Bool
 -> Maybe [ContainerDefinition]
 -> Maybe VpcConfig
 -> Maybe InferenceExecutionConfig
 -> Int
 -> Text
 -> Text
 -> POSIX
 -> Text
 -> DescribeModelResponse)
-> Either String (Maybe ContainerDefinition)
-> Either
     String
     (Maybe Bool
      -> Maybe [ContainerDefinition]
      -> Maybe VpcConfig
      -> Maybe InferenceExecutionConfig
      -> Int
      -> Text
      -> Text
      -> POSIX
      -> Text
      -> DescribeModelResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ContainerDefinition)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"PrimaryContainer")
            Either
  String
  (Maybe Bool
   -> Maybe [ContainerDefinition]
   -> Maybe VpcConfig
   -> Maybe InferenceExecutionConfig
   -> Int
   -> Text
   -> Text
   -> POSIX
   -> Text
   -> DescribeModelResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe [ContainerDefinition]
      -> Maybe VpcConfig
      -> Maybe InferenceExecutionConfig
      -> Int
      -> Text
      -> Text
      -> POSIX
      -> Text
      -> DescribeModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"EnableNetworkIsolation")
            Either
  String
  (Maybe [ContainerDefinition]
   -> Maybe VpcConfig
   -> Maybe InferenceExecutionConfig
   -> Int
   -> Text
   -> Text
   -> POSIX
   -> Text
   -> DescribeModelResponse)
-> Either String (Maybe [ContainerDefinition])
-> Either
     String
     (Maybe VpcConfig
      -> Maybe InferenceExecutionConfig
      -> Int
      -> Text
      -> Text
      -> POSIX
      -> Text
      -> DescribeModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Either String (Maybe (Maybe [ContainerDefinition]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Containers" Either String (Maybe (Maybe [ContainerDefinition]))
-> Maybe [ContainerDefinition]
-> Either String (Maybe [ContainerDefinition])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ContainerDefinition]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe VpcConfig
   -> Maybe InferenceExecutionConfig
   -> Int
   -> Text
   -> Text
   -> POSIX
   -> Text
   -> DescribeModelResponse)
-> Either String (Maybe VpcConfig)
-> Either
     String
     (Maybe InferenceExecutionConfig
      -> Int -> Text -> Text -> POSIX -> Text -> DescribeModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe VpcConfig)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"VpcConfig")
            Either
  String
  (Maybe InferenceExecutionConfig
   -> Int -> Text -> Text -> POSIX -> Text -> DescribeModelResponse)
-> Either String (Maybe InferenceExecutionConfig)
-> Either
     String
     (Int -> Text -> Text -> POSIX -> Text -> DescribeModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe InferenceExecutionConfig)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"InferenceExecutionConfig")
            Either
  String
  (Int -> Text -> Text -> POSIX -> Text -> DescribeModelResponse)
-> Either String Int
-> Either
     String (Text -> Text -> POSIX -> Text -> DescribeModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            Either
  String (Text -> Text -> POSIX -> Text -> DescribeModelResponse)
-> Either String Text
-> Either String (Text -> POSIX -> Text -> DescribeModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"ModelName")
            Either String (Text -> POSIX -> Text -> DescribeModelResponse)
-> Either String Text
-> Either String (POSIX -> Text -> DescribeModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"ExecutionRoleArn")
            Either String (POSIX -> Text -> DescribeModelResponse)
-> Either String POSIX
-> Either String (Text -> DescribeModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String POSIX
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"CreationTime")
            Either String (Text -> DescribeModelResponse)
-> Either String Text -> Either String DescribeModelResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"ModelArn")
      )

instance Prelude.Hashable DescribeModel

instance Prelude.NFData DescribeModel

instance Core.ToHeaders DescribeModel where
  toHeaders :: DescribeModel -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeModel -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# (ByteString
"SageMaker.DescribeModel" :: Prelude.ByteString),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON DescribeModel where
  toJSON :: DescribeModel -> Value
toJSON DescribeModel' {Text
modelName :: Text
$sel:modelName:DescribeModel' :: DescribeModel -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ModelName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
modelName)]
      )

instance Core.ToPath DescribeModel where
  toPath :: DescribeModel -> ByteString
toPath = ByteString -> DescribeModel -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery DescribeModel where
  toQuery :: DescribeModel -> QueryString
toQuery = QueryString -> DescribeModel -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newDescribeModelResponse' smart constructor.
data DescribeModelResponse = DescribeModelResponse'
  { -- | The location of the primary inference code, associated artifacts, and
    -- custom environment map that the inference code uses when it is deployed
    -- in production.
    DescribeModelResponse -> Maybe ContainerDefinition
primaryContainer :: Prelude.Maybe ContainerDefinition,
    -- | If @True@, no inbound or outbound network calls can be made to or from
    -- the model container.
    DescribeModelResponse -> Maybe Bool
enableNetworkIsolation :: Prelude.Maybe Prelude.Bool,
    -- | The containers in the inference pipeline.
    DescribeModelResponse -> Maybe [ContainerDefinition]
containers :: Prelude.Maybe [ContainerDefinition],
    -- | A VpcConfig object that specifies the VPC that this model has access to.
    -- For more information, see
    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/host-vpc.html Protect Endpoints by Using an Amazon Virtual Private Cloud>
    DescribeModelResponse -> Maybe VpcConfig
vpcConfig :: Prelude.Maybe VpcConfig,
    -- | Specifies details of how containers in a multi-container endpoint are
    -- called.
    DescribeModelResponse -> Maybe InferenceExecutionConfig
inferenceExecutionConfig :: Prelude.Maybe InferenceExecutionConfig,
    -- | The response's http status code.
    DescribeModelResponse -> Int
httpStatus :: Prelude.Int,
    -- | Name of the Amazon SageMaker model.
    DescribeModelResponse -> Text
modelName :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the IAM role that you specified for
    -- the model.
    DescribeModelResponse -> Text
executionRoleArn :: Prelude.Text,
    -- | A timestamp that shows when the model was created.
    DescribeModelResponse -> POSIX
creationTime :: Core.POSIX,
    -- | The Amazon Resource Name (ARN) of the model.
    DescribeModelResponse -> Text
modelArn :: Prelude.Text
  }
  deriving (DescribeModelResponse -> DescribeModelResponse -> Bool
(DescribeModelResponse -> DescribeModelResponse -> Bool)
-> (DescribeModelResponse -> DescribeModelResponse -> Bool)
-> Eq DescribeModelResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeModelResponse -> DescribeModelResponse -> Bool
$c/= :: DescribeModelResponse -> DescribeModelResponse -> Bool
== :: DescribeModelResponse -> DescribeModelResponse -> Bool
$c== :: DescribeModelResponse -> DescribeModelResponse -> Bool
Prelude.Eq, ReadPrec [DescribeModelResponse]
ReadPrec DescribeModelResponse
Int -> ReadS DescribeModelResponse
ReadS [DescribeModelResponse]
(Int -> ReadS DescribeModelResponse)
-> ReadS [DescribeModelResponse]
-> ReadPrec DescribeModelResponse
-> ReadPrec [DescribeModelResponse]
-> Read DescribeModelResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeModelResponse]
$creadListPrec :: ReadPrec [DescribeModelResponse]
readPrec :: ReadPrec DescribeModelResponse
$creadPrec :: ReadPrec DescribeModelResponse
readList :: ReadS [DescribeModelResponse]
$creadList :: ReadS [DescribeModelResponse]
readsPrec :: Int -> ReadS DescribeModelResponse
$creadsPrec :: Int -> ReadS DescribeModelResponse
Prelude.Read, Int -> DescribeModelResponse -> ShowS
[DescribeModelResponse] -> ShowS
DescribeModelResponse -> String
(Int -> DescribeModelResponse -> ShowS)
-> (DescribeModelResponse -> String)
-> ([DescribeModelResponse] -> ShowS)
-> Show DescribeModelResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeModelResponse] -> ShowS
$cshowList :: [DescribeModelResponse] -> ShowS
show :: DescribeModelResponse -> String
$cshow :: DescribeModelResponse -> String
showsPrec :: Int -> DescribeModelResponse -> ShowS
$cshowsPrec :: Int -> DescribeModelResponse -> ShowS
Prelude.Show, (forall x. DescribeModelResponse -> Rep DescribeModelResponse x)
-> (forall x. Rep DescribeModelResponse x -> DescribeModelResponse)
-> Generic DescribeModelResponse
forall x. Rep DescribeModelResponse x -> DescribeModelResponse
forall x. DescribeModelResponse -> Rep DescribeModelResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeModelResponse x -> DescribeModelResponse
$cfrom :: forall x. DescribeModelResponse -> Rep DescribeModelResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeModelResponse' 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:
--
-- 'primaryContainer', 'describeModelResponse_primaryContainer' - The location of the primary inference code, associated artifacts, and
-- custom environment map that the inference code uses when it is deployed
-- in production.
--
-- 'enableNetworkIsolation', 'describeModelResponse_enableNetworkIsolation' - If @True@, no inbound or outbound network calls can be made to or from
-- the model container.
--
-- 'containers', 'describeModelResponse_containers' - The containers in the inference pipeline.
--
-- 'vpcConfig', 'describeModelResponse_vpcConfig' - A VpcConfig object that specifies the VPC that this model has access to.
-- For more information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/host-vpc.html Protect Endpoints by Using an Amazon Virtual Private Cloud>
--
-- 'inferenceExecutionConfig', 'describeModelResponse_inferenceExecutionConfig' - Specifies details of how containers in a multi-container endpoint are
-- called.
--
-- 'httpStatus', 'describeModelResponse_httpStatus' - The response's http status code.
--
-- 'modelName', 'describeModelResponse_modelName' - Name of the Amazon SageMaker model.
--
-- 'executionRoleArn', 'describeModelResponse_executionRoleArn' - The Amazon Resource Name (ARN) of the IAM role that you specified for
-- the model.
--
-- 'creationTime', 'describeModelResponse_creationTime' - A timestamp that shows when the model was created.
--
-- 'modelArn', 'describeModelResponse_modelArn' - The Amazon Resource Name (ARN) of the model.
newDescribeModelResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'modelName'
  Prelude.Text ->
  -- | 'executionRoleArn'
  Prelude.Text ->
  -- | 'creationTime'
  Prelude.UTCTime ->
  -- | 'modelArn'
  Prelude.Text ->
  DescribeModelResponse
newDescribeModelResponse :: Int -> Text -> Text -> UTCTime -> Text -> DescribeModelResponse
newDescribeModelResponse
  Int
pHttpStatus_
  Text
pModelName_
  Text
pExecutionRoleArn_
  UTCTime
pCreationTime_
  Text
pModelArn_ =
    DescribeModelResponse' :: Maybe ContainerDefinition
-> Maybe Bool
-> Maybe [ContainerDefinition]
-> Maybe VpcConfig
-> Maybe InferenceExecutionConfig
-> Int
-> Text
-> Text
-> POSIX
-> Text
-> DescribeModelResponse
DescribeModelResponse'
      { $sel:primaryContainer:DescribeModelResponse' :: Maybe ContainerDefinition
primaryContainer =
          Maybe ContainerDefinition
forall a. Maybe a
Prelude.Nothing,
        $sel:enableNetworkIsolation:DescribeModelResponse' :: Maybe Bool
enableNetworkIsolation = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:containers:DescribeModelResponse' :: Maybe [ContainerDefinition]
containers = Maybe [ContainerDefinition]
forall a. Maybe a
Prelude.Nothing,
        $sel:vpcConfig:DescribeModelResponse' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
forall a. Maybe a
Prelude.Nothing,
        $sel:inferenceExecutionConfig:DescribeModelResponse' :: Maybe InferenceExecutionConfig
inferenceExecutionConfig = Maybe InferenceExecutionConfig
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeModelResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:modelName:DescribeModelResponse' :: Text
modelName = Text
pModelName_,
        $sel:executionRoleArn:DescribeModelResponse' :: Text
executionRoleArn = Text
pExecutionRoleArn_,
        $sel:creationTime:DescribeModelResponse' :: POSIX
creationTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationTime_,
        $sel:modelArn:DescribeModelResponse' :: Text
modelArn = Text
pModelArn_
      }

-- | The location of the primary inference code, associated artifacts, and
-- custom environment map that the inference code uses when it is deployed
-- in production.
describeModelResponse_primaryContainer :: Lens.Lens' DescribeModelResponse (Prelude.Maybe ContainerDefinition)
describeModelResponse_primaryContainer :: (Maybe ContainerDefinition -> f (Maybe ContainerDefinition))
-> DescribeModelResponse -> f DescribeModelResponse
describeModelResponse_primaryContainer = (DescribeModelResponse -> Maybe ContainerDefinition)
-> (DescribeModelResponse
    -> Maybe ContainerDefinition -> DescribeModelResponse)
-> Lens
     DescribeModelResponse
     DescribeModelResponse
     (Maybe ContainerDefinition)
     (Maybe ContainerDefinition)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeModelResponse' {Maybe ContainerDefinition
primaryContainer :: Maybe ContainerDefinition
$sel:primaryContainer:DescribeModelResponse' :: DescribeModelResponse -> Maybe ContainerDefinition
primaryContainer} -> Maybe ContainerDefinition
primaryContainer) (\s :: DescribeModelResponse
s@DescribeModelResponse' {} Maybe ContainerDefinition
a -> DescribeModelResponse
s {$sel:primaryContainer:DescribeModelResponse' :: Maybe ContainerDefinition
primaryContainer = Maybe ContainerDefinition
a} :: DescribeModelResponse)

-- | If @True@, no inbound or outbound network calls can be made to or from
-- the model container.
describeModelResponse_enableNetworkIsolation :: Lens.Lens' DescribeModelResponse (Prelude.Maybe Prelude.Bool)
describeModelResponse_enableNetworkIsolation :: (Maybe Bool -> f (Maybe Bool))
-> DescribeModelResponse -> f DescribeModelResponse
describeModelResponse_enableNetworkIsolation = (DescribeModelResponse -> Maybe Bool)
-> (DescribeModelResponse -> Maybe Bool -> DescribeModelResponse)
-> Lens
     DescribeModelResponse
     DescribeModelResponse
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeModelResponse' {Maybe Bool
enableNetworkIsolation :: Maybe Bool
$sel:enableNetworkIsolation:DescribeModelResponse' :: DescribeModelResponse -> Maybe Bool
enableNetworkIsolation} -> Maybe Bool
enableNetworkIsolation) (\s :: DescribeModelResponse
s@DescribeModelResponse' {} Maybe Bool
a -> DescribeModelResponse
s {$sel:enableNetworkIsolation:DescribeModelResponse' :: Maybe Bool
enableNetworkIsolation = Maybe Bool
a} :: DescribeModelResponse)

-- | The containers in the inference pipeline.
describeModelResponse_containers :: Lens.Lens' DescribeModelResponse (Prelude.Maybe [ContainerDefinition])
describeModelResponse_containers :: (Maybe [ContainerDefinition] -> f (Maybe [ContainerDefinition]))
-> DescribeModelResponse -> f DescribeModelResponse
describeModelResponse_containers = (DescribeModelResponse -> Maybe [ContainerDefinition])
-> (DescribeModelResponse
    -> Maybe [ContainerDefinition] -> DescribeModelResponse)
-> Lens
     DescribeModelResponse
     DescribeModelResponse
     (Maybe [ContainerDefinition])
     (Maybe [ContainerDefinition])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeModelResponse' {Maybe [ContainerDefinition]
containers :: Maybe [ContainerDefinition]
$sel:containers:DescribeModelResponse' :: DescribeModelResponse -> Maybe [ContainerDefinition]
containers} -> Maybe [ContainerDefinition]
containers) (\s :: DescribeModelResponse
s@DescribeModelResponse' {} Maybe [ContainerDefinition]
a -> DescribeModelResponse
s {$sel:containers:DescribeModelResponse' :: Maybe [ContainerDefinition]
containers = Maybe [ContainerDefinition]
a} :: DescribeModelResponse) ((Maybe [ContainerDefinition] -> f (Maybe [ContainerDefinition]))
 -> DescribeModelResponse -> f DescribeModelResponse)
-> ((Maybe [ContainerDefinition]
     -> f (Maybe [ContainerDefinition]))
    -> Maybe [ContainerDefinition] -> f (Maybe [ContainerDefinition]))
-> (Maybe [ContainerDefinition] -> f (Maybe [ContainerDefinition]))
-> DescribeModelResponse
-> f DescribeModelResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ContainerDefinition]
  [ContainerDefinition]
  [ContainerDefinition]
  [ContainerDefinition]
-> Iso
     (Maybe [ContainerDefinition])
     (Maybe [ContainerDefinition])
     (Maybe [ContainerDefinition])
     (Maybe [ContainerDefinition])
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
  [ContainerDefinition]
  [ContainerDefinition]
  [ContainerDefinition]
  [ContainerDefinition]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A VpcConfig object that specifies the VPC that this model has access to.
-- For more information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/host-vpc.html Protect Endpoints by Using an Amazon Virtual Private Cloud>
describeModelResponse_vpcConfig :: Lens.Lens' DescribeModelResponse (Prelude.Maybe VpcConfig)
describeModelResponse_vpcConfig :: (Maybe VpcConfig -> f (Maybe VpcConfig))
-> DescribeModelResponse -> f DescribeModelResponse
describeModelResponse_vpcConfig = (DescribeModelResponse -> Maybe VpcConfig)
-> (DescribeModelResponse
    -> Maybe VpcConfig -> DescribeModelResponse)
-> Lens
     DescribeModelResponse
     DescribeModelResponse
     (Maybe VpcConfig)
     (Maybe VpcConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeModelResponse' {Maybe VpcConfig
vpcConfig :: Maybe VpcConfig
$sel:vpcConfig:DescribeModelResponse' :: DescribeModelResponse -> Maybe VpcConfig
vpcConfig} -> Maybe VpcConfig
vpcConfig) (\s :: DescribeModelResponse
s@DescribeModelResponse' {} Maybe VpcConfig
a -> DescribeModelResponse
s {$sel:vpcConfig:DescribeModelResponse' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
a} :: DescribeModelResponse)

-- | Specifies details of how containers in a multi-container endpoint are
-- called.
describeModelResponse_inferenceExecutionConfig :: Lens.Lens' DescribeModelResponse (Prelude.Maybe InferenceExecutionConfig)
describeModelResponse_inferenceExecutionConfig :: (Maybe InferenceExecutionConfig
 -> f (Maybe InferenceExecutionConfig))
-> DescribeModelResponse -> f DescribeModelResponse
describeModelResponse_inferenceExecutionConfig = (DescribeModelResponse -> Maybe InferenceExecutionConfig)
-> (DescribeModelResponse
    -> Maybe InferenceExecutionConfig -> DescribeModelResponse)
-> Lens
     DescribeModelResponse
     DescribeModelResponse
     (Maybe InferenceExecutionConfig)
     (Maybe InferenceExecutionConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeModelResponse' {Maybe InferenceExecutionConfig
inferenceExecutionConfig :: Maybe InferenceExecutionConfig
$sel:inferenceExecutionConfig:DescribeModelResponse' :: DescribeModelResponse -> Maybe InferenceExecutionConfig
inferenceExecutionConfig} -> Maybe InferenceExecutionConfig
inferenceExecutionConfig) (\s :: DescribeModelResponse
s@DescribeModelResponse' {} Maybe InferenceExecutionConfig
a -> DescribeModelResponse
s {$sel:inferenceExecutionConfig:DescribeModelResponse' :: Maybe InferenceExecutionConfig
inferenceExecutionConfig = Maybe InferenceExecutionConfig
a} :: DescribeModelResponse)

-- | The response's http status code.
describeModelResponse_httpStatus :: Lens.Lens' DescribeModelResponse Prelude.Int
describeModelResponse_httpStatus :: (Int -> f Int) -> DescribeModelResponse -> f DescribeModelResponse
describeModelResponse_httpStatus = (DescribeModelResponse -> Int)
-> (DescribeModelResponse -> Int -> DescribeModelResponse)
-> Lens DescribeModelResponse DescribeModelResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeModelResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeModelResponse' :: DescribeModelResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeModelResponse
s@DescribeModelResponse' {} Int
a -> DescribeModelResponse
s {$sel:httpStatus:DescribeModelResponse' :: Int
httpStatus = Int
a} :: DescribeModelResponse)

-- | Name of the Amazon SageMaker model.
describeModelResponse_modelName :: Lens.Lens' DescribeModelResponse Prelude.Text
describeModelResponse_modelName :: (Text -> f Text)
-> DescribeModelResponse -> f DescribeModelResponse
describeModelResponse_modelName = (DescribeModelResponse -> Text)
-> (DescribeModelResponse -> Text -> DescribeModelResponse)
-> Lens DescribeModelResponse DescribeModelResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeModelResponse' {Text
modelName :: Text
$sel:modelName:DescribeModelResponse' :: DescribeModelResponse -> Text
modelName} -> Text
modelName) (\s :: DescribeModelResponse
s@DescribeModelResponse' {} Text
a -> DescribeModelResponse
s {$sel:modelName:DescribeModelResponse' :: Text
modelName = Text
a} :: DescribeModelResponse)

-- | The Amazon Resource Name (ARN) of the IAM role that you specified for
-- the model.
describeModelResponse_executionRoleArn :: Lens.Lens' DescribeModelResponse Prelude.Text
describeModelResponse_executionRoleArn :: (Text -> f Text)
-> DescribeModelResponse -> f DescribeModelResponse
describeModelResponse_executionRoleArn = (DescribeModelResponse -> Text)
-> (DescribeModelResponse -> Text -> DescribeModelResponse)
-> Lens DescribeModelResponse DescribeModelResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeModelResponse' {Text
executionRoleArn :: Text
$sel:executionRoleArn:DescribeModelResponse' :: DescribeModelResponse -> Text
executionRoleArn} -> Text
executionRoleArn) (\s :: DescribeModelResponse
s@DescribeModelResponse' {} Text
a -> DescribeModelResponse
s {$sel:executionRoleArn:DescribeModelResponse' :: Text
executionRoleArn = Text
a} :: DescribeModelResponse)

-- | A timestamp that shows when the model was created.
describeModelResponse_creationTime :: Lens.Lens' DescribeModelResponse Prelude.UTCTime
describeModelResponse_creationTime :: (UTCTime -> f UTCTime)
-> DescribeModelResponse -> f DescribeModelResponse
describeModelResponse_creationTime = (DescribeModelResponse -> POSIX)
-> (DescribeModelResponse -> POSIX -> DescribeModelResponse)
-> Lens DescribeModelResponse DescribeModelResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeModelResponse' {POSIX
creationTime :: POSIX
$sel:creationTime:DescribeModelResponse' :: DescribeModelResponse -> POSIX
creationTime} -> POSIX
creationTime) (\s :: DescribeModelResponse
s@DescribeModelResponse' {} POSIX
a -> DescribeModelResponse
s {$sel:creationTime:DescribeModelResponse' :: POSIX
creationTime = POSIX
a} :: DescribeModelResponse) ((POSIX -> f POSIX)
 -> DescribeModelResponse -> f DescribeModelResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> DescribeModelResponse
-> f DescribeModelResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The Amazon Resource Name (ARN) of the model.
describeModelResponse_modelArn :: Lens.Lens' DescribeModelResponse Prelude.Text
describeModelResponse_modelArn :: (Text -> f Text)
-> DescribeModelResponse -> f DescribeModelResponse
describeModelResponse_modelArn = (DescribeModelResponse -> Text)
-> (DescribeModelResponse -> Text -> DescribeModelResponse)
-> Lens DescribeModelResponse DescribeModelResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeModelResponse' {Text
modelArn :: Text
$sel:modelArn:DescribeModelResponse' :: DescribeModelResponse -> Text
modelArn} -> Text
modelArn) (\s :: DescribeModelResponse
s@DescribeModelResponse' {} Text
a -> DescribeModelResponse
s {$sel:modelArn:DescribeModelResponse' :: Text
modelArn = Text
a} :: DescribeModelResponse)

instance Prelude.NFData DescribeModelResponse