{-# 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 #-}
module Amazonka.Proton.Types.AccountSettings where
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 Amazonka.Proton.Types.RepositoryBranch
data AccountSettings = AccountSettings'
{
AccountSettings -> Maybe Text
pipelineCodebuildRoleArn :: Prelude.Maybe Prelude.Text,
AccountSettings -> Maybe RepositoryBranch
pipelineProvisioningRepository :: Prelude.Maybe RepositoryBranch,
AccountSettings -> Maybe Text
pipelineServiceRoleArn :: Prelude.Maybe Prelude.Text
}
deriving (AccountSettings -> AccountSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccountSettings -> AccountSettings -> Bool
$c/= :: AccountSettings -> AccountSettings -> Bool
== :: AccountSettings -> AccountSettings -> Bool
$c== :: AccountSettings -> AccountSettings -> Bool
Prelude.Eq, ReadPrec [AccountSettings]
ReadPrec AccountSettings
Int -> ReadS AccountSettings
ReadS [AccountSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AccountSettings]
$creadListPrec :: ReadPrec [AccountSettings]
readPrec :: ReadPrec AccountSettings
$creadPrec :: ReadPrec AccountSettings
readList :: ReadS [AccountSettings]
$creadList :: ReadS [AccountSettings]
readsPrec :: Int -> ReadS AccountSettings
$creadsPrec :: Int -> ReadS AccountSettings
Prelude.Read, Int -> AccountSettings -> ShowS
[AccountSettings] -> ShowS
AccountSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AccountSettings] -> ShowS
$cshowList :: [AccountSettings] -> ShowS
show :: AccountSettings -> String
$cshow :: AccountSettings -> String
showsPrec :: Int -> AccountSettings -> ShowS
$cshowsPrec :: Int -> AccountSettings -> ShowS
Prelude.Show, forall x. Rep AccountSettings x -> AccountSettings
forall x. AccountSettings -> Rep AccountSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AccountSettings x -> AccountSettings
$cfrom :: forall x. AccountSettings -> Rep AccountSettings x
Prelude.Generic)
newAccountSettings ::
AccountSettings
newAccountSettings :: AccountSettings
newAccountSettings =
AccountSettings'
{ $sel:pipelineCodebuildRoleArn:AccountSettings' :: Maybe Text
pipelineCodebuildRoleArn =
forall a. Maybe a
Prelude.Nothing,
$sel:pipelineProvisioningRepository:AccountSettings' :: Maybe RepositoryBranch
pipelineProvisioningRepository = forall a. Maybe a
Prelude.Nothing,
$sel:pipelineServiceRoleArn:AccountSettings' :: Maybe Text
pipelineServiceRoleArn = forall a. Maybe a
Prelude.Nothing
}
accountSettings_pipelineCodebuildRoleArn :: Lens.Lens' AccountSettings (Prelude.Maybe Prelude.Text)
accountSettings_pipelineCodebuildRoleArn :: Lens' AccountSettings (Maybe Text)
accountSettings_pipelineCodebuildRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountSettings' {Maybe Text
pipelineCodebuildRoleArn :: Maybe Text
$sel:pipelineCodebuildRoleArn:AccountSettings' :: AccountSettings -> Maybe Text
pipelineCodebuildRoleArn} -> Maybe Text
pipelineCodebuildRoleArn) (\s :: AccountSettings
s@AccountSettings' {} Maybe Text
a -> AccountSettings
s {$sel:pipelineCodebuildRoleArn:AccountSettings' :: Maybe Text
pipelineCodebuildRoleArn = Maybe Text
a} :: AccountSettings)
accountSettings_pipelineProvisioningRepository :: Lens.Lens' AccountSettings (Prelude.Maybe RepositoryBranch)
accountSettings_pipelineProvisioningRepository :: Lens' AccountSettings (Maybe RepositoryBranch)
accountSettings_pipelineProvisioningRepository = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountSettings' {Maybe RepositoryBranch
pipelineProvisioningRepository :: Maybe RepositoryBranch
$sel:pipelineProvisioningRepository:AccountSettings' :: AccountSettings -> Maybe RepositoryBranch
pipelineProvisioningRepository} -> Maybe RepositoryBranch
pipelineProvisioningRepository) (\s :: AccountSettings
s@AccountSettings' {} Maybe RepositoryBranch
a -> AccountSettings
s {$sel:pipelineProvisioningRepository:AccountSettings' :: Maybe RepositoryBranch
pipelineProvisioningRepository = Maybe RepositoryBranch
a} :: AccountSettings)
accountSettings_pipelineServiceRoleArn :: Lens.Lens' AccountSettings (Prelude.Maybe Prelude.Text)
accountSettings_pipelineServiceRoleArn :: Lens' AccountSettings (Maybe Text)
accountSettings_pipelineServiceRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountSettings' {Maybe Text
pipelineServiceRoleArn :: Maybe Text
$sel:pipelineServiceRoleArn:AccountSettings' :: AccountSettings -> Maybe Text
pipelineServiceRoleArn} -> Maybe Text
pipelineServiceRoleArn) (\s :: AccountSettings
s@AccountSettings' {} Maybe Text
a -> AccountSettings
s {$sel:pipelineServiceRoleArn:AccountSettings' :: Maybe Text
pipelineServiceRoleArn = Maybe Text
a} :: AccountSettings)
instance Data.FromJSON AccountSettings where
parseJSON :: Value -> Parser AccountSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AccountSettings"
( \Object
x ->
Maybe Text
-> Maybe RepositoryBranch -> Maybe Text -> AccountSettings
AccountSettings'
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
"pipelineCodebuildRoleArn")
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
"pipelineProvisioningRepository")
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
"pipelineServiceRoleArn")
)
instance Prelude.Hashable AccountSettings where
hashWithSalt :: Int -> AccountSettings -> Int
hashWithSalt Int
_salt AccountSettings' {Maybe Text
Maybe RepositoryBranch
pipelineServiceRoleArn :: Maybe Text
pipelineProvisioningRepository :: Maybe RepositoryBranch
pipelineCodebuildRoleArn :: Maybe Text
$sel:pipelineServiceRoleArn:AccountSettings' :: AccountSettings -> Maybe Text
$sel:pipelineProvisioningRepository:AccountSettings' :: AccountSettings -> Maybe RepositoryBranch
$sel:pipelineCodebuildRoleArn:AccountSettings' :: AccountSettings -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
pipelineCodebuildRoleArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RepositoryBranch
pipelineProvisioningRepository
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
pipelineServiceRoleArn
instance Prelude.NFData AccountSettings where
rnf :: AccountSettings -> ()
rnf AccountSettings' {Maybe Text
Maybe RepositoryBranch
pipelineServiceRoleArn :: Maybe Text
pipelineProvisioningRepository :: Maybe RepositoryBranch
pipelineCodebuildRoleArn :: Maybe Text
$sel:pipelineServiceRoleArn:AccountSettings' :: AccountSettings -> Maybe Text
$sel:pipelineProvisioningRepository:AccountSettings' :: AccountSettings -> Maybe RepositoryBranch
$sel:pipelineCodebuildRoleArn:AccountSettings' :: AccountSettings -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
pipelineCodebuildRoleArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RepositoryBranch
pipelineProvisioningRepository
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
pipelineServiceRoleArn