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

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;


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

    public static final TargetExecutionConfigArgs Empty = new TargetExecutionConfigArgs();

    /**
     * Optional. Cloud Storage location in which to store execution outputs. This can either be a bucket (&#34;gs://my-bucket&#34;) or a path within a bucket (&#34;gs://my-bucket/my-dir&#34;). If unspecified, a default bucket located in the same region will be used.
     * 
     */
    @Import(name="artifactStorage")
    private @Nullable Output<String> artifactStorage;

    /**
     * @return Optional. Cloud Storage location in which to store execution outputs. This can either be a bucket (&#34;gs://my-bucket&#34;) or a path within a bucket (&#34;gs://my-bucket/my-dir&#34;). If unspecified, a default bucket located in the same region will be used.
     * 
     */
    public Optional<Output<String>> artifactStorage() {
        return Optional.ofNullable(this.artifactStorage);
    }

    /**
     * Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and 24h in seconds format. If unspecified, a default timeout of 1h is used.
     * 
     */
    @Import(name="executionTimeout")
    private @Nullable Output<String> executionTimeout;

    /**
     * @return Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and 24h in seconds format. If unspecified, a default timeout of 1h is used.
     * 
     */
    public Optional<Output<String>> executionTimeout() {
        return Optional.ofNullable(this.executionTimeout);
    }

    /**
     * Optional. Google service account to use for execution. If unspecified, the project execution service account (-compute@developer.gserviceaccount.com) is used.
     * 
     */
    @Import(name="serviceAccount")
    private @Nullable Output<String> serviceAccount;

    /**
     * @return Optional. Google service account to use for execution. If unspecified, the project execution service account (-compute@developer.gserviceaccount.com) is used.
     * 
     */
    public Optional<Output<String>> serviceAccount() {
        return Optional.ofNullable(this.serviceAccount);
    }

    /**
     * Required. Usages when this configuration should be applied.
     * 
     */
    @Import(name="usages", required=true)
    private Output<List<String>> usages;

    /**
     * @return Required. Usages when this configuration should be applied.
     * 
     */
    public Output<List<String>> usages() {
        return this.usages;
    }

    /**
     * Optional. The resource name of the `WorkerPool`, with the format `projects/{project}/locations/{location}/workerPools/{worker_pool}`. If this optional field is unspecified, the default Cloud Build pool will be used.
     * 
     */
    @Import(name="workerPool")
    private @Nullable Output<String> workerPool;

    /**
     * @return Optional. The resource name of the `WorkerPool`, with the format `projects/{project}/locations/{location}/workerPools/{worker_pool}`. If this optional field is unspecified, the default Cloud Build pool will be used.
     * 
     */
    public Optional<Output<String>> workerPool() {
        return Optional.ofNullable(this.workerPool);
    }

    private TargetExecutionConfigArgs() {}

    private TargetExecutionConfigArgs(TargetExecutionConfigArgs $) {
        this.artifactStorage = $.artifactStorage;
        this.executionTimeout = $.executionTimeout;
        this.serviceAccount = $.serviceAccount;
        this.usages = $.usages;
        this.workerPool = $.workerPool;
    }

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

    public static final class Builder {
        private TargetExecutionConfigArgs $;

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

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

        /**
         * @param artifactStorage Optional. Cloud Storage location in which to store execution outputs. This can either be a bucket (&#34;gs://my-bucket&#34;) or a path within a bucket (&#34;gs://my-bucket/my-dir&#34;). If unspecified, a default bucket located in the same region will be used.
         * 
         * @return builder
         * 
         */
        public Builder artifactStorage(@Nullable Output<String> artifactStorage) {
            $.artifactStorage = artifactStorage;
            return this;
        }

        /**
         * @param artifactStorage Optional. Cloud Storage location in which to store execution outputs. This can either be a bucket (&#34;gs://my-bucket&#34;) or a path within a bucket (&#34;gs://my-bucket/my-dir&#34;). If unspecified, a default bucket located in the same region will be used.
         * 
         * @return builder
         * 
         */
        public Builder artifactStorage(String artifactStorage) {
            return artifactStorage(Output.of(artifactStorage));
        }

        /**
         * @param executionTimeout Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and 24h in seconds format. If unspecified, a default timeout of 1h is used.
         * 
         * @return builder
         * 
         */
        public Builder executionTimeout(@Nullable Output<String> executionTimeout) {
            $.executionTimeout = executionTimeout;
            return this;
        }

        /**
         * @param executionTimeout Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and 24h in seconds format. If unspecified, a default timeout of 1h is used.
         * 
         * @return builder
         * 
         */
        public Builder executionTimeout(String executionTimeout) {
            return executionTimeout(Output.of(executionTimeout));
        }

        /**
         * @param serviceAccount Optional. Google service account to use for execution. If unspecified, the project execution service account (-compute@developer.gserviceaccount.com) is used.
         * 
         * @return builder
         * 
         */
        public Builder serviceAccount(@Nullable Output<String> serviceAccount) {
            $.serviceAccount = serviceAccount;
            return this;
        }

        /**
         * @param serviceAccount Optional. Google service account to use for execution. If unspecified, the project execution service account (-compute@developer.gserviceaccount.com) is used.
         * 
         * @return builder
         * 
         */
        public Builder serviceAccount(String serviceAccount) {
            return serviceAccount(Output.of(serviceAccount));
        }

        /**
         * @param usages Required. Usages when this configuration should be applied.
         * 
         * @return builder
         * 
         */
        public Builder usages(Output<List<String>> usages) {
            $.usages = usages;
            return this;
        }

        /**
         * @param usages Required. Usages when this configuration should be applied.
         * 
         * @return builder
         * 
         */
        public Builder usages(List<String> usages) {
            return usages(Output.of(usages));
        }

        /**
         * @param usages Required. Usages when this configuration should be applied.
         * 
         * @return builder
         * 
         */
        public Builder usages(String... usages) {
            return usages(List.of(usages));
        }

        /**
         * @param workerPool Optional. The resource name of the `WorkerPool`, with the format `projects/{project}/locations/{location}/workerPools/{worker_pool}`. If this optional field is unspecified, the default Cloud Build pool will be used.
         * 
         * @return builder
         * 
         */
        public Builder workerPool(@Nullable Output<String> workerPool) {
            $.workerPool = workerPool;
            return this;
        }

        /**
         * @param workerPool Optional. The resource name of the `WorkerPool`, with the format `projects/{project}/locations/{location}/workerPools/{worker_pool}`. If this optional field is unspecified, the default Cloud Build pool will be used.
         * 
         * @return builder
         * 
         */
        public Builder workerPool(String workerPool) {
            return workerPool(Output.of(workerPool));
        }

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

}
