sdk/java/src/main/java/com/pulumi/ovh/CloudProjectDatabase/KafkaTopicArgs.java
<gh_stars>0// *** 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.ovh.CloudProjectDatabase;

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


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

    public static final KafkaTopicArgs Empty = new KafkaTopicArgs();

    /**
     * Cluster ID.
     * 
     */
    @Import(name="clusterId", required=true)
    private Output<String> clusterId;

    /**
     * @return Cluster ID.
     * 
     */
    public Output<String> clusterId() {
        return this.clusterId;
    }

    /**
     * Minimum insync replica accepted for this topic. Should be superior to 0
     * 
     */
    @Import(name="minInsyncReplicas")
    private @Nullable Output<Integer> minInsyncReplicas;

    /**
     * @return Minimum insync replica accepted for this topic. Should be superior to 0
     * 
     */
    public Optional<Output<Integer>> minInsyncReplicas() {
        return Optional.ofNullable(this.minInsyncReplicas);
    }

    /**
     * Name of the topic. No spaces allowed.
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return Name of the topic. No spaces allowed.
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Number of partitions for this topic. Should be superior to 0
     * 
     */
    @Import(name="partitions")
    private @Nullable Output<Integer> partitions;

    /**
     * @return Number of partitions for this topic. Should be superior to 0
     * 
     */
    public Optional<Output<Integer>> partitions() {
        return Optional.ofNullable(this.partitions);
    }

    /**
     * Number of replication for this topic. Should be superior to 1
     * 
     */
    @Import(name="replication")
    private @Nullable Output<Integer> replication;

    /**
     * @return Number of replication for this topic. Should be superior to 1
     * 
     */
    public Optional<Output<Integer>> replication() {
        return Optional.ofNullable(this.replication);
    }

    /**
     * Number of bytes for the retention of the data for this topic. Inferior to 0 means unlimited
     * 
     */
    @Import(name="retentionBytes")
    private @Nullable Output<Integer> retentionBytes;

    /**
     * @return Number of bytes for the retention of the data for this topic. Inferior to 0 means unlimited
     * 
     */
    public Optional<Output<Integer>> retentionBytes() {
        return Optional.ofNullable(this.retentionBytes);
    }

    /**
     * Number of hours for the retention of the data for this topic. Should be superior to -2. Inferior to 0 means unlimited
     * 
     */
    @Import(name="retentionHours")
    private @Nullable Output<Integer> retentionHours;

    /**
     * @return Number of hours for the retention of the data for this topic. Should be superior to -2. Inferior to 0 means unlimited
     * 
     */
    public Optional<Output<Integer>> retentionHours() {
        return Optional.ofNullable(this.retentionHours);
    }

    /**
     * The id of the public cloud project. If omitted,
     * the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used.
     * 
     */
    @Import(name="serviceName", required=true)
    private Output<String> serviceName;

    /**
     * @return The id of the public cloud project. If omitted,
     * the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used.
     * 
     */
    public Output<String> serviceName() {
        return this.serviceName;
    }

    private KafkaTopicArgs() {}

    private KafkaTopicArgs(KafkaTopicArgs $) {
        this.clusterId = $.clusterId;
        this.minInsyncReplicas = $.minInsyncReplicas;
        this.name = $.name;
        this.partitions = $.partitions;
        this.replication = $.replication;
        this.retentionBytes = $.retentionBytes;
        this.retentionHours = $.retentionHours;
        this.serviceName = $.serviceName;
    }

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

    public static final class Builder {
        private KafkaTopicArgs $;

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

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

        /**
         * @param clusterId Cluster ID.
         * 
         * @return builder
         * 
         */
        public Builder clusterId(Output<String> clusterId) {
            $.clusterId = clusterId;
            return this;
        }

        /**
         * @param clusterId Cluster ID.
         * 
         * @return builder
         * 
         */
        public Builder clusterId(String clusterId) {
            return clusterId(Output.of(clusterId));
        }

        /**
         * @param minInsyncReplicas Minimum insync replica accepted for this topic. Should be superior to 0
         * 
         * @return builder
         * 
         */
        public Builder minInsyncReplicas(@Nullable Output<Integer> minInsyncReplicas) {
            $.minInsyncReplicas = minInsyncReplicas;
            return this;
        }

        /**
         * @param minInsyncReplicas Minimum insync replica accepted for this topic. Should be superior to 0
         * 
         * @return builder
         * 
         */
        public Builder minInsyncReplicas(Integer minInsyncReplicas) {
            return minInsyncReplicas(Output.of(minInsyncReplicas));
        }

        /**
         * @param name Name of the topic. No spaces allowed.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Name of the topic. No spaces allowed.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param partitions Number of partitions for this topic. Should be superior to 0
         * 
         * @return builder
         * 
         */
        public Builder partitions(@Nullable Output<Integer> partitions) {
            $.partitions = partitions;
            return this;
        }

        /**
         * @param partitions Number of partitions for this topic. Should be superior to 0
         * 
         * @return builder
         * 
         */
        public Builder partitions(Integer partitions) {
            return partitions(Output.of(partitions));
        }

        /**
         * @param replication Number of replication for this topic. Should be superior to 1
         * 
         * @return builder
         * 
         */
        public Builder replication(@Nullable Output<Integer> replication) {
            $.replication = replication;
            return this;
        }

        /**
         * @param replication Number of replication for this topic. Should be superior to 1
         * 
         * @return builder
         * 
         */
        public Builder replication(Integer replication) {
            return replication(Output.of(replication));
        }

        /**
         * @param retentionBytes Number of bytes for the retention of the data for this topic. Inferior to 0 means unlimited
         * 
         * @return builder
         * 
         */
        public Builder retentionBytes(@Nullable Output<Integer> retentionBytes) {
            $.retentionBytes = retentionBytes;
            return this;
        }

        /**
         * @param retentionBytes Number of bytes for the retention of the data for this topic. Inferior to 0 means unlimited
         * 
         * @return builder
         * 
         */
        public Builder retentionBytes(Integer retentionBytes) {
            return retentionBytes(Output.of(retentionBytes));
        }

        /**
         * @param retentionHours Number of hours for the retention of the data for this topic. Should be superior to -2. Inferior to 0 means unlimited
         * 
         * @return builder
         * 
         */
        public Builder retentionHours(@Nullable Output<Integer> retentionHours) {
            $.retentionHours = retentionHours;
            return this;
        }

        /**
         * @param retentionHours Number of hours for the retention of the data for this topic. Should be superior to -2. Inferior to 0 means unlimited
         * 
         * @return builder
         * 
         */
        public Builder retentionHours(Integer retentionHours) {
            return retentionHours(Output.of(retentionHours));
        }

        /**
         * @param serviceName The id of the public cloud project. If omitted,
         * the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used.
         * 
         * @return builder
         * 
         */
        public Builder serviceName(Output<String> serviceName) {
            $.serviceName = serviceName;
            return this;
        }

        /**
         * @param serviceName The id of the public cloud project. If omitted,
         * the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used.
         * 
         * @return builder
         * 
         */
        public Builder serviceName(String serviceName) {
            return serviceName(Output.of(serviceName));
        }

        public KafkaTopicArgs build() {
            $.clusterId = Objects.requireNonNull($.clusterId, "expected parameter 'clusterId' to be non-null");
            $.serviceName = Objects.requireNonNull($.serviceName, "expected parameter 'serviceName' to be non-null");
            return $;
        }
    }

}
