// *** 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.azure.hdinsight.outputs;

import com.pulumi.azure.hdinsight.outputs.KafkaClusterRolesHeadNode;
import com.pulumi.azure.hdinsight.outputs.KafkaClusterRolesKafkaManagementNode;
import com.pulumi.azure.hdinsight.outputs.KafkaClusterRolesWorkerNode;
import com.pulumi.azure.hdinsight.outputs.KafkaClusterRolesZookeeperNode;
import com.pulumi.core.annotations.CustomType;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class KafkaClusterRoles {
    /**
     * @return A `head_node` block as defined above.
     * 
     */
    private KafkaClusterRolesHeadNode headNode;
    /**
     * @return A `kafka_management_node` block as defined below.
     * 
     * &gt; **Note:** This property has been deprecated and will be removed in version 4.0.
     * 
     */
    private @Nullable KafkaClusterRolesKafkaManagementNode kafkaManagementNode;
    /**
     * @return A `worker_node` block as defined below.
     * 
     */
    private KafkaClusterRolesWorkerNode workerNode;
    /**
     * @return A `zookeeper_node` block as defined below.
     * 
     */
    private KafkaClusterRolesZookeeperNode zookeeperNode;

    private KafkaClusterRoles() {}
    /**
     * @return A `head_node` block as defined above.
     * 
     */
    public KafkaClusterRolesHeadNode headNode() {
        return this.headNode;
    }
    /**
     * @return A `kafka_management_node` block as defined below.
     * 
     * &gt; **Note:** This property has been deprecated and will be removed in version 4.0.
     * 
     */
    public Optional<KafkaClusterRolesKafkaManagementNode> kafkaManagementNode() {
        return Optional.ofNullable(this.kafkaManagementNode);
    }
    /**
     * @return A `worker_node` block as defined below.
     * 
     */
    public KafkaClusterRolesWorkerNode workerNode() {
        return this.workerNode;
    }
    /**
     * @return A `zookeeper_node` block as defined below.
     * 
     */
    public KafkaClusterRolesZookeeperNode zookeeperNode() {
        return this.zookeeperNode;
    }

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

    public static Builder builder(KafkaClusterRoles defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private KafkaClusterRolesHeadNode headNode;
        private @Nullable KafkaClusterRolesKafkaManagementNode kafkaManagementNode;
        private KafkaClusterRolesWorkerNode workerNode;
        private KafkaClusterRolesZookeeperNode zookeeperNode;
        public Builder() {}
        public Builder(KafkaClusterRoles defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.headNode = defaults.headNode;
    	      this.kafkaManagementNode = defaults.kafkaManagementNode;
    	      this.workerNode = defaults.workerNode;
    	      this.zookeeperNode = defaults.zookeeperNode;
        }

        @CustomType.Setter
        public Builder headNode(KafkaClusterRolesHeadNode headNode) {
            this.headNode = Objects.requireNonNull(headNode);
            return this;
        }
        @CustomType.Setter
        public Builder kafkaManagementNode(@Nullable KafkaClusterRolesKafkaManagementNode kafkaManagementNode) {
            this.kafkaManagementNode = kafkaManagementNode;
            return this;
        }
        @CustomType.Setter
        public Builder workerNode(KafkaClusterRolesWorkerNode workerNode) {
            this.workerNode = Objects.requireNonNull(workerNode);
            return this;
        }
        @CustomType.Setter
        public Builder zookeeperNode(KafkaClusterRolesZookeeperNode zookeeperNode) {
            this.zookeeperNode = Objects.requireNonNull(zookeeperNode);
            return this;
        }
        public KafkaClusterRoles build() {
            final var o = new KafkaClusterRoles();
            o.headNode = headNode;
            o.kafkaManagementNode = kafkaManagementNode;
            o.workerNode = workerNode;
            o.zookeeperNode = zookeeperNode;
            return o;
        }
    }
}
