// 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 Office Microsoft Project data connector. */
@Fluent
public final class Office365ProjectConnectorDataTypes {
    /*
     * Logs data type.
     */
    @JsonProperty(value = "logs", required = true)
    private Office365ProjectConnectorDataTypesLogs logs;

    /**
     * Get the logs property: Logs data type.
     *
     * @return the logs value.
     */
    public Office365ProjectConnectorDataTypesLogs logs() {
        return this.logs;
    }

    /**
     * Set the logs property: Logs data type.
     *
     * @param logs the logs value to set.
     * @return the Office365ProjectConnectorDataTypes object itself.
     */
    public Office365ProjectConnectorDataTypes withLogs(Office365ProjectConnectorDataTypesLogs logs) {
        this.logs = logs;
        return this;
    }

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

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