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

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

@CustomType
public final class EntryBigqueryTableSpec {
    /**
     * @return (Output)
     * The table source type.
     * 
     */
    private @Nullable String tableSourceType;
    /**
     * @return (Output)
     * Spec of a BigQuery table. This field should only be populated if tableSourceType is BIGQUERY_TABLE.
     * Structure is documented below.
     * 
     */
    private @Nullable List<EntryBigqueryTableSpecTableSpec> tableSpecs;
    /**
     * @return (Output)
     * Table view specification. This field should only be populated if tableSourceType is BIGQUERY_VIEW.
     * Structure is documented below.
     * 
     */
    private @Nullable List<EntryBigqueryTableSpecViewSpec> viewSpecs;

    private EntryBigqueryTableSpec() {}
    /**
     * @return (Output)
     * The table source type.
     * 
     */
    public Optional<String> tableSourceType() {
        return Optional.ofNullable(this.tableSourceType);
    }
    /**
     * @return (Output)
     * Spec of a BigQuery table. This field should only be populated if tableSourceType is BIGQUERY_TABLE.
     * Structure is documented below.
     * 
     */
    public List<EntryBigqueryTableSpecTableSpec> tableSpecs() {
        return this.tableSpecs == null ? List.of() : this.tableSpecs;
    }
    /**
     * @return (Output)
     * Table view specification. This field should only be populated if tableSourceType is BIGQUERY_VIEW.
     * Structure is documented below.
     * 
     */
    public List<EntryBigqueryTableSpecViewSpec> viewSpecs() {
        return this.viewSpecs == null ? List.of() : this.viewSpecs;
    }

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

    public static Builder builder(EntryBigqueryTableSpec defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String tableSourceType;
        private @Nullable List<EntryBigqueryTableSpecTableSpec> tableSpecs;
        private @Nullable List<EntryBigqueryTableSpecViewSpec> viewSpecs;
        public Builder() {}
        public Builder(EntryBigqueryTableSpec defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.tableSourceType = defaults.tableSourceType;
    	      this.tableSpecs = defaults.tableSpecs;
    	      this.viewSpecs = defaults.viewSpecs;
        }

        @CustomType.Setter
        public Builder tableSourceType(@Nullable String tableSourceType) {
            this.tableSourceType = tableSourceType;
            return this;
        }
        @CustomType.Setter
        public Builder tableSpecs(@Nullable List<EntryBigqueryTableSpecTableSpec> tableSpecs) {
            this.tableSpecs = tableSpecs;
            return this;
        }
        public Builder tableSpecs(EntryBigqueryTableSpecTableSpec... tableSpecs) {
            return tableSpecs(List.of(tableSpecs));
        }
        @CustomType.Setter
        public Builder viewSpecs(@Nullable List<EntryBigqueryTableSpecViewSpec> viewSpecs) {
            this.viewSpecs = viewSpecs;
            return this;
        }
        public Builder viewSpecs(EntryBigqueryTableSpecViewSpec... viewSpecs) {
            return viewSpecs(List.of(viewSpecs));
        }
        public EntryBigqueryTableSpec build() {
            final var o = new EntryBigqueryTableSpec();
            o.tableSourceType = tableSourceType;
            o.tableSpecs = tableSpecs;
            o.viewSpecs = viewSpecs;
            return o;
        }
    }
}
