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

com.pulumi.azurenative.awsconnector.inputs.WebhookArgs Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** 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.azurenative.awsconnector.inputs;

import com.pulumi.azurenative.awsconnector.inputs.FilterGroupArgs;
import com.pulumi.azurenative.awsconnector.inputs.WebhookBuildTypeEnumValueArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Definition of Webhook
 * 
 */
public final class WebhookArgs extends com.pulumi.resources.ResourceArgs {

    public static final WebhookArgs Empty = new WebhookArgs();

    /**
     * <p>A regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If <code>branchFilter</code> is empty, then all branches are built.</p> <note> <p>It is recommended that you use <code>filterGroups</code> instead of <code>branchFilter</code>. </p> </note>
     * 
     */
    @Import(name="branchFilter")
    private @Nullable Output branchFilter;

    /**
     * @return <p>A regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If <code>branchFilter</code> is empty, then all branches are built.</p> <note> <p>It is recommended that you use <code>filterGroups</code> instead of <code>branchFilter</code>. </p> </note>
     * 
     */
    public Optional> branchFilter() {
        return Optional.ofNullable(this.branchFilter);
    }

    /**
     * <p>Specifies the type of build this webhook will trigger.</p>
     * 
     */
    @Import(name="buildType")
    private @Nullable Output buildType;

    /**
     * @return <p>Specifies the type of build this webhook will trigger.</p>
     * 
     */
    public Optional> buildType() {
        return Optional.ofNullable(this.buildType);
    }

    /**
     * <p>An array of arrays of <code>WebhookFilter</code> objects used to determine which webhooks are triggered. At least one <code>WebhookFilter</code> in the array must specify <code>EVENT</code> as its <code>type</code>. </p> <p>For a build to be triggered, at least one filter group in the <code>filterGroups</code> array must pass. For a filter group to pass, each of its filters must pass. </p>
     * 
     */
    @Import(name="filterGroups")
    private @Nullable Output> filterGroups;

    /**
     * @return <p>An array of arrays of <code>WebhookFilter</code> objects used to determine which webhooks are triggered. At least one <code>WebhookFilter</code> in the array must specify <code>EVENT</code> as its <code>type</code>. </p> <p>For a build to be triggered, at least one filter group in the <code>filterGroups</code> array must pass. For a filter group to pass, each of its filters must pass. </p>
     * 
     */
    public Optional>> filterGroups() {
        return Optional.ofNullable(this.filterGroups);
    }

    /**
     * <p>A timestamp that indicates the last time a repository's secret token was modified. </p>
     * 
     */
    @Import(name="lastModifiedSecret")
    private @Nullable Output lastModifiedSecret;

    /**
     * @return <p>A timestamp that indicates the last time a repository's secret token was modified. </p>
     * 
     */
    public Optional> lastModifiedSecret() {
        return Optional.ofNullable(this.lastModifiedSecret);
    }

    /**
     * <p>The CodeBuild endpoint where webhook events are sent.</p>
     * 
     */
    @Import(name="payloadUrl")
    private @Nullable Output payloadUrl;

    /**
     * @return <p>The CodeBuild endpoint where webhook events are sent.</p>
     * 
     */
    public Optional> payloadUrl() {
        return Optional.ofNullable(this.payloadUrl);
    }

    /**
     * <p>The secret token of the associated repository. </p> <note> <p>A Bitbucket webhook does not support <code>secret</code>. </p> </note>
     * 
     */
    @Import(name="secret")
    private @Nullable Output secret;

    /**
     * @return <p>The secret token of the associated repository. </p> <note> <p>A Bitbucket webhook does not support <code>secret</code>. </p> </note>
     * 
     */
    public Optional> secret() {
        return Optional.ofNullable(this.secret);
    }

    /**
     * <p>The URL to the webhook.</p>
     * 
     */
    @Import(name="url")
    private @Nullable Output url;

    /**
     * @return <p>The URL to the webhook.</p>
     * 
     */
    public Optional> url() {
        return Optional.ofNullable(this.url);
    }

    private WebhookArgs() {}

    private WebhookArgs(WebhookArgs $) {
        this.branchFilter = $.branchFilter;
        this.buildType = $.buildType;
        this.filterGroups = $.filterGroups;
        this.lastModifiedSecret = $.lastModifiedSecret;
        this.payloadUrl = $.payloadUrl;
        this.secret = $.secret;
        this.url = $.url;
    }

    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 <p>A regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If <code>branchFilter</code> is empty, then all branches are built.</p> <note> <p>It is recommended that you use <code>filterGroups</code> instead of <code>branchFilter</code>. </p> </note>
         * 
         * @return builder
         * 
         */
        public Builder branchFilter(@Nullable Output branchFilter) {
            $.branchFilter = branchFilter;
            return this;
        }

        /**
         * @param branchFilter <p>A regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If <code>branchFilter</code> is empty, then all branches are built.</p> <note> <p>It is recommended that you use <code>filterGroups</code> instead of <code>branchFilter</code>. </p> </note>
         * 
         * @return builder
         * 
         */
        public Builder branchFilter(String branchFilter) {
            return branchFilter(Output.of(branchFilter));
        }

        /**
         * @param buildType <p>Specifies the type of build this webhook will trigger.</p>
         * 
         * @return builder
         * 
         */
        public Builder buildType(@Nullable Output buildType) {
            $.buildType = buildType;
            return this;
        }

        /**
         * @param buildType <p>Specifies the type of build this webhook will trigger.</p>
         * 
         * @return builder
         * 
         */
        public Builder buildType(WebhookBuildTypeEnumValueArgs buildType) {
            return buildType(Output.of(buildType));
        }

        /**
         * @param filterGroups <p>An array of arrays of <code>WebhookFilter</code> objects used to determine which webhooks are triggered. At least one <code>WebhookFilter</code> in the array must specify <code>EVENT</code> as its <code>type</code>. </p> <p>For a build to be triggered, at least one filter group in the <code>filterGroups</code> array must pass. For a filter group to pass, each of its filters must pass. </p>
         * 
         * @return builder
         * 
         */
        public Builder filterGroups(@Nullable Output> filterGroups) {
            $.filterGroups = filterGroups;
            return this;
        }

        /**
         * @param filterGroups <p>An array of arrays of <code>WebhookFilter</code> objects used to determine which webhooks are triggered. At least one <code>WebhookFilter</code> in the array must specify <code>EVENT</code> as its <code>type</code>. </p> <p>For a build to be triggered, at least one filter group in the <code>filterGroups</code> array must pass. For a filter group to pass, each of its filters must pass. </p>
         * 
         * @return builder
         * 
         */
        public Builder filterGroups(List filterGroups) {
            return filterGroups(Output.of(filterGroups));
        }

        /**
         * @param filterGroups <p>An array of arrays of <code>WebhookFilter</code> objects used to determine which webhooks are triggered. At least one <code>WebhookFilter</code> in the array must specify <code>EVENT</code> as its <code>type</code>. </p> <p>For a build to be triggered, at least one filter group in the <code>filterGroups</code> array must pass. For a filter group to pass, each of its filters must pass. </p>
         * 
         * @return builder
         * 
         */
        public Builder filterGroups(FilterGroupArgs... filterGroups) {
            return filterGroups(List.of(filterGroups));
        }

        /**
         * @param lastModifiedSecret <p>A timestamp that indicates the last time a repository's secret token was modified. </p>
         * 
         * @return builder
         * 
         */
        public Builder lastModifiedSecret(@Nullable Output lastModifiedSecret) {
            $.lastModifiedSecret = lastModifiedSecret;
            return this;
        }

        /**
         * @param lastModifiedSecret <p>A timestamp that indicates the last time a repository's secret token was modified. </p>
         * 
         * @return builder
         * 
         */
        public Builder lastModifiedSecret(String lastModifiedSecret) {
            return lastModifiedSecret(Output.of(lastModifiedSecret));
        }

        /**
         * @param payloadUrl <p>The CodeBuild endpoint where webhook events are sent.</p>
         * 
         * @return builder
         * 
         */
        public Builder payloadUrl(@Nullable Output payloadUrl) {
            $.payloadUrl = payloadUrl;
            return this;
        }

        /**
         * @param payloadUrl <p>The CodeBuild endpoint where webhook events are sent.</p>
         * 
         * @return builder
         * 
         */
        public Builder payloadUrl(String payloadUrl) {
            return payloadUrl(Output.of(payloadUrl));
        }

        /**
         * @param secret <p>The secret token of the associated repository. </p> <note> <p>A Bitbucket webhook does not support <code>secret</code>. </p> </note>
         * 
         * @return builder
         * 
         */
        public Builder secret(@Nullable Output secret) {
            $.secret = secret;
            return this;
        }

        /**
         * @param secret <p>The secret token of the associated repository. </p> <note> <p>A Bitbucket webhook does not support <code>secret</code>. </p> </note>
         * 
         * @return builder
         * 
         */
        public Builder secret(String secret) {
            return secret(Output.of(secret));
        }

        /**
         * @param url <p>The URL to the webhook.</p>
         * 
         * @return builder
         * 
         */
        public Builder url(@Nullable Output url) {
            $.url = url;
            return this;
        }

        /**
         * @param url <p>The URL to the webhook.</p>
         * 
         * @return builder
         * 
         */
        public Builder url(String url) {
            return url(Output.of(url));
        }

        public WebhookArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy