All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.alicloud.ots.SearchIndexArgs Maven / Gradle / Ivy

There is a newer version: 3.63.0-alpha.1727424957
Show newest version
// *** 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.alicloud.ots;

import com.pulumi.alicloud.ots.inputs.SearchIndexSchemaArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final SearchIndexArgs Empty = new SearchIndexArgs();

    /**
     * The index name of the OTS Table. If changed, a new index would be created.
     * 
     */
    @Import(name="indexName", required=true)
    private Output indexName;

    /**
     * @return The index name of the OTS Table. If changed, a new index would be created.
     * 
     */
    public Output indexName() {
        return this.indexName;
    }

    /**
     * The name of the OTS instance in which table will located.
     * 
     */
    @Import(name="instanceName", required=true)
    private Output instanceName;

    /**
     * @return The name of the OTS instance in which table will located.
     * 
     */
    public Output instanceName() {
        return this.instanceName;
    }

    /**
     * The schema of the search index. If changed, a new index would be created. See `schema` below.
     * 
     */
    @Import(name="schemas", required=true)
    private Output> schemas;

    /**
     * @return The schema of the search index. If changed, a new index would be created. See `schema` below.
     * 
     */
    public Output> schemas() {
        return this.schemas;
    }

    /**
     * The name of the OTS table. If changed, a new table would be created.
     * 
     */
    @Import(name="tableName", required=true)
    private Output tableName;

    /**
     * @return The name of the OTS table. If changed, a new table would be created.
     * 
     */
    public Output tableName() {
        return this.tableName;
    }

    /**
     * The index type of the OTS Table. Specifies the retention period of data in the search index. Unit: seconds. Default value: -1.
     * If the retention period exceeds the TTL value, OTS automatically deletes expired data.
     * 
     */
    @Import(name="timeToLive")
    private @Nullable Output timeToLive;

    /**
     * @return The index type of the OTS Table. Specifies the retention period of data in the search index. Unit: seconds. Default value: -1.
     * If the retention period exceeds the TTL value, OTS automatically deletes expired data.
     * 
     */
    public Optional> timeToLive() {
        return Optional.ofNullable(this.timeToLive);
    }

    private SearchIndexArgs() {}

    private SearchIndexArgs(SearchIndexArgs $) {
        this.indexName = $.indexName;
        this.instanceName = $.instanceName;
        this.schemas = $.schemas;
        this.tableName = $.tableName;
        this.timeToLive = $.timeToLive;
    }

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

    public static final class Builder {
        private SearchIndexArgs $;

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

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

        /**
         * @param indexName The index name of the OTS Table. If changed, a new index would be created.
         * 
         * @return builder
         * 
         */
        public Builder indexName(Output indexName) {
            $.indexName = indexName;
            return this;
        }

        /**
         * @param indexName The index name of the OTS Table. If changed, a new index would be created.
         * 
         * @return builder
         * 
         */
        public Builder indexName(String indexName) {
            return indexName(Output.of(indexName));
        }

        /**
         * @param instanceName The name of the OTS instance in which table will located.
         * 
         * @return builder
         * 
         */
        public Builder instanceName(Output instanceName) {
            $.instanceName = instanceName;
            return this;
        }

        /**
         * @param instanceName The name of the OTS instance in which table will located.
         * 
         * @return builder
         * 
         */
        public Builder instanceName(String instanceName) {
            return instanceName(Output.of(instanceName));
        }

        /**
         * @param schemas The schema of the search index. If changed, a new index would be created. See `schema` below.
         * 
         * @return builder
         * 
         */
        public Builder schemas(Output> schemas) {
            $.schemas = schemas;
            return this;
        }

        /**
         * @param schemas The schema of the search index. If changed, a new index would be created. See `schema` below.
         * 
         * @return builder
         * 
         */
        public Builder schemas(List schemas) {
            return schemas(Output.of(schemas));
        }

        /**
         * @param schemas The schema of the search index. If changed, a new index would be created. See `schema` below.
         * 
         * @return builder
         * 
         */
        public Builder schemas(SearchIndexSchemaArgs... schemas) {
            return schemas(List.of(schemas));
        }

        /**
         * @param tableName The name of the OTS table. If changed, a new table would be created.
         * 
         * @return builder
         * 
         */
        public Builder tableName(Output tableName) {
            $.tableName = tableName;
            return this;
        }

        /**
         * @param tableName The name of the OTS table. If changed, a new table would be created.
         * 
         * @return builder
         * 
         */
        public Builder tableName(String tableName) {
            return tableName(Output.of(tableName));
        }

        /**
         * @param timeToLive The index type of the OTS Table. Specifies the retention period of data in the search index. Unit: seconds. Default value: -1.
         * If the retention period exceeds the TTL value, OTS automatically deletes expired data.
         * 
         * @return builder
         * 
         */
        public Builder timeToLive(@Nullable Output timeToLive) {
            $.timeToLive = timeToLive;
            return this;
        }

        /**
         * @param timeToLive The index type of the OTS Table. Specifies the retention period of data in the search index. Unit: seconds. Default value: -1.
         * If the retention period exceeds the TTL value, OTS automatically deletes expired data.
         * 
         * @return builder
         * 
         */
        public Builder timeToLive(Integer timeToLive) {
            return timeToLive(Output.of(timeToLive));
        }

        public SearchIndexArgs build() {
            if ($.indexName == null) {
                throw new MissingRequiredPropertyException("SearchIndexArgs", "indexName");
            }
            if ($.instanceName == null) {
                throw new MissingRequiredPropertyException("SearchIndexArgs", "instanceName");
            }
            if ($.schemas == null) {
                throw new MissingRequiredPropertyException("SearchIndexArgs", "schemas");
            }
            if ($.tableName == null) {
                throw new MissingRequiredPropertyException("SearchIndexArgs", "tableName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy