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

com.pulumi.azurenative.iotoperationsmq.inputs.KafkaToMqttRoutesArgs Maven / Gradle / Ivy

There is a newer version: 2.82.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.iotoperationsmq.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
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;


/**
 * Kafka to Mqtt route properties
 * 
 */
public final class KafkaToMqttRoutesArgs extends com.pulumi.resources.ResourceArgs {

    public static final KafkaToMqttRoutesArgs Empty = new KafkaToMqttRoutesArgs();

    /**
     * The consumer group id to use.
     * 
     */
    @Import(name="consumerGroupId")
    private @Nullable Output consumerGroupId;

    /**
     * @return The consumer group id to use.
     * 
     */
    public Optional> consumerGroupId() {
        return Optional.ofNullable(this.consumerGroupId);
    }

    /**
     * The kafka topic to pull from.
     * 
     */
    @Import(name="kafkaTopic", required=true)
    private Output kafkaTopic;

    /**
     * @return The kafka topic to pull from.
     * 
     */
    public Output kafkaTopic() {
        return this.kafkaTopic;
    }

    /**
     * The mqtt topic to publish to.
     * 
     */
    @Import(name="mqttTopic", required=true)
    private Output mqttTopic;

    /**
     * @return The mqtt topic to publish to.
     * 
     */
    public Output mqttTopic() {
        return this.mqttTopic;
    }

    /**
     * The name of the route.
     * 
     */
    @Import(name="name", required=true)
    private Output name;

    /**
     * @return The name of the route.
     * 
     */
    public Output name() {
        return this.name;
    }

    /**
     * The qos to use for mqtt.
     * 
     */
    @Import(name="qos")
    private @Nullable Output qos;

    /**
     * @return The qos to use for mqtt.
     * 
     */
    public Optional> qos() {
        return Optional.ofNullable(this.qos);
    }

    private KafkaToMqttRoutesArgs() {}

    private KafkaToMqttRoutesArgs(KafkaToMqttRoutesArgs $) {
        this.consumerGroupId = $.consumerGroupId;
        this.kafkaTopic = $.kafkaTopic;
        this.mqttTopic = $.mqttTopic;
        this.name = $.name;
        this.qos = $.qos;
    }

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

    public static final class Builder {
        private KafkaToMqttRoutesArgs $;

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

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

        /**
         * @param consumerGroupId The consumer group id to use.
         * 
         * @return builder
         * 
         */
        public Builder consumerGroupId(@Nullable Output consumerGroupId) {
            $.consumerGroupId = consumerGroupId;
            return this;
        }

        /**
         * @param consumerGroupId The consumer group id to use.
         * 
         * @return builder
         * 
         */
        public Builder consumerGroupId(String consumerGroupId) {
            return consumerGroupId(Output.of(consumerGroupId));
        }

        /**
         * @param kafkaTopic The kafka topic to pull from.
         * 
         * @return builder
         * 
         */
        public Builder kafkaTopic(Output kafkaTopic) {
            $.kafkaTopic = kafkaTopic;
            return this;
        }

        /**
         * @param kafkaTopic The kafka topic to pull from.
         * 
         * @return builder
         * 
         */
        public Builder kafkaTopic(String kafkaTopic) {
            return kafkaTopic(Output.of(kafkaTopic));
        }

        /**
         * @param mqttTopic The mqtt topic to publish to.
         * 
         * @return builder
         * 
         */
        public Builder mqttTopic(Output mqttTopic) {
            $.mqttTopic = mqttTopic;
            return this;
        }

        /**
         * @param mqttTopic The mqtt topic to publish to.
         * 
         * @return builder
         * 
         */
        public Builder mqttTopic(String mqttTopic) {
            return mqttTopic(Output.of(mqttTopic));
        }

        /**
         * @param name The name of the route.
         * 
         * @return builder
         * 
         */
        public Builder name(Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name of the route.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param qos The qos to use for mqtt.
         * 
         * @return builder
         * 
         */
        public Builder qos(@Nullable Output qos) {
            $.qos = qos;
            return this;
        }

        /**
         * @param qos The qos to use for mqtt.
         * 
         * @return builder
         * 
         */
        public Builder qos(Integer qos) {
            return qos(Output.of(qos));
        }

        public KafkaToMqttRoutesArgs build() {
            if ($.kafkaTopic == null) {
                throw new MissingRequiredPropertyException("KafkaToMqttRoutesArgs", "kafkaTopic");
            }
            if ($.mqttTopic == null) {
                throw new MissingRequiredPropertyException("KafkaToMqttRoutesArgs", "mqttTopic");
            }
            if ($.name == null) {
                throw new MissingRequiredPropertyException("KafkaToMqttRoutesArgs", "name");
            }
            $.qos = Codegen.integerProp("qos").output().arg($.qos).def(1).getNullable();
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy