All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.codebuild.WebhookArgs Maven / Gradle / Ivy

// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.codebuild;

import com.pulumi.aws.codebuild.inputs.WebhookFilterGroupArgs;
import com.pulumi.aws.codebuild.inputs.WebhookScopeConfigurationArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class WebhookArgs extends com.pulumi.resources.ResourceArgs {

    public static final WebhookArgs Empty = new WebhookArgs();

    /**
     * A regular expression used to determine which branches get built. Default is all branches are built. We recommend using `filter_group` over `branch_filter`.
     * 
     */
    @Import(name="branchFilter")
    private @Nullable Output branchFilter;

    /**
     * @return A regular expression used to determine which branches get built. Default is all branches are built. We recommend using `filter_group` over `branch_filter`.
     * 
     */
    public Optional> branchFilter() {
        return Optional.ofNullable(this.branchFilter);
    }

    /**
     * The type of build this webhook will trigger. Valid values for this parameter are: `BUILD`, `BUILD_BATCH`.
     * 
     */
    @Import(name="buildType")
    private @Nullable Output buildType;

    /**
     * @return The type of build this webhook will trigger. Valid values for this parameter are: `BUILD`, `BUILD_BATCH`.
     * 
     */
    public Optional> buildType() {
        return Optional.ofNullable(this.buildType);
    }

    /**
     * Information about the webhook's trigger. Filter group blocks are documented below.
     * 
     */
    @Import(name="filterGroups")
    private @Nullable Output> filterGroups;

    /**
     * @return Information about the webhook's trigger. Filter group blocks are documented below.
     * 
     */
    public Optional>> filterGroups() {
        return Optional.ofNullable(this.filterGroups);
    }

    /**
     * The name of the build project.
     * 
     */
    @Import(name="projectName", required=true)
    private Output projectName;

    /**
     * @return The name of the build project.
     * 
     */
    public Output projectName() {
        return this.projectName;
    }

    /**
     * Scope configuration for global or organization webhooks. Scope configuration blocks are documented below.
     * 
     */
    @Import(name="scopeConfiguration")
    private @Nullable Output scopeConfiguration;

    /**
     * @return Scope configuration for global or organization webhooks. Scope configuration blocks are documented below.
     * 
     */
    public Optional> scopeConfiguration() {
        return Optional.ofNullable(this.scopeConfiguration);
    }

    private WebhookArgs() {}

    private WebhookArgs(WebhookArgs $) {
        this.branchFilter = $.branchFilter;
        this.buildType = $.buildType;
        this.filterGroups = $.filterGroups;
        this.projectName = $.projectName;
        this.scopeConfiguration = $.scopeConfiguration;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(WebhookArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private WebhookArgs $;

        public Builder() {
            $ = new WebhookArgs();
        }

        public Builder(WebhookArgs defaults) {
            $ = new WebhookArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param branchFilter A regular expression used to determine which branches get built. Default is all branches are built. We recommend using `filter_group` over `branch_filter`.
         * 
         * @return builder
         * 
         */
        public Builder branchFilter(@Nullable Output branchFilter) {
            $.branchFilter = branchFilter;
            return this;
        }

        /**
         * @param branchFilter A regular expression used to determine which branches get built. Default is all branches are built. We recommend using `filter_group` over `branch_filter`.
         * 
         * @return builder
         * 
         */
        public Builder branchFilter(String branchFilter) {
            return branchFilter(Output.of(branchFilter));
        }

        /**
         * @param buildType The type of build this webhook will trigger. Valid values for this parameter are: `BUILD`, `BUILD_BATCH`.
         * 
         * @return builder
         * 
         */
        public Builder buildType(@Nullable Output buildType) {
            $.buildType = buildType;
            return this;
        }

        /**
         * @param buildType The type of build this webhook will trigger. Valid values for this parameter are: `BUILD`, `BUILD_BATCH`.
         * 
         * @return builder
         * 
         */
        public Builder buildType(String buildType) {
            return buildType(Output.of(buildType));
        }

        /**
         * @param filterGroups Information about the webhook's trigger. Filter group blocks are documented below.
         * 
         * @return builder
         * 
         */
        public Builder filterGroups(@Nullable Output> filterGroups) {
            $.filterGroups = filterGroups;
            return this;
        }

        /**
         * @param filterGroups Information about the webhook's trigger. Filter group blocks are documented below.
         * 
         * @return builder
         * 
         */
        public Builder filterGroups(List filterGroups) {
            return filterGroups(Output.of(filterGroups));
        }

        /**
         * @param filterGroups Information about the webhook's trigger. Filter group blocks are documented below.
         * 
         * @return builder
         * 
         */
        public Builder filterGroups(WebhookFilterGroupArgs... filterGroups) {
            return filterGroups(List.of(filterGroups));
        }

        /**
         * @param projectName The name of the build project.
         * 
         * @return builder
         * 
         */
        public Builder projectName(Output projectName) {
            $.projectName = projectName;
            return this;
        }

        /**
         * @param projectName The name of the build project.
         * 
         * @return builder
         * 
         */
        public Builder projectName(String projectName) {
            return projectName(Output.of(projectName));
        }

        /**
         * @param scopeConfiguration Scope configuration for global or organization webhooks. Scope configuration blocks are documented below.
         * 
         * @return builder
         * 
         */
        public Builder scopeConfiguration(@Nullable Output scopeConfiguration) {
            $.scopeConfiguration = scopeConfiguration;
            return this;
        }

        /**
         * @param scopeConfiguration Scope configuration for global or organization webhooks. Scope configuration blocks are documented below.
         * 
         * @return builder
         * 
         */
        public Builder scopeConfiguration(WebhookScopeConfigurationArgs scopeConfiguration) {
            return scopeConfiguration(Output.of(scopeConfiguration));
        }

        public WebhookArgs build() {
            if ($.projectName == null) {
                throw new MissingRequiredPropertyException("WebhookArgs", "projectName");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy