// 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 Intelligence Platforms data connector. */
@Fluent
public final class MstiDataConnectorDataTypes {
    /*
     * Data type for Microsoft Threat Intelligence Platforms data connector.
     */
    @JsonProperty(value = "bingSafetyPhishingURL", required = true)
    private MstiDataConnectorDataTypesBingSafetyPhishingUrl bingSafetyPhishingUrl;

    /*
     * Data type for Microsoft Threat Intelligence Platforms data connector.
     */
    @JsonProperty(value = "microsoftEmergingThreatFeed", required = true)
    private MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed microsoftEmergingThreatFeed;

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

    /**
     * Set the bingSafetyPhishingUrl property: Data type for Microsoft Threat Intelligence Platforms data connector.
     *
     * @param bingSafetyPhishingUrl the bingSafetyPhishingUrl value to set.
     * @return the MstiDataConnectorDataTypes object itself.
     */
    public MstiDataConnectorDataTypes withBingSafetyPhishingUrl(
        MstiDataConnectorDataTypesBingSafetyPhishingUrl bingSafetyPhishingUrl) {
        this.bingSafetyPhishingUrl = bingSafetyPhishingUrl;
        return this;
    }

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

    /**
     * Set the microsoftEmergingThreatFeed property: Data type for Microsoft Threat Intelligence Platforms data
     * connector.
     *
     * @param microsoftEmergingThreatFeed the microsoftEmergingThreatFeed value to set.
     * @return the MstiDataConnectorDataTypes object itself.
     */
    public MstiDataConnectorDataTypes withMicrosoftEmergingThreatFeed(
        MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed microsoftEmergingThreatFeed) {
        this.microsoftEmergingThreatFeed = microsoftEmergingThreatFeed;
        return this;
    }

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

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