{-# 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.DescribeArtifact
-- 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 an artifact.
module Amazonka.SageMaker.DescribeArtifact
  ( -- * Creating a Request
    DescribeArtifact (..),
    newDescribeArtifact,

    -- * Request Lenses
    describeArtifact_artifactArn,

    -- * Destructuring the Response
    DescribeArtifactResponse (..),
    newDescribeArtifactResponse,

    -- * Response Lenses
    describeArtifactResponse_creationTime,
    describeArtifactResponse_metadataProperties,
    describeArtifactResponse_createdBy,
    describeArtifactResponse_lastModifiedTime,
    describeArtifactResponse_artifactName,
    describeArtifactResponse_source,
    describeArtifactResponse_lastModifiedBy,
    describeArtifactResponse_artifactArn,
    describeArtifactResponse_artifactType,
    describeArtifactResponse_properties,
    describeArtifactResponse_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:/ 'newDescribeArtifact' smart constructor.
data DescribeArtifact = DescribeArtifact'
  { -- | The Amazon Resource Name (ARN) of the artifact to describe.
    DescribeArtifact -> Text
artifactArn :: Prelude.Text
  }
  deriving (DescribeArtifact -> DescribeArtifact -> Bool
(DescribeArtifact -> DescribeArtifact -> Bool)
-> (DescribeArtifact -> DescribeArtifact -> Bool)
-> Eq DescribeArtifact
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeArtifact -> DescribeArtifact -> Bool
$c/= :: DescribeArtifact -> DescribeArtifact -> Bool
== :: DescribeArtifact -> DescribeArtifact -> Bool
$c== :: DescribeArtifact -> DescribeArtifact -> Bool
Prelude.Eq, ReadPrec [DescribeArtifact]
ReadPrec DescribeArtifact
Int -> ReadS DescribeArtifact
ReadS [DescribeArtifact]
(Int -> ReadS DescribeArtifact)
-> ReadS [DescribeArtifact]
-> ReadPrec DescribeArtifact
-> ReadPrec [DescribeArtifact]
-> Read DescribeArtifact
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeArtifact]
$creadListPrec :: ReadPrec [DescribeArtifact]
readPrec :: ReadPrec DescribeArtifact
$creadPrec :: ReadPrec DescribeArtifact
readList :: ReadS [DescribeArtifact]
$creadList :: ReadS [DescribeArtifact]
readsPrec :: Int -> ReadS DescribeArtifact
$creadsPrec :: Int -> ReadS DescribeArtifact
Prelude.Read, Int -> DescribeArtifact -> ShowS
[DescribeArtifact] -> ShowS
DescribeArtifact -> String
(Int -> DescribeArtifact -> ShowS)
-> (DescribeArtifact -> String)
-> ([DescribeArtifact] -> ShowS)
-> Show DescribeArtifact
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeArtifact] -> ShowS
$cshowList :: [DescribeArtifact] -> ShowS
show :: DescribeArtifact -> String
$cshow :: DescribeArtifact -> String
showsPrec :: Int -> DescribeArtifact -> ShowS
$cshowsPrec :: Int -> DescribeArtifact -> ShowS
Prelude.Show, (forall x. DescribeArtifact -> Rep DescribeArtifact x)
-> (forall x. Rep DescribeArtifact x -> DescribeArtifact)
-> Generic DescribeArtifact
forall x. Rep DescribeArtifact x -> DescribeArtifact
forall x. DescribeArtifact -> Rep DescribeArtifact x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeArtifact x -> DescribeArtifact
$cfrom :: forall x. DescribeArtifact -> Rep DescribeArtifact x
Prelude.Generic)

-- |
-- Create a value of 'DescribeArtifact' 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:
--
-- 'artifactArn', 'describeArtifact_artifactArn' - The Amazon Resource Name (ARN) of the artifact to describe.
newDescribeArtifact ::
  -- | 'artifactArn'
  Prelude.Text ->
  DescribeArtifact
newDescribeArtifact :: Text -> DescribeArtifact
newDescribeArtifact Text
pArtifactArn_ =
  DescribeArtifact' :: Text -> DescribeArtifact
DescribeArtifact' {$sel:artifactArn:DescribeArtifact' :: Text
artifactArn = Text
pArtifactArn_}

-- | The Amazon Resource Name (ARN) of the artifact to describe.
describeArtifact_artifactArn :: Lens.Lens' DescribeArtifact Prelude.Text
describeArtifact_artifactArn :: (Text -> f Text) -> DescribeArtifact -> f DescribeArtifact
describeArtifact_artifactArn = (DescribeArtifact -> Text)
-> (DescribeArtifact -> Text -> DescribeArtifact)
-> Lens DescribeArtifact DescribeArtifact Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeArtifact' {Text
artifactArn :: Text
$sel:artifactArn:DescribeArtifact' :: DescribeArtifact -> Text
artifactArn} -> Text
artifactArn) (\s :: DescribeArtifact
s@DescribeArtifact' {} Text
a -> DescribeArtifact
s {$sel:artifactArn:DescribeArtifact' :: Text
artifactArn = Text
a} :: DescribeArtifact)

instance Core.AWSRequest DescribeArtifact where
  type
    AWSResponse DescribeArtifact =
      DescribeArtifactResponse
  request :: DescribeArtifact -> Request DescribeArtifact
request = Service -> DescribeArtifact -> Request DescribeArtifact
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeArtifact
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeArtifact)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeArtifact))
-> Logger
-> Service
-> Proxy DescribeArtifact
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeArtifact)))
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 MetadataProperties
-> Maybe UserContext
-> Maybe POSIX
-> Maybe Text
-> Maybe ArtifactSource
-> Maybe UserContext
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> DescribeArtifactResponse
DescribeArtifactResponse'
            (Maybe POSIX
 -> Maybe MetadataProperties
 -> Maybe UserContext
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe ArtifactSource
 -> Maybe UserContext
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> DescribeArtifactResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe MetadataProperties
      -> Maybe UserContext
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe ArtifactSource
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeArtifactResponse)
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 MetadataProperties
   -> Maybe UserContext
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe ArtifactSource
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeArtifactResponse)
-> Either String (Maybe MetadataProperties)
-> Either
     String
     (Maybe UserContext
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe ArtifactSource
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeArtifactResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe MetadataProperties)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"MetadataProperties")
            Either
  String
  (Maybe UserContext
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe ArtifactSource
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeArtifactResponse)
-> Either String (Maybe UserContext)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe ArtifactSource
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeArtifactResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe UserContext)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreatedBy")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe ArtifactSource
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeArtifactResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe ArtifactSource
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeArtifactResponse)
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 ArtifactSource
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeArtifactResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ArtifactSource
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeArtifactResponse)
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
"ArtifactName")
            Either
  String
  (Maybe ArtifactSource
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeArtifactResponse)
-> Either String (Maybe ArtifactSource)
-> Either
     String
     (Maybe UserContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeArtifactResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ArtifactSource)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Source")
            Either
  String
  (Maybe UserContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeArtifactResponse)
-> Either String (Maybe UserContext)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeArtifactResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe UserContext)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LastModifiedBy")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeArtifactResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text) -> Int -> DescribeArtifactResponse)
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
"ArtifactArn")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text) -> Int -> DescribeArtifactResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text) -> Int -> DescribeArtifactResponse)
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
"ArtifactType")
            Either
  String
  (Maybe (HashMap Text Text) -> Int -> DescribeArtifactResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> DescribeArtifactResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Properties" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> DescribeArtifactResponse)
-> Either String Int -> Either String DescribeArtifactResponse
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 DescribeArtifact

instance Prelude.NFData DescribeArtifact

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

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

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

-- | /See:/ 'newDescribeArtifactResponse' smart constructor.
data DescribeArtifactResponse = DescribeArtifactResponse'
  { -- | When the artifact was created.
    DescribeArtifactResponse -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    DescribeArtifactResponse -> Maybe MetadataProperties
metadataProperties :: Prelude.Maybe MetadataProperties,
    DescribeArtifactResponse -> Maybe UserContext
createdBy :: Prelude.Maybe UserContext,
    -- | When the artifact was last modified.
    DescribeArtifactResponse -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
    -- | The name of the artifact.
    DescribeArtifactResponse -> Maybe Text
artifactName :: Prelude.Maybe Prelude.Text,
    -- | The source of the artifact.
    DescribeArtifactResponse -> Maybe ArtifactSource
source :: Prelude.Maybe ArtifactSource,
    DescribeArtifactResponse -> Maybe UserContext
lastModifiedBy :: Prelude.Maybe UserContext,
    -- | The Amazon Resource Name (ARN) of the artifact.
    DescribeArtifactResponse -> Maybe Text
artifactArn :: Prelude.Maybe Prelude.Text,
    -- | The type of the artifact.
    DescribeArtifactResponse -> Maybe Text
artifactType :: Prelude.Maybe Prelude.Text,
    -- | A list of the artifact\'s properties.
    DescribeArtifactResponse -> Maybe (HashMap Text Text)
properties :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    DescribeArtifactResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeArtifactResponse -> DescribeArtifactResponse -> Bool
(DescribeArtifactResponse -> DescribeArtifactResponse -> Bool)
-> (DescribeArtifactResponse -> DescribeArtifactResponse -> Bool)
-> Eq DescribeArtifactResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeArtifactResponse -> DescribeArtifactResponse -> Bool
$c/= :: DescribeArtifactResponse -> DescribeArtifactResponse -> Bool
== :: DescribeArtifactResponse -> DescribeArtifactResponse -> Bool
$c== :: DescribeArtifactResponse -> DescribeArtifactResponse -> Bool
Prelude.Eq, ReadPrec [DescribeArtifactResponse]
ReadPrec DescribeArtifactResponse
Int -> ReadS DescribeArtifactResponse
ReadS [DescribeArtifactResponse]
(Int -> ReadS DescribeArtifactResponse)
-> ReadS [DescribeArtifactResponse]
-> ReadPrec DescribeArtifactResponse
-> ReadPrec [DescribeArtifactResponse]
-> Read DescribeArtifactResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeArtifactResponse]
$creadListPrec :: ReadPrec [DescribeArtifactResponse]
readPrec :: ReadPrec DescribeArtifactResponse
$creadPrec :: ReadPrec DescribeArtifactResponse
readList :: ReadS [DescribeArtifactResponse]
$creadList :: ReadS [DescribeArtifactResponse]
readsPrec :: Int -> ReadS DescribeArtifactResponse
$creadsPrec :: Int -> ReadS DescribeArtifactResponse
Prelude.Read, Int -> DescribeArtifactResponse -> ShowS
[DescribeArtifactResponse] -> ShowS
DescribeArtifactResponse -> String
(Int -> DescribeArtifactResponse -> ShowS)
-> (DescribeArtifactResponse -> String)
-> ([DescribeArtifactResponse] -> ShowS)
-> Show DescribeArtifactResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeArtifactResponse] -> ShowS
$cshowList :: [DescribeArtifactResponse] -> ShowS
show :: DescribeArtifactResponse -> String
$cshow :: DescribeArtifactResponse -> String
showsPrec :: Int -> DescribeArtifactResponse -> ShowS
$cshowsPrec :: Int -> DescribeArtifactResponse -> ShowS
Prelude.Show, (forall x.
 DescribeArtifactResponse -> Rep DescribeArtifactResponse x)
-> (forall x.
    Rep DescribeArtifactResponse x -> DescribeArtifactResponse)
-> Generic DescribeArtifactResponse
forall x.
Rep DescribeArtifactResponse x -> DescribeArtifactResponse
forall x.
DescribeArtifactResponse -> Rep DescribeArtifactResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeArtifactResponse x -> DescribeArtifactResponse
$cfrom :: forall x.
DescribeArtifactResponse -> Rep DescribeArtifactResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeArtifactResponse' 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', 'describeArtifactResponse_creationTime' - When the artifact was created.
--
-- 'metadataProperties', 'describeArtifactResponse_metadataProperties' - Undocumented member.
--
-- 'createdBy', 'describeArtifactResponse_createdBy' - Undocumented member.
--
-- 'lastModifiedTime', 'describeArtifactResponse_lastModifiedTime' - When the artifact was last modified.
--
-- 'artifactName', 'describeArtifactResponse_artifactName' - The name of the artifact.
--
-- 'source', 'describeArtifactResponse_source' - The source of the artifact.
--
-- 'lastModifiedBy', 'describeArtifactResponse_lastModifiedBy' - Undocumented member.
--
-- 'artifactArn', 'describeArtifactResponse_artifactArn' - The Amazon Resource Name (ARN) of the artifact.
--
-- 'artifactType', 'describeArtifactResponse_artifactType' - The type of the artifact.
--
-- 'properties', 'describeArtifactResponse_properties' - A list of the artifact\'s properties.
--
-- 'httpStatus', 'describeArtifactResponse_httpStatus' - The response's http status code.
newDescribeArtifactResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeArtifactResponse
newDescribeArtifactResponse :: Int -> DescribeArtifactResponse
newDescribeArtifactResponse Int
pHttpStatus_ =
  DescribeArtifactResponse' :: Maybe POSIX
-> Maybe MetadataProperties
-> Maybe UserContext
-> Maybe POSIX
-> Maybe Text
-> Maybe ArtifactSource
-> Maybe UserContext
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> DescribeArtifactResponse
DescribeArtifactResponse'
    { $sel:creationTime:DescribeArtifactResponse' :: Maybe POSIX
creationTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:metadataProperties:DescribeArtifactResponse' :: Maybe MetadataProperties
metadataProperties = Maybe MetadataProperties
forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:DescribeArtifactResponse' :: Maybe UserContext
createdBy = Maybe UserContext
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:DescribeArtifactResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:artifactName:DescribeArtifactResponse' :: Maybe Text
artifactName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:source:DescribeArtifactResponse' :: Maybe ArtifactSource
source = Maybe ArtifactSource
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedBy:DescribeArtifactResponse' :: Maybe UserContext
lastModifiedBy = Maybe UserContext
forall a. Maybe a
Prelude.Nothing,
      $sel:artifactArn:DescribeArtifactResponse' :: Maybe Text
artifactArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:artifactType:DescribeArtifactResponse' :: Maybe Text
artifactType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:properties:DescribeArtifactResponse' :: Maybe (HashMap Text Text)
properties = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeArtifactResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | Undocumented member.
describeArtifactResponse_metadataProperties :: Lens.Lens' DescribeArtifactResponse (Prelude.Maybe MetadataProperties)
describeArtifactResponse_metadataProperties :: (Maybe MetadataProperties -> f (Maybe MetadataProperties))
-> DescribeArtifactResponse -> f DescribeArtifactResponse
describeArtifactResponse_metadataProperties = (DescribeArtifactResponse -> Maybe MetadataProperties)
-> (DescribeArtifactResponse
    -> Maybe MetadataProperties -> DescribeArtifactResponse)
-> Lens
     DescribeArtifactResponse
     DescribeArtifactResponse
     (Maybe MetadataProperties)
     (Maybe MetadataProperties)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeArtifactResponse' {Maybe MetadataProperties
metadataProperties :: Maybe MetadataProperties
$sel:metadataProperties:DescribeArtifactResponse' :: DescribeArtifactResponse -> Maybe MetadataProperties
metadataProperties} -> Maybe MetadataProperties
metadataProperties) (\s :: DescribeArtifactResponse
s@DescribeArtifactResponse' {} Maybe MetadataProperties
a -> DescribeArtifactResponse
s {$sel:metadataProperties:DescribeArtifactResponse' :: Maybe MetadataProperties
metadataProperties = Maybe MetadataProperties
a} :: DescribeArtifactResponse)

-- | Undocumented member.
describeArtifactResponse_createdBy :: Lens.Lens' DescribeArtifactResponse (Prelude.Maybe UserContext)
describeArtifactResponse_createdBy :: (Maybe UserContext -> f (Maybe UserContext))
-> DescribeArtifactResponse -> f DescribeArtifactResponse
describeArtifactResponse_createdBy = (DescribeArtifactResponse -> Maybe UserContext)
-> (DescribeArtifactResponse
    -> Maybe UserContext -> DescribeArtifactResponse)
-> Lens
     DescribeArtifactResponse
     DescribeArtifactResponse
     (Maybe UserContext)
     (Maybe UserContext)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeArtifactResponse' {Maybe UserContext
createdBy :: Maybe UserContext
$sel:createdBy:DescribeArtifactResponse' :: DescribeArtifactResponse -> Maybe UserContext
createdBy} -> Maybe UserContext
createdBy) (\s :: DescribeArtifactResponse
s@DescribeArtifactResponse' {} Maybe UserContext
a -> DescribeArtifactResponse
s {$sel:createdBy:DescribeArtifactResponse' :: Maybe UserContext
createdBy = Maybe UserContext
a} :: DescribeArtifactResponse)

-- | When the artifact was last modified.
describeArtifactResponse_lastModifiedTime :: Lens.Lens' DescribeArtifactResponse (Prelude.Maybe Prelude.UTCTime)
describeArtifactResponse_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeArtifactResponse -> f DescribeArtifactResponse
describeArtifactResponse_lastModifiedTime = (DescribeArtifactResponse -> Maybe POSIX)
-> (DescribeArtifactResponse
    -> Maybe POSIX -> DescribeArtifactResponse)
-> Lens
     DescribeArtifactResponse
     DescribeArtifactResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeArtifactResponse' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:DescribeArtifactResponse' :: DescribeArtifactResponse -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: DescribeArtifactResponse
s@DescribeArtifactResponse' {} Maybe POSIX
a -> DescribeArtifactResponse
s {$sel:lastModifiedTime:DescribeArtifactResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: DescribeArtifactResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeArtifactResponse -> f DescribeArtifactResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeArtifactResponse
-> f DescribeArtifactResponse
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 name of the artifact.
describeArtifactResponse_artifactName :: Lens.Lens' DescribeArtifactResponse (Prelude.Maybe Prelude.Text)
describeArtifactResponse_artifactName :: (Maybe Text -> f (Maybe Text))
-> DescribeArtifactResponse -> f DescribeArtifactResponse
describeArtifactResponse_artifactName = (DescribeArtifactResponse -> Maybe Text)
-> (DescribeArtifactResponse
    -> Maybe Text -> DescribeArtifactResponse)
-> Lens
     DescribeArtifactResponse
     DescribeArtifactResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeArtifactResponse' {Maybe Text
artifactName :: Maybe Text
$sel:artifactName:DescribeArtifactResponse' :: DescribeArtifactResponse -> Maybe Text
artifactName} -> Maybe Text
artifactName) (\s :: DescribeArtifactResponse
s@DescribeArtifactResponse' {} Maybe Text
a -> DescribeArtifactResponse
s {$sel:artifactName:DescribeArtifactResponse' :: Maybe Text
artifactName = Maybe Text
a} :: DescribeArtifactResponse)

-- | The source of the artifact.
describeArtifactResponse_source :: Lens.Lens' DescribeArtifactResponse (Prelude.Maybe ArtifactSource)
describeArtifactResponse_source :: (Maybe ArtifactSource -> f (Maybe ArtifactSource))
-> DescribeArtifactResponse -> f DescribeArtifactResponse
describeArtifactResponse_source = (DescribeArtifactResponse -> Maybe ArtifactSource)
-> (DescribeArtifactResponse
    -> Maybe ArtifactSource -> DescribeArtifactResponse)
-> Lens
     DescribeArtifactResponse
     DescribeArtifactResponse
     (Maybe ArtifactSource)
     (Maybe ArtifactSource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeArtifactResponse' {Maybe ArtifactSource
source :: Maybe ArtifactSource
$sel:source:DescribeArtifactResponse' :: DescribeArtifactResponse -> Maybe ArtifactSource
source} -> Maybe ArtifactSource
source) (\s :: DescribeArtifactResponse
s@DescribeArtifactResponse' {} Maybe ArtifactSource
a -> DescribeArtifactResponse
s {$sel:source:DescribeArtifactResponse' :: Maybe ArtifactSource
source = Maybe ArtifactSource
a} :: DescribeArtifactResponse)

-- | Undocumented member.
describeArtifactResponse_lastModifiedBy :: Lens.Lens' DescribeArtifactResponse (Prelude.Maybe UserContext)
describeArtifactResponse_lastModifiedBy :: (Maybe UserContext -> f (Maybe UserContext))
-> DescribeArtifactResponse -> f DescribeArtifactResponse
describeArtifactResponse_lastModifiedBy = (DescribeArtifactResponse -> Maybe UserContext)
-> (DescribeArtifactResponse
    -> Maybe UserContext -> DescribeArtifactResponse)
-> Lens
     DescribeArtifactResponse
     DescribeArtifactResponse
     (Maybe UserContext)
     (Maybe UserContext)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeArtifactResponse' {Maybe UserContext
lastModifiedBy :: Maybe UserContext
$sel:lastModifiedBy:DescribeArtifactResponse' :: DescribeArtifactResponse -> Maybe UserContext
lastModifiedBy} -> Maybe UserContext
lastModifiedBy) (\s :: DescribeArtifactResponse
s@DescribeArtifactResponse' {} Maybe UserContext
a -> DescribeArtifactResponse
s {$sel:lastModifiedBy:DescribeArtifactResponse' :: Maybe UserContext
lastModifiedBy = Maybe UserContext
a} :: DescribeArtifactResponse)

-- | The Amazon Resource Name (ARN) of the artifact.
describeArtifactResponse_artifactArn :: Lens.Lens' DescribeArtifactResponse (Prelude.Maybe Prelude.Text)
describeArtifactResponse_artifactArn :: (Maybe Text -> f (Maybe Text))
-> DescribeArtifactResponse -> f DescribeArtifactResponse
describeArtifactResponse_artifactArn = (DescribeArtifactResponse -> Maybe Text)
-> (DescribeArtifactResponse
    -> Maybe Text -> DescribeArtifactResponse)
-> Lens
     DescribeArtifactResponse
     DescribeArtifactResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeArtifactResponse' {Maybe Text
artifactArn :: Maybe Text
$sel:artifactArn:DescribeArtifactResponse' :: DescribeArtifactResponse -> Maybe Text
artifactArn} -> Maybe Text
artifactArn) (\s :: DescribeArtifactResponse
s@DescribeArtifactResponse' {} Maybe Text
a -> DescribeArtifactResponse
s {$sel:artifactArn:DescribeArtifactResponse' :: Maybe Text
artifactArn = Maybe Text
a} :: DescribeArtifactResponse)

-- | The type of the artifact.
describeArtifactResponse_artifactType :: Lens.Lens' DescribeArtifactResponse (Prelude.Maybe Prelude.Text)
describeArtifactResponse_artifactType :: (Maybe Text -> f (Maybe Text))
-> DescribeArtifactResponse -> f DescribeArtifactResponse
describeArtifactResponse_artifactType = (DescribeArtifactResponse -> Maybe Text)
-> (DescribeArtifactResponse
    -> Maybe Text -> DescribeArtifactResponse)
-> Lens
     DescribeArtifactResponse
     DescribeArtifactResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeArtifactResponse' {Maybe Text
artifactType :: Maybe Text
$sel:artifactType:DescribeArtifactResponse' :: DescribeArtifactResponse -> Maybe Text
artifactType} -> Maybe Text
artifactType) (\s :: DescribeArtifactResponse
s@DescribeArtifactResponse' {} Maybe Text
a -> DescribeArtifactResponse
s {$sel:artifactType:DescribeArtifactResponse' :: Maybe Text
artifactType = Maybe Text
a} :: DescribeArtifactResponse)

-- | A list of the artifact\'s properties.
describeArtifactResponse_properties :: Lens.Lens' DescribeArtifactResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describeArtifactResponse_properties :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeArtifactResponse -> f DescribeArtifactResponse
describeArtifactResponse_properties = (DescribeArtifactResponse -> Maybe (HashMap Text Text))
-> (DescribeArtifactResponse
    -> Maybe (HashMap Text Text) -> DescribeArtifactResponse)
-> Lens
     DescribeArtifactResponse
     DescribeArtifactResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeArtifactResponse' {Maybe (HashMap Text Text)
properties :: Maybe (HashMap Text Text)
$sel:properties:DescribeArtifactResponse' :: DescribeArtifactResponse -> Maybe (HashMap Text Text)
properties} -> Maybe (HashMap Text Text)
properties) (\s :: DescribeArtifactResponse
s@DescribeArtifactResponse' {} Maybe (HashMap Text Text)
a -> DescribeArtifactResponse
s {$sel:properties:DescribeArtifactResponse' :: Maybe (HashMap Text Text)
properties = Maybe (HashMap Text Text)
a} :: DescribeArtifactResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DescribeArtifactResponse -> f DescribeArtifactResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeArtifactResponse
-> f DescribeArtifactResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DescribeArtifactResponse