// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.hdinsight.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** The kafka rest proxy configuration which contains AAD security group information. */
@Fluent
public final class KafkaRestProperties {
    /*
     * The information of AAD security group.
     */
    @JsonProperty(value = "clientGroupInfo")
    private ClientGroupInfo clientGroupInfo;

    /*
     * The configurations that need to be overriden.
     */
    @JsonProperty(value = "configurationOverride")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> configurationOverride;

    /** Creates an instance of KafkaRestProperties class. */
    public KafkaRestProperties() {
    }

    /**
     * Get the clientGroupInfo property: The information of AAD security group.
     *
     * @return the clientGroupInfo value.
     */
    public ClientGroupInfo clientGroupInfo() {
        return this.clientGroupInfo;
    }

    /**
     * Set the clientGroupInfo property: The information of AAD security group.
     *
     * @param clientGroupInfo the clientGroupInfo value to set.
     * @return the KafkaRestProperties object itself.
     */
    public KafkaRestProperties withClientGroupInfo(ClientGroupInfo clientGroupInfo) {
        this.clientGroupInfo = clientGroupInfo;
        return this;
    }

    /**
     * Get the configurationOverride property: The configurations that need to be overriden.
     *
     * @return the configurationOverride value.
     */
    public Map<String, String> configurationOverride() {
        return this.configurationOverride;
    }

    /**
     * Set the configurationOverride property: The configurations that need to be overriden.
     *
     * @param configurationOverride the configurationOverride value to set.
     * @return the KafkaRestProperties object itself.
     */
    public KafkaRestProperties withConfigurationOverride(Map<String, String> configurationOverride) {
        this.configurationOverride = configurationOverride;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (clientGroupInfo() != null) {
            clientGroupInfo().validate();
        }
    }
}
