{-# 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.Amplify.UpdateBranch
(
UpdateBranch (..),
newUpdateBranch,
updateBranch_framework,
updateBranch_ttl,
updateBranch_enableNotification,
updateBranch_stage,
updateBranch_backendEnvironmentArn,
updateBranch_enablePullRequestPreview,
updateBranch_basicAuthCredentials,
updateBranch_buildSpec,
updateBranch_enablePerformanceMode,
updateBranch_displayName,
updateBranch_environmentVariables,
updateBranch_enableAutoBuild,
updateBranch_enableBasicAuth,
updateBranch_pullRequestEnvironmentName,
updateBranch_description,
updateBranch_appId,
updateBranch_branchName,
UpdateBranchResponse (..),
newUpdateBranchResponse,
updateBranchResponse_httpStatus,
updateBranchResponse_branch,
)
where
import Amazonka.Amplify.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 UpdateBranch = UpdateBranch'
{
UpdateBranch -> Maybe Text
framework :: Prelude.Maybe Prelude.Text,
UpdateBranch -> Maybe Text
ttl :: Prelude.Maybe Prelude.Text,
UpdateBranch -> Maybe Bool
enableNotification :: Prelude.Maybe Prelude.Bool,
UpdateBranch -> Maybe Stage
stage :: Prelude.Maybe Stage,
UpdateBranch -> Maybe Text
backendEnvironmentArn :: Prelude.Maybe Prelude.Text,
UpdateBranch -> Maybe Bool
enablePullRequestPreview :: Prelude.Maybe Prelude.Bool,
UpdateBranch -> Maybe (Sensitive Text)
basicAuthCredentials :: Prelude.Maybe (Core.Sensitive Prelude.Text),
UpdateBranch -> Maybe Text
buildSpec :: Prelude.Maybe Prelude.Text,
UpdateBranch -> Maybe Bool
enablePerformanceMode :: Prelude.Maybe Prelude.Bool,
UpdateBranch -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
UpdateBranch -> Maybe (HashMap Text Text)
environmentVariables :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
UpdateBranch -> Maybe Bool
enableAutoBuild :: Prelude.Maybe Prelude.Bool,
UpdateBranch -> Maybe Bool
enableBasicAuth :: Prelude.Maybe Prelude.Bool,
UpdateBranch -> Maybe Text
pullRequestEnvironmentName :: Prelude.Maybe Prelude.Text,
UpdateBranch -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
UpdateBranch -> Text
appId :: Prelude.Text,
UpdateBranch -> Text
branchName :: Prelude.Text
}
deriving (UpdateBranch -> UpdateBranch -> Bool
(UpdateBranch -> UpdateBranch -> Bool)
-> (UpdateBranch -> UpdateBranch -> Bool) -> Eq UpdateBranch
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateBranch -> UpdateBranch -> Bool
$c/= :: UpdateBranch -> UpdateBranch -> Bool
== :: UpdateBranch -> UpdateBranch -> Bool
$c== :: UpdateBranch -> UpdateBranch -> Bool
Prelude.Eq, Int -> UpdateBranch -> ShowS
[UpdateBranch] -> ShowS
UpdateBranch -> String
(Int -> UpdateBranch -> ShowS)
-> (UpdateBranch -> String)
-> ([UpdateBranch] -> ShowS)
-> Show UpdateBranch
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateBranch] -> ShowS
$cshowList :: [UpdateBranch] -> ShowS
show :: UpdateBranch -> String
$cshow :: UpdateBranch -> String
showsPrec :: Int -> UpdateBranch -> ShowS
$cshowsPrec :: Int -> UpdateBranch -> ShowS
Prelude.Show, (forall x. UpdateBranch -> Rep UpdateBranch x)
-> (forall x. Rep UpdateBranch x -> UpdateBranch)
-> Generic UpdateBranch
forall x. Rep UpdateBranch x -> UpdateBranch
forall x. UpdateBranch -> Rep UpdateBranch x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateBranch x -> UpdateBranch
$cfrom :: forall x. UpdateBranch -> Rep UpdateBranch x
Prelude.Generic)
newUpdateBranch ::
Prelude.Text ->
Prelude.Text ->
UpdateBranch
newUpdateBranch :: Text -> Text -> UpdateBranch
newUpdateBranch Text
pAppId_ Text
pBranchName_ =
UpdateBranch' :: Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Stage
-> Maybe Text
-> Maybe Bool
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> UpdateBranch
UpdateBranch'
{ $sel:framework:UpdateBranch' :: Maybe Text
framework = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ttl:UpdateBranch' :: Maybe Text
ttl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:enableNotification:UpdateBranch' :: Maybe Bool
enableNotification = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:stage:UpdateBranch' :: Maybe Stage
stage = Maybe Stage
forall a. Maybe a
Prelude.Nothing,
$sel:backendEnvironmentArn:UpdateBranch' :: Maybe Text
backendEnvironmentArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:enablePullRequestPreview:UpdateBranch' :: Maybe Bool
enablePullRequestPreview = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:basicAuthCredentials:UpdateBranch' :: Maybe (Sensitive Text)
basicAuthCredentials = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:buildSpec:UpdateBranch' :: Maybe Text
buildSpec = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:enablePerformanceMode:UpdateBranch' :: Maybe Bool
enablePerformanceMode = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:displayName:UpdateBranch' :: Maybe Text
displayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:environmentVariables:UpdateBranch' :: Maybe (HashMap Text Text)
environmentVariables = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:enableAutoBuild:UpdateBranch' :: Maybe Bool
enableAutoBuild = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:enableBasicAuth:UpdateBranch' :: Maybe Bool
enableBasicAuth = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:pullRequestEnvironmentName:UpdateBranch' :: Maybe Text
pullRequestEnvironmentName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:UpdateBranch' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:appId:UpdateBranch' :: Text
appId = Text
pAppId_,
$sel:branchName:UpdateBranch' :: Text
branchName = Text
pBranchName_
}
updateBranch_framework :: Lens.Lens' UpdateBranch (Prelude.Maybe Prelude.Text)
updateBranch_framework :: (Maybe Text -> f (Maybe Text)) -> UpdateBranch -> f UpdateBranch
updateBranch_framework = (UpdateBranch -> Maybe Text)
-> (UpdateBranch -> Maybe Text -> UpdateBranch)
-> Lens UpdateBranch UpdateBranch (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBranch' {Maybe Text
framework :: Maybe Text
$sel:framework:UpdateBranch' :: UpdateBranch -> Maybe Text
framework} -> Maybe Text
framework) (\s :: UpdateBranch
s@UpdateBranch' {} Maybe Text
a -> UpdateBranch
s {$sel:framework:UpdateBranch' :: Maybe Text
framework = Maybe Text
a} :: UpdateBranch)
updateBranch_ttl :: Lens.Lens' UpdateBranch (Prelude.Maybe Prelude.Text)
updateBranch_ttl :: (Maybe Text -> f (Maybe Text)) -> UpdateBranch -> f UpdateBranch
updateBranch_ttl = (UpdateBranch -> Maybe Text)
-> (UpdateBranch -> Maybe Text -> UpdateBranch)
-> Lens UpdateBranch UpdateBranch (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBranch' {Maybe Text
ttl :: Maybe Text
$sel:ttl:UpdateBranch' :: UpdateBranch -> Maybe Text
ttl} -> Maybe Text
ttl) (\s :: UpdateBranch
s@UpdateBranch' {} Maybe Text
a -> UpdateBranch
s {$sel:ttl:UpdateBranch' :: Maybe Text
ttl = Maybe Text
a} :: UpdateBranch)
updateBranch_enableNotification :: Lens.Lens' UpdateBranch (Prelude.Maybe Prelude.Bool)
updateBranch_enableNotification :: (Maybe Bool -> f (Maybe Bool)) -> UpdateBranch -> f UpdateBranch
updateBranch_enableNotification = (UpdateBranch -> Maybe Bool)
-> (UpdateBranch -> Maybe Bool -> UpdateBranch)
-> Lens UpdateBranch UpdateBranch (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBranch' {Maybe Bool
enableNotification :: Maybe Bool
$sel:enableNotification:UpdateBranch' :: UpdateBranch -> Maybe Bool
enableNotification} -> Maybe Bool
enableNotification) (\s :: UpdateBranch
s@UpdateBranch' {} Maybe Bool
a -> UpdateBranch
s {$sel:enableNotification:UpdateBranch' :: Maybe Bool
enableNotification = Maybe Bool
a} :: UpdateBranch)
updateBranch_stage :: Lens.Lens' UpdateBranch (Prelude.Maybe Stage)
updateBranch_stage :: (Maybe Stage -> f (Maybe Stage)) -> UpdateBranch -> f UpdateBranch
updateBranch_stage = (UpdateBranch -> Maybe Stage)
-> (UpdateBranch -> Maybe Stage -> UpdateBranch)
-> Lens UpdateBranch UpdateBranch (Maybe Stage) (Maybe Stage)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBranch' {Maybe Stage
stage :: Maybe Stage
$sel:stage:UpdateBranch' :: UpdateBranch -> Maybe Stage
stage} -> Maybe Stage
stage) (\s :: UpdateBranch
s@UpdateBranch' {} Maybe Stage
a -> UpdateBranch
s {$sel:stage:UpdateBranch' :: Maybe Stage
stage = Maybe Stage
a} :: UpdateBranch)
updateBranch_backendEnvironmentArn :: Lens.Lens' UpdateBranch (Prelude.Maybe Prelude.Text)
updateBranch_backendEnvironmentArn :: (Maybe Text -> f (Maybe Text)) -> UpdateBranch -> f UpdateBranch
updateBranch_backendEnvironmentArn = (UpdateBranch -> Maybe Text)
-> (UpdateBranch -> Maybe Text -> UpdateBranch)
-> Lens UpdateBranch UpdateBranch (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBranch' {Maybe Text
backendEnvironmentArn :: Maybe Text
$sel:backendEnvironmentArn:UpdateBranch' :: UpdateBranch -> Maybe Text
backendEnvironmentArn} -> Maybe Text
backendEnvironmentArn) (\s :: UpdateBranch
s@UpdateBranch' {} Maybe Text
a -> UpdateBranch
s {$sel:backendEnvironmentArn:UpdateBranch' :: Maybe Text
backendEnvironmentArn = Maybe Text
a} :: UpdateBranch)
updateBranch_enablePullRequestPreview :: Lens.Lens' UpdateBranch (Prelude.Maybe Prelude.Bool)
updateBranch_enablePullRequestPreview :: (Maybe Bool -> f (Maybe Bool)) -> UpdateBranch -> f UpdateBranch
updateBranch_enablePullRequestPreview = (UpdateBranch -> Maybe Bool)
-> (UpdateBranch -> Maybe Bool -> UpdateBranch)
-> Lens UpdateBranch UpdateBranch (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBranch' {Maybe Bool
enablePullRequestPreview :: Maybe Bool
$sel:enablePullRequestPreview:UpdateBranch' :: UpdateBranch -> Maybe Bool
enablePullRequestPreview} -> Maybe Bool
enablePullRequestPreview) (\s :: UpdateBranch
s@UpdateBranch' {} Maybe Bool
a -> UpdateBranch
s {$sel:enablePullRequestPreview:UpdateBranch' :: Maybe Bool
enablePullRequestPreview = Maybe Bool
a} :: UpdateBranch)
updateBranch_basicAuthCredentials :: Lens.Lens' UpdateBranch (Prelude.Maybe Prelude.Text)
updateBranch_basicAuthCredentials :: (Maybe Text -> f (Maybe Text)) -> UpdateBranch -> f UpdateBranch
updateBranch_basicAuthCredentials = (UpdateBranch -> Maybe (Sensitive Text))
-> (UpdateBranch -> Maybe (Sensitive Text) -> UpdateBranch)
-> Lens
UpdateBranch
UpdateBranch
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBranch' {Maybe (Sensitive Text)
basicAuthCredentials :: Maybe (Sensitive Text)
$sel:basicAuthCredentials:UpdateBranch' :: UpdateBranch -> Maybe (Sensitive Text)
basicAuthCredentials} -> Maybe (Sensitive Text)
basicAuthCredentials) (\s :: UpdateBranch
s@UpdateBranch' {} Maybe (Sensitive Text)
a -> UpdateBranch
s {$sel:basicAuthCredentials:UpdateBranch' :: Maybe (Sensitive Text)
basicAuthCredentials = Maybe (Sensitive Text)
a} :: UpdateBranch) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> UpdateBranch -> f UpdateBranch)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> UpdateBranch
-> f UpdateBranch
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
updateBranch_buildSpec :: Lens.Lens' UpdateBranch (Prelude.Maybe Prelude.Text)
updateBranch_buildSpec :: (Maybe Text -> f (Maybe Text)) -> UpdateBranch -> f UpdateBranch
updateBranch_buildSpec = (UpdateBranch -> Maybe Text)
-> (UpdateBranch -> Maybe Text -> UpdateBranch)
-> Lens UpdateBranch UpdateBranch (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBranch' {Maybe Text
buildSpec :: Maybe Text
$sel:buildSpec:UpdateBranch' :: UpdateBranch -> Maybe Text
buildSpec} -> Maybe Text
buildSpec) (\s :: UpdateBranch
s@UpdateBranch' {} Maybe Text
a -> UpdateBranch
s {$sel:buildSpec:UpdateBranch' :: Maybe Text
buildSpec = Maybe Text
a} :: UpdateBranch)
updateBranch_enablePerformanceMode :: Lens.Lens' UpdateBranch (Prelude.Maybe Prelude.Bool)
updateBranch_enablePerformanceMode :: (Maybe Bool -> f (Maybe Bool)) -> UpdateBranch -> f UpdateBranch
updateBranch_enablePerformanceMode = (UpdateBranch -> Maybe Bool)
-> (UpdateBranch -> Maybe Bool -> UpdateBranch)
-> Lens UpdateBranch UpdateBranch (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBranch' {Maybe Bool
enablePerformanceMode :: Maybe Bool
$sel:enablePerformanceMode:UpdateBranch' :: UpdateBranch -> Maybe Bool
enablePerformanceMode} -> Maybe Bool
enablePerformanceMode) (\s :: UpdateBranch
s@UpdateBranch' {} Maybe Bool
a -> UpdateBranch
s {$sel:enablePerformanceMode:UpdateBranch' :: Maybe Bool
enablePerformanceMode = Maybe Bool
a} :: UpdateBranch)
updateBranch_displayName :: Lens.Lens' UpdateBranch (Prelude.Maybe Prelude.Text)
updateBranch_displayName :: (Maybe Text -> f (Maybe Text)) -> UpdateBranch -> f UpdateBranch
updateBranch_displayName = (UpdateBranch -> Maybe Text)
-> (UpdateBranch -> Maybe Text -> UpdateBranch)
-> Lens UpdateBranch UpdateBranch (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBranch' {Maybe Text
displayName :: Maybe Text
$sel:displayName:UpdateBranch' :: UpdateBranch -> Maybe Text
displayName} -> Maybe Text
displayName) (\s :: UpdateBranch
s@UpdateBranch' {} Maybe Text
a -> UpdateBranch
s {$sel:displayName:UpdateBranch' :: Maybe Text
displayName = Maybe Text
a} :: UpdateBranch)
updateBranch_environmentVariables :: Lens.Lens' UpdateBranch (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updateBranch_environmentVariables :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateBranch -> f UpdateBranch
updateBranch_environmentVariables = (UpdateBranch -> Maybe (HashMap Text Text))
-> (UpdateBranch -> Maybe (HashMap Text Text) -> UpdateBranch)
-> Lens
UpdateBranch
UpdateBranch
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBranch' {Maybe (HashMap Text Text)
environmentVariables :: Maybe (HashMap Text Text)
$sel:environmentVariables:UpdateBranch' :: UpdateBranch -> Maybe (HashMap Text Text)
environmentVariables} -> Maybe (HashMap Text Text)
environmentVariables) (\s :: UpdateBranch
s@UpdateBranch' {} Maybe (HashMap Text Text)
a -> UpdateBranch
s {$sel:environmentVariables:UpdateBranch' :: Maybe (HashMap Text Text)
environmentVariables = Maybe (HashMap Text Text)
a} :: UpdateBranch) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateBranch -> f UpdateBranch)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateBranch
-> f UpdateBranch
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateBranch_enableAutoBuild :: Lens.Lens' UpdateBranch (Prelude.Maybe Prelude.Bool)
updateBranch_enableAutoBuild :: (Maybe Bool -> f (Maybe Bool)) -> UpdateBranch -> f UpdateBranch
updateBranch_enableAutoBuild = (UpdateBranch -> Maybe Bool)
-> (UpdateBranch -> Maybe Bool -> UpdateBranch)
-> Lens UpdateBranch UpdateBranch (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBranch' {Maybe Bool
enableAutoBuild :: Maybe Bool
$sel:enableAutoBuild:UpdateBranch' :: UpdateBranch -> Maybe Bool
enableAutoBuild} -> Maybe Bool
enableAutoBuild) (\s :: UpdateBranch
s@UpdateBranch' {} Maybe Bool
a -> UpdateBranch
s {$sel:enableAutoBuild:UpdateBranch' :: Maybe Bool
enableAutoBuild = Maybe Bool
a} :: UpdateBranch)
updateBranch_enableBasicAuth :: Lens.Lens' UpdateBranch (Prelude.Maybe Prelude.Bool)
updateBranch_enableBasicAuth :: (Maybe Bool -> f (Maybe Bool)) -> UpdateBranch -> f UpdateBranch
updateBranch_enableBasicAuth = (UpdateBranch -> Maybe Bool)
-> (UpdateBranch -> Maybe Bool -> UpdateBranch)
-> Lens UpdateBranch UpdateBranch (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBranch' {Maybe Bool
enableBasicAuth :: Maybe Bool
$sel:enableBasicAuth:UpdateBranch' :: UpdateBranch -> Maybe Bool
enableBasicAuth} -> Maybe Bool
enableBasicAuth) (\s :: UpdateBranch
s@UpdateBranch' {} Maybe Bool
a -> UpdateBranch
s {$sel:enableBasicAuth:UpdateBranch' :: Maybe Bool
enableBasicAuth = Maybe Bool
a} :: UpdateBranch)
updateBranch_pullRequestEnvironmentName :: Lens.Lens' UpdateBranch (Prelude.Maybe Prelude.Text)
updateBranch_pullRequestEnvironmentName :: (Maybe Text -> f (Maybe Text)) -> UpdateBranch -> f UpdateBranch
updateBranch_pullRequestEnvironmentName = (UpdateBranch -> Maybe Text)
-> (UpdateBranch -> Maybe Text -> UpdateBranch)
-> Lens UpdateBranch UpdateBranch (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBranch' {Maybe Text
pullRequestEnvironmentName :: Maybe Text
$sel:pullRequestEnvironmentName:UpdateBranch' :: UpdateBranch -> Maybe Text
pullRequestEnvironmentName} -> Maybe Text
pullRequestEnvironmentName) (\s :: UpdateBranch
s@UpdateBranch' {} Maybe Text
a -> UpdateBranch
s {$sel:pullRequestEnvironmentName:UpdateBranch' :: Maybe Text
pullRequestEnvironmentName = Maybe Text
a} :: UpdateBranch)
updateBranch_description :: Lens.Lens' UpdateBranch (Prelude.Maybe Prelude.Text)
updateBranch_description :: (Maybe Text -> f (Maybe Text)) -> UpdateBranch -> f UpdateBranch
updateBranch_description = (UpdateBranch -> Maybe Text)
-> (UpdateBranch -> Maybe Text -> UpdateBranch)
-> Lens UpdateBranch UpdateBranch (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBranch' {Maybe Text
description :: Maybe Text
$sel:description:UpdateBranch' :: UpdateBranch -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateBranch
s@UpdateBranch' {} Maybe Text
a -> UpdateBranch
s {$sel:description:UpdateBranch' :: Maybe Text
description = Maybe Text
a} :: UpdateBranch)
updateBranch_appId :: Lens.Lens' UpdateBranch Prelude.Text
updateBranch_appId :: (Text -> f Text) -> UpdateBranch -> f UpdateBranch
updateBranch_appId = (UpdateBranch -> Text)
-> (UpdateBranch -> Text -> UpdateBranch)
-> Lens UpdateBranch UpdateBranch Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBranch' {Text
appId :: Text
$sel:appId:UpdateBranch' :: UpdateBranch -> Text
appId} -> Text
appId) (\s :: UpdateBranch
s@UpdateBranch' {} Text
a -> UpdateBranch
s {$sel:appId:UpdateBranch' :: Text
appId = Text
a} :: UpdateBranch)
updateBranch_branchName :: Lens.Lens' UpdateBranch Prelude.Text
updateBranch_branchName :: (Text -> f Text) -> UpdateBranch -> f UpdateBranch
updateBranch_branchName = (UpdateBranch -> Text)
-> (UpdateBranch -> Text -> UpdateBranch)
-> Lens UpdateBranch UpdateBranch Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBranch' {Text
branchName :: Text
$sel:branchName:UpdateBranch' :: UpdateBranch -> Text
branchName} -> Text
branchName) (\s :: UpdateBranch
s@UpdateBranch' {} Text
a -> UpdateBranch
s {$sel:branchName:UpdateBranch' :: Text
branchName = Text
a} :: UpdateBranch)
instance Core.AWSRequest UpdateBranch where
type AWSResponse UpdateBranch = UpdateBranchResponse
request :: UpdateBranch -> Request UpdateBranch
request = Service -> UpdateBranch -> Request UpdateBranch
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateBranch
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateBranch)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateBranch))
-> Logger
-> Service
-> Proxy UpdateBranch
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateBranch)))
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 ->
Int -> Branch -> UpdateBranchResponse
UpdateBranchResponse'
(Int -> Branch -> UpdateBranchResponse)
-> Either String Int
-> Either String (Branch -> UpdateBranchResponse)
forall (f :: * -> *) a b. Functor 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))
Either String (Branch -> UpdateBranchResponse)
-> Either String Branch -> Either String UpdateBranchResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Branch
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"branch")
)
instance Prelude.Hashable UpdateBranch
instance Prelude.NFData UpdateBranch
instance Core.ToHeaders UpdateBranch where
toHeaders :: UpdateBranch -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateBranch -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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 UpdateBranch where
toJSON :: UpdateBranch -> Value
toJSON UpdateBranch' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive Text)
Maybe Stage
Text
branchName :: Text
appId :: Text
description :: Maybe Text
pullRequestEnvironmentName :: Maybe Text
enableBasicAuth :: Maybe Bool
enableAutoBuild :: Maybe Bool
environmentVariables :: Maybe (HashMap Text Text)
displayName :: Maybe Text
enablePerformanceMode :: Maybe Bool
buildSpec :: Maybe Text
basicAuthCredentials :: Maybe (Sensitive Text)
enablePullRequestPreview :: Maybe Bool
backendEnvironmentArn :: Maybe Text
stage :: Maybe Stage
enableNotification :: Maybe Bool
ttl :: Maybe Text
framework :: Maybe Text
$sel:branchName:UpdateBranch' :: UpdateBranch -> Text
$sel:appId:UpdateBranch' :: UpdateBranch -> Text
$sel:description:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:pullRequestEnvironmentName:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:enableBasicAuth:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:enableAutoBuild:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:environmentVariables:UpdateBranch' :: UpdateBranch -> Maybe (HashMap Text Text)
$sel:displayName:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:enablePerformanceMode:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:buildSpec:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:basicAuthCredentials:UpdateBranch' :: UpdateBranch -> Maybe (Sensitive Text)
$sel:enablePullRequestPreview:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:backendEnvironmentArn:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:stage:UpdateBranch' :: UpdateBranch -> Maybe Stage
$sel:enableNotification:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:ttl:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:framework:UpdateBranch' :: UpdateBranch -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"framework" 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
framework,
(Text
"ttl" 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
ttl,
(Text
"enableNotification" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enableNotification,
(Text
"stage" Text -> Stage -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Stage -> Pair) -> Maybe Stage -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Stage
stage,
(Text
"backendEnvironmentArn" 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
backendEnvironmentArn,
(Text
"enablePullRequestPreview" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enablePullRequestPreview,
(Text
"basicAuthCredentials" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
basicAuthCredentials,
(Text
"buildSpec" 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
buildSpec,
(Text
"enablePerformanceMode" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enablePerformanceMode,
(Text
"displayName" 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
displayName,
(Text
"environmentVariables" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
environmentVariables,
(Text
"enableAutoBuild" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enableAutoBuild,
(Text
"enableBasicAuth" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enableBasicAuth,
(Text
"pullRequestEnvironmentName" 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
pullRequestEnvironmentName,
(Text
"description" 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
description
]
)
instance Core.ToPath UpdateBranch where
toPath :: UpdateBranch -> ByteString
toPath UpdateBranch' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive Text)
Maybe Stage
Text
branchName :: Text
appId :: Text
description :: Maybe Text
pullRequestEnvironmentName :: Maybe Text
enableBasicAuth :: Maybe Bool
enableAutoBuild :: Maybe Bool
environmentVariables :: Maybe (HashMap Text Text)
displayName :: Maybe Text
enablePerformanceMode :: Maybe Bool
buildSpec :: Maybe Text
basicAuthCredentials :: Maybe (Sensitive Text)
enablePullRequestPreview :: Maybe Bool
backendEnvironmentArn :: Maybe Text
stage :: Maybe Stage
enableNotification :: Maybe Bool
ttl :: Maybe Text
framework :: Maybe Text
$sel:branchName:UpdateBranch' :: UpdateBranch -> Text
$sel:appId:UpdateBranch' :: UpdateBranch -> Text
$sel:description:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:pullRequestEnvironmentName:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:enableBasicAuth:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:enableAutoBuild:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:environmentVariables:UpdateBranch' :: UpdateBranch -> Maybe (HashMap Text Text)
$sel:displayName:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:enablePerformanceMode:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:buildSpec:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:basicAuthCredentials:UpdateBranch' :: UpdateBranch -> Maybe (Sensitive Text)
$sel:enablePullRequestPreview:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:backendEnvironmentArn:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:stage:UpdateBranch' :: UpdateBranch -> Maybe Stage
$sel:enableNotification:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:ttl:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:framework:UpdateBranch' :: UpdateBranch -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/apps/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
appId,
ByteString
"/branches/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
branchName
]
instance Core.ToQuery UpdateBranch where
toQuery :: UpdateBranch -> QueryString
toQuery = QueryString -> UpdateBranch -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateBranchResponse = UpdateBranchResponse'
{
UpdateBranchResponse -> Int
httpStatus :: Prelude.Int,
UpdateBranchResponse -> Branch
branch :: Branch
}
deriving (UpdateBranchResponse -> UpdateBranchResponse -> Bool
(UpdateBranchResponse -> UpdateBranchResponse -> Bool)
-> (UpdateBranchResponse -> UpdateBranchResponse -> Bool)
-> Eq UpdateBranchResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateBranchResponse -> UpdateBranchResponse -> Bool
$c/= :: UpdateBranchResponse -> UpdateBranchResponse -> Bool
== :: UpdateBranchResponse -> UpdateBranchResponse -> Bool
$c== :: UpdateBranchResponse -> UpdateBranchResponse -> Bool
Prelude.Eq, Int -> UpdateBranchResponse -> ShowS
[UpdateBranchResponse] -> ShowS
UpdateBranchResponse -> String
(Int -> UpdateBranchResponse -> ShowS)
-> (UpdateBranchResponse -> String)
-> ([UpdateBranchResponse] -> ShowS)
-> Show UpdateBranchResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateBranchResponse] -> ShowS
$cshowList :: [UpdateBranchResponse] -> ShowS
show :: UpdateBranchResponse -> String
$cshow :: UpdateBranchResponse -> String
showsPrec :: Int -> UpdateBranchResponse -> ShowS
$cshowsPrec :: Int -> UpdateBranchResponse -> ShowS
Prelude.Show, (forall x. UpdateBranchResponse -> Rep UpdateBranchResponse x)
-> (forall x. Rep UpdateBranchResponse x -> UpdateBranchResponse)
-> Generic UpdateBranchResponse
forall x. Rep UpdateBranchResponse x -> UpdateBranchResponse
forall x. UpdateBranchResponse -> Rep UpdateBranchResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateBranchResponse x -> UpdateBranchResponse
$cfrom :: forall x. UpdateBranchResponse -> Rep UpdateBranchResponse x
Prelude.Generic)
newUpdateBranchResponse ::
Prelude.Int ->
Branch ->
UpdateBranchResponse
newUpdateBranchResponse :: Int -> Branch -> UpdateBranchResponse
newUpdateBranchResponse Int
pHttpStatus_ Branch
pBranch_ =
UpdateBranchResponse' :: Int -> Branch -> UpdateBranchResponse
UpdateBranchResponse'
{ $sel:httpStatus:UpdateBranchResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:branch:UpdateBranchResponse' :: Branch
branch = Branch
pBranch_
}
updateBranchResponse_httpStatus :: Lens.Lens' UpdateBranchResponse Prelude.Int
updateBranchResponse_httpStatus :: (Int -> f Int) -> UpdateBranchResponse -> f UpdateBranchResponse
updateBranchResponse_httpStatus = (UpdateBranchResponse -> Int)
-> (UpdateBranchResponse -> Int -> UpdateBranchResponse)
-> Lens UpdateBranchResponse UpdateBranchResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBranchResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateBranchResponse' :: UpdateBranchResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateBranchResponse
s@UpdateBranchResponse' {} Int
a -> UpdateBranchResponse
s {$sel:httpStatus:UpdateBranchResponse' :: Int
httpStatus = Int
a} :: UpdateBranchResponse)
updateBranchResponse_branch :: Lens.Lens' UpdateBranchResponse Branch
updateBranchResponse_branch :: (Branch -> f Branch)
-> UpdateBranchResponse -> f UpdateBranchResponse
updateBranchResponse_branch = (UpdateBranchResponse -> Branch)
-> (UpdateBranchResponse -> Branch -> UpdateBranchResponse)
-> Lens UpdateBranchResponse UpdateBranchResponse Branch Branch
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBranchResponse' {Branch
branch :: Branch
$sel:branch:UpdateBranchResponse' :: UpdateBranchResponse -> Branch
branch} -> Branch
branch) (\s :: UpdateBranchResponse
s@UpdateBranchResponse' {} Branch
a -> UpdateBranchResponse
s {$sel:branch:UpdateBranchResponse' :: Branch
branch = Branch
a} :: UpdateBranchResponse)
instance Prelude.NFData UpdateBranchResponse