module Stratosphere.CodeBuild.Project.PullRequestBuildPolicyProperty (
PullRequestBuildPolicyProperty(..),
mkPullRequestBuildPolicyProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PullRequestBuildPolicyProperty
=
PullRequestBuildPolicyProperty {PullRequestBuildPolicyProperty -> ()
haddock_workaround_ :: (),
PullRequestBuildPolicyProperty -> Maybe (ValueList Text)
approverRoles :: (Prelude.Maybe (ValueList Prelude.Text)),
:: (Value Prelude.Text)}
deriving stock (PullRequestBuildPolicyProperty
-> PullRequestBuildPolicyProperty -> Bool
(PullRequestBuildPolicyProperty
-> PullRequestBuildPolicyProperty -> Bool)
-> (PullRequestBuildPolicyProperty
-> PullRequestBuildPolicyProperty -> Bool)
-> Eq PullRequestBuildPolicyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PullRequestBuildPolicyProperty
-> PullRequestBuildPolicyProperty -> Bool
== :: PullRequestBuildPolicyProperty
-> PullRequestBuildPolicyProperty -> Bool
$c/= :: PullRequestBuildPolicyProperty
-> PullRequestBuildPolicyProperty -> Bool
/= :: PullRequestBuildPolicyProperty
-> PullRequestBuildPolicyProperty -> Bool
Prelude.Eq, Int -> PullRequestBuildPolicyProperty -> ShowS
[PullRequestBuildPolicyProperty] -> ShowS
PullRequestBuildPolicyProperty -> String
(Int -> PullRequestBuildPolicyProperty -> ShowS)
-> (PullRequestBuildPolicyProperty -> String)
-> ([PullRequestBuildPolicyProperty] -> ShowS)
-> Show PullRequestBuildPolicyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PullRequestBuildPolicyProperty -> ShowS
showsPrec :: Int -> PullRequestBuildPolicyProperty -> ShowS
$cshow :: PullRequestBuildPolicyProperty -> String
show :: PullRequestBuildPolicyProperty -> String
$cshowList :: [PullRequestBuildPolicyProperty] -> ShowS
showList :: [PullRequestBuildPolicyProperty] -> ShowS
Prelude.Show)
mkPullRequestBuildPolicyProperty ::
Value Prelude.Text -> PullRequestBuildPolicyProperty
mkPullRequestBuildPolicyProperty :: Value Text -> PullRequestBuildPolicyProperty
mkPullRequestBuildPolicyProperty Value Text
requiresCommentApproval
= PullRequestBuildPolicyProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (),
requiresCommentApproval :: Value Text
requiresCommentApproval = Value Text
requiresCommentApproval,
approverRoles :: Maybe (ValueList Text)
approverRoles = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PullRequestBuildPolicyProperty where
toResourceProperties :: PullRequestBuildPolicyProperty -> ResourceProperties
toResourceProperties PullRequestBuildPolicyProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: PullRequestBuildPolicyProperty -> ()
approverRoles :: PullRequestBuildPolicyProperty -> Maybe (ValueList Text)
requiresCommentApproval :: PullRequestBuildPolicyProperty -> Value Text
haddock_workaround_ :: ()
approverRoles :: Maybe (ValueList Text)
requiresCommentApproval :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::CodeBuild::Project.PullRequestBuildPolicy",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"RequiresCommentApproval" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
requiresCommentApproval]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ApproverRoles" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
approverRoles]))}
instance JSON.ToJSON PullRequestBuildPolicyProperty where
toJSON :: PullRequestBuildPolicyProperty -> Value
toJSON PullRequestBuildPolicyProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: PullRequestBuildPolicyProperty -> ()
approverRoles :: PullRequestBuildPolicyProperty -> Maybe (ValueList Text)
requiresCommentApproval :: PullRequestBuildPolicyProperty -> Value Text
haddock_workaround_ :: ()
approverRoles :: Maybe (ValueList Text)
requiresCommentApproval :: Value Text
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"RequiresCommentApproval" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
requiresCommentApproval]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ApproverRoles" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
approverRoles])))
instance Property "ApproverRoles" PullRequestBuildPolicyProperty where
type PropertyType "ApproverRoles" PullRequestBuildPolicyProperty = ValueList Prelude.Text
set :: PropertyType "ApproverRoles" PullRequestBuildPolicyProperty
-> PullRequestBuildPolicyProperty -> PullRequestBuildPolicyProperty
set PropertyType "ApproverRoles" PullRequestBuildPolicyProperty
newValue PullRequestBuildPolicyProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: PullRequestBuildPolicyProperty -> ()
approverRoles :: PullRequestBuildPolicyProperty -> Maybe (ValueList Text)
requiresCommentApproval :: PullRequestBuildPolicyProperty -> Value Text
haddock_workaround_ :: ()
approverRoles :: Maybe (ValueList Text)
requiresCommentApproval :: Value Text
..}
= PullRequestBuildPolicyProperty
{approverRoles :: Maybe (ValueList Text)
approverRoles = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ApproverRoles" PullRequestBuildPolicyProperty
ValueList Text
newValue, ()
Value Text
haddock_workaround_ :: ()
requiresCommentApproval :: Value Text
haddock_workaround_ :: ()
requiresCommentApproval :: Value Text
..}
instance Property "RequiresCommentApproval" PullRequestBuildPolicyProperty where
type PropertyType "RequiresCommentApproval" PullRequestBuildPolicyProperty = Value Prelude.Text
set :: PropertyType
"RequiresCommentApproval" PullRequestBuildPolicyProperty
-> PullRequestBuildPolicyProperty -> PullRequestBuildPolicyProperty
set PropertyType
"RequiresCommentApproval" PullRequestBuildPolicyProperty
newValue PullRequestBuildPolicyProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: PullRequestBuildPolicyProperty -> ()
approverRoles :: PullRequestBuildPolicyProperty -> Maybe (ValueList Text)
requiresCommentApproval :: PullRequestBuildPolicyProperty -> Value Text
haddock_workaround_ :: ()
approverRoles :: Maybe (ValueList Text)
requiresCommentApproval :: Value Text
..}
= PullRequestBuildPolicyProperty
{requiresCommentApproval :: Value Text
requiresCommentApproval = PropertyType
"RequiresCommentApproval" PullRequestBuildPolicyProperty
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
approverRoles :: Maybe (ValueList Text)
haddock_workaround_ :: ()
approverRoles :: Maybe (ValueList Text)
..}