{-# 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.CreatePipeline
-- 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 a pipeline using a JSON pipeline definition.
module Amazonka.SageMaker.CreatePipeline
  ( -- * Creating a Request
    CreatePipeline (..),
    newCreatePipeline,

    -- * Request Lenses
    createPipeline_pipelineDisplayName,
    createPipeline_pipelineDescription,
    createPipeline_tags,
    createPipeline_pipelineName,
    createPipeline_pipelineDefinition,
    createPipeline_clientRequestToken,
    createPipeline_roleArn,

    -- * Destructuring the Response
    CreatePipelineResponse (..),
    newCreatePipelineResponse,

    -- * Response Lenses
    createPipelineResponse_pipelineArn,
    createPipelineResponse_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:/ 'newCreatePipeline' smart constructor.
data CreatePipeline = CreatePipeline'
  { -- | The display name of the pipeline.
    CreatePipeline -> Maybe Text
pipelineDisplayName :: Prelude.Maybe Prelude.Text,
    -- | A description of the pipeline.
    CreatePipeline -> Maybe Text
pipelineDescription :: Prelude.Maybe Prelude.Text,
    -- | A list of tags to apply to the created pipeline.
    CreatePipeline -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name of the pipeline.
    CreatePipeline -> Text
pipelineName :: Prelude.Text,
    -- | The JSON pipeline definition of the pipeline.
    CreatePipeline -> Text
pipelineDefinition :: Prelude.Text,
    -- | A unique, case-sensitive identifier that you provide to ensure the
    -- idempotency of the operation. An idempotent operation completes no more
    -- than one time.
    CreatePipeline -> Text
clientRequestToken :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the role used by the pipeline to
    -- access and create resources.
    CreatePipeline -> Text
roleArn :: Prelude.Text
  }
  deriving (CreatePipeline -> CreatePipeline -> Bool
(CreatePipeline -> CreatePipeline -> Bool)
-> (CreatePipeline -> CreatePipeline -> Bool) -> Eq CreatePipeline
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreatePipeline -> CreatePipeline -> Bool
$c/= :: CreatePipeline -> CreatePipeline -> Bool
== :: CreatePipeline -> CreatePipeline -> Bool
$c== :: CreatePipeline -> CreatePipeline -> Bool
Prelude.Eq, ReadPrec [CreatePipeline]
ReadPrec CreatePipeline
Int -> ReadS CreatePipeline
ReadS [CreatePipeline]
(Int -> ReadS CreatePipeline)
-> ReadS [CreatePipeline]
-> ReadPrec CreatePipeline
-> ReadPrec [CreatePipeline]
-> Read CreatePipeline
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreatePipeline]
$creadListPrec :: ReadPrec [CreatePipeline]
readPrec :: ReadPrec CreatePipeline
$creadPrec :: ReadPrec CreatePipeline
readList :: ReadS [CreatePipeline]
$creadList :: ReadS [CreatePipeline]
readsPrec :: Int -> ReadS CreatePipeline
$creadsPrec :: Int -> ReadS CreatePipeline
Prelude.Read, Int -> CreatePipeline -> ShowS
[CreatePipeline] -> ShowS
CreatePipeline -> String
(Int -> CreatePipeline -> ShowS)
-> (CreatePipeline -> String)
-> ([CreatePipeline] -> ShowS)
-> Show CreatePipeline
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreatePipeline] -> ShowS
$cshowList :: [CreatePipeline] -> ShowS
show :: CreatePipeline -> String
$cshow :: CreatePipeline -> String
showsPrec :: Int -> CreatePipeline -> ShowS
$cshowsPrec :: Int -> CreatePipeline -> ShowS
Prelude.Show, (forall x. CreatePipeline -> Rep CreatePipeline x)
-> (forall x. Rep CreatePipeline x -> CreatePipeline)
-> Generic CreatePipeline
forall x. Rep CreatePipeline x -> CreatePipeline
forall x. CreatePipeline -> Rep CreatePipeline x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreatePipeline x -> CreatePipeline
$cfrom :: forall x. CreatePipeline -> Rep CreatePipeline x
Prelude.Generic)

-- |
-- Create a value of 'CreatePipeline' 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:
--
-- 'pipelineDisplayName', 'createPipeline_pipelineDisplayName' - The display name of the pipeline.
--
-- 'pipelineDescription', 'createPipeline_pipelineDescription' - A description of the pipeline.
--
-- 'tags', 'createPipeline_tags' - A list of tags to apply to the created pipeline.
--
-- 'pipelineName', 'createPipeline_pipelineName' - The name of the pipeline.
--
-- 'pipelineDefinition', 'createPipeline_pipelineDefinition' - The JSON pipeline definition of the pipeline.
--
-- 'clientRequestToken', 'createPipeline_clientRequestToken' - A unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the operation. An idempotent operation completes no more
-- than one time.
--
-- 'roleArn', 'createPipeline_roleArn' - The Amazon Resource Name (ARN) of the role used by the pipeline to
-- access and create resources.
newCreatePipeline ::
  -- | 'pipelineName'
  Prelude.Text ->
  -- | 'pipelineDefinition'
  Prelude.Text ->
  -- | 'clientRequestToken'
  Prelude.Text ->
  -- | 'roleArn'
  Prelude.Text ->
  CreatePipeline
newCreatePipeline :: Text -> Text -> Text -> Text -> CreatePipeline
newCreatePipeline
  Text
pPipelineName_
  Text
pPipelineDefinition_
  Text
pClientRequestToken_
  Text
pRoleArn_ =
    CreatePipeline' :: Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Text
-> Text
-> Text
-> Text
-> CreatePipeline
CreatePipeline'
      { $sel:pipelineDisplayName:CreatePipeline' :: Maybe Text
pipelineDisplayName =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:pipelineDescription:CreatePipeline' :: Maybe Text
pipelineDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreatePipeline' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:pipelineName:CreatePipeline' :: Text
pipelineName = Text
pPipelineName_,
        $sel:pipelineDefinition:CreatePipeline' :: Text
pipelineDefinition = Text
pPipelineDefinition_,
        $sel:clientRequestToken:CreatePipeline' :: Text
clientRequestToken = Text
pClientRequestToken_,
        $sel:roleArn:CreatePipeline' :: Text
roleArn = Text
pRoleArn_
      }

-- | The display name of the pipeline.
createPipeline_pipelineDisplayName :: Lens.Lens' CreatePipeline (Prelude.Maybe Prelude.Text)
createPipeline_pipelineDisplayName :: (Maybe Text -> f (Maybe Text))
-> CreatePipeline -> f CreatePipeline
createPipeline_pipelineDisplayName = (CreatePipeline -> Maybe Text)
-> (CreatePipeline -> Maybe Text -> CreatePipeline)
-> Lens CreatePipeline CreatePipeline (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePipeline' {Maybe Text
pipelineDisplayName :: Maybe Text
$sel:pipelineDisplayName:CreatePipeline' :: CreatePipeline -> Maybe Text
pipelineDisplayName} -> Maybe Text
pipelineDisplayName) (\s :: CreatePipeline
s@CreatePipeline' {} Maybe Text
a -> CreatePipeline
s {$sel:pipelineDisplayName:CreatePipeline' :: Maybe Text
pipelineDisplayName = Maybe Text
a} :: CreatePipeline)

-- | A description of the pipeline.
createPipeline_pipelineDescription :: Lens.Lens' CreatePipeline (Prelude.Maybe Prelude.Text)
createPipeline_pipelineDescription :: (Maybe Text -> f (Maybe Text))
-> CreatePipeline -> f CreatePipeline
createPipeline_pipelineDescription = (CreatePipeline -> Maybe Text)
-> (CreatePipeline -> Maybe Text -> CreatePipeline)
-> Lens CreatePipeline CreatePipeline (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePipeline' {Maybe Text
pipelineDescription :: Maybe Text
$sel:pipelineDescription:CreatePipeline' :: CreatePipeline -> Maybe Text
pipelineDescription} -> Maybe Text
pipelineDescription) (\s :: CreatePipeline
s@CreatePipeline' {} Maybe Text
a -> CreatePipeline
s {$sel:pipelineDescription:CreatePipeline' :: Maybe Text
pipelineDescription = Maybe Text
a} :: CreatePipeline)

-- | A list of tags to apply to the created pipeline.
createPipeline_tags :: Lens.Lens' CreatePipeline (Prelude.Maybe [Tag])
createPipeline_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreatePipeline -> f CreatePipeline
createPipeline_tags = (CreatePipeline -> Maybe [Tag])
-> (CreatePipeline -> Maybe [Tag] -> CreatePipeline)
-> Lens CreatePipeline CreatePipeline (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePipeline' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreatePipeline' :: CreatePipeline -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreatePipeline
s@CreatePipeline' {} Maybe [Tag]
a -> CreatePipeline
s {$sel:tags:CreatePipeline' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreatePipeline) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreatePipeline -> f CreatePipeline)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreatePipeline
-> f CreatePipeline
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

-- | The name of the pipeline.
createPipeline_pipelineName :: Lens.Lens' CreatePipeline Prelude.Text
createPipeline_pipelineName :: (Text -> f Text) -> CreatePipeline -> f CreatePipeline
createPipeline_pipelineName = (CreatePipeline -> Text)
-> (CreatePipeline -> Text -> CreatePipeline)
-> Lens CreatePipeline CreatePipeline Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePipeline' {Text
pipelineName :: Text
$sel:pipelineName:CreatePipeline' :: CreatePipeline -> Text
pipelineName} -> Text
pipelineName) (\s :: CreatePipeline
s@CreatePipeline' {} Text
a -> CreatePipeline
s {$sel:pipelineName:CreatePipeline' :: Text
pipelineName = Text
a} :: CreatePipeline)

-- | The JSON pipeline definition of the pipeline.
createPipeline_pipelineDefinition :: Lens.Lens' CreatePipeline Prelude.Text
createPipeline_pipelineDefinition :: (Text -> f Text) -> CreatePipeline -> f CreatePipeline
createPipeline_pipelineDefinition = (CreatePipeline -> Text)
-> (CreatePipeline -> Text -> CreatePipeline)
-> Lens CreatePipeline CreatePipeline Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePipeline' {Text
pipelineDefinition :: Text
$sel:pipelineDefinition:CreatePipeline' :: CreatePipeline -> Text
pipelineDefinition} -> Text
pipelineDefinition) (\s :: CreatePipeline
s@CreatePipeline' {} Text
a -> CreatePipeline
s {$sel:pipelineDefinition:CreatePipeline' :: Text
pipelineDefinition = Text
a} :: CreatePipeline)

-- | A unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the operation. An idempotent operation completes no more
-- than one time.
createPipeline_clientRequestToken :: Lens.Lens' CreatePipeline Prelude.Text
createPipeline_clientRequestToken :: (Text -> f Text) -> CreatePipeline -> f CreatePipeline
createPipeline_clientRequestToken = (CreatePipeline -> Text)
-> (CreatePipeline -> Text -> CreatePipeline)
-> Lens CreatePipeline CreatePipeline Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePipeline' {Text
clientRequestToken :: Text
$sel:clientRequestToken:CreatePipeline' :: CreatePipeline -> Text
clientRequestToken} -> Text
clientRequestToken) (\s :: CreatePipeline
s@CreatePipeline' {} Text
a -> CreatePipeline
s {$sel:clientRequestToken:CreatePipeline' :: Text
clientRequestToken = Text
a} :: CreatePipeline)

-- | The Amazon Resource Name (ARN) of the role used by the pipeline to
-- access and create resources.
createPipeline_roleArn :: Lens.Lens' CreatePipeline Prelude.Text
createPipeline_roleArn :: (Text -> f Text) -> CreatePipeline -> f CreatePipeline
createPipeline_roleArn = (CreatePipeline -> Text)
-> (CreatePipeline -> Text -> CreatePipeline)
-> Lens CreatePipeline CreatePipeline Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePipeline' {Text
roleArn :: Text
$sel:roleArn:CreatePipeline' :: CreatePipeline -> Text
roleArn} -> Text
roleArn) (\s :: CreatePipeline
s@CreatePipeline' {} Text
a -> CreatePipeline
s {$sel:roleArn:CreatePipeline' :: Text
roleArn = Text
a} :: CreatePipeline)

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

instance Prelude.NFData CreatePipeline

instance Core.ToHeaders CreatePipeline where
  toHeaders :: CreatePipeline -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreatePipeline -> 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.CreatePipeline" :: 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 CreatePipeline where
  toJSON :: CreatePipeline -> Value
toJSON CreatePipeline' {Maybe [Tag]
Maybe Text
Text
roleArn :: Text
clientRequestToken :: Text
pipelineDefinition :: Text
pipelineName :: Text
tags :: Maybe [Tag]
pipelineDescription :: Maybe Text
pipelineDisplayName :: Maybe Text
$sel:roleArn:CreatePipeline' :: CreatePipeline -> Text
$sel:clientRequestToken:CreatePipeline' :: CreatePipeline -> Text
$sel:pipelineDefinition:CreatePipeline' :: CreatePipeline -> Text
$sel:pipelineName:CreatePipeline' :: CreatePipeline -> Text
$sel:tags:CreatePipeline' :: CreatePipeline -> Maybe [Tag]
$sel:pipelineDescription:CreatePipeline' :: CreatePipeline -> Maybe Text
$sel:pipelineDisplayName:CreatePipeline' :: CreatePipeline -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"PipelineDisplayName" 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
pipelineDisplayName,
            (Text
"PipelineDescription" 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
pipelineDescription,
            (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,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"PipelineName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
pipelineName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"PipelineDefinition" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
pipelineDefinition),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ClientRequestToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clientRequestToken),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"RoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
roleArn)
          ]
      )

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

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

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

-- |
-- Create a value of 'CreatePipelineResponse' 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:
--
-- 'pipelineArn', 'createPipelineResponse_pipelineArn' - The Amazon Resource Name (ARN) of the created pipeline.
--
-- 'httpStatus', 'createPipelineResponse_httpStatus' - The response's http status code.
newCreatePipelineResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreatePipelineResponse
newCreatePipelineResponse :: Int -> CreatePipelineResponse
newCreatePipelineResponse Int
pHttpStatus_ =
  CreatePipelineResponse' :: Maybe Text -> Int -> CreatePipelineResponse
CreatePipelineResponse'
    { $sel:pipelineArn:CreatePipelineResponse' :: Maybe Text
pipelineArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreatePipelineResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the created pipeline.
createPipelineResponse_pipelineArn :: Lens.Lens' CreatePipelineResponse (Prelude.Maybe Prelude.Text)
createPipelineResponse_pipelineArn :: (Maybe Text -> f (Maybe Text))
-> CreatePipelineResponse -> f CreatePipelineResponse
createPipelineResponse_pipelineArn = (CreatePipelineResponse -> Maybe Text)
-> (CreatePipelineResponse -> Maybe Text -> CreatePipelineResponse)
-> Lens
     CreatePipelineResponse
     CreatePipelineResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePipelineResponse' {Maybe Text
pipelineArn :: Maybe Text
$sel:pipelineArn:CreatePipelineResponse' :: CreatePipelineResponse -> Maybe Text
pipelineArn} -> Maybe Text
pipelineArn) (\s :: CreatePipelineResponse
s@CreatePipelineResponse' {} Maybe Text
a -> CreatePipelineResponse
s {$sel:pipelineArn:CreatePipelineResponse' :: Maybe Text
pipelineArn = Maybe Text
a} :: CreatePipelineResponse)

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

instance Prelude.NFData CreatePipelineResponse