{-# 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.DescribeImage
-- 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 SageMaker image.
module Amazonka.SageMaker.DescribeImage
  ( -- * Creating a Request
    DescribeImage (..),
    newDescribeImage,

    -- * Request Lenses
    describeImage_imageName,

    -- * Destructuring the Response
    DescribeImageResponse (..),
    newDescribeImageResponse,

    -- * Response Lenses
    describeImageResponse_creationTime,
    describeImageResponse_failureReason,
    describeImageResponse_imageStatus,
    describeImageResponse_lastModifiedTime,
    describeImageResponse_imageArn,
    describeImageResponse_displayName,
    describeImageResponse_imageName,
    describeImageResponse_description,
    describeImageResponse_roleArn,
    describeImageResponse_httpStatus,
  )
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:/ 'newDescribeImage' smart constructor.
data DescribeImage = DescribeImage'
  { -- | The name of the image to describe.
    DescribeImage -> Text
imageName :: Prelude.Text
  }
  deriving (DescribeImage -> DescribeImage -> Bool
(DescribeImage -> DescribeImage -> Bool)
-> (DescribeImage -> DescribeImage -> Bool) -> Eq DescribeImage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeImage -> DescribeImage -> Bool
$c/= :: DescribeImage -> DescribeImage -> Bool
== :: DescribeImage -> DescribeImage -> Bool
$c== :: DescribeImage -> DescribeImage -> Bool
Prelude.Eq, ReadPrec [DescribeImage]
ReadPrec DescribeImage
Int -> ReadS DescribeImage
ReadS [DescribeImage]
(Int -> ReadS DescribeImage)
-> ReadS [DescribeImage]
-> ReadPrec DescribeImage
-> ReadPrec [DescribeImage]
-> Read DescribeImage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeImage]
$creadListPrec :: ReadPrec [DescribeImage]
readPrec :: ReadPrec DescribeImage
$creadPrec :: ReadPrec DescribeImage
readList :: ReadS [DescribeImage]
$creadList :: ReadS [DescribeImage]
readsPrec :: Int -> ReadS DescribeImage
$creadsPrec :: Int -> ReadS DescribeImage
Prelude.Read, Int -> DescribeImage -> ShowS
[DescribeImage] -> ShowS
DescribeImage -> String
(Int -> DescribeImage -> ShowS)
-> (DescribeImage -> String)
-> ([DescribeImage] -> ShowS)
-> Show DescribeImage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeImage] -> ShowS
$cshowList :: [DescribeImage] -> ShowS
show :: DescribeImage -> String
$cshow :: DescribeImage -> String
showsPrec :: Int -> DescribeImage -> ShowS
$cshowsPrec :: Int -> DescribeImage -> ShowS
Prelude.Show, (forall x. DescribeImage -> Rep DescribeImage x)
-> (forall x. Rep DescribeImage x -> DescribeImage)
-> Generic DescribeImage
forall x. Rep DescribeImage x -> DescribeImage
forall x. DescribeImage -> Rep DescribeImage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeImage x -> DescribeImage
$cfrom :: forall x. DescribeImage -> Rep DescribeImage x
Prelude.Generic)

-- |
-- Create a value of 'DescribeImage' 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:
--
-- 'imageName', 'describeImage_imageName' - The name of the image to describe.
newDescribeImage ::
  -- | 'imageName'
  Prelude.Text ->
  DescribeImage
newDescribeImage :: Text -> DescribeImage
newDescribeImage Text
pImageName_ =
  DescribeImage' :: Text -> DescribeImage
DescribeImage' {$sel:imageName:DescribeImage' :: Text
imageName = Text
pImageName_}

-- | The name of the image to describe.
describeImage_imageName :: Lens.Lens' DescribeImage Prelude.Text
describeImage_imageName :: (Text -> f Text) -> DescribeImage -> f DescribeImage
describeImage_imageName = (DescribeImage -> Text)
-> (DescribeImage -> Text -> DescribeImage)
-> Lens DescribeImage DescribeImage Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImage' {Text
imageName :: Text
$sel:imageName:DescribeImage' :: DescribeImage -> Text
imageName} -> Text
imageName) (\s :: DescribeImage
s@DescribeImage' {} Text
a -> DescribeImage
s {$sel:imageName:DescribeImage' :: Text
imageName = Text
a} :: DescribeImage)

instance Core.AWSRequest DescribeImage where
  type
    AWSResponse DescribeImage =
      DescribeImageResponse
  request :: DescribeImage -> Request DescribeImage
request = Service -> DescribeImage -> Request DescribeImage
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeImage
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeImage)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeImage))
-> Logger
-> Service
-> Proxy DescribeImage
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeImage)))
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 POSIX
-> Maybe Text
-> Maybe ImageStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeImageResponse
DescribeImageResponse'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe ImageStatus
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> DescribeImageResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe ImageStatus
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeImageResponse)
forall (f :: * -> *) a b. Functor 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
"CreationTime")
            Either
  String
  (Maybe Text
   -> Maybe ImageStatus
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeImageResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ImageStatus
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeImageResponse)
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
"FailureReason")
            Either
  String
  (Maybe ImageStatus
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeImageResponse)
-> Either String (Maybe ImageStatus)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeImageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ImageStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ImageStatus")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeImageResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeImageResponse)
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
"LastModifiedTime")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeImageResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeImageResponse)
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
"ImageArn")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeImageResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Int -> DescribeImageResponse)
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
"DisplayName")
            Either
  String
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Int -> DescribeImageResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Maybe Text -> Int -> DescribeImageResponse)
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
"ImageName")
            Either
  String (Maybe Text -> Maybe Text -> Int -> DescribeImageResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> DescribeImageResponse)
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
"Description")
            Either String (Maybe Text -> Int -> DescribeImageResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeImageResponse)
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
"RoleArn")
            Either String (Int -> DescribeImageResponse)
-> Either String Int -> Either String DescribeImageResponse
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))
      )

instance Prelude.Hashable DescribeImage

instance Prelude.NFData DescribeImage

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

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

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

-- | /See:/ 'newDescribeImageResponse' smart constructor.
data DescribeImageResponse = DescribeImageResponse'
  { -- | When the image was created.
    DescribeImageResponse -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | When a create, update, or delete operation fails, the reason for the
    -- failure.
    DescribeImageResponse -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | The status of the image.
    DescribeImageResponse -> Maybe ImageStatus
imageStatus :: Prelude.Maybe ImageStatus,
    -- | When the image was last modified.
    DescribeImageResponse -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
    -- | The Amazon Resource Name (ARN) of the image.
    DescribeImageResponse -> Maybe Text
imageArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the image as displayed.
    DescribeImageResponse -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
    -- | The name of the image.
    DescribeImageResponse -> Maybe Text
imageName :: Prelude.Maybe Prelude.Text,
    -- | The description of the image.
    DescribeImageResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the IAM role that enables Amazon
    -- SageMaker to perform tasks on your behalf.
    DescribeImageResponse -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeImageResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeImageResponse -> DescribeImageResponse -> Bool
(DescribeImageResponse -> DescribeImageResponse -> Bool)
-> (DescribeImageResponse -> DescribeImageResponse -> Bool)
-> Eq DescribeImageResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeImageResponse -> DescribeImageResponse -> Bool
$c/= :: DescribeImageResponse -> DescribeImageResponse -> Bool
== :: DescribeImageResponse -> DescribeImageResponse -> Bool
$c== :: DescribeImageResponse -> DescribeImageResponse -> Bool
Prelude.Eq, ReadPrec [DescribeImageResponse]
ReadPrec DescribeImageResponse
Int -> ReadS DescribeImageResponse
ReadS [DescribeImageResponse]
(Int -> ReadS DescribeImageResponse)
-> ReadS [DescribeImageResponse]
-> ReadPrec DescribeImageResponse
-> ReadPrec [DescribeImageResponse]
-> Read DescribeImageResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeImageResponse]
$creadListPrec :: ReadPrec [DescribeImageResponse]
readPrec :: ReadPrec DescribeImageResponse
$creadPrec :: ReadPrec DescribeImageResponse
readList :: ReadS [DescribeImageResponse]
$creadList :: ReadS [DescribeImageResponse]
readsPrec :: Int -> ReadS DescribeImageResponse
$creadsPrec :: Int -> ReadS DescribeImageResponse
Prelude.Read, Int -> DescribeImageResponse -> ShowS
[DescribeImageResponse] -> ShowS
DescribeImageResponse -> String
(Int -> DescribeImageResponse -> ShowS)
-> (DescribeImageResponse -> String)
-> ([DescribeImageResponse] -> ShowS)
-> Show DescribeImageResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeImageResponse] -> ShowS
$cshowList :: [DescribeImageResponse] -> ShowS
show :: DescribeImageResponse -> String
$cshow :: DescribeImageResponse -> String
showsPrec :: Int -> DescribeImageResponse -> ShowS
$cshowsPrec :: Int -> DescribeImageResponse -> ShowS
Prelude.Show, (forall x. DescribeImageResponse -> Rep DescribeImageResponse x)
-> (forall x. Rep DescribeImageResponse x -> DescribeImageResponse)
-> Generic DescribeImageResponse
forall x. Rep DescribeImageResponse x -> DescribeImageResponse
forall x. DescribeImageResponse -> Rep DescribeImageResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeImageResponse x -> DescribeImageResponse
$cfrom :: forall x. DescribeImageResponse -> Rep DescribeImageResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeImageResponse' 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:
--
-- 'creationTime', 'describeImageResponse_creationTime' - When the image was created.
--
-- 'failureReason', 'describeImageResponse_failureReason' - When a create, update, or delete operation fails, the reason for the
-- failure.
--
-- 'imageStatus', 'describeImageResponse_imageStatus' - The status of the image.
--
-- 'lastModifiedTime', 'describeImageResponse_lastModifiedTime' - When the image was last modified.
--
-- 'imageArn', 'describeImageResponse_imageArn' - The Amazon Resource Name (ARN) of the image.
--
-- 'displayName', 'describeImageResponse_displayName' - The name of the image as displayed.
--
-- 'imageName', 'describeImageResponse_imageName' - The name of the image.
--
-- 'description', 'describeImageResponse_description' - The description of the image.
--
-- 'roleArn', 'describeImageResponse_roleArn' - The Amazon Resource Name (ARN) of the IAM role that enables Amazon
-- SageMaker to perform tasks on your behalf.
--
-- 'httpStatus', 'describeImageResponse_httpStatus' - The response's http status code.
newDescribeImageResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeImageResponse
newDescribeImageResponse :: Int -> DescribeImageResponse
newDescribeImageResponse Int
pHttpStatus_ =
  DescribeImageResponse' :: Maybe POSIX
-> Maybe Text
-> Maybe ImageStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeImageResponse
DescribeImageResponse'
    { $sel:creationTime:DescribeImageResponse' :: Maybe POSIX
creationTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:failureReason:DescribeImageResponse' :: Maybe Text
failureReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:imageStatus:DescribeImageResponse' :: Maybe ImageStatus
imageStatus = Maybe ImageStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:DescribeImageResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:imageArn:DescribeImageResponse' :: Maybe Text
imageArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:displayName:DescribeImageResponse' :: Maybe Text
displayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:imageName:DescribeImageResponse' :: Maybe Text
imageName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:DescribeImageResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:DescribeImageResponse' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeImageResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | When the image was created.
describeImageResponse_creationTime :: Lens.Lens' DescribeImageResponse (Prelude.Maybe Prelude.UTCTime)
describeImageResponse_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeImageResponse -> f DescribeImageResponse
describeImageResponse_creationTime = (DescribeImageResponse -> Maybe POSIX)
-> (DescribeImageResponse -> Maybe POSIX -> DescribeImageResponse)
-> Lens
     DescribeImageResponse
     DescribeImageResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageResponse' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:DescribeImageResponse' :: DescribeImageResponse -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: DescribeImageResponse
s@DescribeImageResponse' {} Maybe POSIX
a -> DescribeImageResponse
s {$sel:creationTime:DescribeImageResponse' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: DescribeImageResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeImageResponse -> f DescribeImageResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeImageResponse
-> f DescribeImageResponse
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

-- | When a create, update, or delete operation fails, the reason for the
-- failure.
describeImageResponse_failureReason :: Lens.Lens' DescribeImageResponse (Prelude.Maybe Prelude.Text)
describeImageResponse_failureReason :: (Maybe Text -> f (Maybe Text))
-> DescribeImageResponse -> f DescribeImageResponse
describeImageResponse_failureReason = (DescribeImageResponse -> Maybe Text)
-> (DescribeImageResponse -> Maybe Text -> DescribeImageResponse)
-> Lens
     DescribeImageResponse
     DescribeImageResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageResponse' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:DescribeImageResponse' :: DescribeImageResponse -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: DescribeImageResponse
s@DescribeImageResponse' {} Maybe Text
a -> DescribeImageResponse
s {$sel:failureReason:DescribeImageResponse' :: Maybe Text
failureReason = Maybe Text
a} :: DescribeImageResponse)

-- | The status of the image.
describeImageResponse_imageStatus :: Lens.Lens' DescribeImageResponse (Prelude.Maybe ImageStatus)
describeImageResponse_imageStatus :: (Maybe ImageStatus -> f (Maybe ImageStatus))
-> DescribeImageResponse -> f DescribeImageResponse
describeImageResponse_imageStatus = (DescribeImageResponse -> Maybe ImageStatus)
-> (DescribeImageResponse
    -> Maybe ImageStatus -> DescribeImageResponse)
-> Lens
     DescribeImageResponse
     DescribeImageResponse
     (Maybe ImageStatus)
     (Maybe ImageStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageResponse' {Maybe ImageStatus
imageStatus :: Maybe ImageStatus
$sel:imageStatus:DescribeImageResponse' :: DescribeImageResponse -> Maybe ImageStatus
imageStatus} -> Maybe ImageStatus
imageStatus) (\s :: DescribeImageResponse
s@DescribeImageResponse' {} Maybe ImageStatus
a -> DescribeImageResponse
s {$sel:imageStatus:DescribeImageResponse' :: Maybe ImageStatus
imageStatus = Maybe ImageStatus
a} :: DescribeImageResponse)

-- | When the image was last modified.
describeImageResponse_lastModifiedTime :: Lens.Lens' DescribeImageResponse (Prelude.Maybe Prelude.UTCTime)
describeImageResponse_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeImageResponse -> f DescribeImageResponse
describeImageResponse_lastModifiedTime = (DescribeImageResponse -> Maybe POSIX)
-> (DescribeImageResponse -> Maybe POSIX -> DescribeImageResponse)
-> Lens
     DescribeImageResponse
     DescribeImageResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageResponse' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:DescribeImageResponse' :: DescribeImageResponse -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: DescribeImageResponse
s@DescribeImageResponse' {} Maybe POSIX
a -> DescribeImageResponse
s {$sel:lastModifiedTime:DescribeImageResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: DescribeImageResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeImageResponse -> f DescribeImageResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeImageResponse
-> f DescribeImageResponse
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 Amazon Resource Name (ARN) of the image.
describeImageResponse_imageArn :: Lens.Lens' DescribeImageResponse (Prelude.Maybe Prelude.Text)
describeImageResponse_imageArn :: (Maybe Text -> f (Maybe Text))
-> DescribeImageResponse -> f DescribeImageResponse
describeImageResponse_imageArn = (DescribeImageResponse -> Maybe Text)
-> (DescribeImageResponse -> Maybe Text -> DescribeImageResponse)
-> Lens
     DescribeImageResponse
     DescribeImageResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageResponse' {Maybe Text
imageArn :: Maybe Text
$sel:imageArn:DescribeImageResponse' :: DescribeImageResponse -> Maybe Text
imageArn} -> Maybe Text
imageArn) (\s :: DescribeImageResponse
s@DescribeImageResponse' {} Maybe Text
a -> DescribeImageResponse
s {$sel:imageArn:DescribeImageResponse' :: Maybe Text
imageArn = Maybe Text
a} :: DescribeImageResponse)

-- | The name of the image as displayed.
describeImageResponse_displayName :: Lens.Lens' DescribeImageResponse (Prelude.Maybe Prelude.Text)
describeImageResponse_displayName :: (Maybe Text -> f (Maybe Text))
-> DescribeImageResponse -> f DescribeImageResponse
describeImageResponse_displayName = (DescribeImageResponse -> Maybe Text)
-> (DescribeImageResponse -> Maybe Text -> DescribeImageResponse)
-> Lens
     DescribeImageResponse
     DescribeImageResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageResponse' {Maybe Text
displayName :: Maybe Text
$sel:displayName:DescribeImageResponse' :: DescribeImageResponse -> Maybe Text
displayName} -> Maybe Text
displayName) (\s :: DescribeImageResponse
s@DescribeImageResponse' {} Maybe Text
a -> DescribeImageResponse
s {$sel:displayName:DescribeImageResponse' :: Maybe Text
displayName = Maybe Text
a} :: DescribeImageResponse)

-- | The name of the image.
describeImageResponse_imageName :: Lens.Lens' DescribeImageResponse (Prelude.Maybe Prelude.Text)
describeImageResponse_imageName :: (Maybe Text -> f (Maybe Text))
-> DescribeImageResponse -> f DescribeImageResponse
describeImageResponse_imageName = (DescribeImageResponse -> Maybe Text)
-> (DescribeImageResponse -> Maybe Text -> DescribeImageResponse)
-> Lens
     DescribeImageResponse
     DescribeImageResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageResponse' {Maybe Text
imageName :: Maybe Text
$sel:imageName:DescribeImageResponse' :: DescribeImageResponse -> Maybe Text
imageName} -> Maybe Text
imageName) (\s :: DescribeImageResponse
s@DescribeImageResponse' {} Maybe Text
a -> DescribeImageResponse
s {$sel:imageName:DescribeImageResponse' :: Maybe Text
imageName = Maybe Text
a} :: DescribeImageResponse)

-- | The description of the image.
describeImageResponse_description :: Lens.Lens' DescribeImageResponse (Prelude.Maybe Prelude.Text)
describeImageResponse_description :: (Maybe Text -> f (Maybe Text))
-> DescribeImageResponse -> f DescribeImageResponse
describeImageResponse_description = (DescribeImageResponse -> Maybe Text)
-> (DescribeImageResponse -> Maybe Text -> DescribeImageResponse)
-> Lens
     DescribeImageResponse
     DescribeImageResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageResponse' {Maybe Text
description :: Maybe Text
$sel:description:DescribeImageResponse' :: DescribeImageResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: DescribeImageResponse
s@DescribeImageResponse' {} Maybe Text
a -> DescribeImageResponse
s {$sel:description:DescribeImageResponse' :: Maybe Text
description = Maybe Text
a} :: DescribeImageResponse)

-- | The Amazon Resource Name (ARN) of the IAM role that enables Amazon
-- SageMaker to perform tasks on your behalf.
describeImageResponse_roleArn :: Lens.Lens' DescribeImageResponse (Prelude.Maybe Prelude.Text)
describeImageResponse_roleArn :: (Maybe Text -> f (Maybe Text))
-> DescribeImageResponse -> f DescribeImageResponse
describeImageResponse_roleArn = (DescribeImageResponse -> Maybe Text)
-> (DescribeImageResponse -> Maybe Text -> DescribeImageResponse)
-> Lens
     DescribeImageResponse
     DescribeImageResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageResponse' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:DescribeImageResponse' :: DescribeImageResponse -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: DescribeImageResponse
s@DescribeImageResponse' {} Maybe Text
a -> DescribeImageResponse
s {$sel:roleArn:DescribeImageResponse' :: Maybe Text
roleArn = Maybe Text
a} :: DescribeImageResponse)

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

instance Prelude.NFData DescribeImageResponse