// *** 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.gcp.cloudbuild.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.gcp.cloudbuild.inputs.TriggerGithubPullRequestArgs;
import com.pulumi.gcp.cloudbuild.inputs.TriggerGithubPushArgs;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final TriggerGithubArgs Empty = new TriggerGithubArgs();

    /**
     * The resource name of the github enterprise config that should be applied to this installation.
     * For example: &#34;projects/{$projectId}/locations/{$locationId}/githubEnterpriseConfigs/{$configId}&#34;
     * 
     */
    @Import(name="enterpriseConfigResourceName")
    private @Nullable Output<String> enterpriseConfigResourceName;

    /**
     * @return The resource name of the github enterprise config that should be applied to this installation.
     * For example: &#34;projects/{$projectId}/locations/{$locationId}/githubEnterpriseConfigs/{$configId}&#34;
     * 
     */
    public Optional<Output<String>> enterpriseConfigResourceName() {
        return Optional.ofNullable(this.enterpriseConfigResourceName);
    }

    /**
     * Name of the repository. For example: The name for
     * https://github.com/googlecloudplatform/cloud-builders is &#34;cloud-builders&#34;.
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return Name of the repository. For example: The name for
     * https://github.com/googlecloudplatform/cloud-builders is &#34;cloud-builders&#34;.
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Owner of the repository. For example: The owner for
     * https://github.com/googlecloudplatform/cloud-builders is &#34;googlecloudplatform&#34;.
     * 
     */
    @Import(name="owner")
    private @Nullable Output<String> owner;

    /**
     * @return Owner of the repository. For example: The owner for
     * https://github.com/googlecloudplatform/cloud-builders is &#34;googlecloudplatform&#34;.
     * 
     */
    public Optional<Output<String>> owner() {
        return Optional.ofNullable(this.owner);
    }

    /**
     * filter to match changes in pull requests. Specify only one of `pull_request` or `push`.
     * Structure is documented below.
     * 
     */
    @Import(name="pullRequest")
    private @Nullable Output<TriggerGithubPullRequestArgs> pullRequest;

    /**
     * @return filter to match changes in pull requests. Specify only one of `pull_request` or `push`.
     * Structure is documented below.
     * 
     */
    public Optional<Output<TriggerGithubPullRequestArgs>> pullRequest() {
        return Optional.ofNullable(this.pullRequest);
    }

    /**
     * filter to match changes in refs, like branches or tags. Specify only one of `pull_request` or `push`.
     * Structure is documented below.
     * 
     */
    @Import(name="push")
    private @Nullable Output<TriggerGithubPushArgs> push;

    /**
     * @return filter to match changes in refs, like branches or tags. Specify only one of `pull_request` or `push`.
     * Structure is documented below.
     * 
     */
    public Optional<Output<TriggerGithubPushArgs>> push() {
        return Optional.ofNullable(this.push);
    }

    private TriggerGithubArgs() {}

    private TriggerGithubArgs(TriggerGithubArgs $) {
        this.enterpriseConfigResourceName = $.enterpriseConfigResourceName;
        this.name = $.name;
        this.owner = $.owner;
        this.pullRequest = $.pullRequest;
        this.push = $.push;
    }

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

    public static final class Builder {
        private TriggerGithubArgs $;

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

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

        /**
         * @param enterpriseConfigResourceName The resource name of the github enterprise config that should be applied to this installation.
         * For example: &#34;projects/{$projectId}/locations/{$locationId}/githubEnterpriseConfigs/{$configId}&#34;
         * 
         * @return builder
         * 
         */
        public Builder enterpriseConfigResourceName(@Nullable Output<String> enterpriseConfigResourceName) {
            $.enterpriseConfigResourceName = enterpriseConfigResourceName;
            return this;
        }

        /**
         * @param enterpriseConfigResourceName The resource name of the github enterprise config that should be applied to this installation.
         * For example: &#34;projects/{$projectId}/locations/{$locationId}/githubEnterpriseConfigs/{$configId}&#34;
         * 
         * @return builder
         * 
         */
        public Builder enterpriseConfigResourceName(String enterpriseConfigResourceName) {
            return enterpriseConfigResourceName(Output.of(enterpriseConfigResourceName));
        }

        /**
         * @param name Name of the repository. For example: The name for
         * https://github.com/googlecloudplatform/cloud-builders is &#34;cloud-builders&#34;.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Name of the repository. For example: The name for
         * https://github.com/googlecloudplatform/cloud-builders is &#34;cloud-builders&#34;.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param owner Owner of the repository. For example: The owner for
         * https://github.com/googlecloudplatform/cloud-builders is &#34;googlecloudplatform&#34;.
         * 
         * @return builder
         * 
         */
        public Builder owner(@Nullable Output<String> owner) {
            $.owner = owner;
            return this;
        }

        /**
         * @param owner Owner of the repository. For example: The owner for
         * https://github.com/googlecloudplatform/cloud-builders is &#34;googlecloudplatform&#34;.
         * 
         * @return builder
         * 
         */
        public Builder owner(String owner) {
            return owner(Output.of(owner));
        }

        /**
         * @param pullRequest filter to match changes in pull requests. Specify only one of `pull_request` or `push`.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder pullRequest(@Nullable Output<TriggerGithubPullRequestArgs> pullRequest) {
            $.pullRequest = pullRequest;
            return this;
        }

        /**
         * @param pullRequest filter to match changes in pull requests. Specify only one of `pull_request` or `push`.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder pullRequest(TriggerGithubPullRequestArgs pullRequest) {
            return pullRequest(Output.of(pullRequest));
        }

        /**
         * @param push filter to match changes in refs, like branches or tags. Specify only one of `pull_request` or `push`.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder push(@Nullable Output<TriggerGithubPushArgs> push) {
            $.push = push;
            return this;
        }

        /**
         * @param push filter to match changes in refs, like branches or tags. Specify only one of `pull_request` or `push`.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder push(TriggerGithubPushArgs push) {
            return push(Output.of(push));
        }

        public TriggerGithubArgs build() {
            return $;
        }
    }

}
