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

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final DomainIndexFieldArgs Empty = new DomainIndexFieldArgs();

    /**
     * The analysis scheme you want to use for a `text` field. The analysis scheme specifies the language-specific text processing options that are used during indexing.
     * 
     */
    @Import(name="analysisScheme")
    private @Nullable Output<String> analysisScheme;

    /**
     * @return The analysis scheme you want to use for a `text` field. The analysis scheme specifies the language-specific text processing options that are used during indexing.
     * 
     */
    public Optional<Output<String>> analysisScheme() {
        return Optional.ofNullable(this.analysisScheme);
    }

    /**
     * The default value for the field. This value is used when no value is specified for the field in the document data.
     * 
     */
    @Import(name="defaultValue")
    private @Nullable Output<String> defaultValue;

    /**
     * @return The default value for the field. This value is used when no value is specified for the field in the document data.
     * 
     */
    public Optional<Output<String>> defaultValue() {
        return Optional.ofNullable(this.defaultValue);
    }

    /**
     * You can get facet information by enabling this.
     * 
     */
    @Import(name="facet")
    private @Nullable Output<Boolean> facet;

    /**
     * @return You can get facet information by enabling this.
     * 
     */
    public Optional<Output<Boolean>> facet() {
        return Optional.ofNullable(this.facet);
    }

    /**
     * You can highlight information.
     * 
     */
    @Import(name="highlight")
    private @Nullable Output<Boolean> highlight;

    /**
     * @return You can highlight information.
     * 
     */
    public Optional<Output<Boolean>> highlight() {
        return Optional.ofNullable(this.highlight);
    }

    /**
     * A unique name for the field. Field names must begin with a letter and be at least 3 and no more than 64 characters long. The allowed characters are: `a`-`z` (lower-case letters), `0`-`9`, and `_` (underscore). The name `score` is reserved and cannot be used as a field name.
     * 
     */
    @Import(name="name", required=true)
    private Output<String> name;

    /**
     * @return A unique name for the field. Field names must begin with a letter and be at least 3 and no more than 64 characters long. The allowed characters are: `a`-`z` (lower-case letters), `0`-`9`, and `_` (underscore). The name `score` is reserved and cannot be used as a field name.
     * 
     */
    public Output<String> name() {
        return this.name;
    }

    /**
     * You can enable returning the value of all searchable fields.
     * 
     */
    @Import(name="return")
    private @Nullable Output<Boolean> return_;

    /**
     * @return You can enable returning the value of all searchable fields.
     * 
     */
    public Optional<Output<Boolean>> return_() {
        return Optional.ofNullable(this.return_);
    }

    /**
     * You can set whether this index should be searchable or not.
     * 
     */
    @Import(name="search")
    private @Nullable Output<Boolean> search;

    /**
     * @return You can set whether this index should be searchable or not.
     * 
     */
    public Optional<Output<Boolean>> search() {
        return Optional.ofNullable(this.search);
    }

    /**
     * You can enable the property to be sortable.
     * 
     */
    @Import(name="sort")
    private @Nullable Output<Boolean> sort;

    /**
     * @return You can enable the property to be sortable.
     * 
     */
    public Optional<Output<Boolean>> sort() {
        return Optional.ofNullable(this.sort);
    }

    /**
     * A comma-separated list of source fields to map to the field. Specifying a source field copies data from one field to another, enabling you to use the same source data in different ways by configuring different options for the fields.
     * 
     */
    @Import(name="sourceFields")
    private @Nullable Output<String> sourceFields;

    /**
     * @return A comma-separated list of source fields to map to the field. Specifying a source field copies data from one field to another, enabling you to use the same source data in different ways by configuring different options for the fields.
     * 
     */
    public Optional<Output<String>> sourceFields() {
        return Optional.ofNullable(this.sourceFields);
    }

    /**
     * The field type. Valid values: `date`, `date-array`, `double`, `double-array`, `int`, `int-array`, `literal`, `literal-array`, `text`, `text-array`.
     * 
     */
    @Import(name="type", required=true)
    private Output<String> type;

    /**
     * @return The field type. Valid values: `date`, `date-array`, `double`, `double-array`, `int`, `int-array`, `literal`, `literal-array`, `text`, `text-array`.
     * 
     */
    public Output<String> type() {
        return this.type;
    }

    private DomainIndexFieldArgs() {}

    private DomainIndexFieldArgs(DomainIndexFieldArgs $) {
        this.analysisScheme = $.analysisScheme;
        this.defaultValue = $.defaultValue;
        this.facet = $.facet;
        this.highlight = $.highlight;
        this.name = $.name;
        this.return_ = $.return_;
        this.search = $.search;
        this.sort = $.sort;
        this.sourceFields = $.sourceFields;
        this.type = $.type;
    }

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

    public static final class Builder {
        private DomainIndexFieldArgs $;

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

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

        /**
         * @param analysisScheme The analysis scheme you want to use for a `text` field. The analysis scheme specifies the language-specific text processing options that are used during indexing.
         * 
         * @return builder
         * 
         */
        public Builder analysisScheme(@Nullable Output<String> analysisScheme) {
            $.analysisScheme = analysisScheme;
            return this;
        }

        /**
         * @param analysisScheme The analysis scheme you want to use for a `text` field. The analysis scheme specifies the language-specific text processing options that are used during indexing.
         * 
         * @return builder
         * 
         */
        public Builder analysisScheme(String analysisScheme) {
            return analysisScheme(Output.of(analysisScheme));
        }

        /**
         * @param defaultValue The default value for the field. This value is used when no value is specified for the field in the document data.
         * 
         * @return builder
         * 
         */
        public Builder defaultValue(@Nullable Output<String> defaultValue) {
            $.defaultValue = defaultValue;
            return this;
        }

        /**
         * @param defaultValue The default value for the field. This value is used when no value is specified for the field in the document data.
         * 
         * @return builder
         * 
         */
        public Builder defaultValue(String defaultValue) {
            return defaultValue(Output.of(defaultValue));
        }

        /**
         * @param facet You can get facet information by enabling this.
         * 
         * @return builder
         * 
         */
        public Builder facet(@Nullable Output<Boolean> facet) {
            $.facet = facet;
            return this;
        }

        /**
         * @param facet You can get facet information by enabling this.
         * 
         * @return builder
         * 
         */
        public Builder facet(Boolean facet) {
            return facet(Output.of(facet));
        }

        /**
         * @param highlight You can highlight information.
         * 
         * @return builder
         * 
         */
        public Builder highlight(@Nullable Output<Boolean> highlight) {
            $.highlight = highlight;
            return this;
        }

        /**
         * @param highlight You can highlight information.
         * 
         * @return builder
         * 
         */
        public Builder highlight(Boolean highlight) {
            return highlight(Output.of(highlight));
        }

        /**
         * @param name A unique name for the field. Field names must begin with a letter and be at least 3 and no more than 64 characters long. The allowed characters are: `a`-`z` (lower-case letters), `0`-`9`, and `_` (underscore). The name `score` is reserved and cannot be used as a field name.
         * 
         * @return builder
         * 
         */
        public Builder name(Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name A unique name for the field. Field names must begin with a letter and be at least 3 and no more than 64 characters long. The allowed characters are: `a`-`z` (lower-case letters), `0`-`9`, and `_` (underscore). The name `score` is reserved and cannot be used as a field name.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param return_ You can enable returning the value of all searchable fields.
         * 
         * @return builder
         * 
         */
        public Builder return_(@Nullable Output<Boolean> return_) {
            $.return_ = return_;
            return this;
        }

        /**
         * @param return_ You can enable returning the value of all searchable fields.
         * 
         * @return builder
         * 
         */
        public Builder return_(Boolean return_) {
            return return_(Output.of(return_));
        }

        /**
         * @param search You can set whether this index should be searchable or not.
         * 
         * @return builder
         * 
         */
        public Builder search(@Nullable Output<Boolean> search) {
            $.search = search;
            return this;
        }

        /**
         * @param search You can set whether this index should be searchable or not.
         * 
         * @return builder
         * 
         */
        public Builder search(Boolean search) {
            return search(Output.of(search));
        }

        /**
         * @param sort You can enable the property to be sortable.
         * 
         * @return builder
         * 
         */
        public Builder sort(@Nullable Output<Boolean> sort) {
            $.sort = sort;
            return this;
        }

        /**
         * @param sort You can enable the property to be sortable.
         * 
         * @return builder
         * 
         */
        public Builder sort(Boolean sort) {
            return sort(Output.of(sort));
        }

        /**
         * @param sourceFields A comma-separated list of source fields to map to the field. Specifying a source field copies data from one field to another, enabling you to use the same source data in different ways by configuring different options for the fields.
         * 
         * @return builder
         * 
         */
        public Builder sourceFields(@Nullable Output<String> sourceFields) {
            $.sourceFields = sourceFields;
            return this;
        }

        /**
         * @param sourceFields A comma-separated list of source fields to map to the field. Specifying a source field copies data from one field to another, enabling you to use the same source data in different ways by configuring different options for the fields.
         * 
         * @return builder
         * 
         */
        public Builder sourceFields(String sourceFields) {
            return sourceFields(Output.of(sourceFields));
        }

        /**
         * @param type The field type. Valid values: `date`, `date-array`, `double`, `double-array`, `int`, `int-array`, `literal`, `literal-array`, `text`, `text-array`.
         * 
         * @return builder
         * 
         */
        public Builder type(Output<String> type) {
            $.type = type;
            return this;
        }

        /**
         * @param type The field type. Valid values: `date`, `date-array`, `double`, `double-array`, `int`, `int-array`, `literal`, `literal-array`, `text`, `text-array`.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

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

}
