// 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.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The available data types for Microsoft Threat Protection Platforms data connector. */
@Fluent
public final class MtpDataConnectorDataTypes {
    /*
     * Data type for Microsoft Threat Protection Platforms data connector.
     */
    @JsonProperty(value = "incidents", required = true)
    private MtpDataConnectorDataTypesIncidents incidents;

    /**
     * Get the incidents property: Data type for Microsoft Threat Protection Platforms data connector.
     *
     * @return the incidents value.
     */
    public MtpDataConnectorDataTypesIncidents incidents() {
        return this.incidents;
    }

    /**
     * Set the incidents property: Data type for Microsoft Threat Protection Platforms data connector.
     *
     * @param incidents the incidents value to set.
     * @return the MtpDataConnectorDataTypes object itself.
     */
    public MtpDataConnectorDataTypes withIncidents(MtpDataConnectorDataTypesIncidents incidents) {
        this.incidents = incidents;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (incidents() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property incidents in model MtpDataConnectorDataTypes"));
        } else {
            incidents().validate();
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(MtpDataConnectorDataTypes.class);
}
