{-# 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.AppConfig.GetDeploymentStrategy
(
GetDeploymentStrategy (..),
newGetDeploymentStrategy,
getDeploymentStrategy_deploymentStrategyId,
DeploymentStrategy (..),
newDeploymentStrategy,
deploymentStrategy_deploymentDurationInMinutes,
deploymentStrategy_description,
deploymentStrategy_finalBakeTimeInMinutes,
deploymentStrategy_growthFactor,
deploymentStrategy_growthType,
deploymentStrategy_id,
deploymentStrategy_name,
deploymentStrategy_replicateTo,
)
where
import Amazonka.AppConfig.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetDeploymentStrategy = GetDeploymentStrategy'
{
GetDeploymentStrategy -> Text
deploymentStrategyId :: Prelude.Text
}
deriving (GetDeploymentStrategy -> GetDeploymentStrategy -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDeploymentStrategy -> GetDeploymentStrategy -> Bool
$c/= :: GetDeploymentStrategy -> GetDeploymentStrategy -> Bool
== :: GetDeploymentStrategy -> GetDeploymentStrategy -> Bool
$c== :: GetDeploymentStrategy -> GetDeploymentStrategy -> Bool
Prelude.Eq, ReadPrec [GetDeploymentStrategy]
ReadPrec GetDeploymentStrategy
Int -> ReadS GetDeploymentStrategy
ReadS [GetDeploymentStrategy]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDeploymentStrategy]
$creadListPrec :: ReadPrec [GetDeploymentStrategy]
readPrec :: ReadPrec GetDeploymentStrategy
$creadPrec :: ReadPrec GetDeploymentStrategy
readList :: ReadS [GetDeploymentStrategy]
$creadList :: ReadS [GetDeploymentStrategy]
readsPrec :: Int -> ReadS GetDeploymentStrategy
$creadsPrec :: Int -> ReadS GetDeploymentStrategy
Prelude.Read, Int -> GetDeploymentStrategy -> ShowS
[GetDeploymentStrategy] -> ShowS
GetDeploymentStrategy -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDeploymentStrategy] -> ShowS
$cshowList :: [GetDeploymentStrategy] -> ShowS
show :: GetDeploymentStrategy -> String
$cshow :: GetDeploymentStrategy -> String
showsPrec :: Int -> GetDeploymentStrategy -> ShowS
$cshowsPrec :: Int -> GetDeploymentStrategy -> ShowS
Prelude.Show, forall x. Rep GetDeploymentStrategy x -> GetDeploymentStrategy
forall x. GetDeploymentStrategy -> Rep GetDeploymentStrategy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDeploymentStrategy x -> GetDeploymentStrategy
$cfrom :: forall x. GetDeploymentStrategy -> Rep GetDeploymentStrategy x
Prelude.Generic)
newGetDeploymentStrategy ::
Prelude.Text ->
GetDeploymentStrategy
newGetDeploymentStrategy :: Text -> GetDeploymentStrategy
newGetDeploymentStrategy Text
pDeploymentStrategyId_ =
GetDeploymentStrategy'
{ $sel:deploymentStrategyId:GetDeploymentStrategy' :: Text
deploymentStrategyId =
Text
pDeploymentStrategyId_
}
getDeploymentStrategy_deploymentStrategyId :: Lens.Lens' GetDeploymentStrategy Prelude.Text
getDeploymentStrategy_deploymentStrategyId :: Lens' GetDeploymentStrategy Text
getDeploymentStrategy_deploymentStrategyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeploymentStrategy' {Text
deploymentStrategyId :: Text
$sel:deploymentStrategyId:GetDeploymentStrategy' :: GetDeploymentStrategy -> Text
deploymentStrategyId} -> Text
deploymentStrategyId) (\s :: GetDeploymentStrategy
s@GetDeploymentStrategy' {} Text
a -> GetDeploymentStrategy
s {$sel:deploymentStrategyId:GetDeploymentStrategy' :: Text
deploymentStrategyId = Text
a} :: GetDeploymentStrategy)
instance Core.AWSRequest GetDeploymentStrategy where
type
AWSResponse GetDeploymentStrategy =
DeploymentStrategy
request :: (Service -> Service)
-> GetDeploymentStrategy -> Request GetDeploymentStrategy
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetDeploymentStrategy
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetDeploymentStrategy)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
(\Int
s ResponseHeaders
h Object
x -> forall a. FromJSON a => Object -> Either String a
Data.eitherParseJSON Object
x)
instance Prelude.Hashable GetDeploymentStrategy where
hashWithSalt :: Int -> GetDeploymentStrategy -> Int
hashWithSalt Int
_salt GetDeploymentStrategy' {Text
deploymentStrategyId :: Text
$sel:deploymentStrategyId:GetDeploymentStrategy' :: GetDeploymentStrategy -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
deploymentStrategyId
instance Prelude.NFData GetDeploymentStrategy where
rnf :: GetDeploymentStrategy -> ()
rnf GetDeploymentStrategy' {Text
deploymentStrategyId :: Text
$sel:deploymentStrategyId:GetDeploymentStrategy' :: GetDeploymentStrategy -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
deploymentStrategyId
instance Data.ToHeaders GetDeploymentStrategy where
toHeaders :: GetDeploymentStrategy -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToPath GetDeploymentStrategy where
toPath :: GetDeploymentStrategy -> ByteString
toPath GetDeploymentStrategy' {Text
deploymentStrategyId :: Text
$sel:deploymentStrategyId:GetDeploymentStrategy' :: GetDeploymentStrategy -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/deploymentstrategies/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
deploymentStrategyId
]
instance Data.ToQuery GetDeploymentStrategy where
toQuery :: GetDeploymentStrategy -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty