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

package com.azure.resourcemanager.securityinsights.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner;
import com.azure.resourcemanager.securityinsights.fluent.models.UebaProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.util.List;

/** Settings with single toggle. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind")
@JsonTypeName("Ueba")
@Fluent
public final class Ueba extends SettingsInner {
    /*
     * Ueba properties
     */
    @JsonProperty(value = "properties")
    private UebaProperties innerProperties;

    /**
     * Get the innerProperties property: Ueba properties.
     *
     * @return the innerProperties value.
     */
    private UebaProperties innerProperties() {
        return this.innerProperties;
    }

    /** {@inheritDoc} */
    @Override
    public Ueba withEtag(String etag) {
        super.withEtag(etag);
        return this;
    }

    /**
     * Get the dataSources property: The relevant data sources that enriched by ueba.
     *
     * @return the dataSources value.
     */
    public List<UebaDataSources> dataSources() {
        return this.innerProperties() == null ? null : this.innerProperties().dataSources();
    }

    /**
     * Set the dataSources property: The relevant data sources that enriched by ueba.
     *
     * @param dataSources the dataSources value to set.
     * @return the Ueba object itself.
     */
    public Ueba withDataSources(List<UebaDataSources> dataSources) {
        if (this.innerProperties() == null) {
            this.innerProperties = new UebaProperties();
        }
        this.innerProperties().withDataSources(dataSources);
        return this;
    }

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