// *** 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.aws.iot.inputs;

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


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

    public static final TopicRuleErrorActionKafkaArgs Empty = new TopicRuleErrorActionKafkaArgs();

    /**
     * Properties of the Apache Kafka producer client. For more info, see the [AWS documentation](https://docs.aws.amazon.com/iot/latest/developerguide/apache-kafka-rule-action.html).
     * 
     */
    @Import(name="clientProperties", required=true)
    private Output<Map<String,String>> clientProperties;

    /**
     * @return Properties of the Apache Kafka producer client. For more info, see the [AWS documentation](https://docs.aws.amazon.com/iot/latest/developerguide/apache-kafka-rule-action.html).
     * 
     */
    public Output<Map<String,String>> clientProperties() {
        return this.clientProperties;
    }

    /**
     * The ARN of Kafka action&#39;s VPC `aws.iot.TopicRuleDestination` .
     * 
     */
    @Import(name="destinationArn", required=true)
    private Output<String> destinationArn;

    /**
     * @return The ARN of Kafka action&#39;s VPC `aws.iot.TopicRuleDestination` .
     * 
     */
    public Output<String> destinationArn() {
        return this.destinationArn;
    }

    /**
     * The Kafka message key.
     * 
     */
    @Import(name="key")
    private @Nullable Output<String> key;

    /**
     * @return The Kafka message key.
     * 
     */
    public Optional<Output<String>> key() {
        return Optional.ofNullable(this.key);
    }

    /**
     * The Kafka message partition.
     * 
     */
    @Import(name="partition")
    private @Nullable Output<String> partition;

    /**
     * @return The Kafka message partition.
     * 
     */
    public Optional<Output<String>> partition() {
        return Optional.ofNullable(this.partition);
    }

    /**
     * The Kafka topic for messages to be sent to the Kafka broker.
     * 
     */
    @Import(name="topic", required=true)
    private Output<String> topic;

    /**
     * @return The Kafka topic for messages to be sent to the Kafka broker.
     * 
     */
    public Output<String> topic() {
        return this.topic;
    }

    private TopicRuleErrorActionKafkaArgs() {}

    private TopicRuleErrorActionKafkaArgs(TopicRuleErrorActionKafkaArgs $) {
        this.clientProperties = $.clientProperties;
        this.destinationArn = $.destinationArn;
        this.key = $.key;
        this.partition = $.partition;
        this.topic = $.topic;
    }

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

    public static final class Builder {
        private TopicRuleErrorActionKafkaArgs $;

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

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

        /**
         * @param clientProperties Properties of the Apache Kafka producer client. For more info, see the [AWS documentation](https://docs.aws.amazon.com/iot/latest/developerguide/apache-kafka-rule-action.html).
         * 
         * @return builder
         * 
         */
        public Builder clientProperties(Output<Map<String,String>> clientProperties) {
            $.clientProperties = clientProperties;
            return this;
        }

        /**
         * @param clientProperties Properties of the Apache Kafka producer client. For more info, see the [AWS documentation](https://docs.aws.amazon.com/iot/latest/developerguide/apache-kafka-rule-action.html).
         * 
         * @return builder
         * 
         */
        public Builder clientProperties(Map<String,String> clientProperties) {
            return clientProperties(Output.of(clientProperties));
        }

        /**
         * @param destinationArn The ARN of Kafka action&#39;s VPC `aws.iot.TopicRuleDestination` .
         * 
         * @return builder
         * 
         */
        public Builder destinationArn(Output<String> destinationArn) {
            $.destinationArn = destinationArn;
            return this;
        }

        /**
         * @param destinationArn The ARN of Kafka action&#39;s VPC `aws.iot.TopicRuleDestination` .
         * 
         * @return builder
         * 
         */
        public Builder destinationArn(String destinationArn) {
            return destinationArn(Output.of(destinationArn));
        }

        /**
         * @param key The Kafka message key.
         * 
         * @return builder
         * 
         */
        public Builder key(@Nullable Output<String> key) {
            $.key = key;
            return this;
        }

        /**
         * @param key The Kafka message key.
         * 
         * @return builder
         * 
         */
        public Builder key(String key) {
            return key(Output.of(key));
        }

        /**
         * @param partition The Kafka message partition.
         * 
         * @return builder
         * 
         */
        public Builder partition(@Nullable Output<String> partition) {
            $.partition = partition;
            return this;
        }

        /**
         * @param partition The Kafka message partition.
         * 
         * @return builder
         * 
         */
        public Builder partition(String partition) {
            return partition(Output.of(partition));
        }

        /**
         * @param topic The Kafka topic for messages to be sent to the Kafka broker.
         * 
         * @return builder
         * 
         */
        public Builder topic(Output<String> topic) {
            $.topic = topic;
            return this;
        }

        /**
         * @param topic The Kafka topic for messages to be sent to the Kafka broker.
         * 
         * @return builder
         * 
         */
        public Builder topic(String topic) {
            return topic(Output.of(topic));
        }

        public TopicRuleErrorActionKafkaArgs build() {
            $.clientProperties = Objects.requireNonNull($.clientProperties, "expected parameter 'clientProperties' to be non-null");
            $.destinationArn = Objects.requireNonNull($.destinationArn, "expected parameter 'destinationArn' to be non-null");
            $.topic = Objects.requireNonNull($.topic, "expected parameter 'topic' to be non-null");
            return $;
        }
    }

}
