// 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.AnomalySecurityMLAnalyticsSettingsProperties;
import com.azure.resourcemanager.securityinsights.fluent.models.SecurityMLAnalyticsSettingInner;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.time.Duration;
import java.time.OffsetDateTime;
import java.util.List;
import java.util.UUID;

/** Represents Anomaly Security ML Analytics Settings. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind")
@JsonTypeName("Anomaly")
@Fluent
public final class AnomalySecurityMLAnalyticsSettings extends SecurityMLAnalyticsSettingInner {
    /*
     * Anomaly Security ML Analytics Settings properties
     */
    @JsonProperty(value = "properties")
    private AnomalySecurityMLAnalyticsSettingsProperties innerProperties;

    /**
     * Get the innerProperties property: Anomaly Security ML Analytics Settings properties.
     *
     * @return the innerProperties value.
     */
    private AnomalySecurityMLAnalyticsSettingsProperties innerProperties() {
        return this.innerProperties;
    }

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

    /**
     * Get the description property: The description of the SecurityMLAnalyticsSettings.
     *
     * @return the description value.
     */
    public String description() {
        return this.innerProperties() == null ? null : this.innerProperties().description();
    }

    /**
     * Set the description property: The description of the SecurityMLAnalyticsSettings.
     *
     * @param description the description value to set.
     * @return the AnomalySecurityMLAnalyticsSettings object itself.
     */
    public AnomalySecurityMLAnalyticsSettings withDescription(String description) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties();
        }
        this.innerProperties().withDescription(description);
        return this;
    }

    /**
     * Get the displayName property: The display name for settings created by this SecurityMLAnalyticsSettings.
     *
     * @return the displayName value.
     */
    public String displayName() {
        return this.innerProperties() == null ? null : this.innerProperties().displayName();
    }

    /**
     * Set the displayName property: The display name for settings created by this SecurityMLAnalyticsSettings.
     *
     * @param displayName the displayName value to set.
     * @return the AnomalySecurityMLAnalyticsSettings object itself.
     */
    public AnomalySecurityMLAnalyticsSettings withDisplayName(String displayName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties();
        }
        this.innerProperties().withDisplayName(displayName);
        return this;
    }

    /**
     * Get the enabled property: Determines whether this settings is enabled or disabled.
     *
     * @return the enabled value.
     */
    public Boolean enabled() {
        return this.innerProperties() == null ? null : this.innerProperties().enabled();
    }

    /**
     * Set the enabled property: Determines whether this settings is enabled or disabled.
     *
     * @param enabled the enabled value to set.
     * @return the AnomalySecurityMLAnalyticsSettings object itself.
     */
    public AnomalySecurityMLAnalyticsSettings withEnabled(Boolean enabled) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties();
        }
        this.innerProperties().withEnabled(enabled);
        return this;
    }

    /**
     * Get the lastModifiedUtc property: The last time that this SecurityMLAnalyticsSettings has been modified.
     *
     * @return the lastModifiedUtc value.
     */
    public OffsetDateTime lastModifiedUtc() {
        return this.innerProperties() == null ? null : this.innerProperties().lastModifiedUtc();
    }

    /**
     * Get the requiredDataConnectors property: The required data sources for this SecurityMLAnalyticsSettings.
     *
     * @return the requiredDataConnectors value.
     */
    public List<SecurityMLAnalyticsSettingsDataSource> requiredDataConnectors() {
        return this.innerProperties() == null ? null : this.innerProperties().requiredDataConnectors();
    }

    /**
     * Set the requiredDataConnectors property: The required data sources for this SecurityMLAnalyticsSettings.
     *
     * @param requiredDataConnectors the requiredDataConnectors value to set.
     * @return the AnomalySecurityMLAnalyticsSettings object itself.
     */
    public AnomalySecurityMLAnalyticsSettings withRequiredDataConnectors(
        List<SecurityMLAnalyticsSettingsDataSource> requiredDataConnectors) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties();
        }
        this.innerProperties().withRequiredDataConnectors(requiredDataConnectors);
        return this;
    }

    /**
     * Get the tactics property: The tactics of the SecurityMLAnalyticsSettings.
     *
     * @return the tactics value.
     */
    public List<AttackTactic> tactics() {
        return this.innerProperties() == null ? null : this.innerProperties().tactics();
    }

    /**
     * Set the tactics property: The tactics of the SecurityMLAnalyticsSettings.
     *
     * @param tactics the tactics value to set.
     * @return the AnomalySecurityMLAnalyticsSettings object itself.
     */
    public AnomalySecurityMLAnalyticsSettings withTactics(List<AttackTactic> tactics) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties();
        }
        this.innerProperties().withTactics(tactics);
        return this;
    }

    /**
     * Get the techniques property: The techniques of the SecurityMLAnalyticsSettings.
     *
     * @return the techniques value.
     */
    public List<String> techniques() {
        return this.innerProperties() == null ? null : this.innerProperties().techniques();
    }

    /**
     * Set the techniques property: The techniques of the SecurityMLAnalyticsSettings.
     *
     * @param techniques the techniques value to set.
     * @return the AnomalySecurityMLAnalyticsSettings object itself.
     */
    public AnomalySecurityMLAnalyticsSettings withTechniques(List<String> techniques) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties();
        }
        this.innerProperties().withTechniques(techniques);
        return this;
    }

    /**
     * Get the anomalyVersion property: The anomaly version of the AnomalySecurityMLAnalyticsSettings.
     *
     * @return the anomalyVersion value.
     */
    public String anomalyVersion() {
        return this.innerProperties() == null ? null : this.innerProperties().anomalyVersion();
    }

    /**
     * Set the anomalyVersion property: The anomaly version of the AnomalySecurityMLAnalyticsSettings.
     *
     * @param anomalyVersion the anomalyVersion value to set.
     * @return the AnomalySecurityMLAnalyticsSettings object itself.
     */
    public AnomalySecurityMLAnalyticsSettings withAnomalyVersion(String anomalyVersion) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties();
        }
        this.innerProperties().withAnomalyVersion(anomalyVersion);
        return this;
    }

    /**
     * Get the customizableObservations property: The customizable observations of the
     * AnomalySecurityMLAnalyticsSettings.
     *
     * @return the customizableObservations value.
     */
    public Object customizableObservations() {
        return this.innerProperties() == null ? null : this.innerProperties().customizableObservations();
    }

    /**
     * Set the customizableObservations property: The customizable observations of the
     * AnomalySecurityMLAnalyticsSettings.
     *
     * @param customizableObservations the customizableObservations value to set.
     * @return the AnomalySecurityMLAnalyticsSettings object itself.
     */
    public AnomalySecurityMLAnalyticsSettings withCustomizableObservations(Object customizableObservations) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties();
        }
        this.innerProperties().withCustomizableObservations(customizableObservations);
        return this;
    }

    /**
     * Get the frequency property: The frequency that this SecurityMLAnalyticsSettings will be run.
     *
     * @return the frequency value.
     */
    public Duration frequency() {
        return this.innerProperties() == null ? null : this.innerProperties().frequency();
    }

    /**
     * Set the frequency property: The frequency that this SecurityMLAnalyticsSettings will be run.
     *
     * @param frequency the frequency value to set.
     * @return the AnomalySecurityMLAnalyticsSettings object itself.
     */
    public AnomalySecurityMLAnalyticsSettings withFrequency(Duration frequency) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties();
        }
        this.innerProperties().withFrequency(frequency);
        return this;
    }

    /**
     * Get the settingsStatus property: The anomaly SecurityMLAnalyticsSettings status.
     *
     * @return the settingsStatus value.
     */
    public SettingsStatus settingsStatus() {
        return this.innerProperties() == null ? null : this.innerProperties().settingsStatus();
    }

    /**
     * Set the settingsStatus property: The anomaly SecurityMLAnalyticsSettings status.
     *
     * @param settingsStatus the settingsStatus value to set.
     * @return the AnomalySecurityMLAnalyticsSettings object itself.
     */
    public AnomalySecurityMLAnalyticsSettings withSettingsStatus(SettingsStatus settingsStatus) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties();
        }
        this.innerProperties().withSettingsStatus(settingsStatus);
        return this;
    }

    /**
     * Get the isDefaultSettings property: Determines whether this anomaly security ml analytics settings is a default
     * settings.
     *
     * @return the isDefaultSettings value.
     */
    public Boolean isDefaultSettings() {
        return this.innerProperties() == null ? null : this.innerProperties().isDefaultSettings();
    }

    /**
     * Set the isDefaultSettings property: Determines whether this anomaly security ml analytics settings is a default
     * settings.
     *
     * @param isDefaultSettings the isDefaultSettings value to set.
     * @return the AnomalySecurityMLAnalyticsSettings object itself.
     */
    public AnomalySecurityMLAnalyticsSettings withIsDefaultSettings(Boolean isDefaultSettings) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties();
        }
        this.innerProperties().withIsDefaultSettings(isDefaultSettings);
        return this;
    }

    /**
     * Get the anomalySettingsVersion property: The anomaly settings version of the Anomaly security ml analytics
     * settings that dictates whether job version gets updated or not.
     *
     * @return the anomalySettingsVersion value.
     */
    public Integer anomalySettingsVersion() {
        return this.innerProperties() == null ? null : this.innerProperties().anomalySettingsVersion();
    }

    /**
     * Set the anomalySettingsVersion property: The anomaly settings version of the Anomaly security ml analytics
     * settings that dictates whether job version gets updated or not.
     *
     * @param anomalySettingsVersion the anomalySettingsVersion value to set.
     * @return the AnomalySecurityMLAnalyticsSettings object itself.
     */
    public AnomalySecurityMLAnalyticsSettings withAnomalySettingsVersion(Integer anomalySettingsVersion) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties();
        }
        this.innerProperties().withAnomalySettingsVersion(anomalySettingsVersion);
        return this;
    }

    /**
     * Get the settingsDefinitionId property: The anomaly settings definition Id.
     *
     * @return the settingsDefinitionId value.
     */
    public UUID settingsDefinitionId() {
        return this.innerProperties() == null ? null : this.innerProperties().settingsDefinitionId();
    }

    /**
     * Set the settingsDefinitionId property: The anomaly settings definition Id.
     *
     * @param settingsDefinitionId the settingsDefinitionId value to set.
     * @return the AnomalySecurityMLAnalyticsSettings object itself.
     */
    public AnomalySecurityMLAnalyticsSettings withSettingsDefinitionId(UUID settingsDefinitionId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AnomalySecurityMLAnalyticsSettingsProperties();
        }
        this.innerProperties().withSettingsDefinitionId(settingsDefinitionId);
        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();
        }
    }
}
