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

com.pulumi.azurenative.documentdb.inputs.ContainerPartitionKeyArgs 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.enums.PartitionKind;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * The configuration of the partition key to be used for partitioning data into multiple partitions
 * 
 */
public final class ContainerPartitionKeyArgs extends com.pulumi.resources.ResourceArgs {

    public static final ContainerPartitionKeyArgs Empty = new ContainerPartitionKeyArgs();

    /**
     * Indicates the kind of algorithm used for partitioning. For MultiHash, multiple partition keys (upto three maximum) are supported for container create
     * 
     */
    @Import(name="kind")
    private @Nullable Output> kind;

    /**
     * @return Indicates the kind of algorithm used for partitioning. For MultiHash, multiple partition keys (upto three maximum) are supported for container create
     * 
     */
    public Optional>> kind() {
        return Optional.ofNullable(this.kind);
    }

    /**
     * List of paths using which data within the container can be partitioned
     * 
     */
    @Import(name="paths")
    private @Nullable Output> paths;

    /**
     * @return List of paths using which data within the container can be partitioned
     * 
     */
    public Optional>> paths() {
        return Optional.ofNullable(this.paths);
    }

    /**
     * Indicates the version of the partition key definition
     * 
     */
    @Import(name="version")
    private @Nullable Output version;

    /**
     * @return Indicates the version of the partition key definition
     * 
     */
    public Optional> version() {
        return Optional.ofNullable(this.version);
    }

    private ContainerPartitionKeyArgs() {}

    private ContainerPartitionKeyArgs(ContainerPartitionKeyArgs $) {
        this.kind = $.kind;
        this.paths = $.paths;
        this.version = $.version;
    }

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

    public static final class Builder {
        private ContainerPartitionKeyArgs $;

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

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

        /**
         * @param kind Indicates the kind of algorithm used for partitioning. For MultiHash, multiple partition keys (upto three maximum) are supported for container create
         * 
         * @return builder
         * 
         */
        public Builder kind(@Nullable Output> kind) {
            $.kind = kind;
            return this;
        }

        /**
         * @param kind Indicates the kind of algorithm used for partitioning. For MultiHash, multiple partition keys (upto three maximum) are supported for container create
         * 
         * @return builder
         * 
         */
        public Builder kind(Either kind) {
            return kind(Output.of(kind));
        }

        /**
         * @param kind Indicates the kind of algorithm used for partitioning. For MultiHash, multiple partition keys (upto three maximum) are supported for container create
         * 
         * @return builder
         * 
         */
        public Builder kind(String kind) {
            return kind(Either.ofLeft(kind));
        }

        /**
         * @param kind Indicates the kind of algorithm used for partitioning. For MultiHash, multiple partition keys (upto three maximum) are supported for container create
         * 
         * @return builder
         * 
         */
        public Builder kind(PartitionKind kind) {
            return kind(Either.ofRight(kind));
        }

        /**
         * @param paths List of paths using which data within the container can be partitioned
         * 
         * @return builder
         * 
         */
        public Builder paths(@Nullable Output> paths) {
            $.paths = paths;
            return this;
        }

        /**
         * @param paths List of paths using which data within the container can be partitioned
         * 
         * @return builder
         * 
         */
        public Builder paths(List paths) {
            return paths(Output.of(paths));
        }

        /**
         * @param paths List of paths using which data within the container can be partitioned
         * 
         * @return builder
         * 
         */
        public Builder paths(String... paths) {
            return paths(List.of(paths));
        }

        /**
         * @param version Indicates the version of the partition key definition
         * 
         * @return builder
         * 
         */
        public Builder version(@Nullable Output version) {
            $.version = version;
            return this;
        }

        /**
         * @param version Indicates the version of the partition key definition
         * 
         * @return builder
         * 
         */
        public Builder version(Integer version) {
            return version(Output.of(version));
        }

        public ContainerPartitionKeyArgs build() {
            $.kind = Codegen.stringProp("kind").left(PartitionKind.class).output().arg($.kind).def("Hash").getNullable();
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy