{-# 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_backendEnvironmentArn,
updateBranch_basicAuthCredentials,
updateBranch_buildSpec,
updateBranch_description,
updateBranch_displayName,
updateBranch_enableAutoBuild,
updateBranch_enableBasicAuth,
updateBranch_enableNotification,
updateBranch_enablePerformanceMode,
updateBranch_enablePullRequestPreview,
updateBranch_environmentVariables,
updateBranch_framework,
updateBranch_pullRequestEnvironmentName,
updateBranch_stage,
updateBranch_ttl,
updateBranch_appId,
updateBranch_branchName,
UpdateBranchResponse (..),
newUpdateBranchResponse,
updateBranchResponse_httpStatus,
updateBranchResponse_branch,
)
where
import Amazonka.Amplify.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 UpdateBranch = UpdateBranch'
{
UpdateBranch -> Maybe Text
backendEnvironmentArn :: Prelude.Maybe Prelude.Text,
UpdateBranch -> Maybe (Sensitive Text)
basicAuthCredentials :: Prelude.Maybe (Data.Sensitive Prelude.Text),
UpdateBranch -> Maybe (Sensitive Text)
buildSpec :: Prelude.Maybe (Data.Sensitive Prelude.Text),
UpdateBranch -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
UpdateBranch -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
UpdateBranch -> Maybe Bool
enableAutoBuild :: Prelude.Maybe Prelude.Bool,
UpdateBranch -> Maybe Bool
enableBasicAuth :: Prelude.Maybe Prelude.Bool,
UpdateBranch -> Maybe Bool
enableNotification :: Prelude.Maybe Prelude.Bool,
UpdateBranch -> Maybe Bool
enablePerformanceMode :: Prelude.Maybe Prelude.Bool,
UpdateBranch -> Maybe Bool
enablePullRequestPreview :: Prelude.Maybe Prelude.Bool,
UpdateBranch -> Maybe (HashMap Text Text)
environmentVariables :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
UpdateBranch -> Maybe Text
framework :: Prelude.Maybe Prelude.Text,
UpdateBranch -> Maybe Text
pullRequestEnvironmentName :: Prelude.Maybe Prelude.Text,
UpdateBranch -> Maybe Stage
stage :: Prelude.Maybe Stage,
UpdateBranch -> Maybe Text
ttl :: Prelude.Maybe Prelude.Text,
UpdateBranch -> Text
appId :: Prelude.Text,
UpdateBranch -> Text
branchName :: Prelude.Text
}
deriving (UpdateBranch -> UpdateBranch -> Bool
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
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. 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'
{ $sel:backendEnvironmentArn:UpdateBranch' :: Maybe Text
backendEnvironmentArn =
forall a. Maybe a
Prelude.Nothing,
$sel:basicAuthCredentials:UpdateBranch' :: Maybe (Sensitive Text)
basicAuthCredentials = forall a. Maybe a
Prelude.Nothing,
$sel:buildSpec:UpdateBranch' :: Maybe (Sensitive Text)
buildSpec = forall a. Maybe a
Prelude.Nothing,
$sel:description:UpdateBranch' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:displayName:UpdateBranch' :: Maybe Text
displayName = forall a. Maybe a
Prelude.Nothing,
$sel:enableAutoBuild:UpdateBranch' :: Maybe Bool
enableAutoBuild = forall a. Maybe a
Prelude.Nothing,
$sel:enableBasicAuth:UpdateBranch' :: Maybe Bool
enableBasicAuth = forall a. Maybe a
Prelude.Nothing,
$sel:enableNotification:UpdateBranch' :: Maybe Bool
enableNotification = forall a. Maybe a
Prelude.Nothing,
$sel:enablePerformanceMode:UpdateBranch' :: Maybe Bool
enablePerformanceMode = forall a. Maybe a
Prelude.Nothing,
$sel:enablePullRequestPreview:UpdateBranch' :: Maybe Bool
enablePullRequestPreview = forall a. Maybe a
Prelude.Nothing,
$sel:environmentVariables:UpdateBranch' :: Maybe (HashMap Text Text)
environmentVariables = forall a. Maybe a
Prelude.Nothing,
$sel:framework:UpdateBranch' :: Maybe Text
framework = forall a. Maybe a
Prelude.Nothing,
$sel:pullRequestEnvironmentName:UpdateBranch' :: Maybe Text
pullRequestEnvironmentName = forall a. Maybe a
Prelude.Nothing,
$sel:stage:UpdateBranch' :: Maybe Stage
stage = forall a. Maybe a
Prelude.Nothing,
$sel:ttl:UpdateBranch' :: Maybe Text
ttl = forall a. Maybe a
Prelude.Nothing,
$sel:appId:UpdateBranch' :: Text
appId = Text
pAppId_,
$sel:branchName:UpdateBranch' :: Text
branchName = Text
pBranchName_
}
updateBranch_backendEnvironmentArn :: Lens.Lens' UpdateBranch (Prelude.Maybe Prelude.Text)
updateBranch_backendEnvironmentArn :: Lens' UpdateBranch (Maybe Text)
updateBranch_backendEnvironmentArn = 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_basicAuthCredentials :: Lens.Lens' UpdateBranch (Prelude.Maybe Prelude.Text)
updateBranch_basicAuthCredentials :: Lens' UpdateBranch (Maybe Text)
updateBranch_basicAuthCredentials = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive
updateBranch_buildSpec :: Lens.Lens' UpdateBranch (Prelude.Maybe Prelude.Text)
updateBranch_buildSpec :: Lens' UpdateBranch (Maybe Text)
updateBranch_buildSpec = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBranch' {Maybe (Sensitive Text)
buildSpec :: Maybe (Sensitive Text)
$sel:buildSpec:UpdateBranch' :: UpdateBranch -> Maybe (Sensitive Text)
buildSpec} -> Maybe (Sensitive Text)
buildSpec) (\s :: UpdateBranch
s@UpdateBranch' {} Maybe (Sensitive Text)
a -> UpdateBranch
s {$sel:buildSpec:UpdateBranch' :: Maybe (Sensitive Text)
buildSpec = Maybe (Sensitive Text)
a} :: UpdateBranch) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive
updateBranch_description :: Lens.Lens' UpdateBranch (Prelude.Maybe Prelude.Text)
updateBranch_description :: Lens' UpdateBranch (Maybe Text)
updateBranch_description = 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_displayName :: Lens.Lens' UpdateBranch (Prelude.Maybe Prelude.Text)
updateBranch_displayName :: Lens' UpdateBranch (Maybe Text)
updateBranch_displayName = 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_enableAutoBuild :: Lens.Lens' UpdateBranch (Prelude.Maybe Prelude.Bool)
updateBranch_enableAutoBuild :: Lens' UpdateBranch (Maybe Bool)
updateBranch_enableAutoBuild = 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 :: Lens' UpdateBranch (Maybe Bool)
updateBranch_enableBasicAuth = 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_enableNotification :: Lens.Lens' UpdateBranch (Prelude.Maybe Prelude.Bool)
updateBranch_enableNotification :: Lens' UpdateBranch (Maybe Bool)
updateBranch_enableNotification = 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_enablePerformanceMode :: Lens.Lens' UpdateBranch (Prelude.Maybe Prelude.Bool)
updateBranch_enablePerformanceMode :: Lens' UpdateBranch (Maybe Bool)
updateBranch_enablePerformanceMode = 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_enablePullRequestPreview :: Lens.Lens' UpdateBranch (Prelude.Maybe Prelude.Bool)
updateBranch_enablePullRequestPreview :: Lens' UpdateBranch (Maybe Bool)
updateBranch_enablePullRequestPreview = 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_environmentVariables :: Lens.Lens' UpdateBranch (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updateBranch_environmentVariables :: Lens' UpdateBranch (Maybe (HashMap Text Text))
updateBranch_environmentVariables = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateBranch_framework :: Lens.Lens' UpdateBranch (Prelude.Maybe Prelude.Text)
updateBranch_framework :: Lens' UpdateBranch (Maybe Text)
updateBranch_framework = 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_pullRequestEnvironmentName :: Lens.Lens' UpdateBranch (Prelude.Maybe Prelude.Text)
updateBranch_pullRequestEnvironmentName :: Lens' UpdateBranch (Maybe Text)
updateBranch_pullRequestEnvironmentName = 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_stage :: Lens.Lens' UpdateBranch (Prelude.Maybe Stage)
updateBranch_stage :: Lens' UpdateBranch (Maybe Stage)
updateBranch_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_ttl :: Lens.Lens' UpdateBranch (Prelude.Maybe Prelude.Text)
updateBranch_ttl :: Lens' UpdateBranch (Maybe Text)
updateBranch_ttl = 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_appId :: Lens.Lens' UpdateBranch Prelude.Text
updateBranch_appId :: Lens' UpdateBranch Text
updateBranch_appId = 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 :: Lens' UpdateBranch Text
updateBranch_branchName = 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 :: (Service -> Service) -> UpdateBranch -> Request UpdateBranch
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateBranch
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateBranch)))
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 ->
Int -> Branch -> UpdateBranchResponse
UpdateBranchResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"branch")
)
instance Prelude.Hashable UpdateBranch where
hashWithSalt :: Int -> UpdateBranch -> Int
hashWithSalt Int
_salt UpdateBranch' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive Text)
Maybe Stage
Text
branchName :: Text
appId :: Text
ttl :: Maybe Text
stage :: Maybe Stage
pullRequestEnvironmentName :: Maybe Text
framework :: Maybe Text
environmentVariables :: Maybe (HashMap Text Text)
enablePullRequestPreview :: Maybe Bool
enablePerformanceMode :: Maybe Bool
enableNotification :: Maybe Bool
enableBasicAuth :: Maybe Bool
enableAutoBuild :: Maybe Bool
displayName :: Maybe Text
description :: Maybe Text
buildSpec :: Maybe (Sensitive Text)
basicAuthCredentials :: Maybe (Sensitive Text)
backendEnvironmentArn :: Maybe Text
$sel:branchName:UpdateBranch' :: UpdateBranch -> Text
$sel:appId:UpdateBranch' :: UpdateBranch -> Text
$sel:ttl:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:stage:UpdateBranch' :: UpdateBranch -> Maybe Stage
$sel:pullRequestEnvironmentName:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:framework:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:environmentVariables:UpdateBranch' :: UpdateBranch -> Maybe (HashMap Text Text)
$sel:enablePullRequestPreview:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:enablePerformanceMode:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:enableNotification:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:enableBasicAuth:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:enableAutoBuild:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:displayName:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:description:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:buildSpec:UpdateBranch' :: UpdateBranch -> Maybe (Sensitive Text)
$sel:basicAuthCredentials:UpdateBranch' :: UpdateBranch -> Maybe (Sensitive Text)
$sel:backendEnvironmentArn:UpdateBranch' :: UpdateBranch -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
backendEnvironmentArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
basicAuthCredentials
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
buildSpec
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
displayName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enableAutoBuild
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enableBasicAuth
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enableNotification
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enablePerformanceMode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enablePullRequestPreview
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
environmentVariables
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
framework
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
pullRequestEnvironmentName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Stage
stage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ttl
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
appId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
branchName
instance Prelude.NFData UpdateBranch where
rnf :: UpdateBranch -> ()
rnf UpdateBranch' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive Text)
Maybe Stage
Text
branchName :: Text
appId :: Text
ttl :: Maybe Text
stage :: Maybe Stage
pullRequestEnvironmentName :: Maybe Text
framework :: Maybe Text
environmentVariables :: Maybe (HashMap Text Text)
enablePullRequestPreview :: Maybe Bool
enablePerformanceMode :: Maybe Bool
enableNotification :: Maybe Bool
enableBasicAuth :: Maybe Bool
enableAutoBuild :: Maybe Bool
displayName :: Maybe Text
description :: Maybe Text
buildSpec :: Maybe (Sensitive Text)
basicAuthCredentials :: Maybe (Sensitive Text)
backendEnvironmentArn :: Maybe Text
$sel:branchName:UpdateBranch' :: UpdateBranch -> Text
$sel:appId:UpdateBranch' :: UpdateBranch -> Text
$sel:ttl:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:stage:UpdateBranch' :: UpdateBranch -> Maybe Stage
$sel:pullRequestEnvironmentName:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:framework:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:environmentVariables:UpdateBranch' :: UpdateBranch -> Maybe (HashMap Text Text)
$sel:enablePullRequestPreview:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:enablePerformanceMode:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:enableNotification:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:enableBasicAuth:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:enableAutoBuild:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:displayName:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:description:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:buildSpec:UpdateBranch' :: UpdateBranch -> Maybe (Sensitive Text)
$sel:basicAuthCredentials:UpdateBranch' :: UpdateBranch -> Maybe (Sensitive Text)
$sel:backendEnvironmentArn:UpdateBranch' :: UpdateBranch -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
backendEnvironmentArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
basicAuthCredentials
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
buildSpec
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
displayName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enableAutoBuild
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enableBasicAuth
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enableNotification
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enablePerformanceMode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enablePullRequestPreview
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
environmentVariables
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
framework
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
pullRequestEnvironmentName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Stage
stage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ttl
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
appId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
branchName
instance Data.ToHeaders UpdateBranch where
toHeaders :: UpdateBranch -> 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.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
ttl :: Maybe Text
stage :: Maybe Stage
pullRequestEnvironmentName :: Maybe Text
framework :: Maybe Text
environmentVariables :: Maybe (HashMap Text Text)
enablePullRequestPreview :: Maybe Bool
enablePerformanceMode :: Maybe Bool
enableNotification :: Maybe Bool
enableBasicAuth :: Maybe Bool
enableAutoBuild :: Maybe Bool
displayName :: Maybe Text
description :: Maybe Text
buildSpec :: Maybe (Sensitive Text)
basicAuthCredentials :: Maybe (Sensitive Text)
backendEnvironmentArn :: Maybe Text
$sel:branchName:UpdateBranch' :: UpdateBranch -> Text
$sel:appId:UpdateBranch' :: UpdateBranch -> Text
$sel:ttl:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:stage:UpdateBranch' :: UpdateBranch -> Maybe Stage
$sel:pullRequestEnvironmentName:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:framework:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:environmentVariables:UpdateBranch' :: UpdateBranch -> Maybe (HashMap Text Text)
$sel:enablePullRequestPreview:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:enablePerformanceMode:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:enableNotification:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:enableBasicAuth:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:enableAutoBuild:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:displayName:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:description:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:buildSpec:UpdateBranch' :: UpdateBranch -> Maybe (Sensitive Text)
$sel:basicAuthCredentials:UpdateBranch' :: UpdateBranch -> Maybe (Sensitive Text)
$sel:backendEnvironmentArn:UpdateBranch' :: UpdateBranch -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"backendEnvironmentArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
backendEnvironmentArn,
(Key
"basicAuthCredentials" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
basicAuthCredentials,
(Key
"buildSpec" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
buildSpec,
(Key
"description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
(Key
"displayName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
displayName,
(Key
"enableAutoBuild" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enableAutoBuild,
(Key
"enableBasicAuth" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enableBasicAuth,
(Key
"enableNotification" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enableNotification,
(Key
"enablePerformanceMode" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enablePerformanceMode,
(Key
"enablePullRequestPreview" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enablePullRequestPreview,
(Key
"environmentVariables" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
environmentVariables,
(Key
"framework" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
framework,
(Key
"pullRequestEnvironmentName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
pullRequestEnvironmentName,
(Key
"stage" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Stage
stage,
(Key
"ttl" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
ttl
]
)
instance Data.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
ttl :: Maybe Text
stage :: Maybe Stage
pullRequestEnvironmentName :: Maybe Text
framework :: Maybe Text
environmentVariables :: Maybe (HashMap Text Text)
enablePullRequestPreview :: Maybe Bool
enablePerformanceMode :: Maybe Bool
enableNotification :: Maybe Bool
enableBasicAuth :: Maybe Bool
enableAutoBuild :: Maybe Bool
displayName :: Maybe Text
description :: Maybe Text
buildSpec :: Maybe (Sensitive Text)
basicAuthCredentials :: Maybe (Sensitive Text)
backendEnvironmentArn :: Maybe Text
$sel:branchName:UpdateBranch' :: UpdateBranch -> Text
$sel:appId:UpdateBranch' :: UpdateBranch -> Text
$sel:ttl:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:stage:UpdateBranch' :: UpdateBranch -> Maybe Stage
$sel:pullRequestEnvironmentName:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:framework:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:environmentVariables:UpdateBranch' :: UpdateBranch -> Maybe (HashMap Text Text)
$sel:enablePullRequestPreview:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:enablePerformanceMode:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:enableNotification:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:enableBasicAuth:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:enableAutoBuild:UpdateBranch' :: UpdateBranch -> Maybe Bool
$sel:displayName:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:description:UpdateBranch' :: UpdateBranch -> Maybe Text
$sel:buildSpec:UpdateBranch' :: UpdateBranch -> Maybe (Sensitive Text)
$sel:basicAuthCredentials:UpdateBranch' :: UpdateBranch -> Maybe (Sensitive Text)
$sel:backendEnvironmentArn:UpdateBranch' :: UpdateBranch -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/apps/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
appId,
ByteString
"/branches/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
branchName
]
instance Data.ToQuery UpdateBranch where
toQuery :: UpdateBranch -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data UpdateBranchResponse = UpdateBranchResponse'
{
UpdateBranchResponse -> Int
httpStatus :: Prelude.Int,
UpdateBranchResponse -> Branch
branch :: Branch
}
deriving (UpdateBranchResponse -> UpdateBranchResponse -> Bool
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
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. 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'
{ $sel:httpStatus:UpdateBranchResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:branch:UpdateBranchResponse' :: Branch
branch = Branch
pBranch_
}
updateBranchResponse_httpStatus :: Lens.Lens' UpdateBranchResponse Prelude.Int
updateBranchResponse_httpStatus :: Lens' UpdateBranchResponse Int
updateBranchResponse_httpStatus = 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 :: Lens' UpdateBranchResponse Branch
updateBranchResponse_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 where
rnf :: UpdateBranchResponse -> ()
rnf UpdateBranchResponse' {Int
Branch
branch :: Branch
httpStatus :: Int
$sel:branch:UpdateBranchResponse' :: UpdateBranchResponse -> Branch
$sel:httpStatus:UpdateBranchResponse' :: UpdateBranchResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Branch
branch