# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities

__all__ = [
    'PipelineProviderSettingsArgs',
    'PipelineTeamArgs',
]

@pulumi.input_type
class PipelineProviderSettingsArgs:
    def __init__(__self__, *,
                 build_branches: Optional[pulumi.Input[bool]] = None,
                 build_pull_request_forks: Optional[pulumi.Input[bool]] = None,
                 build_pull_request_labels_changed: Optional[pulumi.Input[bool]] = None,
                 build_pull_request_ready_for_review: Optional[pulumi.Input[bool]] = None,
                 build_pull_requests: Optional[pulumi.Input[bool]] = None,
                 build_tags: Optional[pulumi.Input[bool]] = None,
                 cancel_deleted_branch_builds: Optional[pulumi.Input[bool]] = None,
                 filter_condition: Optional[pulumi.Input[str]] = None,
                 filter_enabled: Optional[pulumi.Input[bool]] = None,
                 prefix_pull_request_fork_branch_names: Optional[pulumi.Input[bool]] = None,
                 publish_blocked_as_pending: Optional[pulumi.Input[bool]] = None,
                 publish_commit_status: Optional[pulumi.Input[bool]] = None,
                 publish_commit_status_per_step: Optional[pulumi.Input[bool]] = None,
                 pull_request_branch_filter_configuration: Optional[pulumi.Input[str]] = None,
                 pull_request_branch_filter_enabled: Optional[pulumi.Input[bool]] = None,
                 separate_pull_request_statuses: Optional[pulumi.Input[bool]] = None,
                 skip_pull_request_builds_for_existing_commits: Optional[pulumi.Input[bool]] = None,
                 trigger_mode: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[bool] build_branches: Whether to create builds when branches are pushed.
        :param pulumi.Input[bool] build_pull_request_forks: Whether to create builds for pull requests from third-party forks.
        :param pulumi.Input[bool] build_pull_request_labels_changed: Whether to create builds for pull requests when labels are added or removed.
        :param pulumi.Input[bool] build_pull_requests: Whether to create builds for commits that are part of a Pull Request.
        :param pulumi.Input[bool] build_tags: Whether to create builds when tags are pushed.
        :param pulumi.Input[bool] cancel_deleted_branch_builds: A boolean to enable automatically cancelling any running builds for a branch if the branch is deleted.
        :param pulumi.Input[str] filter_condition: The condition to evaluate when deciding if a build should run. More details available in [the documentation](https://buildkite.com/docs/pipelines/conditionals#conditionals-in-pipelines)
        :param pulumi.Input[bool] filter_enabled: [true/false] Whether to filter builds to only run when the condition in `filter_condition` is true
        :param pulumi.Input[bool] prefix_pull_request_fork_branch_names: Prefix branch names for third-party fork builds to ensure they don't trigger branch conditions. For example, the `master` branch from `some-user` will become `some-user:master`.
        :param pulumi.Input[bool] publish_blocked_as_pending: The status to use for blocked builds. Pending can be used with [required status checks](https://help.github.com/en/articles/enabling-required-status-checks) to prevent merging pull requests with blocked builds.
        :param pulumi.Input[bool] publish_commit_status: Whether to update the status of commits in Bitbucket or GitHub.
        :param pulumi.Input[bool] publish_commit_status_per_step: Whether to create a separate status for each job in a build, allowing you to see the status of each job directly in Bitbucket or GitHub.
        :param pulumi.Input[str] pull_request_branch_filter_configuration: The branch filtering pattern. Only pull requests on branches matching this pattern will cause builds to be created.
        :param pulumi.Input[bool] pull_request_branch_filter_enabled: Whether to limit the creation of builds to specific branches or patterns.
        :param pulumi.Input[bool] separate_pull_request_statuses: Whether to create a separate status for pull request builds, allowing you to require a passing pull request build in your [required status checks](https://help.github.com/en/articles/enabling-required-status-checks) in GitHub.
        :param pulumi.Input[bool] skip_pull_request_builds_for_existing_commits: Whether to skip creating a new build for a pull request if an existing build for the commit and branch already exists.
        :param pulumi.Input[str] trigger_mode: What type of event to trigger builds on. Must be one of:
        """
        if build_branches is not None:
            pulumi.set(__self__, "build_branches", build_branches)
        if build_pull_request_forks is not None:
            pulumi.set(__self__, "build_pull_request_forks", build_pull_request_forks)
        if build_pull_request_labels_changed is not None:
            pulumi.set(__self__, "build_pull_request_labels_changed", build_pull_request_labels_changed)
        if build_pull_request_ready_for_review is not None:
            pulumi.set(__self__, "build_pull_request_ready_for_review", build_pull_request_ready_for_review)
        if build_pull_requests is not None:
            pulumi.set(__self__, "build_pull_requests", build_pull_requests)
        if build_tags is not None:
            pulumi.set(__self__, "build_tags", build_tags)
        if cancel_deleted_branch_builds is not None:
            pulumi.set(__self__, "cancel_deleted_branch_builds", cancel_deleted_branch_builds)
        if filter_condition is not None:
            pulumi.set(__self__, "filter_condition", filter_condition)
        if filter_enabled is not None:
            pulumi.set(__self__, "filter_enabled", filter_enabled)
        if prefix_pull_request_fork_branch_names is not None:
            pulumi.set(__self__, "prefix_pull_request_fork_branch_names", prefix_pull_request_fork_branch_names)
        if publish_blocked_as_pending is not None:
            pulumi.set(__self__, "publish_blocked_as_pending", publish_blocked_as_pending)
        if publish_commit_status is not None:
            pulumi.set(__self__, "publish_commit_status", publish_commit_status)
        if publish_commit_status_per_step is not None:
            pulumi.set(__self__, "publish_commit_status_per_step", publish_commit_status_per_step)
        if pull_request_branch_filter_configuration is not None:
            pulumi.set(__self__, "pull_request_branch_filter_configuration", pull_request_branch_filter_configuration)
        if pull_request_branch_filter_enabled is not None:
            pulumi.set(__self__, "pull_request_branch_filter_enabled", pull_request_branch_filter_enabled)
        if separate_pull_request_statuses is not None:
            pulumi.set(__self__, "separate_pull_request_statuses", separate_pull_request_statuses)
        if skip_pull_request_builds_for_existing_commits is not None:
            pulumi.set(__self__, "skip_pull_request_builds_for_existing_commits", skip_pull_request_builds_for_existing_commits)
        if trigger_mode is not None:
            pulumi.set(__self__, "trigger_mode", trigger_mode)

    @property
    @pulumi.getter(name="buildBranches")
    def build_branches(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether to create builds when branches are pushed.
        """
        return pulumi.get(self, "build_branches")

    @build_branches.setter
    def build_branches(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "build_branches", value)

    @property
    @pulumi.getter(name="buildPullRequestForks")
    def build_pull_request_forks(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether to create builds for pull requests from third-party forks.
        """
        return pulumi.get(self, "build_pull_request_forks")

    @build_pull_request_forks.setter
    def build_pull_request_forks(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "build_pull_request_forks", value)

    @property
    @pulumi.getter(name="buildPullRequestLabelsChanged")
    def build_pull_request_labels_changed(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether to create builds for pull requests when labels are added or removed.
        """
        return pulumi.get(self, "build_pull_request_labels_changed")

    @build_pull_request_labels_changed.setter
    def build_pull_request_labels_changed(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "build_pull_request_labels_changed", value)

    @property
    @pulumi.getter(name="buildPullRequestReadyForReview")
    def build_pull_request_ready_for_review(self) -> Optional[pulumi.Input[bool]]:
        return pulumi.get(self, "build_pull_request_ready_for_review")

    @build_pull_request_ready_for_review.setter
    def build_pull_request_ready_for_review(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "build_pull_request_ready_for_review", value)

    @property
    @pulumi.getter(name="buildPullRequests")
    def build_pull_requests(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether to create builds for commits that are part of a Pull Request.
        """
        return pulumi.get(self, "build_pull_requests")

    @build_pull_requests.setter
    def build_pull_requests(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "build_pull_requests", value)

    @property
    @pulumi.getter(name="buildTags")
    def build_tags(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether to create builds when tags are pushed.
        """
        return pulumi.get(self, "build_tags")

    @build_tags.setter
    def build_tags(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "build_tags", value)

    @property
    @pulumi.getter(name="cancelDeletedBranchBuilds")
    def cancel_deleted_branch_builds(self) -> Optional[pulumi.Input[bool]]:
        """
        A boolean to enable automatically cancelling any running builds for a branch if the branch is deleted.
        """
        return pulumi.get(self, "cancel_deleted_branch_builds")

    @cancel_deleted_branch_builds.setter
    def cancel_deleted_branch_builds(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "cancel_deleted_branch_builds", value)

    @property
    @pulumi.getter(name="filterCondition")
    def filter_condition(self) -> Optional[pulumi.Input[str]]:
        """
        The condition to evaluate when deciding if a build should run. More details available in [the documentation](https://buildkite.com/docs/pipelines/conditionals#conditionals-in-pipelines)
        """
        return pulumi.get(self, "filter_condition")

    @filter_condition.setter
    def filter_condition(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "filter_condition", value)

    @property
    @pulumi.getter(name="filterEnabled")
    def filter_enabled(self) -> Optional[pulumi.Input[bool]]:
        """
        [true/false] Whether to filter builds to only run when the condition in `filter_condition` is true
        """
        return pulumi.get(self, "filter_enabled")

    @filter_enabled.setter
    def filter_enabled(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "filter_enabled", value)

    @property
    @pulumi.getter(name="prefixPullRequestForkBranchNames")
    def prefix_pull_request_fork_branch_names(self) -> Optional[pulumi.Input[bool]]:
        """
        Prefix branch names for third-party fork builds to ensure they don't trigger branch conditions. For example, the `master` branch from `some-user` will become `some-user:master`.
        """
        return pulumi.get(self, "prefix_pull_request_fork_branch_names")

    @prefix_pull_request_fork_branch_names.setter
    def prefix_pull_request_fork_branch_names(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "prefix_pull_request_fork_branch_names", value)

    @property
    @pulumi.getter(name="publishBlockedAsPending")
    def publish_blocked_as_pending(self) -> Optional[pulumi.Input[bool]]:
        """
        The status to use for blocked builds. Pending can be used with [required status checks](https://help.github.com/en/articles/enabling-required-status-checks) to prevent merging pull requests with blocked builds.
        """
        return pulumi.get(self, "publish_blocked_as_pending")

    @publish_blocked_as_pending.setter
    def publish_blocked_as_pending(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "publish_blocked_as_pending", value)

    @property
    @pulumi.getter(name="publishCommitStatus")
    def publish_commit_status(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether to update the status of commits in Bitbucket or GitHub.
        """
        return pulumi.get(self, "publish_commit_status")

    @publish_commit_status.setter
    def publish_commit_status(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "publish_commit_status", value)

    @property
    @pulumi.getter(name="publishCommitStatusPerStep")
    def publish_commit_status_per_step(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether to create a separate status for each job in a build, allowing you to see the status of each job directly in Bitbucket or GitHub.
        """
        return pulumi.get(self, "publish_commit_status_per_step")

    @publish_commit_status_per_step.setter
    def publish_commit_status_per_step(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "publish_commit_status_per_step", value)

    @property
    @pulumi.getter(name="pullRequestBranchFilterConfiguration")
    def pull_request_branch_filter_configuration(self) -> Optional[pulumi.Input[str]]:
        """
        The branch filtering pattern. Only pull requests on branches matching this pattern will cause builds to be created.
        """
        return pulumi.get(self, "pull_request_branch_filter_configuration")

    @pull_request_branch_filter_configuration.setter
    def pull_request_branch_filter_configuration(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "pull_request_branch_filter_configuration", value)

    @property
    @pulumi.getter(name="pullRequestBranchFilterEnabled")
    def pull_request_branch_filter_enabled(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether to limit the creation of builds to specific branches or patterns.
        """
        return pulumi.get(self, "pull_request_branch_filter_enabled")

    @pull_request_branch_filter_enabled.setter
    def pull_request_branch_filter_enabled(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "pull_request_branch_filter_enabled", value)

    @property
    @pulumi.getter(name="separatePullRequestStatuses")
    def separate_pull_request_statuses(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether to create a separate status for pull request builds, allowing you to require a passing pull request build in your [required status checks](https://help.github.com/en/articles/enabling-required-status-checks) in GitHub.
        """
        return pulumi.get(self, "separate_pull_request_statuses")

    @separate_pull_request_statuses.setter
    def separate_pull_request_statuses(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "separate_pull_request_statuses", value)

    @property
    @pulumi.getter(name="skipPullRequestBuildsForExistingCommits")
    def skip_pull_request_builds_for_existing_commits(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether to skip creating a new build for a pull request if an existing build for the commit and branch already exists.
        """
        return pulumi.get(self, "skip_pull_request_builds_for_existing_commits")

    @skip_pull_request_builds_for_existing_commits.setter
    def skip_pull_request_builds_for_existing_commits(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "skip_pull_request_builds_for_existing_commits", value)

    @property
    @pulumi.getter(name="triggerMode")
    def trigger_mode(self) -> Optional[pulumi.Input[str]]:
        """
        What type of event to trigger builds on. Must be one of:
        """
        return pulumi.get(self, "trigger_mode")

    @trigger_mode.setter
    def trigger_mode(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "trigger_mode", value)


@pulumi.input_type
class PipelineTeamArgs:
    def __init__(__self__, *,
                 access_level: pulumi.Input[str],
                 slug: pulumi.Input[str]):
        """
        :param pulumi.Input[str] access_level: The level of access to grant. Must be one of `READ_ONLY`, `BUILD_AND_READ` or `MANAGE_BUILD_AND_READ`.
        :param pulumi.Input[str] slug: The buildkite slug of the team.
        """
        pulumi.set(__self__, "access_level", access_level)
        pulumi.set(__self__, "slug", slug)

    @property
    @pulumi.getter(name="accessLevel")
    def access_level(self) -> pulumi.Input[str]:
        """
        The level of access to grant. Must be one of `READ_ONLY`, `BUILD_AND_READ` or `MANAGE_BUILD_AND_READ`.
        """
        return pulumi.get(self, "access_level")

    @access_level.setter
    def access_level(self, value: pulumi.Input[str]):
        pulumi.set(self, "access_level", value)

    @property
    @pulumi.getter
    def slug(self) -> pulumi.Input[str]:
        """
        The buildkite slug of the team.
        """
        return pulumi.get(self, "slug")

    @slug.setter
    def slug(self, value: pulumi.Input[str]):
        pulumi.set(self, "slug", value)


