// 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.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.securityinsights.models.AadDataConnector;
import com.azure.resourcemanager.securityinsights.models.AatpDataConnector;
import com.azure.resourcemanager.securityinsights.models.AscDataConnector;
import com.azure.resourcemanager.securityinsights.models.AwsCloudTrailDataConnector;
import com.azure.resourcemanager.securityinsights.models.AwsS3DataConnector;
import com.azure.resourcemanager.securityinsights.models.CodelessApiPollingDataConnector;
import com.azure.resourcemanager.securityinsights.models.CodelessUiDataConnector;
import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnector;
import com.azure.resourcemanager.securityinsights.models.IoTDataConnector;
import com.azure.resourcemanager.securityinsights.models.McasDataConnector;
import com.azure.resourcemanager.securityinsights.models.MdatpDataConnector;
import com.azure.resourcemanager.securityinsights.models.MstiDataConnector;
import com.azure.resourcemanager.securityinsights.models.MtpDataConnector;
import com.azure.resourcemanager.securityinsights.models.Office365ProjectDataConnector;
import com.azure.resourcemanager.securityinsights.models.OfficeAtpDataConnector;
import com.azure.resourcemanager.securityinsights.models.OfficeDataConnector;
import com.azure.resourcemanager.securityinsights.models.OfficeIrmDataConnector;
import com.azure.resourcemanager.securityinsights.models.OfficePowerBIDataConnector;
import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag;
import com.azure.resourcemanager.securityinsights.models.TIDataConnector;
import com.azure.resourcemanager.securityinsights.models.TiTaxiiDataConnector;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/** Data connector. */
@JsonTypeInfo(
    use = JsonTypeInfo.Id.NAME,
    include = JsonTypeInfo.As.PROPERTY,
    property = "kind",
    defaultImpl = DataConnectorInner.class)
@JsonTypeName("DataConnector")
@JsonSubTypes({
    @JsonSubTypes.Type(name = "AzureActiveDirectory", value = AadDataConnector.class),
    @JsonSubTypes.Type(name = "MicrosoftThreatIntelligence", value = MstiDataConnector.class),
    @JsonSubTypes.Type(name = "MicrosoftThreatProtection", value = MtpDataConnector.class),
    @JsonSubTypes.Type(name = "AzureAdvancedThreatProtection", value = AatpDataConnector.class),
    @JsonSubTypes.Type(name = "AzureSecurityCenter", value = AscDataConnector.class),
    @JsonSubTypes.Type(name = "AmazonWebServicesCloudTrail", value = AwsCloudTrailDataConnector.class),
    @JsonSubTypes.Type(name = "AmazonWebServicesS3", value = AwsS3DataConnector.class),
    @JsonSubTypes.Type(name = "MicrosoftCloudAppSecurity", value = McasDataConnector.class),
    @JsonSubTypes.Type(name = "Dynamics365", value = Dynamics365DataConnector.class),
    @JsonSubTypes.Type(name = "OfficeATP", value = OfficeAtpDataConnector.class),
    @JsonSubTypes.Type(name = "Office365Project", value = Office365ProjectDataConnector.class),
    @JsonSubTypes.Type(name = "OfficePowerBI", value = OfficePowerBIDataConnector.class),
    @JsonSubTypes.Type(name = "OfficeIRM", value = OfficeIrmDataConnector.class),
    @JsonSubTypes.Type(name = "MicrosoftDefenderAdvancedThreatProtection", value = MdatpDataConnector.class),
    @JsonSubTypes.Type(name = "Office365", value = OfficeDataConnector.class),
    @JsonSubTypes.Type(name = "ThreatIntelligence", value = TIDataConnector.class),
    @JsonSubTypes.Type(name = "ThreatIntelligenceTaxii", value = TiTaxiiDataConnector.class),
    @JsonSubTypes.Type(name = "IOT", value = IoTDataConnector.class),
    @JsonSubTypes.Type(name = "GenericUI", value = CodelessUiDataConnector.class),
    @JsonSubTypes.Type(name = "APIPolling", value = CodelessApiPollingDataConnector.class)
})
@Fluent
public class DataConnectorInner extends ResourceWithEtag {
    /** {@inheritDoc} */
    @Override
    public DataConnectorInner withEtag(String etag) {
        super.withEtag(etag);
        return this;
    }

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