{-# 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.CodeDeploy.ContinueDeployment
(
ContinueDeployment (..),
newContinueDeployment,
continueDeployment_deploymentId,
continueDeployment_deploymentWaitType,
ContinueDeploymentResponse (..),
newContinueDeploymentResponse,
)
where
import Amazonka.CodeDeploy.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 ContinueDeployment = ContinueDeployment'
{
ContinueDeployment -> Maybe Text
deploymentId :: Prelude.Maybe Prelude.Text,
ContinueDeployment -> Maybe DeploymentWaitType
deploymentWaitType :: Prelude.Maybe DeploymentWaitType
}
deriving (ContinueDeployment -> ContinueDeployment -> Bool
(ContinueDeployment -> ContinueDeployment -> Bool)
-> (ContinueDeployment -> ContinueDeployment -> Bool)
-> Eq ContinueDeployment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContinueDeployment -> ContinueDeployment -> Bool
$c/= :: ContinueDeployment -> ContinueDeployment -> Bool
== :: ContinueDeployment -> ContinueDeployment -> Bool
$c== :: ContinueDeployment -> ContinueDeployment -> Bool
Prelude.Eq, ReadPrec [ContinueDeployment]
ReadPrec ContinueDeployment
Int -> ReadS ContinueDeployment
ReadS [ContinueDeployment]
(Int -> ReadS ContinueDeployment)
-> ReadS [ContinueDeployment]
-> ReadPrec ContinueDeployment
-> ReadPrec [ContinueDeployment]
-> Read ContinueDeployment
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ContinueDeployment]
$creadListPrec :: ReadPrec [ContinueDeployment]
readPrec :: ReadPrec ContinueDeployment
$creadPrec :: ReadPrec ContinueDeployment
readList :: ReadS [ContinueDeployment]
$creadList :: ReadS [ContinueDeployment]
readsPrec :: Int -> ReadS ContinueDeployment
$creadsPrec :: Int -> ReadS ContinueDeployment
Prelude.Read, Int -> ContinueDeployment -> ShowS
[ContinueDeployment] -> ShowS
ContinueDeployment -> String
(Int -> ContinueDeployment -> ShowS)
-> (ContinueDeployment -> String)
-> ([ContinueDeployment] -> ShowS)
-> Show ContinueDeployment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContinueDeployment] -> ShowS
$cshowList :: [ContinueDeployment] -> ShowS
show :: ContinueDeployment -> String
$cshow :: ContinueDeployment -> String
showsPrec :: Int -> ContinueDeployment -> ShowS
$cshowsPrec :: Int -> ContinueDeployment -> ShowS
Prelude.Show, (forall x. ContinueDeployment -> Rep ContinueDeployment x)
-> (forall x. Rep ContinueDeployment x -> ContinueDeployment)
-> Generic ContinueDeployment
forall x. Rep ContinueDeployment x -> ContinueDeployment
forall x. ContinueDeployment -> Rep ContinueDeployment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ContinueDeployment x -> ContinueDeployment
$cfrom :: forall x. ContinueDeployment -> Rep ContinueDeployment x
Prelude.Generic)
newContinueDeployment ::
ContinueDeployment
newContinueDeployment :: ContinueDeployment
newContinueDeployment =
ContinueDeployment' :: Maybe Text -> Maybe DeploymentWaitType -> ContinueDeployment
ContinueDeployment'
{ $sel:deploymentId:ContinueDeployment' :: Maybe Text
deploymentId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:deploymentWaitType:ContinueDeployment' :: Maybe DeploymentWaitType
deploymentWaitType = Maybe DeploymentWaitType
forall a. Maybe a
Prelude.Nothing
}
continueDeployment_deploymentId :: Lens.Lens' ContinueDeployment (Prelude.Maybe Prelude.Text)
continueDeployment_deploymentId :: (Maybe Text -> f (Maybe Text))
-> ContinueDeployment -> f ContinueDeployment
continueDeployment_deploymentId = (ContinueDeployment -> Maybe Text)
-> (ContinueDeployment -> Maybe Text -> ContinueDeployment)
-> Lens
ContinueDeployment ContinueDeployment (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContinueDeployment' {Maybe Text
deploymentId :: Maybe Text
$sel:deploymentId:ContinueDeployment' :: ContinueDeployment -> Maybe Text
deploymentId} -> Maybe Text
deploymentId) (\s :: ContinueDeployment
s@ContinueDeployment' {} Maybe Text
a -> ContinueDeployment
s {$sel:deploymentId:ContinueDeployment' :: Maybe Text
deploymentId = Maybe Text
a} :: ContinueDeployment)
continueDeployment_deploymentWaitType :: Lens.Lens' ContinueDeployment (Prelude.Maybe DeploymentWaitType)
continueDeployment_deploymentWaitType :: (Maybe DeploymentWaitType -> f (Maybe DeploymentWaitType))
-> ContinueDeployment -> f ContinueDeployment
continueDeployment_deploymentWaitType = (ContinueDeployment -> Maybe DeploymentWaitType)
-> (ContinueDeployment
-> Maybe DeploymentWaitType -> ContinueDeployment)
-> Lens
ContinueDeployment
ContinueDeployment
(Maybe DeploymentWaitType)
(Maybe DeploymentWaitType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContinueDeployment' {Maybe DeploymentWaitType
deploymentWaitType :: Maybe DeploymentWaitType
$sel:deploymentWaitType:ContinueDeployment' :: ContinueDeployment -> Maybe DeploymentWaitType
deploymentWaitType} -> Maybe DeploymentWaitType
deploymentWaitType) (\s :: ContinueDeployment
s@ContinueDeployment' {} Maybe DeploymentWaitType
a -> ContinueDeployment
s {$sel:deploymentWaitType:ContinueDeployment' :: Maybe DeploymentWaitType
deploymentWaitType = Maybe DeploymentWaitType
a} :: ContinueDeployment)
instance Core.AWSRequest ContinueDeployment where
type
AWSResponse ContinueDeployment =
ContinueDeploymentResponse
request :: ContinueDeployment -> Request ContinueDeployment
request = Service -> ContinueDeployment -> Request ContinueDeployment
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ContinueDeployment
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ContinueDeployment)))
response =
AWSResponse ContinueDeployment
-> Logger
-> Service
-> Proxy ContinueDeployment
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ContinueDeployment)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse ContinueDeployment
ContinueDeploymentResponse
ContinueDeploymentResponse'
instance Prelude.Hashable ContinueDeployment
instance Prelude.NFData ContinueDeployment
instance Core.ToHeaders ContinueDeployment where
toHeaders :: ContinueDeployment -> [Header]
toHeaders =
[Header] -> ContinueDeployment -> [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
"CodeDeploy_20141006.ContinueDeployment" ::
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 ContinueDeployment where
toJSON :: ContinueDeployment -> Value
toJSON ContinueDeployment' {Maybe Text
Maybe DeploymentWaitType
deploymentWaitType :: Maybe DeploymentWaitType
deploymentId :: Maybe Text
$sel:deploymentWaitType:ContinueDeployment' :: ContinueDeployment -> Maybe DeploymentWaitType
$sel:deploymentId:ContinueDeployment' :: ContinueDeployment -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"deploymentId" 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
deploymentId,
(Text
"deploymentWaitType" Text -> DeploymentWaitType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(DeploymentWaitType -> Pair)
-> Maybe DeploymentWaitType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DeploymentWaitType
deploymentWaitType
]
)
instance Core.ToPath ContinueDeployment where
toPath :: ContinueDeployment -> ByteString
toPath = ByteString -> ContinueDeployment -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ContinueDeployment where
toQuery :: ContinueDeployment -> QueryString
toQuery = QueryString -> ContinueDeployment -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ContinueDeploymentResponse = ContinueDeploymentResponse'
{
}
deriving (ContinueDeploymentResponse -> ContinueDeploymentResponse -> Bool
(ContinueDeploymentResponse -> ContinueDeploymentResponse -> Bool)
-> (ContinueDeploymentResponse
-> ContinueDeploymentResponse -> Bool)
-> Eq ContinueDeploymentResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContinueDeploymentResponse -> ContinueDeploymentResponse -> Bool
$c/= :: ContinueDeploymentResponse -> ContinueDeploymentResponse -> Bool
== :: ContinueDeploymentResponse -> ContinueDeploymentResponse -> Bool
$c== :: ContinueDeploymentResponse -> ContinueDeploymentResponse -> Bool
Prelude.Eq, ReadPrec [ContinueDeploymentResponse]
ReadPrec ContinueDeploymentResponse
Int -> ReadS ContinueDeploymentResponse
ReadS [ContinueDeploymentResponse]
(Int -> ReadS ContinueDeploymentResponse)
-> ReadS [ContinueDeploymentResponse]
-> ReadPrec ContinueDeploymentResponse
-> ReadPrec [ContinueDeploymentResponse]
-> Read ContinueDeploymentResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ContinueDeploymentResponse]
$creadListPrec :: ReadPrec [ContinueDeploymentResponse]
readPrec :: ReadPrec ContinueDeploymentResponse
$creadPrec :: ReadPrec ContinueDeploymentResponse
readList :: ReadS [ContinueDeploymentResponse]
$creadList :: ReadS [ContinueDeploymentResponse]
readsPrec :: Int -> ReadS ContinueDeploymentResponse
$creadsPrec :: Int -> ReadS ContinueDeploymentResponse
Prelude.Read, Int -> ContinueDeploymentResponse -> ShowS
[ContinueDeploymentResponse] -> ShowS
ContinueDeploymentResponse -> String
(Int -> ContinueDeploymentResponse -> ShowS)
-> (ContinueDeploymentResponse -> String)
-> ([ContinueDeploymentResponse] -> ShowS)
-> Show ContinueDeploymentResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContinueDeploymentResponse] -> ShowS
$cshowList :: [ContinueDeploymentResponse] -> ShowS
show :: ContinueDeploymentResponse -> String
$cshow :: ContinueDeploymentResponse -> String
showsPrec :: Int -> ContinueDeploymentResponse -> ShowS
$cshowsPrec :: Int -> ContinueDeploymentResponse -> ShowS
Prelude.Show, (forall x.
ContinueDeploymentResponse -> Rep ContinueDeploymentResponse x)
-> (forall x.
Rep ContinueDeploymentResponse x -> ContinueDeploymentResponse)
-> Generic ContinueDeploymentResponse
forall x.
Rep ContinueDeploymentResponse x -> ContinueDeploymentResponse
forall x.
ContinueDeploymentResponse -> Rep ContinueDeploymentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ContinueDeploymentResponse x -> ContinueDeploymentResponse
$cfrom :: forall x.
ContinueDeploymentResponse -> Rep ContinueDeploymentResponse x
Prelude.Generic)
newContinueDeploymentResponse ::
ContinueDeploymentResponse
newContinueDeploymentResponse :: ContinueDeploymentResponse
newContinueDeploymentResponse =
ContinueDeploymentResponse
ContinueDeploymentResponse'
instance Prelude.NFData ContinueDeploymentResponse