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

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.gcp.cloudfunctionsv2.inputs.FunctionBuildConfigSourceRepoSourceArgs;
import com.pulumi.gcp.cloudfunctionsv2.inputs.FunctionBuildConfigSourceStorageSourceArgs;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final FunctionBuildConfigSourceArgs Empty = new FunctionBuildConfigSourceArgs();

    /**
     * If provided, get the source from this location in a Cloud Source Repository.
     * Structure is documented below.
     * 
     */
    @Import(name="repoSource")
    private @Nullable Output<FunctionBuildConfigSourceRepoSourceArgs> repoSource;

    /**
     * @return If provided, get the source from this location in a Cloud Source Repository.
     * Structure is documented below.
     * 
     */
    public Optional<Output<FunctionBuildConfigSourceRepoSourceArgs>> repoSource() {
        return Optional.ofNullable(this.repoSource);
    }

    /**
     * If provided, get the source from this location in Google Cloud Storage.
     * Structure is documented below.
     * 
     */
    @Import(name="storageSource")
    private @Nullable Output<FunctionBuildConfigSourceStorageSourceArgs> storageSource;

    /**
     * @return If provided, get the source from this location in Google Cloud Storage.
     * Structure is documented below.
     * 
     */
    public Optional<Output<FunctionBuildConfigSourceStorageSourceArgs>> storageSource() {
        return Optional.ofNullable(this.storageSource);
    }

    private FunctionBuildConfigSourceArgs() {}

    private FunctionBuildConfigSourceArgs(FunctionBuildConfigSourceArgs $) {
        this.repoSource = $.repoSource;
        this.storageSource = $.storageSource;
    }

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

    public static final class Builder {
        private FunctionBuildConfigSourceArgs $;

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

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

        /**
         * @param repoSource If provided, get the source from this location in a Cloud Source Repository.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder repoSource(@Nullable Output<FunctionBuildConfigSourceRepoSourceArgs> repoSource) {
            $.repoSource = repoSource;
            return this;
        }

        /**
         * @param repoSource If provided, get the source from this location in a Cloud Source Repository.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder repoSource(FunctionBuildConfigSourceRepoSourceArgs repoSource) {
            return repoSource(Output.of(repoSource));
        }

        /**
         * @param storageSource If provided, get the source from this location in Google Cloud Storage.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder storageSource(@Nullable Output<FunctionBuildConfigSourceStorageSourceArgs> storageSource) {
            $.storageSource = storageSource;
            return this;
        }

        /**
         * @param storageSource If provided, get the source from this location in Google Cloud Storage.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder storageSource(FunctionBuildConfigSourceStorageSourceArgs storageSource) {
            return storageSource(Output.of(storageSource));
        }

        public FunctionBuildConfigSourceArgs build() {
            return $;
        }
    }

}
