{-# 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.AutoBranchCreationConfig
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Amplify.Types.AutoBranchCreationConfig where

import Amazonka.Amplify.Types.Stage
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

-- | Describes the automated branch creation configuration.
--
-- /See:/ 'newAutoBranchCreationConfig' smart constructor.
data AutoBranchCreationConfig = AutoBranchCreationConfig'
  { -- | The basic authorization credentials for the autocreated branch. You must
    -- base64-encode the authorization credentials and provide them in the
    -- format @user:password@.
    AutoBranchCreationConfig -> Maybe (Sensitive Text)
basicAuthCredentials :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The build specification (build spec) for the autocreated branch.
    AutoBranchCreationConfig -> Maybe (Sensitive Text)
buildSpec :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | Enables auto building for the autocreated branch.
    AutoBranchCreationConfig -> Maybe Bool
enableAutoBuild :: Prelude.Maybe Prelude.Bool,
    -- | Enables basic authorization for the autocreated branch.
    AutoBranchCreationConfig -> Maybe Bool
enableBasicAuth :: Prelude.Maybe Prelude.Bool,
    -- | 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.
    AutoBranchCreationConfig -> Maybe Bool
enablePerformanceMode :: Prelude.Maybe Prelude.Bool,
    -- | Enables pull request previews for the autocreated branch.
    AutoBranchCreationConfig -> Maybe Bool
enablePullRequestPreview :: Prelude.Maybe Prelude.Bool,
    -- | The environment variables for the autocreated branch.
    AutoBranchCreationConfig -> Maybe (HashMap Text Text)
environmentVariables :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The framework for the autocreated branch.
    AutoBranchCreationConfig -> Maybe Text
framework :: Prelude.Maybe Prelude.Text,
    -- | The Amplify environment name for the pull request.
    AutoBranchCreationConfig -> Maybe Text
pullRequestEnvironmentName :: Prelude.Maybe Prelude.Text,
    -- | Describes the current stage for the autocreated branch.
    AutoBranchCreationConfig -> Maybe Stage
stage :: Prelude.Maybe Stage
  }
  deriving (AutoBranchCreationConfig -> AutoBranchCreationConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AutoBranchCreationConfig -> AutoBranchCreationConfig -> Bool
$c/= :: AutoBranchCreationConfig -> AutoBranchCreationConfig -> Bool
== :: AutoBranchCreationConfig -> AutoBranchCreationConfig -> Bool
$c== :: AutoBranchCreationConfig -> AutoBranchCreationConfig -> Bool
Prelude.Eq, Int -> AutoBranchCreationConfig -> ShowS
[AutoBranchCreationConfig] -> ShowS
AutoBranchCreationConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AutoBranchCreationConfig] -> ShowS
$cshowList :: [AutoBranchCreationConfig] -> ShowS
show :: AutoBranchCreationConfig -> String
$cshow :: AutoBranchCreationConfig -> String
showsPrec :: Int -> AutoBranchCreationConfig -> ShowS
$cshowsPrec :: Int -> AutoBranchCreationConfig -> ShowS
Prelude.Show, forall x.
Rep AutoBranchCreationConfig x -> AutoBranchCreationConfig
forall x.
AutoBranchCreationConfig -> Rep AutoBranchCreationConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AutoBranchCreationConfig x -> AutoBranchCreationConfig
$cfrom :: forall x.
AutoBranchCreationConfig -> Rep AutoBranchCreationConfig x
Prelude.Generic)

-- |
-- Create a value of 'AutoBranchCreationConfig' 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:
--
-- 'basicAuthCredentials', 'autoBranchCreationConfig_basicAuthCredentials' - The basic authorization credentials for the autocreated branch. You must
-- base64-encode the authorization credentials and provide them in the
-- format @user:password@.
--
-- 'buildSpec', 'autoBranchCreationConfig_buildSpec' - The build specification (build spec) for the autocreated branch.
--
-- 'enableAutoBuild', 'autoBranchCreationConfig_enableAutoBuild' - Enables auto building for the autocreated branch.
--
-- 'enableBasicAuth', 'autoBranchCreationConfig_enableBasicAuth' - Enables basic authorization for the autocreated branch.
--
-- 'enablePerformanceMode', 'autoBranchCreationConfig_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.
--
-- 'enablePullRequestPreview', 'autoBranchCreationConfig_enablePullRequestPreview' - Enables pull request previews for the autocreated branch.
--
-- 'environmentVariables', 'autoBranchCreationConfig_environmentVariables' - The environment variables for the autocreated branch.
--
-- 'framework', 'autoBranchCreationConfig_framework' - The framework for the autocreated branch.
--
-- 'pullRequestEnvironmentName', 'autoBranchCreationConfig_pullRequestEnvironmentName' - The Amplify environment name for the pull request.
--
-- 'stage', 'autoBranchCreationConfig_stage' - Describes the current stage for the autocreated branch.
newAutoBranchCreationConfig ::
  AutoBranchCreationConfig
newAutoBranchCreationConfig :: AutoBranchCreationConfig
newAutoBranchCreationConfig =
  AutoBranchCreationConfig'
    { $sel:basicAuthCredentials:AutoBranchCreationConfig' :: Maybe (Sensitive Text)
basicAuthCredentials =
        forall a. Maybe a
Prelude.Nothing,
      $sel:buildSpec:AutoBranchCreationConfig' :: Maybe (Sensitive Text)
buildSpec = forall a. Maybe a
Prelude.Nothing,
      $sel:enableAutoBuild:AutoBranchCreationConfig' :: Maybe Bool
enableAutoBuild = forall a. Maybe a
Prelude.Nothing,
      $sel:enableBasicAuth:AutoBranchCreationConfig' :: Maybe Bool
enableBasicAuth = forall a. Maybe a
Prelude.Nothing,
      $sel:enablePerformanceMode:AutoBranchCreationConfig' :: Maybe Bool
enablePerformanceMode = forall a. Maybe a
Prelude.Nothing,
      $sel:enablePullRequestPreview:AutoBranchCreationConfig' :: Maybe Bool
enablePullRequestPreview = forall a. Maybe a
Prelude.Nothing,
      $sel:environmentVariables:AutoBranchCreationConfig' :: Maybe (HashMap Text Text)
environmentVariables = forall a. Maybe a
Prelude.Nothing,
      $sel:framework:AutoBranchCreationConfig' :: Maybe Text
framework = forall a. Maybe a
Prelude.Nothing,
      $sel:pullRequestEnvironmentName:AutoBranchCreationConfig' :: Maybe Text
pullRequestEnvironmentName = forall a. Maybe a
Prelude.Nothing,
      $sel:stage:AutoBranchCreationConfig' :: Maybe Stage
stage = forall a. Maybe a
Prelude.Nothing
    }

-- | The basic authorization credentials for the autocreated branch. You must
-- base64-encode the authorization credentials and provide them in the
-- format @user:password@.
autoBranchCreationConfig_basicAuthCredentials :: Lens.Lens' AutoBranchCreationConfig (Prelude.Maybe Prelude.Text)
autoBranchCreationConfig_basicAuthCredentials :: Lens' AutoBranchCreationConfig (Maybe Text)
autoBranchCreationConfig_basicAuthCredentials = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoBranchCreationConfig' {Maybe (Sensitive Text)
basicAuthCredentials :: Maybe (Sensitive Text)
$sel:basicAuthCredentials:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe (Sensitive Text)
basicAuthCredentials} -> Maybe (Sensitive Text)
basicAuthCredentials) (\s :: AutoBranchCreationConfig
s@AutoBranchCreationConfig' {} Maybe (Sensitive Text)
a -> AutoBranchCreationConfig
s {$sel:basicAuthCredentials:AutoBranchCreationConfig' :: Maybe (Sensitive Text)
basicAuthCredentials = Maybe (Sensitive Text)
a} :: AutoBranchCreationConfig) 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

-- | The build specification (build spec) for the autocreated branch.
autoBranchCreationConfig_buildSpec :: Lens.Lens' AutoBranchCreationConfig (Prelude.Maybe Prelude.Text)
autoBranchCreationConfig_buildSpec :: Lens' AutoBranchCreationConfig (Maybe Text)
autoBranchCreationConfig_buildSpec = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoBranchCreationConfig' {Maybe (Sensitive Text)
buildSpec :: Maybe (Sensitive Text)
$sel:buildSpec:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe (Sensitive Text)
buildSpec} -> Maybe (Sensitive Text)
buildSpec) (\s :: AutoBranchCreationConfig
s@AutoBranchCreationConfig' {} Maybe (Sensitive Text)
a -> AutoBranchCreationConfig
s {$sel:buildSpec:AutoBranchCreationConfig' :: Maybe (Sensitive Text)
buildSpec = Maybe (Sensitive Text)
a} :: AutoBranchCreationConfig) 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

-- | Enables auto building for the autocreated branch.
autoBranchCreationConfig_enableAutoBuild :: Lens.Lens' AutoBranchCreationConfig (Prelude.Maybe Prelude.Bool)
autoBranchCreationConfig_enableAutoBuild :: Lens' AutoBranchCreationConfig (Maybe Bool)
autoBranchCreationConfig_enableAutoBuild = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoBranchCreationConfig' {Maybe Bool
enableAutoBuild :: Maybe Bool
$sel:enableAutoBuild:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Bool
enableAutoBuild} -> Maybe Bool
enableAutoBuild) (\s :: AutoBranchCreationConfig
s@AutoBranchCreationConfig' {} Maybe Bool
a -> AutoBranchCreationConfig
s {$sel:enableAutoBuild:AutoBranchCreationConfig' :: Maybe Bool
enableAutoBuild = Maybe Bool
a} :: AutoBranchCreationConfig)

-- | Enables basic authorization for the autocreated branch.
autoBranchCreationConfig_enableBasicAuth :: Lens.Lens' AutoBranchCreationConfig (Prelude.Maybe Prelude.Bool)
autoBranchCreationConfig_enableBasicAuth :: Lens' AutoBranchCreationConfig (Maybe Bool)
autoBranchCreationConfig_enableBasicAuth = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoBranchCreationConfig' {Maybe Bool
enableBasicAuth :: Maybe Bool
$sel:enableBasicAuth:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Bool
enableBasicAuth} -> Maybe Bool
enableBasicAuth) (\s :: AutoBranchCreationConfig
s@AutoBranchCreationConfig' {} Maybe Bool
a -> AutoBranchCreationConfig
s {$sel:enableBasicAuth:AutoBranchCreationConfig' :: Maybe Bool
enableBasicAuth = Maybe Bool
a} :: AutoBranchCreationConfig)

-- | 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.
autoBranchCreationConfig_enablePerformanceMode :: Lens.Lens' AutoBranchCreationConfig (Prelude.Maybe Prelude.Bool)
autoBranchCreationConfig_enablePerformanceMode :: Lens' AutoBranchCreationConfig (Maybe Bool)
autoBranchCreationConfig_enablePerformanceMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoBranchCreationConfig' {Maybe Bool
enablePerformanceMode :: Maybe Bool
$sel:enablePerformanceMode:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Bool
enablePerformanceMode} -> Maybe Bool
enablePerformanceMode) (\s :: AutoBranchCreationConfig
s@AutoBranchCreationConfig' {} Maybe Bool
a -> AutoBranchCreationConfig
s {$sel:enablePerformanceMode:AutoBranchCreationConfig' :: Maybe Bool
enablePerformanceMode = Maybe Bool
a} :: AutoBranchCreationConfig)

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

-- | The environment variables for the autocreated branch.
autoBranchCreationConfig_environmentVariables :: Lens.Lens' AutoBranchCreationConfig (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
autoBranchCreationConfig_environmentVariables :: Lens' AutoBranchCreationConfig (Maybe (HashMap Text Text))
autoBranchCreationConfig_environmentVariables = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoBranchCreationConfig' {Maybe (HashMap Text Text)
environmentVariables :: Maybe (HashMap Text Text)
$sel:environmentVariables:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe (HashMap Text Text)
environmentVariables} -> Maybe (HashMap Text Text)
environmentVariables) (\s :: AutoBranchCreationConfig
s@AutoBranchCreationConfig' {} Maybe (HashMap Text Text)
a -> AutoBranchCreationConfig
s {$sel:environmentVariables:AutoBranchCreationConfig' :: Maybe (HashMap Text Text)
environmentVariables = Maybe (HashMap Text Text)
a} :: AutoBranchCreationConfig) 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

-- | The framework for the autocreated branch.
autoBranchCreationConfig_framework :: Lens.Lens' AutoBranchCreationConfig (Prelude.Maybe Prelude.Text)
autoBranchCreationConfig_framework :: Lens' AutoBranchCreationConfig (Maybe Text)
autoBranchCreationConfig_framework = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoBranchCreationConfig' {Maybe Text
framework :: Maybe Text
$sel:framework:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Text
framework} -> Maybe Text
framework) (\s :: AutoBranchCreationConfig
s@AutoBranchCreationConfig' {} Maybe Text
a -> AutoBranchCreationConfig
s {$sel:framework:AutoBranchCreationConfig' :: Maybe Text
framework = Maybe Text
a} :: AutoBranchCreationConfig)

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

-- | Describes the current stage for the autocreated branch.
autoBranchCreationConfig_stage :: Lens.Lens' AutoBranchCreationConfig (Prelude.Maybe Stage)
autoBranchCreationConfig_stage :: Lens' AutoBranchCreationConfig (Maybe Stage)
autoBranchCreationConfig_stage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoBranchCreationConfig' {Maybe Stage
stage :: Maybe Stage
$sel:stage:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Stage
stage} -> Maybe Stage
stage) (\s :: AutoBranchCreationConfig
s@AutoBranchCreationConfig' {} Maybe Stage
a -> AutoBranchCreationConfig
s {$sel:stage:AutoBranchCreationConfig' :: Maybe Stage
stage = Maybe Stage
a} :: AutoBranchCreationConfig)

instance Data.FromJSON AutoBranchCreationConfig where
  parseJSON :: Value -> Parser AutoBranchCreationConfig
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"AutoBranchCreationConfig"
      ( \Object
x ->
          Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Stage
-> AutoBranchCreationConfig
AutoBranchCreationConfig'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"basicAuthCredentials")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"buildSpec")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"enableAutoBuild")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"enableBasicAuth")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"enablePerformanceMode")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"enablePullRequestPreview")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"environmentVariables"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"framework")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"pullRequestEnvironmentName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"stage")
      )

instance Prelude.Hashable AutoBranchCreationConfig where
  hashWithSalt :: Int -> AutoBranchCreationConfig -> Int
hashWithSalt Int
_salt AutoBranchCreationConfig' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive Text)
Maybe Stage
stage :: Maybe Stage
pullRequestEnvironmentName :: Maybe Text
framework :: Maybe Text
environmentVariables :: Maybe (HashMap Text Text)
enablePullRequestPreview :: Maybe Bool
enablePerformanceMode :: Maybe Bool
enableBasicAuth :: Maybe Bool
enableAutoBuild :: Maybe Bool
buildSpec :: Maybe (Sensitive Text)
basicAuthCredentials :: Maybe (Sensitive Text)
$sel:stage:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Stage
$sel:pullRequestEnvironmentName:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Text
$sel:framework:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Text
$sel:environmentVariables:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe (HashMap Text Text)
$sel:enablePullRequestPreview:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Bool
$sel:enablePerformanceMode:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Bool
$sel:enableBasicAuth:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Bool
$sel:enableAutoBuild:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Bool
$sel:buildSpec:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe (Sensitive Text)
$sel:basicAuthCredentials:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe (Sensitive Text)
..} =
    Int
_salt
      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 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
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

instance Prelude.NFData AutoBranchCreationConfig where
  rnf :: AutoBranchCreationConfig -> ()
rnf AutoBranchCreationConfig' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive Text)
Maybe Stage
stage :: Maybe Stage
pullRequestEnvironmentName :: Maybe Text
framework :: Maybe Text
environmentVariables :: Maybe (HashMap Text Text)
enablePullRequestPreview :: Maybe Bool
enablePerformanceMode :: Maybe Bool
enableBasicAuth :: Maybe Bool
enableAutoBuild :: Maybe Bool
buildSpec :: Maybe (Sensitive Text)
basicAuthCredentials :: Maybe (Sensitive Text)
$sel:stage:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Stage
$sel:pullRequestEnvironmentName:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Text
$sel:framework:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Text
$sel:environmentVariables:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe (HashMap Text Text)
$sel:enablePullRequestPreview:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Bool
$sel:enablePerformanceMode:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Bool
$sel:enableBasicAuth:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Bool
$sel:enableAutoBuild:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Bool
$sel:buildSpec:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe (Sensitive Text)
$sel:basicAuthCredentials:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe (Sensitive Text)
..} =
    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 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
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

instance Data.ToJSON AutoBranchCreationConfig where
  toJSON :: AutoBranchCreationConfig -> Value
toJSON AutoBranchCreationConfig' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive Text)
Maybe Stage
stage :: Maybe Stage
pullRequestEnvironmentName :: Maybe Text
framework :: Maybe Text
environmentVariables :: Maybe (HashMap Text Text)
enablePullRequestPreview :: Maybe Bool
enablePerformanceMode :: Maybe Bool
enableBasicAuth :: Maybe Bool
enableAutoBuild :: Maybe Bool
buildSpec :: Maybe (Sensitive Text)
basicAuthCredentials :: Maybe (Sensitive Text)
$sel:stage:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Stage
$sel:pullRequestEnvironmentName:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Text
$sel:framework:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Text
$sel:environmentVariables:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe (HashMap Text Text)
$sel:enablePullRequestPreview:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Bool
$sel:enablePerformanceMode:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Bool
$sel:enableBasicAuth:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Bool
$sel:enableAutoBuild:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe Bool
$sel:buildSpec:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe (Sensitive Text)
$sel:basicAuthCredentials:AutoBranchCreationConfig' :: AutoBranchCreationConfig -> Maybe (Sensitive Text)
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (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
"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
"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
          ]
      )