{-# 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.CreateArtifact
-- 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)
--
-- Creates an /artifact/. An artifact is a lineage tracking entity that
-- represents a URI addressable object or data. Some examples are the S3
-- URI of a dataset and the ECR registry path of an image. For more
-- information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/lineage-tracking.html Amazon SageMaker ML Lineage Tracking>.
module Amazonka.SageMaker.CreateArtifact
  ( -- * Creating a Request
    CreateArtifact (..),
    newCreateArtifact,

    -- * Request Lenses
    createArtifact_metadataProperties,
    createArtifact_artifactName,
    createArtifact_tags,
    createArtifact_properties,
    createArtifact_source,
    createArtifact_artifactType,

    -- * Destructuring the Response
    CreateArtifactResponse (..),
    newCreateArtifactResponse,

    -- * Response Lenses
    createArtifactResponse_artifactArn,
    createArtifactResponse_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:/ 'newCreateArtifact' smart constructor.
data CreateArtifact = CreateArtifact'
  { CreateArtifact -> Maybe MetadataProperties
metadataProperties :: Prelude.Maybe MetadataProperties,
    -- | The name of the artifact. Must be unique to your account in an Amazon
    -- Web Services Region.
    CreateArtifact -> Maybe Text
artifactName :: Prelude.Maybe Prelude.Text,
    -- | A list of tags to apply to the artifact.
    CreateArtifact -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | A list of properties to add to the artifact.
    CreateArtifact -> Maybe (HashMap Text Text)
properties :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The ID, ID type, and URI of the source.
    CreateArtifact -> ArtifactSource
source :: ArtifactSource,
    -- | The artifact type.
    CreateArtifact -> Text
artifactType :: Prelude.Text
  }
  deriving (CreateArtifact -> CreateArtifact -> Bool
(CreateArtifact -> CreateArtifact -> Bool)
-> (CreateArtifact -> CreateArtifact -> Bool) -> Eq CreateArtifact
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateArtifact -> CreateArtifact -> Bool
$c/= :: CreateArtifact -> CreateArtifact -> Bool
== :: CreateArtifact -> CreateArtifact -> Bool
$c== :: CreateArtifact -> CreateArtifact -> Bool
Prelude.Eq, ReadPrec [CreateArtifact]
ReadPrec CreateArtifact
Int -> ReadS CreateArtifact
ReadS [CreateArtifact]
(Int -> ReadS CreateArtifact)
-> ReadS [CreateArtifact]
-> ReadPrec CreateArtifact
-> ReadPrec [CreateArtifact]
-> Read CreateArtifact
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateArtifact]
$creadListPrec :: ReadPrec [CreateArtifact]
readPrec :: ReadPrec CreateArtifact
$creadPrec :: ReadPrec CreateArtifact
readList :: ReadS [CreateArtifact]
$creadList :: ReadS [CreateArtifact]
readsPrec :: Int -> ReadS CreateArtifact
$creadsPrec :: Int -> ReadS CreateArtifact
Prelude.Read, Int -> CreateArtifact -> ShowS
[CreateArtifact] -> ShowS
CreateArtifact -> String
(Int -> CreateArtifact -> ShowS)
-> (CreateArtifact -> String)
-> ([CreateArtifact] -> ShowS)
-> Show CreateArtifact
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateArtifact] -> ShowS
$cshowList :: [CreateArtifact] -> ShowS
show :: CreateArtifact -> String
$cshow :: CreateArtifact -> String
showsPrec :: Int -> CreateArtifact -> ShowS
$cshowsPrec :: Int -> CreateArtifact -> ShowS
Prelude.Show, (forall x. CreateArtifact -> Rep CreateArtifact x)
-> (forall x. Rep CreateArtifact x -> CreateArtifact)
-> Generic CreateArtifact
forall x. Rep CreateArtifact x -> CreateArtifact
forall x. CreateArtifact -> Rep CreateArtifact x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateArtifact x -> CreateArtifact
$cfrom :: forall x. CreateArtifact -> Rep CreateArtifact x
Prelude.Generic)

-- |
-- Create a value of 'CreateArtifact' 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:
--
-- 'metadataProperties', 'createArtifact_metadataProperties' - Undocumented member.
--
-- 'artifactName', 'createArtifact_artifactName' - The name of the artifact. Must be unique to your account in an Amazon
-- Web Services Region.
--
-- 'tags', 'createArtifact_tags' - A list of tags to apply to the artifact.
--
-- 'properties', 'createArtifact_properties' - A list of properties to add to the artifact.
--
-- 'source', 'createArtifact_source' - The ID, ID type, and URI of the source.
--
-- 'artifactType', 'createArtifact_artifactType' - The artifact type.
newCreateArtifact ::
  -- | 'source'
  ArtifactSource ->
  -- | 'artifactType'
  Prelude.Text ->
  CreateArtifact
newCreateArtifact :: ArtifactSource -> Text -> CreateArtifact
newCreateArtifact ArtifactSource
pSource_ Text
pArtifactType_ =
  CreateArtifact' :: Maybe MetadataProperties
-> Maybe Text
-> Maybe [Tag]
-> Maybe (HashMap Text Text)
-> ArtifactSource
-> Text
-> CreateArtifact
CreateArtifact'
    { $sel:metadataProperties:CreateArtifact' :: Maybe MetadataProperties
metadataProperties =
        Maybe MetadataProperties
forall a. Maybe a
Prelude.Nothing,
      $sel:artifactName:CreateArtifact' :: Maybe Text
artifactName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateArtifact' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:properties:CreateArtifact' :: Maybe (HashMap Text Text)
properties = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:source:CreateArtifact' :: ArtifactSource
source = ArtifactSource
pSource_,
      $sel:artifactType:CreateArtifact' :: Text
artifactType = Text
pArtifactType_
    }

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

-- | The name of the artifact. Must be unique to your account in an Amazon
-- Web Services Region.
createArtifact_artifactName :: Lens.Lens' CreateArtifact (Prelude.Maybe Prelude.Text)
createArtifact_artifactName :: (Maybe Text -> f (Maybe Text))
-> CreateArtifact -> f CreateArtifact
createArtifact_artifactName = (CreateArtifact -> Maybe Text)
-> (CreateArtifact -> Maybe Text -> CreateArtifact)
-> Lens CreateArtifact CreateArtifact (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateArtifact' {Maybe Text
artifactName :: Maybe Text
$sel:artifactName:CreateArtifact' :: CreateArtifact -> Maybe Text
artifactName} -> Maybe Text
artifactName) (\s :: CreateArtifact
s@CreateArtifact' {} Maybe Text
a -> CreateArtifact
s {$sel:artifactName:CreateArtifact' :: Maybe Text
artifactName = Maybe Text
a} :: CreateArtifact)

-- | A list of tags to apply to the artifact.
createArtifact_tags :: Lens.Lens' CreateArtifact (Prelude.Maybe [Tag])
createArtifact_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateArtifact -> f CreateArtifact
createArtifact_tags = (CreateArtifact -> Maybe [Tag])
-> (CreateArtifact -> Maybe [Tag] -> CreateArtifact)
-> Lens CreateArtifact CreateArtifact (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateArtifact' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateArtifact' :: CreateArtifact -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateArtifact
s@CreateArtifact' {} Maybe [Tag]
a -> CreateArtifact
s {$sel:tags:CreateArtifact' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateArtifact) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateArtifact -> f CreateArtifact)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateArtifact
-> f CreateArtifact
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of properties to add to the artifact.
createArtifact_properties :: Lens.Lens' CreateArtifact (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createArtifact_properties :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateArtifact -> f CreateArtifact
createArtifact_properties = (CreateArtifact -> Maybe (HashMap Text Text))
-> (CreateArtifact -> Maybe (HashMap Text Text) -> CreateArtifact)
-> Lens
     CreateArtifact
     CreateArtifact
     (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 (\CreateArtifact' {Maybe (HashMap Text Text)
properties :: Maybe (HashMap Text Text)
$sel:properties:CreateArtifact' :: CreateArtifact -> Maybe (HashMap Text Text)
properties} -> Maybe (HashMap Text Text)
properties) (\s :: CreateArtifact
s@CreateArtifact' {} Maybe (HashMap Text Text)
a -> CreateArtifact
s {$sel:properties:CreateArtifact' :: Maybe (HashMap Text Text)
properties = Maybe (HashMap Text Text)
a} :: CreateArtifact) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateArtifact -> f CreateArtifact)
-> ((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)))
-> CreateArtifact
-> f CreateArtifact
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 ID, ID type, and URI of the source.
createArtifact_source :: Lens.Lens' CreateArtifact ArtifactSource
createArtifact_source :: (ArtifactSource -> f ArtifactSource)
-> CreateArtifact -> f CreateArtifact
createArtifact_source = (CreateArtifact -> ArtifactSource)
-> (CreateArtifact -> ArtifactSource -> CreateArtifact)
-> Lens CreateArtifact CreateArtifact ArtifactSource ArtifactSource
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateArtifact' {ArtifactSource
source :: ArtifactSource
$sel:source:CreateArtifact' :: CreateArtifact -> ArtifactSource
source} -> ArtifactSource
source) (\s :: CreateArtifact
s@CreateArtifact' {} ArtifactSource
a -> CreateArtifact
s {$sel:source:CreateArtifact' :: ArtifactSource
source = ArtifactSource
a} :: CreateArtifact)

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

instance Core.AWSRequest CreateArtifact where
  type
    AWSResponse CreateArtifact =
      CreateArtifactResponse
  request :: CreateArtifact -> Request CreateArtifact
request = Service -> CreateArtifact -> Request CreateArtifact
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateArtifact
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateArtifact)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateArtifact))
-> Logger
-> Service
-> Proxy CreateArtifact
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateArtifact)))
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 Text -> Int -> CreateArtifactResponse
CreateArtifactResponse'
            (Maybe Text -> Int -> CreateArtifactResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateArtifactResponse)
forall (f :: * -> *) a b. Functor 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 (Int -> CreateArtifactResponse)
-> Either String Int -> Either String CreateArtifactResponse
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 CreateArtifact

instance Prelude.NFData CreateArtifact

instance Core.ToHeaders CreateArtifact where
  toHeaders :: CreateArtifact -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateArtifact -> 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.CreateArtifact" :: 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 CreateArtifact where
  toJSON :: CreateArtifact -> Value
toJSON CreateArtifact' {Maybe [Tag]
Maybe Text
Maybe (HashMap Text Text)
Maybe MetadataProperties
Text
ArtifactSource
artifactType :: Text
source :: ArtifactSource
properties :: Maybe (HashMap Text Text)
tags :: Maybe [Tag]
artifactName :: Maybe Text
metadataProperties :: Maybe MetadataProperties
$sel:artifactType:CreateArtifact' :: CreateArtifact -> Text
$sel:source:CreateArtifact' :: CreateArtifact -> ArtifactSource
$sel:properties:CreateArtifact' :: CreateArtifact -> Maybe (HashMap Text Text)
$sel:tags:CreateArtifact' :: CreateArtifact -> Maybe [Tag]
$sel:artifactName:CreateArtifact' :: CreateArtifact -> Maybe Text
$sel:metadataProperties:CreateArtifact' :: CreateArtifact -> Maybe MetadataProperties
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"MetadataProperties" Text -> MetadataProperties -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (MetadataProperties -> Pair)
-> Maybe MetadataProperties -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MetadataProperties
metadataProperties,
            (Text
"ArtifactName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
artifactName,
            (Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            (Text
"Properties" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
properties,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Source" Text -> ArtifactSource -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ArtifactSource
source),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ArtifactType" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
artifactType)
          ]
      )

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

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

-- | /See:/ 'newCreateArtifactResponse' smart constructor.
data CreateArtifactResponse = CreateArtifactResponse'
  { -- | The Amazon Resource Name (ARN) of the artifact.
    CreateArtifactResponse -> Maybe Text
artifactArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateArtifactResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateArtifactResponse -> CreateArtifactResponse -> Bool
(CreateArtifactResponse -> CreateArtifactResponse -> Bool)
-> (CreateArtifactResponse -> CreateArtifactResponse -> Bool)
-> Eq CreateArtifactResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateArtifactResponse -> CreateArtifactResponse -> Bool
$c/= :: CreateArtifactResponse -> CreateArtifactResponse -> Bool
== :: CreateArtifactResponse -> CreateArtifactResponse -> Bool
$c== :: CreateArtifactResponse -> CreateArtifactResponse -> Bool
Prelude.Eq, ReadPrec [CreateArtifactResponse]
ReadPrec CreateArtifactResponse
Int -> ReadS CreateArtifactResponse
ReadS [CreateArtifactResponse]
(Int -> ReadS CreateArtifactResponse)
-> ReadS [CreateArtifactResponse]
-> ReadPrec CreateArtifactResponse
-> ReadPrec [CreateArtifactResponse]
-> Read CreateArtifactResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateArtifactResponse]
$creadListPrec :: ReadPrec [CreateArtifactResponse]
readPrec :: ReadPrec CreateArtifactResponse
$creadPrec :: ReadPrec CreateArtifactResponse
readList :: ReadS [CreateArtifactResponse]
$creadList :: ReadS [CreateArtifactResponse]
readsPrec :: Int -> ReadS CreateArtifactResponse
$creadsPrec :: Int -> ReadS CreateArtifactResponse
Prelude.Read, Int -> CreateArtifactResponse -> ShowS
[CreateArtifactResponse] -> ShowS
CreateArtifactResponse -> String
(Int -> CreateArtifactResponse -> ShowS)
-> (CreateArtifactResponse -> String)
-> ([CreateArtifactResponse] -> ShowS)
-> Show CreateArtifactResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateArtifactResponse] -> ShowS
$cshowList :: [CreateArtifactResponse] -> ShowS
show :: CreateArtifactResponse -> String
$cshow :: CreateArtifactResponse -> String
showsPrec :: Int -> CreateArtifactResponse -> ShowS
$cshowsPrec :: Int -> CreateArtifactResponse -> ShowS
Prelude.Show, (forall x. CreateArtifactResponse -> Rep CreateArtifactResponse x)
-> (forall x.
    Rep CreateArtifactResponse x -> CreateArtifactResponse)
-> Generic CreateArtifactResponse
forall x. Rep CreateArtifactResponse x -> CreateArtifactResponse
forall x. CreateArtifactResponse -> Rep CreateArtifactResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateArtifactResponse x -> CreateArtifactResponse
$cfrom :: forall x. CreateArtifactResponse -> Rep CreateArtifactResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateArtifactResponse' 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', 'createArtifactResponse_artifactArn' - The Amazon Resource Name (ARN) of the artifact.
--
-- 'httpStatus', 'createArtifactResponse_httpStatus' - The response's http status code.
newCreateArtifactResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateArtifactResponse
newCreateArtifactResponse :: Int -> CreateArtifactResponse
newCreateArtifactResponse Int
pHttpStatus_ =
  CreateArtifactResponse' :: Maybe Text -> Int -> CreateArtifactResponse
CreateArtifactResponse'
    { $sel:artifactArn:CreateArtifactResponse' :: Maybe Text
artifactArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateArtifactResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

instance Prelude.NFData CreateArtifactResponse