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

import com.pulumi.core.annotations.CustomType;
import com.pulumi.gcp.firestore.outputs.FieldIndexConfigIndex;
import java.util.List;
import java.util.Objects;
import javax.annotation.Nullable;

@CustomType
public final class FieldIndexConfig {
    /**
     * @return The indexes to configure on the field. Order or array contains must be specified.
     * Structure is documented below.
     * 
     */
    private @Nullable List<FieldIndexConfigIndex> indexes;

    private FieldIndexConfig() {}
    /**
     * @return The indexes to configure on the field. Order or array contains must be specified.
     * Structure is documented below.
     * 
     */
    public List<FieldIndexConfigIndex> indexes() {
        return this.indexes == null ? List.of() : this.indexes;
    }

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

    public static Builder builder(FieldIndexConfig defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List<FieldIndexConfigIndex> indexes;
        public Builder() {}
        public Builder(FieldIndexConfig defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.indexes = defaults.indexes;
        }

        @CustomType.Setter
        public Builder indexes(@Nullable List<FieldIndexConfigIndex> indexes) {
            this.indexes = indexes;
            return this;
        }
        public Builder indexes(FieldIndexConfigIndex... indexes) {
            return indexes(List.of(indexes));
        }
        public FieldIndexConfig build() {
            final var o = new FieldIndexConfig();
            o.indexes = indexes;
            return o;
        }
    }
}
