{-# 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.DescribeCompilationJob
-- 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)
--
-- Returns information about a model compilation job.
--
-- To create a model compilation job, use CreateCompilationJob. To get
-- information about multiple model compilation jobs, use
-- ListCompilationJobs.
module Amazonka.SageMaker.DescribeCompilationJob
  ( -- * Creating a Request
    DescribeCompilationJob (..),
    newDescribeCompilationJob,

    -- * Request Lenses
    describeCompilationJob_compilationJobName,

    -- * Destructuring the Response
    DescribeCompilationJobResponse (..),
    newDescribeCompilationJobResponse,

    -- * Response Lenses
    describeCompilationJobResponse_modelDigests,
    describeCompilationJobResponse_compilationStartTime,
    describeCompilationJobResponse_inferenceImage,
    describeCompilationJobResponse_vpcConfig,
    describeCompilationJobResponse_compilationEndTime,
    describeCompilationJobResponse_httpStatus,
    describeCompilationJobResponse_compilationJobName,
    describeCompilationJobResponse_compilationJobArn,
    describeCompilationJobResponse_compilationJobStatus,
    describeCompilationJobResponse_stoppingCondition,
    describeCompilationJobResponse_creationTime,
    describeCompilationJobResponse_lastModifiedTime,
    describeCompilationJobResponse_failureReason,
    describeCompilationJobResponse_modelArtifacts,
    describeCompilationJobResponse_roleArn,
    describeCompilationJobResponse_inputConfig,
    describeCompilationJobResponse_outputConfig,
  )
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:/ 'newDescribeCompilationJob' smart constructor.
data DescribeCompilationJob = DescribeCompilationJob'
  { -- | The name of the model compilation job that you want information about.
    DescribeCompilationJob -> Text
compilationJobName :: Prelude.Text
  }
  deriving (DescribeCompilationJob -> DescribeCompilationJob -> Bool
(DescribeCompilationJob -> DescribeCompilationJob -> Bool)
-> (DescribeCompilationJob -> DescribeCompilationJob -> Bool)
-> Eq DescribeCompilationJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeCompilationJob -> DescribeCompilationJob -> Bool
$c/= :: DescribeCompilationJob -> DescribeCompilationJob -> Bool
== :: DescribeCompilationJob -> DescribeCompilationJob -> Bool
$c== :: DescribeCompilationJob -> DescribeCompilationJob -> Bool
Prelude.Eq, ReadPrec [DescribeCompilationJob]
ReadPrec DescribeCompilationJob
Int -> ReadS DescribeCompilationJob
ReadS [DescribeCompilationJob]
(Int -> ReadS DescribeCompilationJob)
-> ReadS [DescribeCompilationJob]
-> ReadPrec DescribeCompilationJob
-> ReadPrec [DescribeCompilationJob]
-> Read DescribeCompilationJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeCompilationJob]
$creadListPrec :: ReadPrec [DescribeCompilationJob]
readPrec :: ReadPrec DescribeCompilationJob
$creadPrec :: ReadPrec DescribeCompilationJob
readList :: ReadS [DescribeCompilationJob]
$creadList :: ReadS [DescribeCompilationJob]
readsPrec :: Int -> ReadS DescribeCompilationJob
$creadsPrec :: Int -> ReadS DescribeCompilationJob
Prelude.Read, Int -> DescribeCompilationJob -> ShowS
[DescribeCompilationJob] -> ShowS
DescribeCompilationJob -> String
(Int -> DescribeCompilationJob -> ShowS)
-> (DescribeCompilationJob -> String)
-> ([DescribeCompilationJob] -> ShowS)
-> Show DescribeCompilationJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeCompilationJob] -> ShowS
$cshowList :: [DescribeCompilationJob] -> ShowS
show :: DescribeCompilationJob -> String
$cshow :: DescribeCompilationJob -> String
showsPrec :: Int -> DescribeCompilationJob -> ShowS
$cshowsPrec :: Int -> DescribeCompilationJob -> ShowS
Prelude.Show, (forall x. DescribeCompilationJob -> Rep DescribeCompilationJob x)
-> (forall x.
    Rep DescribeCompilationJob x -> DescribeCompilationJob)
-> Generic DescribeCompilationJob
forall x. Rep DescribeCompilationJob x -> DescribeCompilationJob
forall x. DescribeCompilationJob -> Rep DescribeCompilationJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeCompilationJob x -> DescribeCompilationJob
$cfrom :: forall x. DescribeCompilationJob -> Rep DescribeCompilationJob x
Prelude.Generic)

-- |
-- Create a value of 'DescribeCompilationJob' 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:
--
-- 'compilationJobName', 'describeCompilationJob_compilationJobName' - The name of the model compilation job that you want information about.
newDescribeCompilationJob ::
  -- | 'compilationJobName'
  Prelude.Text ->
  DescribeCompilationJob
newDescribeCompilationJob :: Text -> DescribeCompilationJob
newDescribeCompilationJob Text
pCompilationJobName_ =
  DescribeCompilationJob' :: Text -> DescribeCompilationJob
DescribeCompilationJob'
    { $sel:compilationJobName:DescribeCompilationJob' :: Text
compilationJobName =
        Text
pCompilationJobName_
    }

-- | The name of the model compilation job that you want information about.
describeCompilationJob_compilationJobName :: Lens.Lens' DescribeCompilationJob Prelude.Text
describeCompilationJob_compilationJobName :: (Text -> f Text)
-> DescribeCompilationJob -> f DescribeCompilationJob
describeCompilationJob_compilationJobName = (DescribeCompilationJob -> Text)
-> (DescribeCompilationJob -> Text -> DescribeCompilationJob)
-> Lens DescribeCompilationJob DescribeCompilationJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCompilationJob' {Text
compilationJobName :: Text
$sel:compilationJobName:DescribeCompilationJob' :: DescribeCompilationJob -> Text
compilationJobName} -> Text
compilationJobName) (\s :: DescribeCompilationJob
s@DescribeCompilationJob' {} Text
a -> DescribeCompilationJob
s {$sel:compilationJobName:DescribeCompilationJob' :: Text
compilationJobName = Text
a} :: DescribeCompilationJob)

instance Core.AWSRequest DescribeCompilationJob where
  type
    AWSResponse DescribeCompilationJob =
      DescribeCompilationJobResponse
  request :: DescribeCompilationJob -> Request DescribeCompilationJob
request = Service -> DescribeCompilationJob -> Request DescribeCompilationJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeCompilationJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeCompilationJob)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeCompilationJob))
-> Logger
-> Service
-> Proxy DescribeCompilationJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeCompilationJob)))
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 ModelDigests
-> Maybe POSIX
-> Maybe Text
-> Maybe NeoVpcConfig
-> Maybe POSIX
-> Int
-> Text
-> Text
-> CompilationJobStatus
-> StoppingCondition
-> POSIX
-> POSIX
-> Text
-> ModelArtifacts
-> Text
-> InputConfig
-> OutputConfig
-> DescribeCompilationJobResponse
DescribeCompilationJobResponse'
            (Maybe ModelDigests
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe NeoVpcConfig
 -> Maybe POSIX
 -> Int
 -> Text
 -> Text
 -> CompilationJobStatus
 -> StoppingCondition
 -> POSIX
 -> POSIX
 -> Text
 -> ModelArtifacts
 -> Text
 -> InputConfig
 -> OutputConfig
 -> DescribeCompilationJobResponse)
-> Either String (Maybe ModelDigests)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe NeoVpcConfig
      -> Maybe POSIX
      -> Int
      -> Text
      -> Text
      -> CompilationJobStatus
      -> StoppingCondition
      -> POSIX
      -> POSIX
      -> Text
      -> ModelArtifacts
      -> Text
      -> InputConfig
      -> OutputConfig
      -> DescribeCompilationJobResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ModelDigests)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ModelDigests")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe NeoVpcConfig
   -> Maybe POSIX
   -> Int
   -> Text
   -> Text
   -> CompilationJobStatus
   -> StoppingCondition
   -> POSIX
   -> POSIX
   -> Text
   -> ModelArtifacts
   -> Text
   -> InputConfig
   -> OutputConfig
   -> DescribeCompilationJobResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe NeoVpcConfig
      -> Maybe POSIX
      -> Int
      -> Text
      -> Text
      -> CompilationJobStatus
      -> StoppingCondition
      -> POSIX
      -> POSIX
      -> Text
      -> ModelArtifacts
      -> Text
      -> InputConfig
      -> OutputConfig
      -> DescribeCompilationJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CompilationStartTime")
            Either
  String
  (Maybe Text
   -> Maybe NeoVpcConfig
   -> Maybe POSIX
   -> Int
   -> Text
   -> Text
   -> CompilationJobStatus
   -> StoppingCondition
   -> POSIX
   -> POSIX
   -> Text
   -> ModelArtifacts
   -> Text
   -> InputConfig
   -> OutputConfig
   -> DescribeCompilationJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe NeoVpcConfig
      -> Maybe POSIX
      -> Int
      -> Text
      -> Text
      -> CompilationJobStatus
      -> StoppingCondition
      -> POSIX
      -> POSIX
      -> Text
      -> ModelArtifacts
      -> Text
      -> InputConfig
      -> OutputConfig
      -> DescribeCompilationJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"InferenceImage")
            Either
  String
  (Maybe NeoVpcConfig
   -> Maybe POSIX
   -> Int
   -> Text
   -> Text
   -> CompilationJobStatus
   -> StoppingCondition
   -> POSIX
   -> POSIX
   -> Text
   -> ModelArtifacts
   -> Text
   -> InputConfig
   -> OutputConfig
   -> DescribeCompilationJobResponse)
-> Either String (Maybe NeoVpcConfig)
-> Either
     String
     (Maybe POSIX
      -> Int
      -> Text
      -> Text
      -> CompilationJobStatus
      -> StoppingCondition
      -> POSIX
      -> POSIX
      -> Text
      -> ModelArtifacts
      -> Text
      -> InputConfig
      -> OutputConfig
      -> DescribeCompilationJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe NeoVpcConfig)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"VpcConfig")
            Either
  String
  (Maybe POSIX
   -> Int
   -> Text
   -> Text
   -> CompilationJobStatus
   -> StoppingCondition
   -> POSIX
   -> POSIX
   -> Text
   -> ModelArtifacts
   -> Text
   -> InputConfig
   -> OutputConfig
   -> DescribeCompilationJobResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Int
      -> Text
      -> Text
      -> CompilationJobStatus
      -> StoppingCondition
      -> POSIX
      -> POSIX
      -> Text
      -> ModelArtifacts
      -> Text
      -> InputConfig
      -> OutputConfig
      -> DescribeCompilationJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CompilationEndTime")
            Either
  String
  (Int
   -> Text
   -> Text
   -> CompilationJobStatus
   -> StoppingCondition
   -> POSIX
   -> POSIX
   -> Text
   -> ModelArtifacts
   -> Text
   -> InputConfig
   -> OutputConfig
   -> DescribeCompilationJobResponse)
-> Either String Int
-> Either
     String
     (Text
      -> Text
      -> CompilationJobStatus
      -> StoppingCondition
      -> POSIX
      -> POSIX
      -> Text
      -> ModelArtifacts
      -> Text
      -> InputConfig
      -> OutputConfig
      -> DescribeCompilationJobResponse)
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
   -> CompilationJobStatus
   -> StoppingCondition
   -> POSIX
   -> POSIX
   -> Text
   -> ModelArtifacts
   -> Text
   -> InputConfig
   -> OutputConfig
   -> DescribeCompilationJobResponse)
-> Either String Text
-> Either
     String
     (Text
      -> CompilationJobStatus
      -> StoppingCondition
      -> POSIX
      -> POSIX
      -> Text
      -> ModelArtifacts
      -> Text
      -> InputConfig
      -> OutputConfig
      -> DescribeCompilationJobResponse)
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
"CompilationJobName")
            Either
  String
  (Text
   -> CompilationJobStatus
   -> StoppingCondition
   -> POSIX
   -> POSIX
   -> Text
   -> ModelArtifacts
   -> Text
   -> InputConfig
   -> OutputConfig
   -> DescribeCompilationJobResponse)
-> Either String Text
-> Either
     String
     (CompilationJobStatus
      -> StoppingCondition
      -> POSIX
      -> POSIX
      -> Text
      -> ModelArtifacts
      -> Text
      -> InputConfig
      -> OutputConfig
      -> DescribeCompilationJobResponse)
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
"CompilationJobArn")
            Either
  String
  (CompilationJobStatus
   -> StoppingCondition
   -> POSIX
   -> POSIX
   -> Text
   -> ModelArtifacts
   -> Text
   -> InputConfig
   -> OutputConfig
   -> DescribeCompilationJobResponse)
-> Either String CompilationJobStatus
-> Either
     String
     (StoppingCondition
      -> POSIX
      -> POSIX
      -> Text
      -> ModelArtifacts
      -> Text
      -> InputConfig
      -> OutputConfig
      -> DescribeCompilationJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String CompilationJobStatus
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"CompilationJobStatus")
            Either
  String
  (StoppingCondition
   -> POSIX
   -> POSIX
   -> Text
   -> ModelArtifacts
   -> Text
   -> InputConfig
   -> OutputConfig
   -> DescribeCompilationJobResponse)
-> Either String StoppingCondition
-> Either
     String
     (POSIX
      -> POSIX
      -> Text
      -> ModelArtifacts
      -> Text
      -> InputConfig
      -> OutputConfig
      -> DescribeCompilationJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String StoppingCondition
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"StoppingCondition")
            Either
  String
  (POSIX
   -> POSIX
   -> Text
   -> ModelArtifacts
   -> Text
   -> InputConfig
   -> OutputConfig
   -> DescribeCompilationJobResponse)
-> Either String POSIX
-> Either
     String
     (POSIX
      -> Text
      -> ModelArtifacts
      -> Text
      -> InputConfig
      -> OutputConfig
      -> DescribeCompilationJobResponse)
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
  (POSIX
   -> Text
   -> ModelArtifacts
   -> Text
   -> InputConfig
   -> OutputConfig
   -> DescribeCompilationJobResponse)
-> Either String POSIX
-> Either
     String
     (Text
      -> ModelArtifacts
      -> Text
      -> InputConfig
      -> OutputConfig
      -> DescribeCompilationJobResponse)
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
"LastModifiedTime")
            Either
  String
  (Text
   -> ModelArtifacts
   -> Text
   -> InputConfig
   -> OutputConfig
   -> DescribeCompilationJobResponse)
-> Either String Text
-> Either
     String
     (ModelArtifacts
      -> Text
      -> InputConfig
      -> OutputConfig
      -> DescribeCompilationJobResponse)
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
"FailureReason")
            Either
  String
  (ModelArtifacts
   -> Text
   -> InputConfig
   -> OutputConfig
   -> DescribeCompilationJobResponse)
-> Either String ModelArtifacts
-> Either
     String
     (Text
      -> InputConfig -> OutputConfig -> DescribeCompilationJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String ModelArtifacts
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"ModelArtifacts")
            Either
  String
  (Text
   -> InputConfig -> OutputConfig -> DescribeCompilationJobResponse)
-> Either String Text
-> Either
     String
     (InputConfig -> OutputConfig -> DescribeCompilationJobResponse)
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
"RoleArn")
            Either
  String
  (InputConfig -> OutputConfig -> DescribeCompilationJobResponse)
-> Either String InputConfig
-> Either String (OutputConfig -> DescribeCompilationJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String InputConfig
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"InputConfig")
            Either String (OutputConfig -> DescribeCompilationJobResponse)
-> Either String OutputConfig
-> Either String DescribeCompilationJobResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String OutputConfig
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"OutputConfig")
      )

instance Prelude.Hashable DescribeCompilationJob

instance Prelude.NFData DescribeCompilationJob

instance Core.ToHeaders DescribeCompilationJob where
  toHeaders :: DescribeCompilationJob -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeCompilationJob -> 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.DescribeCompilationJob" ::
                          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 DescribeCompilationJob where
  toJSON :: DescribeCompilationJob -> Value
toJSON DescribeCompilationJob' {Text
compilationJobName :: Text
$sel:compilationJobName:DescribeCompilationJob' :: DescribeCompilationJob -> 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
"CompilationJobName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
compilationJobName)
          ]
      )

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

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

-- | /See:/ 'newDescribeCompilationJobResponse' smart constructor.
data DescribeCompilationJobResponse = DescribeCompilationJobResponse'
  { -- | Provides a BLAKE2 hash value that identifies the compiled model
    -- artifacts in Amazon S3.
    DescribeCompilationJobResponse -> Maybe ModelDigests
modelDigests :: Prelude.Maybe ModelDigests,
    -- | The time when the model compilation job started the @CompilationJob@
    -- instances.
    --
    -- You are billed for the time between this timestamp and the timestamp in
    -- the DescribeCompilationJobResponse$CompilationEndTime field. In Amazon
    -- CloudWatch Logs, the start time might be later than this time. That\'s
    -- because it takes time to download the compilation job, which depends on
    -- the size of the compilation job container.
    DescribeCompilationJobResponse -> Maybe POSIX
compilationStartTime :: Prelude.Maybe Core.POSIX,
    -- | The inference image to use when compiling a model. Specify an image only
    -- if the target device is a cloud instance.
    DescribeCompilationJobResponse -> Maybe Text
inferenceImage :: Prelude.Maybe Prelude.Text,
    -- | A VpcConfig object that specifies the VPC that you want your compilation
    -- job to connect to. Control access to your models by configuring the VPC.
    -- For more information, see
    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/neo-vpc.html Protect Compilation Jobs by Using an Amazon Virtual Private Cloud>.
    DescribeCompilationJobResponse -> Maybe NeoVpcConfig
vpcConfig :: Prelude.Maybe NeoVpcConfig,
    -- | The time when the model compilation job on a compilation job instance
    -- ended. For a successful or stopped job, this is when the job\'s model
    -- artifacts have finished uploading. For a failed job, this is when Amazon
    -- SageMaker detected that the job failed.
    DescribeCompilationJobResponse -> Maybe POSIX
compilationEndTime :: Prelude.Maybe Core.POSIX,
    -- | The response's http status code.
    DescribeCompilationJobResponse -> Int
httpStatus :: Prelude.Int,
    -- | The name of the model compilation job.
    DescribeCompilationJobResponse -> Text
compilationJobName :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the model compilation job.
    DescribeCompilationJobResponse -> Text
compilationJobArn :: Prelude.Text,
    -- | The status of the model compilation job.
    DescribeCompilationJobResponse -> CompilationJobStatus
compilationJobStatus :: CompilationJobStatus,
    -- | Specifies a limit to how long a model compilation job can run. When the
    -- job reaches the time limit, Amazon SageMaker ends the compilation job.
    -- Use this API to cap model training costs.
    DescribeCompilationJobResponse -> StoppingCondition
stoppingCondition :: StoppingCondition,
    -- | The time that the model compilation job was created.
    DescribeCompilationJobResponse -> POSIX
creationTime :: Core.POSIX,
    -- | The time that the status of the model compilation job was last modified.
    DescribeCompilationJobResponse -> POSIX
lastModifiedTime :: Core.POSIX,
    -- | If a model compilation job failed, the reason it failed.
    DescribeCompilationJobResponse -> Text
failureReason :: Prelude.Text,
    -- | Information about the location in Amazon S3 that has been configured for
    -- storing the model artifacts used in the compilation job.
    DescribeCompilationJobResponse -> ModelArtifacts
modelArtifacts :: ModelArtifacts,
    -- | The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker
    -- assumes to perform the model compilation job.
    DescribeCompilationJobResponse -> Text
roleArn :: Prelude.Text,
    -- | Information about the location in Amazon S3 of the input model
    -- artifacts, the name and shape of the expected data inputs, and the
    -- framework in which the model was trained.
    DescribeCompilationJobResponse -> InputConfig
inputConfig :: InputConfig,
    -- | Information about the output location for the compiled model and the
    -- target device that the model runs on.
    DescribeCompilationJobResponse -> OutputConfig
outputConfig :: OutputConfig
  }
  deriving (DescribeCompilationJobResponse
-> DescribeCompilationJobResponse -> Bool
(DescribeCompilationJobResponse
 -> DescribeCompilationJobResponse -> Bool)
-> (DescribeCompilationJobResponse
    -> DescribeCompilationJobResponse -> Bool)
-> Eq DescribeCompilationJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeCompilationJobResponse
-> DescribeCompilationJobResponse -> Bool
$c/= :: DescribeCompilationJobResponse
-> DescribeCompilationJobResponse -> Bool
== :: DescribeCompilationJobResponse
-> DescribeCompilationJobResponse -> Bool
$c== :: DescribeCompilationJobResponse
-> DescribeCompilationJobResponse -> Bool
Prelude.Eq, ReadPrec [DescribeCompilationJobResponse]
ReadPrec DescribeCompilationJobResponse
Int -> ReadS DescribeCompilationJobResponse
ReadS [DescribeCompilationJobResponse]
(Int -> ReadS DescribeCompilationJobResponse)
-> ReadS [DescribeCompilationJobResponse]
-> ReadPrec DescribeCompilationJobResponse
-> ReadPrec [DescribeCompilationJobResponse]
-> Read DescribeCompilationJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeCompilationJobResponse]
$creadListPrec :: ReadPrec [DescribeCompilationJobResponse]
readPrec :: ReadPrec DescribeCompilationJobResponse
$creadPrec :: ReadPrec DescribeCompilationJobResponse
readList :: ReadS [DescribeCompilationJobResponse]
$creadList :: ReadS [DescribeCompilationJobResponse]
readsPrec :: Int -> ReadS DescribeCompilationJobResponse
$creadsPrec :: Int -> ReadS DescribeCompilationJobResponse
Prelude.Read, Int -> DescribeCompilationJobResponse -> ShowS
[DescribeCompilationJobResponse] -> ShowS
DescribeCompilationJobResponse -> String
(Int -> DescribeCompilationJobResponse -> ShowS)
-> (DescribeCompilationJobResponse -> String)
-> ([DescribeCompilationJobResponse] -> ShowS)
-> Show DescribeCompilationJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeCompilationJobResponse] -> ShowS
$cshowList :: [DescribeCompilationJobResponse] -> ShowS
show :: DescribeCompilationJobResponse -> String
$cshow :: DescribeCompilationJobResponse -> String
showsPrec :: Int -> DescribeCompilationJobResponse -> ShowS
$cshowsPrec :: Int -> DescribeCompilationJobResponse -> ShowS
Prelude.Show, (forall x.
 DescribeCompilationJobResponse
 -> Rep DescribeCompilationJobResponse x)
-> (forall x.
    Rep DescribeCompilationJobResponse x
    -> DescribeCompilationJobResponse)
-> Generic DescribeCompilationJobResponse
forall x.
Rep DescribeCompilationJobResponse x
-> DescribeCompilationJobResponse
forall x.
DescribeCompilationJobResponse
-> Rep DescribeCompilationJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeCompilationJobResponse x
-> DescribeCompilationJobResponse
$cfrom :: forall x.
DescribeCompilationJobResponse
-> Rep DescribeCompilationJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeCompilationJobResponse' 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:
--
-- 'modelDigests', 'describeCompilationJobResponse_modelDigests' - Provides a BLAKE2 hash value that identifies the compiled model
-- artifacts in Amazon S3.
--
-- 'compilationStartTime', 'describeCompilationJobResponse_compilationStartTime' - The time when the model compilation job started the @CompilationJob@
-- instances.
--
-- You are billed for the time between this timestamp and the timestamp in
-- the DescribeCompilationJobResponse$CompilationEndTime field. In Amazon
-- CloudWatch Logs, the start time might be later than this time. That\'s
-- because it takes time to download the compilation job, which depends on
-- the size of the compilation job container.
--
-- 'inferenceImage', 'describeCompilationJobResponse_inferenceImage' - The inference image to use when compiling a model. Specify an image only
-- if the target device is a cloud instance.
--
-- 'vpcConfig', 'describeCompilationJobResponse_vpcConfig' - A VpcConfig object that specifies the VPC that you want your compilation
-- job to connect to. Control access to your models by configuring the VPC.
-- For more information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/neo-vpc.html Protect Compilation Jobs by Using an Amazon Virtual Private Cloud>.
--
-- 'compilationEndTime', 'describeCompilationJobResponse_compilationEndTime' - The time when the model compilation job on a compilation job instance
-- ended. For a successful or stopped job, this is when the job\'s model
-- artifacts have finished uploading. For a failed job, this is when Amazon
-- SageMaker detected that the job failed.
--
-- 'httpStatus', 'describeCompilationJobResponse_httpStatus' - The response's http status code.
--
-- 'compilationJobName', 'describeCompilationJobResponse_compilationJobName' - The name of the model compilation job.
--
-- 'compilationJobArn', 'describeCompilationJobResponse_compilationJobArn' - The Amazon Resource Name (ARN) of the model compilation job.
--
-- 'compilationJobStatus', 'describeCompilationJobResponse_compilationJobStatus' - The status of the model compilation job.
--
-- 'stoppingCondition', 'describeCompilationJobResponse_stoppingCondition' - Specifies a limit to how long a model compilation job can run. When the
-- job reaches the time limit, Amazon SageMaker ends the compilation job.
-- Use this API to cap model training costs.
--
-- 'creationTime', 'describeCompilationJobResponse_creationTime' - The time that the model compilation job was created.
--
-- 'lastModifiedTime', 'describeCompilationJobResponse_lastModifiedTime' - The time that the status of the model compilation job was last modified.
--
-- 'failureReason', 'describeCompilationJobResponse_failureReason' - If a model compilation job failed, the reason it failed.
--
-- 'modelArtifacts', 'describeCompilationJobResponse_modelArtifacts' - Information about the location in Amazon S3 that has been configured for
-- storing the model artifacts used in the compilation job.
--
-- 'roleArn', 'describeCompilationJobResponse_roleArn' - The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker
-- assumes to perform the model compilation job.
--
-- 'inputConfig', 'describeCompilationJobResponse_inputConfig' - Information about the location in Amazon S3 of the input model
-- artifacts, the name and shape of the expected data inputs, and the
-- framework in which the model was trained.
--
-- 'outputConfig', 'describeCompilationJobResponse_outputConfig' - Information about the output location for the compiled model and the
-- target device that the model runs on.
newDescribeCompilationJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'compilationJobName'
  Prelude.Text ->
  -- | 'compilationJobArn'
  Prelude.Text ->
  -- | 'compilationJobStatus'
  CompilationJobStatus ->
  -- | 'stoppingCondition'
  StoppingCondition ->
  -- | 'creationTime'
  Prelude.UTCTime ->
  -- | 'lastModifiedTime'
  Prelude.UTCTime ->
  -- | 'failureReason'
  Prelude.Text ->
  -- | 'modelArtifacts'
  ModelArtifacts ->
  -- | 'roleArn'
  Prelude.Text ->
  -- | 'inputConfig'
  InputConfig ->
  -- | 'outputConfig'
  OutputConfig ->
  DescribeCompilationJobResponse
newDescribeCompilationJobResponse :: Int
-> Text
-> Text
-> CompilationJobStatus
-> StoppingCondition
-> UTCTime
-> UTCTime
-> Text
-> ModelArtifacts
-> Text
-> InputConfig
-> OutputConfig
-> DescribeCompilationJobResponse
newDescribeCompilationJobResponse
  Int
pHttpStatus_
  Text
pCompilationJobName_
  Text
pCompilationJobArn_
  CompilationJobStatus
pCompilationJobStatus_
  StoppingCondition
pStoppingCondition_
  UTCTime
pCreationTime_
  UTCTime
pLastModifiedTime_
  Text
pFailureReason_
  ModelArtifacts
pModelArtifacts_
  Text
pRoleArn_
  InputConfig
pInputConfig_
  OutputConfig
pOutputConfig_ =
    DescribeCompilationJobResponse' :: Maybe ModelDigests
-> Maybe POSIX
-> Maybe Text
-> Maybe NeoVpcConfig
-> Maybe POSIX
-> Int
-> Text
-> Text
-> CompilationJobStatus
-> StoppingCondition
-> POSIX
-> POSIX
-> Text
-> ModelArtifacts
-> Text
-> InputConfig
-> OutputConfig
-> DescribeCompilationJobResponse
DescribeCompilationJobResponse'
      { $sel:modelDigests:DescribeCompilationJobResponse' :: Maybe ModelDigests
modelDigests =
          Maybe ModelDigests
forall a. Maybe a
Prelude.Nothing,
        $sel:compilationStartTime:DescribeCompilationJobResponse' :: Maybe POSIX
compilationStartTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:inferenceImage:DescribeCompilationJobResponse' :: Maybe Text
inferenceImage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:vpcConfig:DescribeCompilationJobResponse' :: Maybe NeoVpcConfig
vpcConfig = Maybe NeoVpcConfig
forall a. Maybe a
Prelude.Nothing,
        $sel:compilationEndTime:DescribeCompilationJobResponse' :: Maybe POSIX
compilationEndTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeCompilationJobResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:compilationJobName:DescribeCompilationJobResponse' :: Text
compilationJobName = Text
pCompilationJobName_,
        $sel:compilationJobArn:DescribeCompilationJobResponse' :: Text
compilationJobArn = Text
pCompilationJobArn_,
        $sel:compilationJobStatus:DescribeCompilationJobResponse' :: CompilationJobStatus
compilationJobStatus =
          CompilationJobStatus
pCompilationJobStatus_,
        $sel:stoppingCondition:DescribeCompilationJobResponse' :: StoppingCondition
stoppingCondition = StoppingCondition
pStoppingCondition_,
        $sel:creationTime:DescribeCompilationJobResponse' :: 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:lastModifiedTime:DescribeCompilationJobResponse' :: POSIX
lastModifiedTime =
          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
pLastModifiedTime_,
        $sel:failureReason:DescribeCompilationJobResponse' :: Text
failureReason = Text
pFailureReason_,
        $sel:modelArtifacts:DescribeCompilationJobResponse' :: ModelArtifacts
modelArtifacts = ModelArtifacts
pModelArtifacts_,
        $sel:roleArn:DescribeCompilationJobResponse' :: Text
roleArn = Text
pRoleArn_,
        $sel:inputConfig:DescribeCompilationJobResponse' :: InputConfig
inputConfig = InputConfig
pInputConfig_,
        $sel:outputConfig:DescribeCompilationJobResponse' :: OutputConfig
outputConfig = OutputConfig
pOutputConfig_
      }

-- | Provides a BLAKE2 hash value that identifies the compiled model
-- artifacts in Amazon S3.
describeCompilationJobResponse_modelDigests :: Lens.Lens' DescribeCompilationJobResponse (Prelude.Maybe ModelDigests)
describeCompilationJobResponse_modelDigests :: (Maybe ModelDigests -> f (Maybe ModelDigests))
-> DescribeCompilationJobResponse
-> f DescribeCompilationJobResponse
describeCompilationJobResponse_modelDigests = (DescribeCompilationJobResponse -> Maybe ModelDigests)
-> (DescribeCompilationJobResponse
    -> Maybe ModelDigests -> DescribeCompilationJobResponse)
-> Lens
     DescribeCompilationJobResponse
     DescribeCompilationJobResponse
     (Maybe ModelDigests)
     (Maybe ModelDigests)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCompilationJobResponse' {Maybe ModelDigests
modelDigests :: Maybe ModelDigests
$sel:modelDigests:DescribeCompilationJobResponse' :: DescribeCompilationJobResponse -> Maybe ModelDigests
modelDigests} -> Maybe ModelDigests
modelDigests) (\s :: DescribeCompilationJobResponse
s@DescribeCompilationJobResponse' {} Maybe ModelDigests
a -> DescribeCompilationJobResponse
s {$sel:modelDigests:DescribeCompilationJobResponse' :: Maybe ModelDigests
modelDigests = Maybe ModelDigests
a} :: DescribeCompilationJobResponse)

-- | The time when the model compilation job started the @CompilationJob@
-- instances.
--
-- You are billed for the time between this timestamp and the timestamp in
-- the DescribeCompilationJobResponse$CompilationEndTime field. In Amazon
-- CloudWatch Logs, the start time might be later than this time. That\'s
-- because it takes time to download the compilation job, which depends on
-- the size of the compilation job container.
describeCompilationJobResponse_compilationStartTime :: Lens.Lens' DescribeCompilationJobResponse (Prelude.Maybe Prelude.UTCTime)
describeCompilationJobResponse_compilationStartTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeCompilationJobResponse
-> f DescribeCompilationJobResponse
describeCompilationJobResponse_compilationStartTime = (DescribeCompilationJobResponse -> Maybe POSIX)
-> (DescribeCompilationJobResponse
    -> Maybe POSIX -> DescribeCompilationJobResponse)
-> Lens
     DescribeCompilationJobResponse
     DescribeCompilationJobResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCompilationJobResponse' {Maybe POSIX
compilationStartTime :: Maybe POSIX
$sel:compilationStartTime:DescribeCompilationJobResponse' :: DescribeCompilationJobResponse -> Maybe POSIX
compilationStartTime} -> Maybe POSIX
compilationStartTime) (\s :: DescribeCompilationJobResponse
s@DescribeCompilationJobResponse' {} Maybe POSIX
a -> DescribeCompilationJobResponse
s {$sel:compilationStartTime:DescribeCompilationJobResponse' :: Maybe POSIX
compilationStartTime = Maybe POSIX
a} :: DescribeCompilationJobResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeCompilationJobResponse
 -> f DescribeCompilationJobResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeCompilationJobResponse
-> f DescribeCompilationJobResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The inference image to use when compiling a model. Specify an image only
-- if the target device is a cloud instance.
describeCompilationJobResponse_inferenceImage :: Lens.Lens' DescribeCompilationJobResponse (Prelude.Maybe Prelude.Text)
describeCompilationJobResponse_inferenceImage :: (Maybe Text -> f (Maybe Text))
-> DescribeCompilationJobResponse
-> f DescribeCompilationJobResponse
describeCompilationJobResponse_inferenceImage = (DescribeCompilationJobResponse -> Maybe Text)
-> (DescribeCompilationJobResponse
    -> Maybe Text -> DescribeCompilationJobResponse)
-> Lens
     DescribeCompilationJobResponse
     DescribeCompilationJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCompilationJobResponse' {Maybe Text
inferenceImage :: Maybe Text
$sel:inferenceImage:DescribeCompilationJobResponse' :: DescribeCompilationJobResponse -> Maybe Text
inferenceImage} -> Maybe Text
inferenceImage) (\s :: DescribeCompilationJobResponse
s@DescribeCompilationJobResponse' {} Maybe Text
a -> DescribeCompilationJobResponse
s {$sel:inferenceImage:DescribeCompilationJobResponse' :: Maybe Text
inferenceImage = Maybe Text
a} :: DescribeCompilationJobResponse)

-- | A VpcConfig object that specifies the VPC that you want your compilation
-- job to connect to. Control access to your models by configuring the VPC.
-- For more information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/neo-vpc.html Protect Compilation Jobs by Using an Amazon Virtual Private Cloud>.
describeCompilationJobResponse_vpcConfig :: Lens.Lens' DescribeCompilationJobResponse (Prelude.Maybe NeoVpcConfig)
describeCompilationJobResponse_vpcConfig :: (Maybe NeoVpcConfig -> f (Maybe NeoVpcConfig))
-> DescribeCompilationJobResponse
-> f DescribeCompilationJobResponse
describeCompilationJobResponse_vpcConfig = (DescribeCompilationJobResponse -> Maybe NeoVpcConfig)
-> (DescribeCompilationJobResponse
    -> Maybe NeoVpcConfig -> DescribeCompilationJobResponse)
-> Lens
     DescribeCompilationJobResponse
     DescribeCompilationJobResponse
     (Maybe NeoVpcConfig)
     (Maybe NeoVpcConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCompilationJobResponse' {Maybe NeoVpcConfig
vpcConfig :: Maybe NeoVpcConfig
$sel:vpcConfig:DescribeCompilationJobResponse' :: DescribeCompilationJobResponse -> Maybe NeoVpcConfig
vpcConfig} -> Maybe NeoVpcConfig
vpcConfig) (\s :: DescribeCompilationJobResponse
s@DescribeCompilationJobResponse' {} Maybe NeoVpcConfig
a -> DescribeCompilationJobResponse
s {$sel:vpcConfig:DescribeCompilationJobResponse' :: Maybe NeoVpcConfig
vpcConfig = Maybe NeoVpcConfig
a} :: DescribeCompilationJobResponse)

-- | The time when the model compilation job on a compilation job instance
-- ended. For a successful or stopped job, this is when the job\'s model
-- artifacts have finished uploading. For a failed job, this is when Amazon
-- SageMaker detected that the job failed.
describeCompilationJobResponse_compilationEndTime :: Lens.Lens' DescribeCompilationJobResponse (Prelude.Maybe Prelude.UTCTime)
describeCompilationJobResponse_compilationEndTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeCompilationJobResponse
-> f DescribeCompilationJobResponse
describeCompilationJobResponse_compilationEndTime = (DescribeCompilationJobResponse -> Maybe POSIX)
-> (DescribeCompilationJobResponse
    -> Maybe POSIX -> DescribeCompilationJobResponse)
-> Lens
     DescribeCompilationJobResponse
     DescribeCompilationJobResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCompilationJobResponse' {Maybe POSIX
compilationEndTime :: Maybe POSIX
$sel:compilationEndTime:DescribeCompilationJobResponse' :: DescribeCompilationJobResponse -> Maybe POSIX
compilationEndTime} -> Maybe POSIX
compilationEndTime) (\s :: DescribeCompilationJobResponse
s@DescribeCompilationJobResponse' {} Maybe POSIX
a -> DescribeCompilationJobResponse
s {$sel:compilationEndTime:DescribeCompilationJobResponse' :: Maybe POSIX
compilationEndTime = Maybe POSIX
a} :: DescribeCompilationJobResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeCompilationJobResponse
 -> f DescribeCompilationJobResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeCompilationJobResponse
-> f DescribeCompilationJobResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

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

-- | The name of the model compilation job.
describeCompilationJobResponse_compilationJobName :: Lens.Lens' DescribeCompilationJobResponse Prelude.Text
describeCompilationJobResponse_compilationJobName :: (Text -> f Text)
-> DescribeCompilationJobResponse
-> f DescribeCompilationJobResponse
describeCompilationJobResponse_compilationJobName = (DescribeCompilationJobResponse -> Text)
-> (DescribeCompilationJobResponse
    -> Text -> DescribeCompilationJobResponse)
-> Lens
     DescribeCompilationJobResponse
     DescribeCompilationJobResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCompilationJobResponse' {Text
compilationJobName :: Text
$sel:compilationJobName:DescribeCompilationJobResponse' :: DescribeCompilationJobResponse -> Text
compilationJobName} -> Text
compilationJobName) (\s :: DescribeCompilationJobResponse
s@DescribeCompilationJobResponse' {} Text
a -> DescribeCompilationJobResponse
s {$sel:compilationJobName:DescribeCompilationJobResponse' :: Text
compilationJobName = Text
a} :: DescribeCompilationJobResponse)

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

-- | The status of the model compilation job.
describeCompilationJobResponse_compilationJobStatus :: Lens.Lens' DescribeCompilationJobResponse CompilationJobStatus
describeCompilationJobResponse_compilationJobStatus :: (CompilationJobStatus -> f CompilationJobStatus)
-> DescribeCompilationJobResponse
-> f DescribeCompilationJobResponse
describeCompilationJobResponse_compilationJobStatus = (DescribeCompilationJobResponse -> CompilationJobStatus)
-> (DescribeCompilationJobResponse
    -> CompilationJobStatus -> DescribeCompilationJobResponse)
-> Lens
     DescribeCompilationJobResponse
     DescribeCompilationJobResponse
     CompilationJobStatus
     CompilationJobStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCompilationJobResponse' {CompilationJobStatus
compilationJobStatus :: CompilationJobStatus
$sel:compilationJobStatus:DescribeCompilationJobResponse' :: DescribeCompilationJobResponse -> CompilationJobStatus
compilationJobStatus} -> CompilationJobStatus
compilationJobStatus) (\s :: DescribeCompilationJobResponse
s@DescribeCompilationJobResponse' {} CompilationJobStatus
a -> DescribeCompilationJobResponse
s {$sel:compilationJobStatus:DescribeCompilationJobResponse' :: CompilationJobStatus
compilationJobStatus = CompilationJobStatus
a} :: DescribeCompilationJobResponse)

-- | Specifies a limit to how long a model compilation job can run. When the
-- job reaches the time limit, Amazon SageMaker ends the compilation job.
-- Use this API to cap model training costs.
describeCompilationJobResponse_stoppingCondition :: Lens.Lens' DescribeCompilationJobResponse StoppingCondition
describeCompilationJobResponse_stoppingCondition :: (StoppingCondition -> f StoppingCondition)
-> DescribeCompilationJobResponse
-> f DescribeCompilationJobResponse
describeCompilationJobResponse_stoppingCondition = (DescribeCompilationJobResponse -> StoppingCondition)
-> (DescribeCompilationJobResponse
    -> StoppingCondition -> DescribeCompilationJobResponse)
-> Lens
     DescribeCompilationJobResponse
     DescribeCompilationJobResponse
     StoppingCondition
     StoppingCondition
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCompilationJobResponse' {StoppingCondition
stoppingCondition :: StoppingCondition
$sel:stoppingCondition:DescribeCompilationJobResponse' :: DescribeCompilationJobResponse -> StoppingCondition
stoppingCondition} -> StoppingCondition
stoppingCondition) (\s :: DescribeCompilationJobResponse
s@DescribeCompilationJobResponse' {} StoppingCondition
a -> DescribeCompilationJobResponse
s {$sel:stoppingCondition:DescribeCompilationJobResponse' :: StoppingCondition
stoppingCondition = StoppingCondition
a} :: DescribeCompilationJobResponse)

-- | The time that the model compilation job was created.
describeCompilationJobResponse_creationTime :: Lens.Lens' DescribeCompilationJobResponse Prelude.UTCTime
describeCompilationJobResponse_creationTime :: (UTCTime -> f UTCTime)
-> DescribeCompilationJobResponse
-> f DescribeCompilationJobResponse
describeCompilationJobResponse_creationTime = (DescribeCompilationJobResponse -> POSIX)
-> (DescribeCompilationJobResponse
    -> POSIX -> DescribeCompilationJobResponse)
-> Lens
     DescribeCompilationJobResponse
     DescribeCompilationJobResponse
     POSIX
     POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCompilationJobResponse' {POSIX
creationTime :: POSIX
$sel:creationTime:DescribeCompilationJobResponse' :: DescribeCompilationJobResponse -> POSIX
creationTime} -> POSIX
creationTime) (\s :: DescribeCompilationJobResponse
s@DescribeCompilationJobResponse' {} POSIX
a -> DescribeCompilationJobResponse
s {$sel:creationTime:DescribeCompilationJobResponse' :: POSIX
creationTime = POSIX
a} :: DescribeCompilationJobResponse) ((POSIX -> f POSIX)
 -> DescribeCompilationJobResponse
 -> f DescribeCompilationJobResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> DescribeCompilationJobResponse
-> f DescribeCompilationJobResponse
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 time that the status of the model compilation job was last modified.
describeCompilationJobResponse_lastModifiedTime :: Lens.Lens' DescribeCompilationJobResponse Prelude.UTCTime
describeCompilationJobResponse_lastModifiedTime :: (UTCTime -> f UTCTime)
-> DescribeCompilationJobResponse
-> f DescribeCompilationJobResponse
describeCompilationJobResponse_lastModifiedTime = (DescribeCompilationJobResponse -> POSIX)
-> (DescribeCompilationJobResponse
    -> POSIX -> DescribeCompilationJobResponse)
-> Lens
     DescribeCompilationJobResponse
     DescribeCompilationJobResponse
     POSIX
     POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCompilationJobResponse' {POSIX
lastModifiedTime :: POSIX
$sel:lastModifiedTime:DescribeCompilationJobResponse' :: DescribeCompilationJobResponse -> POSIX
lastModifiedTime} -> POSIX
lastModifiedTime) (\s :: DescribeCompilationJobResponse
s@DescribeCompilationJobResponse' {} POSIX
a -> DescribeCompilationJobResponse
s {$sel:lastModifiedTime:DescribeCompilationJobResponse' :: POSIX
lastModifiedTime = POSIX
a} :: DescribeCompilationJobResponse) ((POSIX -> f POSIX)
 -> DescribeCompilationJobResponse
 -> f DescribeCompilationJobResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> DescribeCompilationJobResponse
-> f DescribeCompilationJobResponse
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

-- | If a model compilation job failed, the reason it failed.
describeCompilationJobResponse_failureReason :: Lens.Lens' DescribeCompilationJobResponse Prelude.Text
describeCompilationJobResponse_failureReason :: (Text -> f Text)
-> DescribeCompilationJobResponse
-> f DescribeCompilationJobResponse
describeCompilationJobResponse_failureReason = (DescribeCompilationJobResponse -> Text)
-> (DescribeCompilationJobResponse
    -> Text -> DescribeCompilationJobResponse)
-> Lens
     DescribeCompilationJobResponse
     DescribeCompilationJobResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCompilationJobResponse' {Text
failureReason :: Text
$sel:failureReason:DescribeCompilationJobResponse' :: DescribeCompilationJobResponse -> Text
failureReason} -> Text
failureReason) (\s :: DescribeCompilationJobResponse
s@DescribeCompilationJobResponse' {} Text
a -> DescribeCompilationJobResponse
s {$sel:failureReason:DescribeCompilationJobResponse' :: Text
failureReason = Text
a} :: DescribeCompilationJobResponse)

-- | Information about the location in Amazon S3 that has been configured for
-- storing the model artifacts used in the compilation job.
describeCompilationJobResponse_modelArtifacts :: Lens.Lens' DescribeCompilationJobResponse ModelArtifacts
describeCompilationJobResponse_modelArtifacts :: (ModelArtifacts -> f ModelArtifacts)
-> DescribeCompilationJobResponse
-> f DescribeCompilationJobResponse
describeCompilationJobResponse_modelArtifacts = (DescribeCompilationJobResponse -> ModelArtifacts)
-> (DescribeCompilationJobResponse
    -> ModelArtifacts -> DescribeCompilationJobResponse)
-> Lens
     DescribeCompilationJobResponse
     DescribeCompilationJobResponse
     ModelArtifacts
     ModelArtifacts
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCompilationJobResponse' {ModelArtifacts
modelArtifacts :: ModelArtifacts
$sel:modelArtifacts:DescribeCompilationJobResponse' :: DescribeCompilationJobResponse -> ModelArtifacts
modelArtifacts} -> ModelArtifacts
modelArtifacts) (\s :: DescribeCompilationJobResponse
s@DescribeCompilationJobResponse' {} ModelArtifacts
a -> DescribeCompilationJobResponse
s {$sel:modelArtifacts:DescribeCompilationJobResponse' :: ModelArtifacts
modelArtifacts = ModelArtifacts
a} :: DescribeCompilationJobResponse)

-- | The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker
-- assumes to perform the model compilation job.
describeCompilationJobResponse_roleArn :: Lens.Lens' DescribeCompilationJobResponse Prelude.Text
describeCompilationJobResponse_roleArn :: (Text -> f Text)
-> DescribeCompilationJobResponse
-> f DescribeCompilationJobResponse
describeCompilationJobResponse_roleArn = (DescribeCompilationJobResponse -> Text)
-> (DescribeCompilationJobResponse
    -> Text -> DescribeCompilationJobResponse)
-> Lens
     DescribeCompilationJobResponse
     DescribeCompilationJobResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCompilationJobResponse' {Text
roleArn :: Text
$sel:roleArn:DescribeCompilationJobResponse' :: DescribeCompilationJobResponse -> Text
roleArn} -> Text
roleArn) (\s :: DescribeCompilationJobResponse
s@DescribeCompilationJobResponse' {} Text
a -> DescribeCompilationJobResponse
s {$sel:roleArn:DescribeCompilationJobResponse' :: Text
roleArn = Text
a} :: DescribeCompilationJobResponse)

-- | Information about the location in Amazon S3 of the input model
-- artifacts, the name and shape of the expected data inputs, and the
-- framework in which the model was trained.
describeCompilationJobResponse_inputConfig :: Lens.Lens' DescribeCompilationJobResponse InputConfig
describeCompilationJobResponse_inputConfig :: (InputConfig -> f InputConfig)
-> DescribeCompilationJobResponse
-> f DescribeCompilationJobResponse
describeCompilationJobResponse_inputConfig = (DescribeCompilationJobResponse -> InputConfig)
-> (DescribeCompilationJobResponse
    -> InputConfig -> DescribeCompilationJobResponse)
-> Lens
     DescribeCompilationJobResponse
     DescribeCompilationJobResponse
     InputConfig
     InputConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCompilationJobResponse' {InputConfig
inputConfig :: InputConfig
$sel:inputConfig:DescribeCompilationJobResponse' :: DescribeCompilationJobResponse -> InputConfig
inputConfig} -> InputConfig
inputConfig) (\s :: DescribeCompilationJobResponse
s@DescribeCompilationJobResponse' {} InputConfig
a -> DescribeCompilationJobResponse
s {$sel:inputConfig:DescribeCompilationJobResponse' :: InputConfig
inputConfig = InputConfig
a} :: DescribeCompilationJobResponse)

-- | Information about the output location for the compiled model and the
-- target device that the model runs on.
describeCompilationJobResponse_outputConfig :: Lens.Lens' DescribeCompilationJobResponse OutputConfig
describeCompilationJobResponse_outputConfig :: (OutputConfig -> f OutputConfig)
-> DescribeCompilationJobResponse
-> f DescribeCompilationJobResponse
describeCompilationJobResponse_outputConfig = (DescribeCompilationJobResponse -> OutputConfig)
-> (DescribeCompilationJobResponse
    -> OutputConfig -> DescribeCompilationJobResponse)
-> Lens
     DescribeCompilationJobResponse
     DescribeCompilationJobResponse
     OutputConfig
     OutputConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCompilationJobResponse' {OutputConfig
outputConfig :: OutputConfig
$sel:outputConfig:DescribeCompilationJobResponse' :: DescribeCompilationJobResponse -> OutputConfig
outputConfig} -> OutputConfig
outputConfig) (\s :: DescribeCompilationJobResponse
s@DescribeCompilationJobResponse' {} OutputConfig
a -> DescribeCompilationJobResponse
s {$sel:outputConfig:DescribeCompilationJobResponse' :: OutputConfig
outputConfig = OutputConfig
a} :: DescribeCompilationJobResponse)

instance
  Prelude.NFData
    DescribeCompilationJobResponse