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

com.ovhcloud.pulumi.ovh.CloudProjectDatabase.KafkaTopicArgs Maven / Gradle / Ivy

There is a newer version: 1.1.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.ovhcloud.pulumi.ovh.CloudProjectDatabase;

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.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 clusterId;

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

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

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

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

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

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

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

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

    /**
     * @return Number of replication for this topic. Should be superior to 1
     * 
     */
    public Optional> 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 retentionBytes;

    /**
     * @return Number of bytes for the retention of the data for this topic. Inferior to 0 means unlimited
     * 
     */
    public Optional> 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 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> 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 serviceName;

    /**
     * @return The id of the public cloud project. If omitted,
     * the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used.
     * 
     */
    public Output 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 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 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 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 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 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 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 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 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() {
            if ($.clusterId == null) {
                throw new MissingRequiredPropertyException("KafkaTopicArgs", "clusterId");
            }
            if ($.serviceName == null) {
                throw new MissingRequiredPropertyException("KafkaTopicArgs", "serviceName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy