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

com.pulumi.azurenative.documentdb.inputs.MongoDBCollectionResourceArgs Maven / Gradle / Ivy

There is a newer version: 2.72.0
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.azurenative.documentdb.inputs;

import com.pulumi.azurenative.documentdb.inputs.MongoIndexArgs;
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.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Cosmos DB MongoDB collection resource object
 * 
 */
public final class MongoDBCollectionResourceArgs extends com.pulumi.resources.ResourceArgs {

    public static final MongoDBCollectionResourceArgs Empty = new MongoDBCollectionResourceArgs();

    /**
     * Analytical TTL.
     * 
     */
    @Import(name="analyticalStorageTtl")
    private @Nullable Output analyticalStorageTtl;

    /**
     * @return Analytical TTL.
     * 
     */
    public Optional> analyticalStorageTtl() {
        return Optional.ofNullable(this.analyticalStorageTtl);
    }

    /**
     * Name of the Cosmos DB MongoDB collection
     * 
     */
    @Import(name="id", required=true)
    private Output id;

    /**
     * @return Name of the Cosmos DB MongoDB collection
     * 
     */
    public Output id() {
        return this.id;
    }

    /**
     * List of index keys
     * 
     */
    @Import(name="indexes")
    private @Nullable Output> indexes;

    /**
     * @return List of index keys
     * 
     */
    public Optional>> indexes() {
        return Optional.ofNullable(this.indexes);
    }

    /**
     * A key-value pair of shard keys to be applied for the request.
     * 
     */
    @Import(name="shardKey")
    private @Nullable Output> shardKey;

    /**
     * @return A key-value pair of shard keys to be applied for the request.
     * 
     */
    public Optional>> shardKey() {
        return Optional.ofNullable(this.shardKey);
    }

    private MongoDBCollectionResourceArgs() {}

    private MongoDBCollectionResourceArgs(MongoDBCollectionResourceArgs $) {
        this.analyticalStorageTtl = $.analyticalStorageTtl;
        this.id = $.id;
        this.indexes = $.indexes;
        this.shardKey = $.shardKey;
    }

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

    public static final class Builder {
        private MongoDBCollectionResourceArgs $;

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

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

        /**
         * @param analyticalStorageTtl Analytical TTL.
         * 
         * @return builder
         * 
         */
        public Builder analyticalStorageTtl(@Nullable Output analyticalStorageTtl) {
            $.analyticalStorageTtl = analyticalStorageTtl;
            return this;
        }

        /**
         * @param analyticalStorageTtl Analytical TTL.
         * 
         * @return builder
         * 
         */
        public Builder analyticalStorageTtl(Integer analyticalStorageTtl) {
            return analyticalStorageTtl(Output.of(analyticalStorageTtl));
        }

        /**
         * @param id Name of the Cosmos DB MongoDB collection
         * 
         * @return builder
         * 
         */
        public Builder id(Output id) {
            $.id = id;
            return this;
        }

        /**
         * @param id Name of the Cosmos DB MongoDB collection
         * 
         * @return builder
         * 
         */
        public Builder id(String id) {
            return id(Output.of(id));
        }

        /**
         * @param indexes List of index keys
         * 
         * @return builder
         * 
         */
        public Builder indexes(@Nullable Output> indexes) {
            $.indexes = indexes;
            return this;
        }

        /**
         * @param indexes List of index keys
         * 
         * @return builder
         * 
         */
        public Builder indexes(List indexes) {
            return indexes(Output.of(indexes));
        }

        /**
         * @param indexes List of index keys
         * 
         * @return builder
         * 
         */
        public Builder indexes(MongoIndexArgs... indexes) {
            return indexes(List.of(indexes));
        }

        /**
         * @param shardKey A key-value pair of shard keys to be applied for the request.
         * 
         * @return builder
         * 
         */
        public Builder shardKey(@Nullable Output> shardKey) {
            $.shardKey = shardKey;
            return this;
        }

        /**
         * @param shardKey A key-value pair of shard keys to be applied for the request.
         * 
         * @return builder
         * 
         */
        public Builder shardKey(Map shardKey) {
            return shardKey(Output.of(shardKey));
        }

        public MongoDBCollectionResourceArgs build() {
            if ($.id == null) {
                throw new MissingRequiredPropertyException("MongoDBCollectionResourceArgs", "id");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy