// *** 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 java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final TriggerSourceToBuildArgs Empty = new TriggerSourceToBuildArgs();

    /**
     * The full resource name of the bitbucket server config.
     * Format: projects/{project}/locations/{location}/bitbucketServerConfigs/{id}.
     * 
     */
    @Import(name="bitbucketServerConfig")
    private @Nullable Output<String> bitbucketServerConfig;

    /**
     * @return The full resource name of the bitbucket server config.
     * Format: projects/{project}/locations/{location}/bitbucketServerConfigs/{id}.
     * 
     */
    public Optional<Output<String>> bitbucketServerConfig() {
        return Optional.ofNullable(this.bitbucketServerConfig);
    }

    /**
     * The full resource name of the github enterprise config.
     * Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.
     * 
     */
    @Import(name="githubEnterpriseConfig")
    private @Nullable Output<String> githubEnterpriseConfig;

    /**
     * @return The full resource name of the github enterprise config.
     * Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.
     * 
     */
    public Optional<Output<String>> githubEnterpriseConfig() {
        return Optional.ofNullable(this.githubEnterpriseConfig);
    }

    /**
     * The branch or tag to use. Must start with &#34;refs/&#34; (required).
     * 
     */
    @Import(name="ref", required=true)
    private Output<String> ref;

    /**
     * @return The branch or tag to use. Must start with &#34;refs/&#34; (required).
     * 
     */
    public Output<String> ref() {
        return this.ref;
    }

    /**
     * The type of the repo, since it may not be explicit from the repo field (e.g from a URL).
     * Values can be UNKNOWN, CLOUD_SOURCE_REPOSITORIES, GITHUB, BITBUCKET_SERVER
     * Possible values are: `UNKNOWN`, `CLOUD_SOURCE_REPOSITORIES`, `GITHUB`, `BITBUCKET_SERVER`.
     * 
     */
    @Import(name="repoType", required=true)
    private Output<String> repoType;

    /**
     * @return The type of the repo, since it may not be explicit from the repo field (e.g from a URL).
     * Values can be UNKNOWN, CLOUD_SOURCE_REPOSITORIES, GITHUB, BITBUCKET_SERVER
     * Possible values are: `UNKNOWN`, `CLOUD_SOURCE_REPOSITORIES`, `GITHUB`, `BITBUCKET_SERVER`.
     * 
     */
    public Output<String> repoType() {
        return this.repoType;
    }

    /**
     * The qualified resource name of the Repo API repository.
     * Either uri or repository can be specified and is required.
     * 
     */
    @Import(name="repository")
    private @Nullable Output<String> repository;

    /**
     * @return The qualified resource name of the Repo API repository.
     * Either uri or repository can be specified and is required.
     * 
     */
    public Optional<Output<String>> repository() {
        return Optional.ofNullable(this.repository);
    }

    /**
     * The URI of the repo.
     * 
     */
    @Import(name="uri")
    private @Nullable Output<String> uri;

    /**
     * @return The URI of the repo.
     * 
     */
    public Optional<Output<String>> uri() {
        return Optional.ofNullable(this.uri);
    }

    private TriggerSourceToBuildArgs() {}

    private TriggerSourceToBuildArgs(TriggerSourceToBuildArgs $) {
        this.bitbucketServerConfig = $.bitbucketServerConfig;
        this.githubEnterpriseConfig = $.githubEnterpriseConfig;
        this.ref = $.ref;
        this.repoType = $.repoType;
        this.repository = $.repository;
        this.uri = $.uri;
    }

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

    public static final class Builder {
        private TriggerSourceToBuildArgs $;

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

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

        /**
         * @param bitbucketServerConfig The full resource name of the bitbucket server config.
         * Format: projects/{project}/locations/{location}/bitbucketServerConfigs/{id}.
         * 
         * @return builder
         * 
         */
        public Builder bitbucketServerConfig(@Nullable Output<String> bitbucketServerConfig) {
            $.bitbucketServerConfig = bitbucketServerConfig;
            return this;
        }

        /**
         * @param bitbucketServerConfig The full resource name of the bitbucket server config.
         * Format: projects/{project}/locations/{location}/bitbucketServerConfigs/{id}.
         * 
         * @return builder
         * 
         */
        public Builder bitbucketServerConfig(String bitbucketServerConfig) {
            return bitbucketServerConfig(Output.of(bitbucketServerConfig));
        }

        /**
         * @param githubEnterpriseConfig The full resource name of the github enterprise config.
         * Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.
         * 
         * @return builder
         * 
         */
        public Builder githubEnterpriseConfig(@Nullable Output<String> githubEnterpriseConfig) {
            $.githubEnterpriseConfig = githubEnterpriseConfig;
            return this;
        }

        /**
         * @param githubEnterpriseConfig The full resource name of the github enterprise config.
         * Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.
         * 
         * @return builder
         * 
         */
        public Builder githubEnterpriseConfig(String githubEnterpriseConfig) {
            return githubEnterpriseConfig(Output.of(githubEnterpriseConfig));
        }

        /**
         * @param ref The branch or tag to use. Must start with &#34;refs/&#34; (required).
         * 
         * @return builder
         * 
         */
        public Builder ref(Output<String> ref) {
            $.ref = ref;
            return this;
        }

        /**
         * @param ref The branch or tag to use. Must start with &#34;refs/&#34; (required).
         * 
         * @return builder
         * 
         */
        public Builder ref(String ref) {
            return ref(Output.of(ref));
        }

        /**
         * @param repoType The type of the repo, since it may not be explicit from the repo field (e.g from a URL).
         * Values can be UNKNOWN, CLOUD_SOURCE_REPOSITORIES, GITHUB, BITBUCKET_SERVER
         * Possible values are: `UNKNOWN`, `CLOUD_SOURCE_REPOSITORIES`, `GITHUB`, `BITBUCKET_SERVER`.
         * 
         * @return builder
         * 
         */
        public Builder repoType(Output<String> repoType) {
            $.repoType = repoType;
            return this;
        }

        /**
         * @param repoType The type of the repo, since it may not be explicit from the repo field (e.g from a URL).
         * Values can be UNKNOWN, CLOUD_SOURCE_REPOSITORIES, GITHUB, BITBUCKET_SERVER
         * Possible values are: `UNKNOWN`, `CLOUD_SOURCE_REPOSITORIES`, `GITHUB`, `BITBUCKET_SERVER`.
         * 
         * @return builder
         * 
         */
        public Builder repoType(String repoType) {
            return repoType(Output.of(repoType));
        }

        /**
         * @param repository The qualified resource name of the Repo API repository.
         * Either uri or repository can be specified and is required.
         * 
         * @return builder
         * 
         */
        public Builder repository(@Nullable Output<String> repository) {
            $.repository = repository;
            return this;
        }

        /**
         * @param repository The qualified resource name of the Repo API repository.
         * Either uri or repository can be specified and is required.
         * 
         * @return builder
         * 
         */
        public Builder repository(String repository) {
            return repository(Output.of(repository));
        }

        /**
         * @param uri The URI of the repo.
         * 
         * @return builder
         * 
         */
        public Builder uri(@Nullable Output<String> uri) {
            $.uri = uri;
            return this;
        }

        /**
         * @param uri The URI of the repo.
         * 
         * @return builder
         * 
         */
        public Builder uri(String uri) {
            return uri(Output.of(uri));
        }

        public TriggerSourceToBuildArgs build() {
            $.ref = Objects.requireNonNull($.ref, "expected parameter 'ref' to be non-null");
            $.repoType = Objects.requireNonNull($.repoType, "expected parameter 'repoType' to be non-null");
            return $;
        }
    }

}
