{-# 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 #-}
module Amazonka.SageMaker.UpdatePipelineExecution
(
UpdatePipelineExecution (..),
newUpdatePipelineExecution,
updatePipelineExecution_pipelineExecutionDisplayName,
updatePipelineExecution_pipelineExecutionDescription,
updatePipelineExecution_pipelineExecutionArn,
UpdatePipelineExecutionResponse (..),
newUpdatePipelineExecutionResponse,
updatePipelineExecutionResponse_pipelineExecutionArn,
updatePipelineExecutionResponse_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
data UpdatePipelineExecution = UpdatePipelineExecution'
{
UpdatePipelineExecution -> Maybe Text
pipelineExecutionDisplayName :: Prelude.Maybe Prelude.Text,
UpdatePipelineExecution -> Maybe Text
pipelineExecutionDescription :: Prelude.Maybe Prelude.Text,
UpdatePipelineExecution -> Text
pipelineExecutionArn :: Prelude.Text
}
deriving (UpdatePipelineExecution -> UpdatePipelineExecution -> Bool
(UpdatePipelineExecution -> UpdatePipelineExecution -> Bool)
-> (UpdatePipelineExecution -> UpdatePipelineExecution -> Bool)
-> Eq UpdatePipelineExecution
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdatePipelineExecution -> UpdatePipelineExecution -> Bool
$c/= :: UpdatePipelineExecution -> UpdatePipelineExecution -> Bool
== :: UpdatePipelineExecution -> UpdatePipelineExecution -> Bool
$c== :: UpdatePipelineExecution -> UpdatePipelineExecution -> Bool
Prelude.Eq, ReadPrec [UpdatePipelineExecution]
ReadPrec UpdatePipelineExecution
Int -> ReadS UpdatePipelineExecution
ReadS [UpdatePipelineExecution]
(Int -> ReadS UpdatePipelineExecution)
-> ReadS [UpdatePipelineExecution]
-> ReadPrec UpdatePipelineExecution
-> ReadPrec [UpdatePipelineExecution]
-> Read UpdatePipelineExecution
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdatePipelineExecution]
$creadListPrec :: ReadPrec [UpdatePipelineExecution]
readPrec :: ReadPrec UpdatePipelineExecution
$creadPrec :: ReadPrec UpdatePipelineExecution
readList :: ReadS [UpdatePipelineExecution]
$creadList :: ReadS [UpdatePipelineExecution]
readsPrec :: Int -> ReadS UpdatePipelineExecution
$creadsPrec :: Int -> ReadS UpdatePipelineExecution
Prelude.Read, Int -> UpdatePipelineExecution -> ShowS
[UpdatePipelineExecution] -> ShowS
UpdatePipelineExecution -> String
(Int -> UpdatePipelineExecution -> ShowS)
-> (UpdatePipelineExecution -> String)
-> ([UpdatePipelineExecution] -> ShowS)
-> Show UpdatePipelineExecution
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdatePipelineExecution] -> ShowS
$cshowList :: [UpdatePipelineExecution] -> ShowS
show :: UpdatePipelineExecution -> String
$cshow :: UpdatePipelineExecution -> String
showsPrec :: Int -> UpdatePipelineExecution -> ShowS
$cshowsPrec :: Int -> UpdatePipelineExecution -> ShowS
Prelude.Show, (forall x.
UpdatePipelineExecution -> Rep UpdatePipelineExecution x)
-> (forall x.
Rep UpdatePipelineExecution x -> UpdatePipelineExecution)
-> Generic UpdatePipelineExecution
forall x. Rep UpdatePipelineExecution x -> UpdatePipelineExecution
forall x. UpdatePipelineExecution -> Rep UpdatePipelineExecution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdatePipelineExecution x -> UpdatePipelineExecution
$cfrom :: forall x. UpdatePipelineExecution -> Rep UpdatePipelineExecution x
Prelude.Generic)
newUpdatePipelineExecution ::
Prelude.Text ->
UpdatePipelineExecution
newUpdatePipelineExecution :: Text -> UpdatePipelineExecution
newUpdatePipelineExecution Text
pPipelineExecutionArn_ =
UpdatePipelineExecution' :: Maybe Text -> Maybe Text -> Text -> UpdatePipelineExecution
UpdatePipelineExecution'
{ $sel:pipelineExecutionDisplayName:UpdatePipelineExecution' :: Maybe Text
pipelineExecutionDisplayName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:pipelineExecutionDescription:UpdatePipelineExecution' :: Maybe Text
pipelineExecutionDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:pipelineExecutionArn:UpdatePipelineExecution' :: Text
pipelineExecutionArn = Text
pPipelineExecutionArn_
}
updatePipelineExecution_pipelineExecutionDisplayName :: Lens.Lens' UpdatePipelineExecution (Prelude.Maybe Prelude.Text)
updatePipelineExecution_pipelineExecutionDisplayName :: (Maybe Text -> f (Maybe Text))
-> UpdatePipelineExecution -> f UpdatePipelineExecution
updatePipelineExecution_pipelineExecutionDisplayName = (UpdatePipelineExecution -> Maybe Text)
-> (UpdatePipelineExecution
-> Maybe Text -> UpdatePipelineExecution)
-> Lens
UpdatePipelineExecution
UpdatePipelineExecution
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePipelineExecution' {Maybe Text
pipelineExecutionDisplayName :: Maybe Text
$sel:pipelineExecutionDisplayName:UpdatePipelineExecution' :: UpdatePipelineExecution -> Maybe Text
pipelineExecutionDisplayName} -> Maybe Text
pipelineExecutionDisplayName) (\s :: UpdatePipelineExecution
s@UpdatePipelineExecution' {} Maybe Text
a -> UpdatePipelineExecution
s {$sel:pipelineExecutionDisplayName:UpdatePipelineExecution' :: Maybe Text
pipelineExecutionDisplayName = Maybe Text
a} :: UpdatePipelineExecution)
updatePipelineExecution_pipelineExecutionDescription :: Lens.Lens' UpdatePipelineExecution (Prelude.Maybe Prelude.Text)
updatePipelineExecution_pipelineExecutionDescription :: (Maybe Text -> f (Maybe Text))
-> UpdatePipelineExecution -> f UpdatePipelineExecution
updatePipelineExecution_pipelineExecutionDescription = (UpdatePipelineExecution -> Maybe Text)
-> (UpdatePipelineExecution
-> Maybe Text -> UpdatePipelineExecution)
-> Lens
UpdatePipelineExecution
UpdatePipelineExecution
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePipelineExecution' {Maybe Text
pipelineExecutionDescription :: Maybe Text
$sel:pipelineExecutionDescription:UpdatePipelineExecution' :: UpdatePipelineExecution -> Maybe Text
pipelineExecutionDescription} -> Maybe Text
pipelineExecutionDescription) (\s :: UpdatePipelineExecution
s@UpdatePipelineExecution' {} Maybe Text
a -> UpdatePipelineExecution
s {$sel:pipelineExecutionDescription:UpdatePipelineExecution' :: Maybe Text
pipelineExecutionDescription = Maybe Text
a} :: UpdatePipelineExecution)
updatePipelineExecution_pipelineExecutionArn :: Lens.Lens' UpdatePipelineExecution Prelude.Text
updatePipelineExecution_pipelineExecutionArn :: (Text -> f Text)
-> UpdatePipelineExecution -> f UpdatePipelineExecution
updatePipelineExecution_pipelineExecutionArn = (UpdatePipelineExecution -> Text)
-> (UpdatePipelineExecution -> Text -> UpdatePipelineExecution)
-> Lens UpdatePipelineExecution UpdatePipelineExecution Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePipelineExecution' {Text
pipelineExecutionArn :: Text
$sel:pipelineExecutionArn:UpdatePipelineExecution' :: UpdatePipelineExecution -> Text
pipelineExecutionArn} -> Text
pipelineExecutionArn) (\s :: UpdatePipelineExecution
s@UpdatePipelineExecution' {} Text
a -> UpdatePipelineExecution
s {$sel:pipelineExecutionArn:UpdatePipelineExecution' :: Text
pipelineExecutionArn = Text
a} :: UpdatePipelineExecution)
instance Core.AWSRequest UpdatePipelineExecution where
type
AWSResponse UpdatePipelineExecution =
UpdatePipelineExecutionResponse
request :: UpdatePipelineExecution -> Request UpdatePipelineExecution
request = Service
-> UpdatePipelineExecution -> Request UpdatePipelineExecution
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdatePipelineExecution
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdatePipelineExecution)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdatePipelineExecution))
-> Logger
-> Service
-> Proxy UpdatePipelineExecution
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdatePipelineExecution)))
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 -> UpdatePipelineExecutionResponse
UpdatePipelineExecutionResponse'
(Maybe Text -> Int -> UpdatePipelineExecutionResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdatePipelineExecutionResponse)
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
"PipelineExecutionArn")
Either String (Int -> UpdatePipelineExecutionResponse)
-> Either String Int
-> Either String UpdatePipelineExecutionResponse
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 UpdatePipelineExecution
instance Prelude.NFData UpdatePipelineExecution
instance Core.ToHeaders UpdatePipelineExecution where
toHeaders :: UpdatePipelineExecution -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdatePipelineExecution -> 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.UpdatePipelineExecution" ::
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 UpdatePipelineExecution where
toJSON :: UpdatePipelineExecution -> Value
toJSON UpdatePipelineExecution' {Maybe Text
Text
pipelineExecutionArn :: Text
pipelineExecutionDescription :: Maybe Text
pipelineExecutionDisplayName :: Maybe Text
$sel:pipelineExecutionArn:UpdatePipelineExecution' :: UpdatePipelineExecution -> Text
$sel:pipelineExecutionDescription:UpdatePipelineExecution' :: UpdatePipelineExecution -> Maybe Text
$sel:pipelineExecutionDisplayName:UpdatePipelineExecution' :: UpdatePipelineExecution -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"PipelineExecutionDisplayName" 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
pipelineExecutionDisplayName,
(Text
"PipelineExecutionDescription" 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
pipelineExecutionDescription,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"PipelineExecutionArn"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
pipelineExecutionArn
)
]
)
instance Core.ToPath UpdatePipelineExecution where
toPath :: UpdatePipelineExecution -> ByteString
toPath = ByteString -> UpdatePipelineExecution -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UpdatePipelineExecution where
toQuery :: UpdatePipelineExecution -> QueryString
toQuery = QueryString -> UpdatePipelineExecution -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdatePipelineExecutionResponse = UpdatePipelineExecutionResponse'
{
UpdatePipelineExecutionResponse -> Maybe Text
pipelineExecutionArn :: Prelude.Maybe Prelude.Text,
UpdatePipelineExecutionResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdatePipelineExecutionResponse
-> UpdatePipelineExecutionResponse -> Bool
(UpdatePipelineExecutionResponse
-> UpdatePipelineExecutionResponse -> Bool)
-> (UpdatePipelineExecutionResponse
-> UpdatePipelineExecutionResponse -> Bool)
-> Eq UpdatePipelineExecutionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdatePipelineExecutionResponse
-> UpdatePipelineExecutionResponse -> Bool
$c/= :: UpdatePipelineExecutionResponse
-> UpdatePipelineExecutionResponse -> Bool
== :: UpdatePipelineExecutionResponse
-> UpdatePipelineExecutionResponse -> Bool
$c== :: UpdatePipelineExecutionResponse
-> UpdatePipelineExecutionResponse -> Bool
Prelude.Eq, ReadPrec [UpdatePipelineExecutionResponse]
ReadPrec UpdatePipelineExecutionResponse
Int -> ReadS UpdatePipelineExecutionResponse
ReadS [UpdatePipelineExecutionResponse]
(Int -> ReadS UpdatePipelineExecutionResponse)
-> ReadS [UpdatePipelineExecutionResponse]
-> ReadPrec UpdatePipelineExecutionResponse
-> ReadPrec [UpdatePipelineExecutionResponse]
-> Read UpdatePipelineExecutionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdatePipelineExecutionResponse]
$creadListPrec :: ReadPrec [UpdatePipelineExecutionResponse]
readPrec :: ReadPrec UpdatePipelineExecutionResponse
$creadPrec :: ReadPrec UpdatePipelineExecutionResponse
readList :: ReadS [UpdatePipelineExecutionResponse]
$creadList :: ReadS [UpdatePipelineExecutionResponse]
readsPrec :: Int -> ReadS UpdatePipelineExecutionResponse
$creadsPrec :: Int -> ReadS UpdatePipelineExecutionResponse
Prelude.Read, Int -> UpdatePipelineExecutionResponse -> ShowS
[UpdatePipelineExecutionResponse] -> ShowS
UpdatePipelineExecutionResponse -> String
(Int -> UpdatePipelineExecutionResponse -> ShowS)
-> (UpdatePipelineExecutionResponse -> String)
-> ([UpdatePipelineExecutionResponse] -> ShowS)
-> Show UpdatePipelineExecutionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdatePipelineExecutionResponse] -> ShowS
$cshowList :: [UpdatePipelineExecutionResponse] -> ShowS
show :: UpdatePipelineExecutionResponse -> String
$cshow :: UpdatePipelineExecutionResponse -> String
showsPrec :: Int -> UpdatePipelineExecutionResponse -> ShowS
$cshowsPrec :: Int -> UpdatePipelineExecutionResponse -> ShowS
Prelude.Show, (forall x.
UpdatePipelineExecutionResponse
-> Rep UpdatePipelineExecutionResponse x)
-> (forall x.
Rep UpdatePipelineExecutionResponse x
-> UpdatePipelineExecutionResponse)
-> Generic UpdatePipelineExecutionResponse
forall x.
Rep UpdatePipelineExecutionResponse x
-> UpdatePipelineExecutionResponse
forall x.
UpdatePipelineExecutionResponse
-> Rep UpdatePipelineExecutionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdatePipelineExecutionResponse x
-> UpdatePipelineExecutionResponse
$cfrom :: forall x.
UpdatePipelineExecutionResponse
-> Rep UpdatePipelineExecutionResponse x
Prelude.Generic)
newUpdatePipelineExecutionResponse ::
Prelude.Int ->
UpdatePipelineExecutionResponse
newUpdatePipelineExecutionResponse :: Int -> UpdatePipelineExecutionResponse
newUpdatePipelineExecutionResponse Int
pHttpStatus_ =
UpdatePipelineExecutionResponse' :: Maybe Text -> Int -> UpdatePipelineExecutionResponse
UpdatePipelineExecutionResponse'
{ $sel:pipelineExecutionArn:UpdatePipelineExecutionResponse' :: Maybe Text
pipelineExecutionArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:UpdatePipelineExecutionResponse' :: Int
httpStatus = Int
pHttpStatus_
}
updatePipelineExecutionResponse_pipelineExecutionArn :: Lens.Lens' UpdatePipelineExecutionResponse (Prelude.Maybe Prelude.Text)
updatePipelineExecutionResponse_pipelineExecutionArn :: (Maybe Text -> f (Maybe Text))
-> UpdatePipelineExecutionResponse
-> f UpdatePipelineExecutionResponse
updatePipelineExecutionResponse_pipelineExecutionArn = (UpdatePipelineExecutionResponse -> Maybe Text)
-> (UpdatePipelineExecutionResponse
-> Maybe Text -> UpdatePipelineExecutionResponse)
-> Lens
UpdatePipelineExecutionResponse
UpdatePipelineExecutionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePipelineExecutionResponse' {Maybe Text
pipelineExecutionArn :: Maybe Text
$sel:pipelineExecutionArn:UpdatePipelineExecutionResponse' :: UpdatePipelineExecutionResponse -> Maybe Text
pipelineExecutionArn} -> Maybe Text
pipelineExecutionArn) (\s :: UpdatePipelineExecutionResponse
s@UpdatePipelineExecutionResponse' {} Maybe Text
a -> UpdatePipelineExecutionResponse
s {$sel:pipelineExecutionArn:UpdatePipelineExecutionResponse' :: Maybe Text
pipelineExecutionArn = Maybe Text
a} :: UpdatePipelineExecutionResponse)
updatePipelineExecutionResponse_httpStatus :: Lens.Lens' UpdatePipelineExecutionResponse Prelude.Int
updatePipelineExecutionResponse_httpStatus :: (Int -> f Int)
-> UpdatePipelineExecutionResponse
-> f UpdatePipelineExecutionResponse
updatePipelineExecutionResponse_httpStatus = (UpdatePipelineExecutionResponse -> Int)
-> (UpdatePipelineExecutionResponse
-> Int -> UpdatePipelineExecutionResponse)
-> Lens
UpdatePipelineExecutionResponse
UpdatePipelineExecutionResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePipelineExecutionResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdatePipelineExecutionResponse' :: UpdatePipelineExecutionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdatePipelineExecutionResponse
s@UpdatePipelineExecutionResponse' {} Int
a -> UpdatePipelineExecutionResponse
s {$sel:httpStatus:UpdatePipelineExecutionResponse' :: Int
httpStatus = Int
a} :: UpdatePipelineExecutionResponse)
instance
Prelude.NFData
UpdatePipelineExecutionResponse