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

import com.pulumi.core.annotations.CustomType;
import com.pulumi.gcp.cloudbuild.outputs.TriggerBuildArtifactsObjectsTiming;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class TriggerBuildArtifactsObjects {
    /**
     * @return Cloud Storage bucket and optional object path, in the form &#34;gs://bucket/path/to/somewhere/&#34;.
     * Files in the workspace matching any path pattern will be uploaded to Cloud Storage with
     * this location as a prefix.
     * 
     */
    private @Nullable String location;
    /**
     * @return Path globs used to match files in the build&#39;s workspace.
     * 
     */
    private @Nullable List<String> paths;
    /**
     * @return (Output)
     * Output only. Stores timing information for pushing all artifact objects.
     * Structure is documented below.
     * 
     * &lt;a name=&#34;nested_timing&#34;&gt;&lt;/a&gt;The `timing` block contains:
     * 
     */
    private @Nullable List<TriggerBuildArtifactsObjectsTiming> timings;

    private TriggerBuildArtifactsObjects() {}
    /**
     * @return Cloud Storage bucket and optional object path, in the form &#34;gs://bucket/path/to/somewhere/&#34;.
     * Files in the workspace matching any path pattern will be uploaded to Cloud Storage with
     * this location as a prefix.
     * 
     */
    public Optional<String> location() {
        return Optional.ofNullable(this.location);
    }
    /**
     * @return Path globs used to match files in the build&#39;s workspace.
     * 
     */
    public List<String> paths() {
        return this.paths == null ? List.of() : this.paths;
    }
    /**
     * @return (Output)
     * Output only. Stores timing information for pushing all artifact objects.
     * Structure is documented below.
     * 
     * &lt;a name=&#34;nested_timing&#34;&gt;&lt;/a&gt;The `timing` block contains:
     * 
     */
    public List<TriggerBuildArtifactsObjectsTiming> timings() {
        return this.timings == null ? List.of() : this.timings;
    }

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

    public static Builder builder(TriggerBuildArtifactsObjects defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String location;
        private @Nullable List<String> paths;
        private @Nullable List<TriggerBuildArtifactsObjectsTiming> timings;
        public Builder() {}
        public Builder(TriggerBuildArtifactsObjects defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.location = defaults.location;
    	      this.paths = defaults.paths;
    	      this.timings = defaults.timings;
        }

        @CustomType.Setter
        public Builder location(@Nullable String location) {
            this.location = location;
            return this;
        }
        @CustomType.Setter
        public Builder paths(@Nullable List<String> paths) {
            this.paths = paths;
            return this;
        }
        public Builder paths(String... paths) {
            return paths(List.of(paths));
        }
        @CustomType.Setter
        public Builder timings(@Nullable List<TriggerBuildArtifactsObjectsTiming> timings) {
            this.timings = timings;
            return this;
        }
        public Builder timings(TriggerBuildArtifactsObjectsTiming... timings) {
            return timings(List.of(timings));
        }
        public TriggerBuildArtifactsObjects build() {
            final var o = new TriggerBuildArtifactsObjects();
            o.location = location;
            o.paths = paths;
            o.timings = timings;
            return o;
        }
    }
}
