{-# 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.CodePipeline.UpdateActionType
(
UpdateActionType (..),
newUpdateActionType,
updateActionType_actionType,
UpdateActionTypeResponse (..),
newUpdateActionTypeResponse,
)
where
import Amazonka.CodePipeline.Types
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
data UpdateActionType = UpdateActionType'
{
UpdateActionType -> ActionTypeDeclaration
actionType :: ActionTypeDeclaration
}
deriving (UpdateActionType -> UpdateActionType -> Bool
(UpdateActionType -> UpdateActionType -> Bool)
-> (UpdateActionType -> UpdateActionType -> Bool)
-> Eq UpdateActionType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateActionType -> UpdateActionType -> Bool
$c/= :: UpdateActionType -> UpdateActionType -> Bool
== :: UpdateActionType -> UpdateActionType -> Bool
$c== :: UpdateActionType -> UpdateActionType -> Bool
Prelude.Eq, ReadPrec [UpdateActionType]
ReadPrec UpdateActionType
Int -> ReadS UpdateActionType
ReadS [UpdateActionType]
(Int -> ReadS UpdateActionType)
-> ReadS [UpdateActionType]
-> ReadPrec UpdateActionType
-> ReadPrec [UpdateActionType]
-> Read UpdateActionType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateActionType]
$creadListPrec :: ReadPrec [UpdateActionType]
readPrec :: ReadPrec UpdateActionType
$creadPrec :: ReadPrec UpdateActionType
readList :: ReadS [UpdateActionType]
$creadList :: ReadS [UpdateActionType]
readsPrec :: Int -> ReadS UpdateActionType
$creadsPrec :: Int -> ReadS UpdateActionType
Prelude.Read, Int -> UpdateActionType -> ShowS
[UpdateActionType] -> ShowS
UpdateActionType -> String
(Int -> UpdateActionType -> ShowS)
-> (UpdateActionType -> String)
-> ([UpdateActionType] -> ShowS)
-> Show UpdateActionType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateActionType] -> ShowS
$cshowList :: [UpdateActionType] -> ShowS
show :: UpdateActionType -> String
$cshow :: UpdateActionType -> String
showsPrec :: Int -> UpdateActionType -> ShowS
$cshowsPrec :: Int -> UpdateActionType -> ShowS
Prelude.Show, (forall x. UpdateActionType -> Rep UpdateActionType x)
-> (forall x. Rep UpdateActionType x -> UpdateActionType)
-> Generic UpdateActionType
forall x. Rep UpdateActionType x -> UpdateActionType
forall x. UpdateActionType -> Rep UpdateActionType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateActionType x -> UpdateActionType
$cfrom :: forall x. UpdateActionType -> Rep UpdateActionType x
Prelude.Generic)
newUpdateActionType ::
ActionTypeDeclaration ->
UpdateActionType
newUpdateActionType :: ActionTypeDeclaration -> UpdateActionType
newUpdateActionType ActionTypeDeclaration
pActionType_ =
UpdateActionType' :: ActionTypeDeclaration -> UpdateActionType
UpdateActionType' {$sel:actionType:UpdateActionType' :: ActionTypeDeclaration
actionType = ActionTypeDeclaration
pActionType_}
updateActionType_actionType :: Lens.Lens' UpdateActionType ActionTypeDeclaration
updateActionType_actionType :: (ActionTypeDeclaration -> f ActionTypeDeclaration)
-> UpdateActionType -> f UpdateActionType
updateActionType_actionType = (UpdateActionType -> ActionTypeDeclaration)
-> (UpdateActionType -> ActionTypeDeclaration -> UpdateActionType)
-> Lens
UpdateActionType
UpdateActionType
ActionTypeDeclaration
ActionTypeDeclaration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateActionType' {ActionTypeDeclaration
actionType :: ActionTypeDeclaration
$sel:actionType:UpdateActionType' :: UpdateActionType -> ActionTypeDeclaration
actionType} -> ActionTypeDeclaration
actionType) (\s :: UpdateActionType
s@UpdateActionType' {} ActionTypeDeclaration
a -> UpdateActionType
s {$sel:actionType:UpdateActionType' :: ActionTypeDeclaration
actionType = ActionTypeDeclaration
a} :: UpdateActionType)
instance Core.AWSRequest UpdateActionType where
type
AWSResponse UpdateActionType =
UpdateActionTypeResponse
request :: UpdateActionType -> Request UpdateActionType
request = Service -> UpdateActionType -> Request UpdateActionType
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateActionType
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateActionType)))
response =
AWSResponse UpdateActionType
-> Logger
-> Service
-> Proxy UpdateActionType
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateActionType)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse UpdateActionType
UpdateActionTypeResponse
UpdateActionTypeResponse'
instance Prelude.Hashable UpdateActionType
instance Prelude.NFData UpdateActionType
instance Core.ToHeaders UpdateActionType where
toHeaders :: UpdateActionType -> [Header]
toHeaders =
[Header] -> UpdateActionType -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"CodePipeline_20150709.UpdateActionType" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON UpdateActionType where
toJSON :: UpdateActionType -> Value
toJSON UpdateActionType' {ActionTypeDeclaration
actionType :: ActionTypeDeclaration
$sel:actionType:UpdateActionType' :: UpdateActionType -> ActionTypeDeclaration
..} =
[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
"actionType" Text -> ActionTypeDeclaration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ActionTypeDeclaration
actionType)]
)
instance Core.ToPath UpdateActionType where
toPath :: UpdateActionType -> ByteString
toPath = ByteString -> UpdateActionType -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UpdateActionType where
toQuery :: UpdateActionType -> QueryString
toQuery = QueryString -> UpdateActionType -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateActionTypeResponse = UpdateActionTypeResponse'
{
}
deriving (UpdateActionTypeResponse -> UpdateActionTypeResponse -> Bool
(UpdateActionTypeResponse -> UpdateActionTypeResponse -> Bool)
-> (UpdateActionTypeResponse -> UpdateActionTypeResponse -> Bool)
-> Eq UpdateActionTypeResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateActionTypeResponse -> UpdateActionTypeResponse -> Bool
$c/= :: UpdateActionTypeResponse -> UpdateActionTypeResponse -> Bool
== :: UpdateActionTypeResponse -> UpdateActionTypeResponse -> Bool
$c== :: UpdateActionTypeResponse -> UpdateActionTypeResponse -> Bool
Prelude.Eq, ReadPrec [UpdateActionTypeResponse]
ReadPrec UpdateActionTypeResponse
Int -> ReadS UpdateActionTypeResponse
ReadS [UpdateActionTypeResponse]
(Int -> ReadS UpdateActionTypeResponse)
-> ReadS [UpdateActionTypeResponse]
-> ReadPrec UpdateActionTypeResponse
-> ReadPrec [UpdateActionTypeResponse]
-> Read UpdateActionTypeResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateActionTypeResponse]
$creadListPrec :: ReadPrec [UpdateActionTypeResponse]
readPrec :: ReadPrec UpdateActionTypeResponse
$creadPrec :: ReadPrec UpdateActionTypeResponse
readList :: ReadS [UpdateActionTypeResponse]
$creadList :: ReadS [UpdateActionTypeResponse]
readsPrec :: Int -> ReadS UpdateActionTypeResponse
$creadsPrec :: Int -> ReadS UpdateActionTypeResponse
Prelude.Read, Int -> UpdateActionTypeResponse -> ShowS
[UpdateActionTypeResponse] -> ShowS
UpdateActionTypeResponse -> String
(Int -> UpdateActionTypeResponse -> ShowS)
-> (UpdateActionTypeResponse -> String)
-> ([UpdateActionTypeResponse] -> ShowS)
-> Show UpdateActionTypeResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateActionTypeResponse] -> ShowS
$cshowList :: [UpdateActionTypeResponse] -> ShowS
show :: UpdateActionTypeResponse -> String
$cshow :: UpdateActionTypeResponse -> String
showsPrec :: Int -> UpdateActionTypeResponse -> ShowS
$cshowsPrec :: Int -> UpdateActionTypeResponse -> ShowS
Prelude.Show, (forall x.
UpdateActionTypeResponse -> Rep UpdateActionTypeResponse x)
-> (forall x.
Rep UpdateActionTypeResponse x -> UpdateActionTypeResponse)
-> Generic UpdateActionTypeResponse
forall x.
Rep UpdateActionTypeResponse x -> UpdateActionTypeResponse
forall x.
UpdateActionTypeResponse -> Rep UpdateActionTypeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateActionTypeResponse x -> UpdateActionTypeResponse
$cfrom :: forall x.
UpdateActionTypeResponse -> Rep UpdateActionTypeResponse x
Prelude.Generic)
newUpdateActionTypeResponse ::
UpdateActionTypeResponse
newUpdateActionTypeResponse :: UpdateActionTypeResponse
newUpdateActionTypeResponse =
UpdateActionTypeResponse
UpdateActionTypeResponse'
instance Prelude.NFData UpdateActionTypeResponse