// 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.AatpDataConnectorProperties;
import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/** Represents AATP (Azure Advanced Threat Protection) data connector. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind")
@JsonTypeName("AzureAdvancedThreatProtection")
@Fluent
public final class AatpDataConnector extends DataConnectorInner {
    /*
     * AATP (Azure Advanced Threat Protection) data connector properties.
     */
    @JsonProperty(value = "properties")
    private AatpDataConnectorProperties innerProperties;

    /**
     * Get the innerProperties property: AATP (Azure Advanced Threat Protection) data connector properties.
     *
     * @return the innerProperties value.
     */
    private AatpDataConnectorProperties innerProperties() {
        return this.innerProperties;
    }

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

    /**
     * Get the dataTypes property: The available data types for the connector.
     *
     * @return the dataTypes value.
     */
    public AlertsDataTypeOfDataConnector dataTypes() {
        return this.innerProperties() == null ? null : this.innerProperties().dataTypes();
    }

    /**
     * Set the dataTypes property: The available data types for the connector.
     *
     * @param dataTypes the dataTypes value to set.
     * @return the AatpDataConnector object itself.
     */
    public AatpDataConnector withDataTypes(AlertsDataTypeOfDataConnector dataTypes) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AatpDataConnectorProperties();
        }
        this.innerProperties().withDataTypes(dataTypes);
        return this;
    }

    /**
     * Get the tenantId property: The tenant id to connect to, and get the data from.
     *
     * @return the tenantId value.
     */
    public String tenantId() {
        return this.innerProperties() == null ? null : this.innerProperties().tenantId();
    }

    /**
     * Set the tenantId property: The tenant id to connect to, and get the data from.
     *
     * @param tenantId the tenantId value to set.
     * @return the AatpDataConnector object itself.
     */
    public AatpDataConnector withTenantId(String tenantId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AatpDataConnectorProperties();
        }
        this.innerProperties().withTenantId(tenantId);
        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();
        }
    }
}
