{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Amplify.Types.Branch
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Amplify.Types.Branch where

import Amazonka.Amplify.Types.Stage
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The branch for an Amplify app, which maps to a third-party repository
-- branch.
--
-- /See:/ 'newBranch' smart constructor.
data Branch = Branch'
  { -- | The Amazon Resource Name (ARN) for a backend environment that is part of
    -- an Amplify app.
    Branch -> Maybe Text
backendEnvironmentArn :: Prelude.Maybe Prelude.Text,
    -- | The thumbnail URL for the branch of an Amplify app.
    Branch -> Maybe Text
thumbnailUrl :: Prelude.Maybe Prelude.Text,
    -- | The basic authorization credentials for a branch of an Amplify app.
    Branch -> Maybe (Sensitive Text)
basicAuthCredentials :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The build specification (build spec) content for the branch of an
    -- Amplify app.
    Branch -> Maybe Text
buildSpec :: Prelude.Maybe Prelude.Text,
    -- | The source branch if the branch is a pull request branch.
    Branch -> Maybe Text
sourceBranch :: Prelude.Maybe Prelude.Text,
    -- | Enables performance mode for the branch.
    --
    -- Performance mode optimizes for faster hosting performance by keeping
    -- content cached at the edge for a longer interval. When performance mode
    -- is enabled, hosting configuration or code changes can take up to 10
    -- minutes to roll out.
    Branch -> Maybe Bool
enablePerformanceMode :: Prelude.Maybe Prelude.Bool,
    -- | The destination branch if the branch is a pull request branch.
    Branch -> Maybe Text
destinationBranch :: Prelude.Maybe Prelude.Text,
    -- | The Amplify environment name for the pull request.
    Branch -> Maybe Text
pullRequestEnvironmentName :: Prelude.Maybe Prelude.Text,
    -- | A list of custom resources that are linked to this branch.
    Branch -> Maybe [Text]
associatedResources :: Prelude.Maybe [Prelude.Text],
    -- | The tag for the branch of an Amplify app.
    Branch -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The Amazon Resource Name (ARN) for a branch that is part of an Amplify
    -- app.
    Branch -> Text
branchArn :: Prelude.Text,
    -- | The name for the branch that is part of an Amplify app.
    Branch -> Text
branchName :: Prelude.Text,
    -- | The description for the branch that is part of an Amplify app.
    Branch -> Text
description :: Prelude.Text,
    -- | The current stage for the branch that is part of an Amplify app.
    Branch -> Stage
stage :: Stage,
    -- | The display name for the branch. This is used as the default domain
    -- prefix.
    Branch -> Text
displayName :: Prelude.Text,
    -- | Enables notifications for a branch that is part of an Amplify app.
    Branch -> Bool
enableNotification :: Prelude.Bool,
    -- | The creation date and time for a branch that is part of an Amplify app.
    Branch -> POSIX
createTime :: Core.POSIX,
    -- | The last updated date and time for a branch that is part of an Amplify
    -- app.
    Branch -> POSIX
updateTime :: Core.POSIX,
    -- | The environment variables specific to a branch of an Amplify app.
    Branch -> HashMap Text Text
environmentVariables :: Prelude.HashMap Prelude.Text Prelude.Text,
    -- | Enables auto-building on push for a branch of an Amplify app.
    Branch -> Bool
enableAutoBuild :: Prelude.Bool,
    -- | The custom domains for a branch of an Amplify app.
    Branch -> [Text]
customDomains :: [Prelude.Text],
    -- | The framework for a branch of an Amplify app.
    Branch -> Text
framework :: Prelude.Text,
    -- | The ID of the active job for a branch of an Amplify app.
    Branch -> Text
activeJobId :: Prelude.Text,
    -- | The total number of jobs that are part of an Amplify app.
    Branch -> Text
totalNumberOfJobs :: Prelude.Text,
    -- | Enables basic authorization for a branch of an Amplify app.
    Branch -> Bool
enableBasicAuth :: Prelude.Bool,
    -- | The content Time to Live (TTL) for the website in seconds.
    Branch -> Text
ttl :: Prelude.Text,
    -- | Enables pull request previews for the branch.
    Branch -> Bool
enablePullRequestPreview :: Prelude.Bool
  }
  deriving (Branch -> Branch -> Bool
(Branch -> Branch -> Bool)
-> (Branch -> Branch -> Bool) -> Eq Branch
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Branch -> Branch -> Bool
$c/= :: Branch -> Branch -> Bool
== :: Branch -> Branch -> Bool
$c== :: Branch -> Branch -> Bool
Prelude.Eq, Int -> Branch -> ShowS
[Branch] -> ShowS
Branch -> String
(Int -> Branch -> ShowS)
-> (Branch -> String) -> ([Branch] -> ShowS) -> Show Branch
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Branch] -> ShowS
$cshowList :: [Branch] -> ShowS
show :: Branch -> String
$cshow :: Branch -> String
showsPrec :: Int -> Branch -> ShowS
$cshowsPrec :: Int -> Branch -> ShowS
Prelude.Show, (forall x. Branch -> Rep Branch x)
-> (forall x. Rep Branch x -> Branch) -> Generic Branch
forall x. Rep Branch x -> Branch
forall x. Branch -> Rep Branch x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Branch x -> Branch
$cfrom :: forall x. Branch -> Rep Branch x
Prelude.Generic)

-- |
-- Create a value of 'Branch' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'backendEnvironmentArn', 'branch_backendEnvironmentArn' - The Amazon Resource Name (ARN) for a backend environment that is part of
-- an Amplify app.
--
-- 'thumbnailUrl', 'branch_thumbnailUrl' - The thumbnail URL for the branch of an Amplify app.
--
-- 'basicAuthCredentials', 'branch_basicAuthCredentials' - The basic authorization credentials for a branch of an Amplify app.
--
-- 'buildSpec', 'branch_buildSpec' - The build specification (build spec) content for the branch of an
-- Amplify app.
--
-- 'sourceBranch', 'branch_sourceBranch' - The source branch if the branch is a pull request branch.
--
-- 'enablePerformanceMode', 'branch_enablePerformanceMode' - Enables performance mode for the branch.
--
-- Performance mode optimizes for faster hosting performance by keeping
-- content cached at the edge for a longer interval. When performance mode
-- is enabled, hosting configuration or code changes can take up to 10
-- minutes to roll out.
--
-- 'destinationBranch', 'branch_destinationBranch' - The destination branch if the branch is a pull request branch.
--
-- 'pullRequestEnvironmentName', 'branch_pullRequestEnvironmentName' - The Amplify environment name for the pull request.
--
-- 'associatedResources', 'branch_associatedResources' - A list of custom resources that are linked to this branch.
--
-- 'tags', 'branch_tags' - The tag for the branch of an Amplify app.
--
-- 'branchArn', 'branch_branchArn' - The Amazon Resource Name (ARN) for a branch that is part of an Amplify
-- app.
--
-- 'branchName', 'branch_branchName' - The name for the branch that is part of an Amplify app.
--
-- 'description', 'branch_description' - The description for the branch that is part of an Amplify app.
--
-- 'stage', 'branch_stage' - The current stage for the branch that is part of an Amplify app.
--
-- 'displayName', 'branch_displayName' - The display name for the branch. This is used as the default domain
-- prefix.
--
-- 'enableNotification', 'branch_enableNotification' - Enables notifications for a branch that is part of an Amplify app.
--
-- 'createTime', 'branch_createTime' - The creation date and time for a branch that is part of an Amplify app.
--
-- 'updateTime', 'branch_updateTime' - The last updated date and time for a branch that is part of an Amplify
-- app.
--
-- 'environmentVariables', 'branch_environmentVariables' - The environment variables specific to a branch of an Amplify app.
--
-- 'enableAutoBuild', 'branch_enableAutoBuild' - Enables auto-building on push for a branch of an Amplify app.
--
-- 'customDomains', 'branch_customDomains' - The custom domains for a branch of an Amplify app.
--
-- 'framework', 'branch_framework' - The framework for a branch of an Amplify app.
--
-- 'activeJobId', 'branch_activeJobId' - The ID of the active job for a branch of an Amplify app.
--
-- 'totalNumberOfJobs', 'branch_totalNumberOfJobs' - The total number of jobs that are part of an Amplify app.
--
-- 'enableBasicAuth', 'branch_enableBasicAuth' - Enables basic authorization for a branch of an Amplify app.
--
-- 'ttl', 'branch_ttl' - The content Time to Live (TTL) for the website in seconds.
--
-- 'enablePullRequestPreview', 'branch_enablePullRequestPreview' - Enables pull request previews for the branch.
newBranch ::
  -- | 'branchArn'
  Prelude.Text ->
  -- | 'branchName'
  Prelude.Text ->
  -- | 'description'
  Prelude.Text ->
  -- | 'stage'
  Stage ->
  -- | 'displayName'
  Prelude.Text ->
  -- | 'enableNotification'
  Prelude.Bool ->
  -- | 'createTime'
  Prelude.UTCTime ->
  -- | 'updateTime'
  Prelude.UTCTime ->
  -- | 'enableAutoBuild'
  Prelude.Bool ->
  -- | 'framework'
  Prelude.Text ->
  -- | 'activeJobId'
  Prelude.Text ->
  -- | 'totalNumberOfJobs'
  Prelude.Text ->
  -- | 'enableBasicAuth'
  Prelude.Bool ->
  -- | 'ttl'
  Prelude.Text ->
  -- | 'enablePullRequestPreview'
  Prelude.Bool ->
  Branch
newBranch :: Text
-> Text
-> Text
-> Stage
-> Text
-> Bool
-> UTCTime
-> UTCTime
-> Bool
-> Text
-> Text
-> Text
-> Bool
-> Text
-> Bool
-> Branch
newBranch
  Text
pBranchArn_
  Text
pBranchName_
  Text
pDescription_
  Stage
pStage_
  Text
pDisplayName_
  Bool
pEnableNotification_
  UTCTime
pCreateTime_
  UTCTime
pUpdateTime_
  Bool
pEnableAutoBuild_
  Text
pFramework_
  Text
pActiveJobId_
  Text
pTotalNumberOfJobs_
  Bool
pEnableBasicAuth_
  Text
pTtl_
  Bool
pEnablePullRequestPreview_ =
    Branch' :: Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Stage
-> Text
-> Bool
-> POSIX
-> POSIX
-> HashMap Text Text
-> Bool
-> [Text]
-> Text
-> Text
-> Text
-> Bool
-> Text
-> Bool
-> Branch
Branch'
      { $sel:backendEnvironmentArn:Branch' :: Maybe Text
backendEnvironmentArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:thumbnailUrl:Branch' :: Maybe Text
thumbnailUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:basicAuthCredentials:Branch' :: Maybe (Sensitive Text)
basicAuthCredentials = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:buildSpec:Branch' :: Maybe Text
buildSpec = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:sourceBranch:Branch' :: Maybe Text
sourceBranch = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:enablePerformanceMode:Branch' :: Maybe Bool
enablePerformanceMode = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:destinationBranch:Branch' :: Maybe Text
destinationBranch = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:pullRequestEnvironmentName:Branch' :: Maybe Text
pullRequestEnvironmentName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:associatedResources:Branch' :: Maybe [Text]
associatedResources = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:Branch' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:branchArn:Branch' :: Text
branchArn = Text
pBranchArn_,
        $sel:branchName:Branch' :: Text
branchName = Text
pBranchName_,
        $sel:description:Branch' :: Text
description = Text
pDescription_,
        $sel:stage:Branch' :: Stage
stage = Stage
pStage_,
        $sel:displayName:Branch' :: Text
displayName = Text
pDisplayName_,
        $sel:enableNotification:Branch' :: Bool
enableNotification = Bool
pEnableNotification_,
        $sel:createTime:Branch' :: POSIX
createTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreateTime_,
        $sel:updateTime:Branch' :: POSIX
updateTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pUpdateTime_,
        $sel:environmentVariables:Branch' :: HashMap Text Text
environmentVariables = HashMap Text Text
forall a. Monoid a => a
Prelude.mempty,
        $sel:enableAutoBuild:Branch' :: Bool
enableAutoBuild = Bool
pEnableAutoBuild_,
        $sel:customDomains:Branch' :: [Text]
customDomains = [Text]
forall a. Monoid a => a
Prelude.mempty,
        $sel:framework:Branch' :: Text
framework = Text
pFramework_,
        $sel:activeJobId:Branch' :: Text
activeJobId = Text
pActiveJobId_,
        $sel:totalNumberOfJobs:Branch' :: Text
totalNumberOfJobs = Text
pTotalNumberOfJobs_,
        $sel:enableBasicAuth:Branch' :: Bool
enableBasicAuth = Bool
pEnableBasicAuth_,
        $sel:ttl:Branch' :: Text
ttl = Text
pTtl_,
        $sel:enablePullRequestPreview:Branch' :: Bool
enablePullRequestPreview =
          Bool
pEnablePullRequestPreview_
      }

-- | The Amazon Resource Name (ARN) for a backend environment that is part of
-- an Amplify app.
branch_backendEnvironmentArn :: Lens.Lens' Branch (Prelude.Maybe Prelude.Text)
branch_backendEnvironmentArn :: (Maybe Text -> f (Maybe Text)) -> Branch -> f Branch
branch_backendEnvironmentArn = (Branch -> Maybe Text)
-> (Branch -> Maybe Text -> Branch)
-> Lens Branch Branch (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {Maybe Text
backendEnvironmentArn :: Maybe Text
$sel:backendEnvironmentArn:Branch' :: Branch -> Maybe Text
backendEnvironmentArn} -> Maybe Text
backendEnvironmentArn) (\s :: Branch
s@Branch' {} Maybe Text
a -> Branch
s {$sel:backendEnvironmentArn:Branch' :: Maybe Text
backendEnvironmentArn = Maybe Text
a} :: Branch)

-- | The thumbnail URL for the branch of an Amplify app.
branch_thumbnailUrl :: Lens.Lens' Branch (Prelude.Maybe Prelude.Text)
branch_thumbnailUrl :: (Maybe Text -> f (Maybe Text)) -> Branch -> f Branch
branch_thumbnailUrl = (Branch -> Maybe Text)
-> (Branch -> Maybe Text -> Branch)
-> Lens Branch Branch (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {Maybe Text
thumbnailUrl :: Maybe Text
$sel:thumbnailUrl:Branch' :: Branch -> Maybe Text
thumbnailUrl} -> Maybe Text
thumbnailUrl) (\s :: Branch
s@Branch' {} Maybe Text
a -> Branch
s {$sel:thumbnailUrl:Branch' :: Maybe Text
thumbnailUrl = Maybe Text
a} :: Branch)

-- | The basic authorization credentials for a branch of an Amplify app.
branch_basicAuthCredentials :: Lens.Lens' Branch (Prelude.Maybe Prelude.Text)
branch_basicAuthCredentials :: (Maybe Text -> f (Maybe Text)) -> Branch -> f Branch
branch_basicAuthCredentials = (Branch -> Maybe (Sensitive Text))
-> (Branch -> Maybe (Sensitive Text) -> Branch)
-> Lens
     Branch Branch (Maybe (Sensitive Text)) (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {Maybe (Sensitive Text)
basicAuthCredentials :: Maybe (Sensitive Text)
$sel:basicAuthCredentials:Branch' :: Branch -> Maybe (Sensitive Text)
basicAuthCredentials} -> Maybe (Sensitive Text)
basicAuthCredentials) (\s :: Branch
s@Branch' {} Maybe (Sensitive Text)
a -> Branch
s {$sel:basicAuthCredentials:Branch' :: Maybe (Sensitive Text)
basicAuthCredentials = Maybe (Sensitive Text)
a} :: Branch) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> Branch -> f Branch)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> Branch
-> f Branch
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

-- | The build specification (build spec) content for the branch of an
-- Amplify app.
branch_buildSpec :: Lens.Lens' Branch (Prelude.Maybe Prelude.Text)
branch_buildSpec :: (Maybe Text -> f (Maybe Text)) -> Branch -> f Branch
branch_buildSpec = (Branch -> Maybe Text)
-> (Branch -> Maybe Text -> Branch)
-> Lens Branch Branch (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {Maybe Text
buildSpec :: Maybe Text
$sel:buildSpec:Branch' :: Branch -> Maybe Text
buildSpec} -> Maybe Text
buildSpec) (\s :: Branch
s@Branch' {} Maybe Text
a -> Branch
s {$sel:buildSpec:Branch' :: Maybe Text
buildSpec = Maybe Text
a} :: Branch)

-- | The source branch if the branch is a pull request branch.
branch_sourceBranch :: Lens.Lens' Branch (Prelude.Maybe Prelude.Text)
branch_sourceBranch :: (Maybe Text -> f (Maybe Text)) -> Branch -> f Branch
branch_sourceBranch = (Branch -> Maybe Text)
-> (Branch -> Maybe Text -> Branch)
-> Lens Branch Branch (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {Maybe Text
sourceBranch :: Maybe Text
$sel:sourceBranch:Branch' :: Branch -> Maybe Text
sourceBranch} -> Maybe Text
sourceBranch) (\s :: Branch
s@Branch' {} Maybe Text
a -> Branch
s {$sel:sourceBranch:Branch' :: Maybe Text
sourceBranch = Maybe Text
a} :: Branch)

-- | Enables performance mode for the branch.
--
-- Performance mode optimizes for faster hosting performance by keeping
-- content cached at the edge for a longer interval. When performance mode
-- is enabled, hosting configuration or code changes can take up to 10
-- minutes to roll out.
branch_enablePerformanceMode :: Lens.Lens' Branch (Prelude.Maybe Prelude.Bool)
branch_enablePerformanceMode :: (Maybe Bool -> f (Maybe Bool)) -> Branch -> f Branch
branch_enablePerformanceMode = (Branch -> Maybe Bool)
-> (Branch -> Maybe Bool -> Branch)
-> Lens Branch Branch (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {Maybe Bool
enablePerformanceMode :: Maybe Bool
$sel:enablePerformanceMode:Branch' :: Branch -> Maybe Bool
enablePerformanceMode} -> Maybe Bool
enablePerformanceMode) (\s :: Branch
s@Branch' {} Maybe Bool
a -> Branch
s {$sel:enablePerformanceMode:Branch' :: Maybe Bool
enablePerformanceMode = Maybe Bool
a} :: Branch)

-- | The destination branch if the branch is a pull request branch.
branch_destinationBranch :: Lens.Lens' Branch (Prelude.Maybe Prelude.Text)
branch_destinationBranch :: (Maybe Text -> f (Maybe Text)) -> Branch -> f Branch
branch_destinationBranch = (Branch -> Maybe Text)
-> (Branch -> Maybe Text -> Branch)
-> Lens Branch Branch (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {Maybe Text
destinationBranch :: Maybe Text
$sel:destinationBranch:Branch' :: Branch -> Maybe Text
destinationBranch} -> Maybe Text
destinationBranch) (\s :: Branch
s@Branch' {} Maybe Text
a -> Branch
s {$sel:destinationBranch:Branch' :: Maybe Text
destinationBranch = Maybe Text
a} :: Branch)

-- | The Amplify environment name for the pull request.
branch_pullRequestEnvironmentName :: Lens.Lens' Branch (Prelude.Maybe Prelude.Text)
branch_pullRequestEnvironmentName :: (Maybe Text -> f (Maybe Text)) -> Branch -> f Branch
branch_pullRequestEnvironmentName = (Branch -> Maybe Text)
-> (Branch -> Maybe Text -> Branch)
-> Lens Branch Branch (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {Maybe Text
pullRequestEnvironmentName :: Maybe Text
$sel:pullRequestEnvironmentName:Branch' :: Branch -> Maybe Text
pullRequestEnvironmentName} -> Maybe Text
pullRequestEnvironmentName) (\s :: Branch
s@Branch' {} Maybe Text
a -> Branch
s {$sel:pullRequestEnvironmentName:Branch' :: Maybe Text
pullRequestEnvironmentName = Maybe Text
a} :: Branch)

-- | A list of custom resources that are linked to this branch.
branch_associatedResources :: Lens.Lens' Branch (Prelude.Maybe [Prelude.Text])
branch_associatedResources :: (Maybe [Text] -> f (Maybe [Text])) -> Branch -> f Branch
branch_associatedResources = (Branch -> Maybe [Text])
-> (Branch -> Maybe [Text] -> Branch)
-> Lens Branch Branch (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {Maybe [Text]
associatedResources :: Maybe [Text]
$sel:associatedResources:Branch' :: Branch -> Maybe [Text]
associatedResources} -> Maybe [Text]
associatedResources) (\s :: Branch
s@Branch' {} Maybe [Text]
a -> Branch
s {$sel:associatedResources:Branch' :: Maybe [Text]
associatedResources = Maybe [Text]
a} :: Branch) ((Maybe [Text] -> f (Maybe [Text])) -> Branch -> f Branch)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Branch
-> f Branch
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The tag for the branch of an Amplify app.
branch_tags :: Lens.Lens' Branch (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
branch_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Branch -> f Branch
branch_tags = (Branch -> Maybe (HashMap Text Text))
-> (Branch -> Maybe (HashMap Text Text) -> Branch)
-> Lens
     Branch
     Branch
     (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 (\Branch' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:Branch' :: Branch -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: Branch
s@Branch' {} Maybe (HashMap Text Text)
a -> Branch
s {$sel:tags:Branch' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: Branch) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> Branch -> f Branch)
-> ((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)))
-> Branch
-> f Branch
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

-- | The Amazon Resource Name (ARN) for a branch that is part of an Amplify
-- app.
branch_branchArn :: Lens.Lens' Branch Prelude.Text
branch_branchArn :: (Text -> f Text) -> Branch -> f Branch
branch_branchArn = (Branch -> Text)
-> (Branch -> Text -> Branch) -> Lens Branch Branch Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {Text
branchArn :: Text
$sel:branchArn:Branch' :: Branch -> Text
branchArn} -> Text
branchArn) (\s :: Branch
s@Branch' {} Text
a -> Branch
s {$sel:branchArn:Branch' :: Text
branchArn = Text
a} :: Branch)

-- | The name for the branch that is part of an Amplify app.
branch_branchName :: Lens.Lens' Branch Prelude.Text
branch_branchName :: (Text -> f Text) -> Branch -> f Branch
branch_branchName = (Branch -> Text)
-> (Branch -> Text -> Branch) -> Lens Branch Branch Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {Text
branchName :: Text
$sel:branchName:Branch' :: Branch -> Text
branchName} -> Text
branchName) (\s :: Branch
s@Branch' {} Text
a -> Branch
s {$sel:branchName:Branch' :: Text
branchName = Text
a} :: Branch)

-- | The description for the branch that is part of an Amplify app.
branch_description :: Lens.Lens' Branch Prelude.Text
branch_description :: (Text -> f Text) -> Branch -> f Branch
branch_description = (Branch -> Text)
-> (Branch -> Text -> Branch) -> Lens Branch Branch Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {Text
description :: Text
$sel:description:Branch' :: Branch -> Text
description} -> Text
description) (\s :: Branch
s@Branch' {} Text
a -> Branch
s {$sel:description:Branch' :: Text
description = Text
a} :: Branch)

-- | The current stage for the branch that is part of an Amplify app.
branch_stage :: Lens.Lens' Branch Stage
branch_stage :: (Stage -> f Stage) -> Branch -> f Branch
branch_stage = (Branch -> Stage)
-> (Branch -> Stage -> Branch) -> Lens Branch Branch Stage Stage
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {Stage
stage :: Stage
$sel:stage:Branch' :: Branch -> Stage
stage} -> Stage
stage) (\s :: Branch
s@Branch' {} Stage
a -> Branch
s {$sel:stage:Branch' :: Stage
stage = Stage
a} :: Branch)

-- | The display name for the branch. This is used as the default domain
-- prefix.
branch_displayName :: Lens.Lens' Branch Prelude.Text
branch_displayName :: (Text -> f Text) -> Branch -> f Branch
branch_displayName = (Branch -> Text)
-> (Branch -> Text -> Branch) -> Lens Branch Branch Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {Text
displayName :: Text
$sel:displayName:Branch' :: Branch -> Text
displayName} -> Text
displayName) (\s :: Branch
s@Branch' {} Text
a -> Branch
s {$sel:displayName:Branch' :: Text
displayName = Text
a} :: Branch)

-- | Enables notifications for a branch that is part of an Amplify app.
branch_enableNotification :: Lens.Lens' Branch Prelude.Bool
branch_enableNotification :: (Bool -> f Bool) -> Branch -> f Branch
branch_enableNotification = (Branch -> Bool)
-> (Branch -> Bool -> Branch) -> Lens Branch Branch Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {Bool
enableNotification :: Bool
$sel:enableNotification:Branch' :: Branch -> Bool
enableNotification} -> Bool
enableNotification) (\s :: Branch
s@Branch' {} Bool
a -> Branch
s {$sel:enableNotification:Branch' :: Bool
enableNotification = Bool
a} :: Branch)

-- | The creation date and time for a branch that is part of an Amplify app.
branch_createTime :: Lens.Lens' Branch Prelude.UTCTime
branch_createTime :: (UTCTime -> f UTCTime) -> Branch -> f Branch
branch_createTime = (Branch -> POSIX)
-> (Branch -> POSIX -> Branch) -> Lens Branch Branch POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {POSIX
createTime :: POSIX
$sel:createTime:Branch' :: Branch -> POSIX
createTime} -> POSIX
createTime) (\s :: Branch
s@Branch' {} POSIX
a -> Branch
s {$sel:createTime:Branch' :: POSIX
createTime = POSIX
a} :: Branch) ((POSIX -> f POSIX) -> Branch -> f Branch)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> Branch
-> f Branch
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The last updated date and time for a branch that is part of an Amplify
-- app.
branch_updateTime :: Lens.Lens' Branch Prelude.UTCTime
branch_updateTime :: (UTCTime -> f UTCTime) -> Branch -> f Branch
branch_updateTime = (Branch -> POSIX)
-> (Branch -> POSIX -> Branch) -> Lens Branch Branch POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {POSIX
updateTime :: POSIX
$sel:updateTime:Branch' :: Branch -> POSIX
updateTime} -> POSIX
updateTime) (\s :: Branch
s@Branch' {} POSIX
a -> Branch
s {$sel:updateTime:Branch' :: POSIX
updateTime = POSIX
a} :: Branch) ((POSIX -> f POSIX) -> Branch -> f Branch)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> Branch
-> f Branch
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The environment variables specific to a branch of an Amplify app.
branch_environmentVariables :: Lens.Lens' Branch (Prelude.HashMap Prelude.Text Prelude.Text)
branch_environmentVariables :: (HashMap Text Text -> f (HashMap Text Text)) -> Branch -> f Branch
branch_environmentVariables = (Branch -> HashMap Text Text)
-> (Branch -> HashMap Text Text -> Branch)
-> Lens Branch Branch (HashMap Text Text) (HashMap Text Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {HashMap Text Text
environmentVariables :: HashMap Text Text
$sel:environmentVariables:Branch' :: Branch -> HashMap Text Text
environmentVariables} -> HashMap Text Text
environmentVariables) (\s :: Branch
s@Branch' {} HashMap Text Text
a -> Branch
s {$sel:environmentVariables:Branch' :: HashMap Text Text
environmentVariables = HashMap Text Text
a} :: Branch) ((HashMap Text Text -> f (HashMap Text Text))
 -> Branch -> f Branch)
-> ((HashMap Text Text -> f (HashMap Text Text))
    -> HashMap Text Text -> f (HashMap Text Text))
-> (HashMap Text Text -> f (HashMap Text Text))
-> Branch
-> f Branch
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (HashMap Text Text -> f (HashMap Text Text))
-> HashMap Text Text -> f (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Enables auto-building on push for a branch of an Amplify app.
branch_enableAutoBuild :: Lens.Lens' Branch Prelude.Bool
branch_enableAutoBuild :: (Bool -> f Bool) -> Branch -> f Branch
branch_enableAutoBuild = (Branch -> Bool)
-> (Branch -> Bool -> Branch) -> Lens Branch Branch Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {Bool
enableAutoBuild :: Bool
$sel:enableAutoBuild:Branch' :: Branch -> Bool
enableAutoBuild} -> Bool
enableAutoBuild) (\s :: Branch
s@Branch' {} Bool
a -> Branch
s {$sel:enableAutoBuild:Branch' :: Bool
enableAutoBuild = Bool
a} :: Branch)

-- | The custom domains for a branch of an Amplify app.
branch_customDomains :: Lens.Lens' Branch [Prelude.Text]
branch_customDomains :: ([Text] -> f [Text]) -> Branch -> f Branch
branch_customDomains = (Branch -> [Text])
-> (Branch -> [Text] -> Branch) -> Lens Branch Branch [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {[Text]
customDomains :: [Text]
$sel:customDomains:Branch' :: Branch -> [Text]
customDomains} -> [Text]
customDomains) (\s :: Branch
s@Branch' {} [Text]
a -> Branch
s {$sel:customDomains:Branch' :: [Text]
customDomains = [Text]
a} :: Branch) (([Text] -> f [Text]) -> Branch -> f Branch)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> Branch
-> f Branch
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The framework for a branch of an Amplify app.
branch_framework :: Lens.Lens' Branch Prelude.Text
branch_framework :: (Text -> f Text) -> Branch -> f Branch
branch_framework = (Branch -> Text)
-> (Branch -> Text -> Branch) -> Lens Branch Branch Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {Text
framework :: Text
$sel:framework:Branch' :: Branch -> Text
framework} -> Text
framework) (\s :: Branch
s@Branch' {} Text
a -> Branch
s {$sel:framework:Branch' :: Text
framework = Text
a} :: Branch)

-- | The ID of the active job for a branch of an Amplify app.
branch_activeJobId :: Lens.Lens' Branch Prelude.Text
branch_activeJobId :: (Text -> f Text) -> Branch -> f Branch
branch_activeJobId = (Branch -> Text)
-> (Branch -> Text -> Branch) -> Lens Branch Branch Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {Text
activeJobId :: Text
$sel:activeJobId:Branch' :: Branch -> Text
activeJobId} -> Text
activeJobId) (\s :: Branch
s@Branch' {} Text
a -> Branch
s {$sel:activeJobId:Branch' :: Text
activeJobId = Text
a} :: Branch)

-- | The total number of jobs that are part of an Amplify app.
branch_totalNumberOfJobs :: Lens.Lens' Branch Prelude.Text
branch_totalNumberOfJobs :: (Text -> f Text) -> Branch -> f Branch
branch_totalNumberOfJobs = (Branch -> Text)
-> (Branch -> Text -> Branch) -> Lens Branch Branch Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {Text
totalNumberOfJobs :: Text
$sel:totalNumberOfJobs:Branch' :: Branch -> Text
totalNumberOfJobs} -> Text
totalNumberOfJobs) (\s :: Branch
s@Branch' {} Text
a -> Branch
s {$sel:totalNumberOfJobs:Branch' :: Text
totalNumberOfJobs = Text
a} :: Branch)

-- | Enables basic authorization for a branch of an Amplify app.
branch_enableBasicAuth :: Lens.Lens' Branch Prelude.Bool
branch_enableBasicAuth :: (Bool -> f Bool) -> Branch -> f Branch
branch_enableBasicAuth = (Branch -> Bool)
-> (Branch -> Bool -> Branch) -> Lens Branch Branch Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {Bool
enableBasicAuth :: Bool
$sel:enableBasicAuth:Branch' :: Branch -> Bool
enableBasicAuth} -> Bool
enableBasicAuth) (\s :: Branch
s@Branch' {} Bool
a -> Branch
s {$sel:enableBasicAuth:Branch' :: Bool
enableBasicAuth = Bool
a} :: Branch)

-- | The content Time to Live (TTL) for the website in seconds.
branch_ttl :: Lens.Lens' Branch Prelude.Text
branch_ttl :: (Text -> f Text) -> Branch -> f Branch
branch_ttl = (Branch -> Text)
-> (Branch -> Text -> Branch) -> Lens Branch Branch Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {Text
ttl :: Text
$sel:ttl:Branch' :: Branch -> Text
ttl} -> Text
ttl) (\s :: Branch
s@Branch' {} Text
a -> Branch
s {$sel:ttl:Branch' :: Text
ttl = Text
a} :: Branch)

-- | Enables pull request previews for the branch.
branch_enablePullRequestPreview :: Lens.Lens' Branch Prelude.Bool
branch_enablePullRequestPreview :: (Bool -> f Bool) -> Branch -> f Branch
branch_enablePullRequestPreview = (Branch -> Bool)
-> (Branch -> Bool -> Branch) -> Lens Branch Branch Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Branch' {Bool
enablePullRequestPreview :: Bool
$sel:enablePullRequestPreview:Branch' :: Branch -> Bool
enablePullRequestPreview} -> Bool
enablePullRequestPreview) (\s :: Branch
s@Branch' {} Bool
a -> Branch
s {$sel:enablePullRequestPreview:Branch' :: Bool
enablePullRequestPreview = Bool
a} :: Branch)

instance Core.FromJSON Branch where
  parseJSON :: Value -> Parser Branch
parseJSON =
    String -> (Object -> Parser Branch) -> Value -> Parser Branch
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Branch"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Stage
-> Text
-> Bool
-> POSIX
-> POSIX
-> HashMap Text Text
-> Bool
-> [Text]
-> Text
-> Text
-> Text
-> Bool
-> Text
-> Bool
-> Branch
Branch'
            (Maybe Text
 -> Maybe Text
 -> Maybe (Sensitive Text)
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe (HashMap Text Text)
 -> Text
 -> Text
 -> Text
 -> Stage
 -> Text
 -> Bool
 -> POSIX
 -> POSIX
 -> HashMap Text Text
 -> Bool
 -> [Text]
 -> Text
 -> Text
 -> Text
 -> Bool
 -> Text
 -> Bool
 -> Branch)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> Stage
      -> Text
      -> Bool
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Bool
      -> [Text]
      -> Text
      -> Text
      -> Text
      -> Bool
      -> Text
      -> Bool
      -> Branch)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"backendEnvironmentArn")
            Parser
  (Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> Stage
   -> Text
   -> Bool
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Bool
   -> [Text]
   -> Text
   -> Text
   -> Text
   -> Bool
   -> Text
   -> Bool
   -> Branch)
-> Parser (Maybe Text)
-> Parser
     (Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> Stage
      -> Text
      -> Bool
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Bool
      -> [Text]
      -> Text
      -> Text
      -> Text
      -> Bool
      -> Text
      -> Bool
      -> Branch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"thumbnailUrl")
            Parser
  (Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> Stage
   -> Text
   -> Bool
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Bool
   -> [Text]
   -> Text
   -> Text
   -> Text
   -> Bool
   -> Text
   -> Bool
   -> Branch)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> Stage
      -> Text
      -> Bool
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Bool
      -> [Text]
      -> Text
      -> Text
      -> Text
      -> Bool
      -> Text
      -> Bool
      -> Branch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"basicAuthCredentials")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> Stage
   -> Text
   -> Bool
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Bool
   -> [Text]
   -> Text
   -> Text
   -> Text
   -> Bool
   -> Text
   -> Bool
   -> Branch)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> Stage
      -> Text
      -> Bool
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Bool
      -> [Text]
      -> Text
      -> Text
      -> Text
      -> Bool
      -> Text
      -> Bool
      -> Branch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"buildSpec")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> Stage
   -> Text
   -> Bool
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Bool
   -> [Text]
   -> Text
   -> Text
   -> Text
   -> Bool
   -> Text
   -> Bool
   -> Branch)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> Stage
      -> Text
      -> Bool
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Bool
      -> [Text]
      -> Text
      -> Text
      -> Text
      -> Bool
      -> Text
      -> Bool
      -> Branch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"sourceBranch")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> Stage
   -> Text
   -> Bool
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Bool
   -> [Text]
   -> Text
   -> Text
   -> Text
   -> Bool
   -> Text
   -> Bool
   -> Branch)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> Stage
      -> Text
      -> Bool
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Bool
      -> [Text]
      -> Text
      -> Text
      -> Text
      -> Bool
      -> Text
      -> Bool
      -> Branch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"enablePerformanceMode")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> Stage
   -> Text
   -> Bool
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Bool
   -> [Text]
   -> Text
   -> Text
   -> Text
   -> Bool
   -> Text
   -> Bool
   -> Branch)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> Stage
      -> Text
      -> Bool
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Bool
      -> [Text]
      -> Text
      -> Text
      -> Text
      -> Bool
      -> Text
      -> Bool
      -> Branch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"destinationBranch")
            Parser
  (Maybe Text
   -> Maybe [Text]
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> Stage
   -> Text
   -> Bool
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Bool
   -> [Text]
   -> Text
   -> Text
   -> Text
   -> Bool
   -> Text
   -> Bool
   -> Branch)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> Stage
      -> Text
      -> Bool
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Bool
      -> [Text]
      -> Text
      -> Text
      -> Text
      -> Bool
      -> Text
      -> Bool
      -> Branch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pullRequestEnvironmentName")
            Parser
  (Maybe [Text]
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> Stage
   -> Text
   -> Bool
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Bool
   -> [Text]
   -> Text
   -> Text
   -> Text
   -> Bool
   -> Text
   -> Bool
   -> Branch)
-> Parser (Maybe [Text])
-> Parser
     (Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> Stage
      -> Text
      -> Bool
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Bool
      -> [Text]
      -> Text
      -> Text
      -> Text
      -> Bool
      -> Text
      -> Bool
      -> Branch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"associatedResources"
                            Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> Stage
   -> Text
   -> Bool
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Bool
   -> [Text]
   -> Text
   -> Text
   -> Text
   -> Bool
   -> Text
   -> Bool
   -> Branch)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Text
      -> Text
      -> Text
      -> Stage
      -> Text
      -> Bool
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Bool
      -> [Text]
      -> Text
      -> Text
      -> Text
      -> Bool
      -> Text
      -> Bool
      -> Branch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Text
   -> Text
   -> Text
   -> Stage
   -> Text
   -> Bool
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Bool
   -> [Text]
   -> Text
   -> Text
   -> Text
   -> Bool
   -> Text
   -> Bool
   -> Branch)
-> Parser Text
-> Parser
     (Text
      -> Text
      -> Stage
      -> Text
      -> Bool
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Bool
      -> [Text]
      -> Text
      -> Text
      -> Text
      -> Bool
      -> Text
      -> Bool
      -> Branch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"branchArn")
            Parser
  (Text
   -> Text
   -> Stage
   -> Text
   -> Bool
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Bool
   -> [Text]
   -> Text
   -> Text
   -> Text
   -> Bool
   -> Text
   -> Bool
   -> Branch)
-> Parser Text
-> Parser
     (Text
      -> Stage
      -> Text
      -> Bool
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Bool
      -> [Text]
      -> Text
      -> Text
      -> Text
      -> Bool
      -> Text
      -> Bool
      -> Branch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"branchName")
            Parser
  (Text
   -> Stage
   -> Text
   -> Bool
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Bool
   -> [Text]
   -> Text
   -> Text
   -> Text
   -> Bool
   -> Text
   -> Bool
   -> Branch)
-> Parser Text
-> Parser
     (Stage
      -> Text
      -> Bool
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Bool
      -> [Text]
      -> Text
      -> Text
      -> Text
      -> Bool
      -> Text
      -> Bool
      -> Branch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"description")
            Parser
  (Stage
   -> Text
   -> Bool
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Bool
   -> [Text]
   -> Text
   -> Text
   -> Text
   -> Bool
   -> Text
   -> Bool
   -> Branch)
-> Parser Stage
-> Parser
     (Text
      -> Bool
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Bool
      -> [Text]
      -> Text
      -> Text
      -> Text
      -> Bool
      -> Text
      -> Bool
      -> Branch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Stage
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"stage")
            Parser
  (Text
   -> Bool
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Bool
   -> [Text]
   -> Text
   -> Text
   -> Text
   -> Bool
   -> Text
   -> Bool
   -> Branch)
-> Parser Text
-> Parser
     (Bool
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Bool
      -> [Text]
      -> Text
      -> Text
      -> Text
      -> Bool
      -> Text
      -> Bool
      -> Branch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"displayName")
            Parser
  (Bool
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Bool
   -> [Text]
   -> Text
   -> Text
   -> Text
   -> Bool
   -> Text
   -> Bool
   -> Branch)
-> Parser Bool
-> Parser
     (POSIX
      -> POSIX
      -> HashMap Text Text
      -> Bool
      -> [Text]
      -> Text
      -> Text
      -> Text
      -> Bool
      -> Text
      -> Bool
      -> Branch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"enableNotification")
            Parser
  (POSIX
   -> POSIX
   -> HashMap Text Text
   -> Bool
   -> [Text]
   -> Text
   -> Text
   -> Text
   -> Bool
   -> Text
   -> Bool
   -> Branch)
-> Parser POSIX
-> Parser
     (POSIX
      -> HashMap Text Text
      -> Bool
      -> [Text]
      -> Text
      -> Text
      -> Text
      -> Bool
      -> Text
      -> Bool
      -> Branch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"createTime")
            Parser
  (POSIX
   -> HashMap Text Text
   -> Bool
   -> [Text]
   -> Text
   -> Text
   -> Text
   -> Bool
   -> Text
   -> Bool
   -> Branch)
-> Parser POSIX
-> Parser
     (HashMap Text Text
      -> Bool
      -> [Text]
      -> Text
      -> Text
      -> Text
      -> Bool
      -> Text
      -> Bool
      -> Branch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"updateTime")
            Parser
  (HashMap Text Text
   -> Bool
   -> [Text]
   -> Text
   -> Text
   -> Text
   -> Bool
   -> Text
   -> Bool
   -> Branch)
-> Parser (HashMap Text Text)
-> Parser
     (Bool
      -> [Text]
      -> Text
      -> Text
      -> Text
      -> Bool
      -> Text
      -> Bool
      -> Branch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (HashMap Text Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"environmentVariables"
                            Parser (Maybe (HashMap Text Text))
-> HashMap Text Text -> Parser (HashMap Text Text)
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= HashMap Text Text
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Bool
   -> [Text]
   -> Text
   -> Text
   -> Text
   -> Bool
   -> Text
   -> Bool
   -> Branch)
-> Parser Bool
-> Parser
     ([Text] -> Text -> Text -> Text -> Bool -> Text -> Bool -> Branch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"enableAutoBuild")
            Parser
  ([Text] -> Text -> Text -> Text -> Bool -> Text -> Bool -> Branch)
-> Parser [Text]
-> Parser (Text -> Text -> Text -> Bool -> Text -> Bool -> Branch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"customDomains" Parser (Maybe [Text]) -> [Text] -> Parser [Text]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [Text]
forall a. Monoid a => a
Prelude.mempty)
            Parser (Text -> Text -> Text -> Bool -> Text -> Bool -> Branch)
-> Parser Text
-> Parser (Text -> Text -> Bool -> Text -> Bool -> Branch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"framework")
            Parser (Text -> Text -> Bool -> Text -> Bool -> Branch)
-> Parser Text -> Parser (Text -> Bool -> Text -> Bool -> Branch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"activeJobId")
            Parser (Text -> Bool -> Text -> Bool -> Branch)
-> Parser Text -> Parser (Bool -> Text -> Bool -> Branch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"totalNumberOfJobs")
            Parser (Bool -> Text -> Bool -> Branch)
-> Parser Bool -> Parser (Text -> Bool -> Branch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"enableBasicAuth")
            Parser (Text -> Bool -> Branch)
-> Parser Text -> Parser (Bool -> Branch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ttl")
            Parser (Bool -> Branch) -> Parser Bool -> Parser Branch
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"enablePullRequestPreview")
      )

instance Prelude.Hashable Branch

instance Prelude.NFData Branch